/* Main layout — Forma Scenes teaser */

html {
  background-color: #020408;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg) url("../assets/images/space-bg.png") center / cover no-repeat;
  overflow-x: clip;
}

body.is-scrolling {
  cursor: url("../assets/images/apple-scroll-cursor.png") 8 8, auto;
}

@media (max-width: 767px) {
  body {
    font-size: 0.9375rem;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 10000;
  padding: 0.75rem 1rem;
  background: var(--color-accent);
  color: var(--color-bg);
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ----- Navigation ----- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: rgba(2, 4, 8, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-nav__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-nav__brand img,
.site-nav__brand svg {
  height: 28px;
  width: auto;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

.site-nav__links a {
  display: inline-block;
  font-size: var(--text-caption);
  letter-spacing: var(--caption-tracking);
  text-transform: uppercase;
  font-weight: 400;
  color: var(--color-muted);
  text-decoration: none;
  text-underline-offset: 0.2em;
  transition:
    color 0.2s var(--ease-out),
    text-decoration-color 0.2s var(--ease-out);
}

.site-nav__links a:hover,
.site-nav__links a:active {
  color: var(--color-accent);
}

.site-nav__links a:active {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
}

.site-nav__links a[aria-current="page"] {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
}

/* Hamburger */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: transform 0.25s var(--ease-out);
}

.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease-out);
}

.nav-toggle__bar::before {
  top: -7px;
}

.nav-toggle__bar::after {
  top: 7px;
}

.site-nav.is-open .nav-toggle__bar {
  background: transparent;
}

.site-nav.is-open .nav-toggle__bar::before {
  transform: translateY(7px) rotate(45deg);
}

.site-nav.is-open .nav-toggle__bar::after {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    background: rgba(2, 4, 8, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      transform 0.35s var(--ease-out),
      opacity 0.25s ease,
      visibility 0.25s;
  }

  .site-nav.is-open .site-nav__links {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .site-nav__links a {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
}

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__poster-fallback {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 10, 10, 0.3) 0%, rgba(10, 10, 10, 0.85) 100%),
    url("../assets/video/hero-poster.jpg") center / cover no-repeat;
  z-index: 0;
}

.hero__media .hero__video {
  position: relative;
  z-index: 1;
}

.hero__vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    ellipse 70% 60% at 50% 45%,
    transparent 30%,
    rgba(10, 10, 10, 0.5) 100%
  );
}

/* ----- Scenes / features ----- */
.scenes {
  position: relative;
  /* Pinned narrative length is driven by JS (≈3× viewport); keep min height for layout */
  min-height: 280vh;
  background-image: url("../assets/images/space-bg.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.scenes__inner {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  transition: background-color 0.4s ease;
}

.scenes__bg {
  position: absolute;
  inset: -20% 0;
  background-image: url("../assets/images/space-bg.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  will-change: transform, opacity;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.scenes__bg.is-settled {
  opacity: 0;
}

.scenes__bg-fallback {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

.scenes__stage {
  position: relative;
  width: min(100%, var(--content-max));
  margin: 0 auto;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--nav-height) clamp(1rem, 4vw, 2rem) 5rem;
}

.scenes__svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.scenes__composition {
  position: relative;
  width: min(90vw, 900px);
  aspect-ratio: 16 / 12;
  max-height: min(70vh, 640px);
  --scenes-apple-px: 120px;
  --scenes-prop-max: calc(var(--scenes-apple-px) * 1.1);
  /*
   * 3-column grid (logical): col1 ≈ 0–33% left props, col2 ≈ 33–66% apple only,
   * col3 ≈ 66–100% right props. Props are positioned within columns 1 and 3 only.
   */
}

.scenes__motion-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 12;
  overflow: visible;
}

.scenes__motion-svg path {
  vector-effect: non-scaling-stroke;
}

.scenes__object {
  position: absolute;
  opacity: 0;
  transform: translateX(80px) scale(0.95);
  filter: drop-shadow(4px 12px 24px rgba(0, 0, 0, 0.45));
  will-change: transform, opacity;
}

.scenes__object picture,
.scenes__object img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: var(--scenes-prop-max, 132px);
  object-fit: contain;
  margin-inline: auto;
}

/* Prop positions: scripts/scroll.js — random left/right bands, center corridor kept clear for apple */

.scenes__object--from-left {
  transform: translateX(-80px) scale(0.95);
}

.scenes.is-reduced .scenes__object {
  opacity: 1;
  transform: none;
}

/* Mobile: enter from below */
@media (max-width: 374px) {
  .scenes__object {
    transform: translateY(48px) scale(0.95);
  }

  .scenes__object--from-left {
    transform: translateY(48px) scale(0.95);
  }
}

/* Tablet: hide some objects via class from JS */
.scenes__object.is-tablet-hidden {
  display: none;
}

/* Apple */
.scenes__apple-wrap {
  position: absolute;
  left: 50%;
  top: 0;
  width: var(--scenes-apple-px, 120px);
  height: var(--scenes-apple-px, 120px);
  margin-left: calc(var(--scenes-apple-px, 120px) / -2);
  z-index: 20;
  pointer-events: none;
  filter: drop-shadow(6px 16px 28px rgba(139, 26, 21, 0.55));
}

.scenes__apple-wrap.has-img-fail .scenes__apple {
  display: none;
}

.scenes__apple-wrap.has-img-fail .scenes__apple-fallback {
  display: block;
}

.scenes__apple {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.scenes__apple-fallback {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50% 50% 42% 42%;
  background: radial-gradient(
    circle at 35% 30%,
    #ff5c72 0%,
    var(--color-accent) 45%,
    var(--color-accent-2) 100%
  );
  box-shadow:
    inset -8px -12px 20px rgba(0, 0, 0, 0.35),
    inset 4px 4px 12px rgba(255, 255, 255, 0.12);
}

.scenes__caption {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 0 clamp(1rem, 4vw, 2rem) 2.5rem;
  max-width: min(42rem, 92vw);
  margin-inline: auto;
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 3.6vw, 2.25rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-text);
  opacity: 1;
  transition: opacity 0.5s ease;
}

.scenes__caption p {
  margin: 0;
}

/* ----- Process panel (Agenz-style: dark split panel + five scroll steps) ----- */
.process-panel {
  position: relative;
  background-image: url("../assets/images/space-bg.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

#process {
  scroll-margin-top: calc(var(--nav-height) + 12px);
}

.process-panel__pin {
  position: relative;
  width: 100%;
  padding: 0 clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem);
}

.process-panel__frame {
  max-width: min(calc(var(--content-max) + 2rem), 96vw);
  margin: 0 auto;
  min-height: min(84vh, 760px);
  background: rgba(7, 7, 7, 0.86);
  border: 1px solid rgb(229 2 61 / 0.3);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  overflow: hidden;
}

.process-panel__left {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  /* Top/side padding matches .process-row so PROCESS + title line up with Step kicker + title */
  padding: clamp(1rem, 2.5vw, 1.5rem) clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3rem);
  border-right: 1px solid rgb(229 2 61 / 0.3);
  min-height: 0;
}

.process-panel__media {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: min(36vh, 320px);
  margin-top: clamp(1rem, 2.5vw, 1.5rem);
  border-radius: clamp(10px, 1.5vw, 16px);
  background: #0a0a0a;
  border: none;
  overflow: hidden;
}

.process-panel__figure {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  place-items: stretch;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.5s var(--ease-out),
    visibility 0s linear 0.5s;
  pointer-events: none;
  will-change: opacity;
}

.process-panel__figure.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
  transition:
    opacity 0.5s var(--ease-out),
    visibility 0s linear 0s;
}

.process-panel__figure img,
.process-panel__figure video {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  filter: none;
}

.process-panel__eyebrow {
  /* Same rhythm as .process-row__kicker → .process-row__title (0.85rem) */
  margin: 0 0 0.85rem;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.process-panel__eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.5rem;
  border-radius: 1px;
  background: var(--color-accent);
  vertical-align: middle;
}

.process-panel__title {
  margin: 0;
  max-width: 12ch;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: #efefef;
}

.process-panel__title span {
  color: var(--color-accent);
}

.process-panel__right {
  --process-accent: var(--color-accent);

  position: relative;
  display: grid;
  grid-template-rows: repeat(5, 1fr);
}

.process-row {
  cursor: pointer;
  padding: clamp(1rem, 2.5vw, 1.5rem) clamp(1.2rem, 3vw, 1.75rem);
  border-bottom: 1px solid rgb(229 2 61 / 0.3);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transform: translateX(0);
  box-shadow: inset 3px 0 0 transparent;
  transition:
    background-color 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out),
    transform 0.35s var(--ease-out);
}

.process-row:last-child {
  border-bottom: none;
}

.process-row__kicker {
  margin: 0;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
}

.process-row__kicker::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 0.45rem;
  border-radius: 1px;
  background: currentColor;
  vertical-align: middle;
}

.process-row__title {
  margin: 0.85rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 2.1rem);
  font-weight: 500;
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.7);
}

.process-row__desc {
  margin: 0.65rem 0 0;
  width: 100%;
  max-width: none;
  font-size: 0.875rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.52);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.25s ease, max-height 0.35s ease;
}

.process-row:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

/* Scroll-selected (.is-active) matches click-accent look; shared hover tint */
.process-row.is-active,
.process-row.process-row--accent {
  box-shadow: inset 3px 0 0 var(--process-accent);
  background-color: rgb(229 2 61 / 0.08);
}

.process-row.is-active {
  transform: translateX(0);
}

.process-row.is-active .process-row__kicker,
.process-row.process-row--accent .process-row__kicker {
  color: var(--process-accent);
}

.process-row.is-active .process-row__kicker::before,
.process-row.process-row--accent .process-row__kicker::before {
  background: var(--process-accent);
}

.process-row.is-active .process-row__title {
  color: #f5f5f5;
}

.process-row:hover:not(.is-active):not(.process-row--accent) {
  background-color: rgb(229 2 61 / 0.06);
}

.process-row.is-active:hover,
.process-row.process-row--accent:hover {
  background-color: rgb(229 2 61 / 0.14);
}

.process-row.is-active .process-row__desc {
  opacity: 1;
  max-height: min(70vh, 56rem);
}

@media (max-width: 960px) {
  .process-panel__frame {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .process-panel__left {
    border-right: none;
    border-bottom: 1px solid rgb(229 2 61 / 0.3);
    min-height: 36vh;
  }

  .process-panel__media {
    min-height: min(28vh, 240px);
    margin-top: 0;
    flex: none;
  }

  .process-panel__right {
    grid-template-rows: none;
  }

  .process-row {
    min-height: 7.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .process-row {
    transform: none !important;
  }

  .process-row__desc {
    opacity: 1 !important;
    max-height: none !important;
  }
}

/* ----- Scenes showcase strip (Agenz-style) ----- */
.scenes-reveal {
  position: relative;
  background: #070707;
  padding-bottom: 0;
}

.scenes-reveal__intro {
  max-width: min(calc(var(--content-max) + 2rem), 96vw);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 1.75rem);
  text-align: center;
}

.scenes-reveal__eyebrow {
  margin: 0;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
}

.scenes-reveal__eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.5rem;
  border-radius: 1px;
  background: var(--color-accent);
  vertical-align: middle;
}

.scenes-reveal__title {
  margin: 0.75rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: #efefef;
}

.scenes-reveal__title span {
  color: var(--color-accent);
}

.scenes-reveal__pin {
  position: relative;
  width: 100%;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

.scenes-reveal__stack {
  max-width: min(calc(var(--content-max) + 2rem), 96vw);
  margin: 0 auto;
  padding-bottom: 0;
}

/* Sticky slabs: lower cards slide up and stack over previous (Agenz-style cover) */
.scene-card {
  position: sticky;
  top: calc(var(--nav-height) + 0.75rem);
  height: min(76vh, 680px);
  max-height: calc(100svh - var(--nav-height) - 1.5rem);
  background: #0c0c0c;
  overflow: hidden;
  border-radius: 8px;
  border: none;
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.45);
}

.scene-card:nth-child(1) {
  z-index: 1;
}

.scene-card:nth-child(2) {
  z-index: 2;
}

.scene-card:nth-child(3) {
  z-index: 3;
}

.scene-card:nth-child(n + 4) {
  z-index: 4;
}

.scene-card__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.43) saturate(0.72) contrast(1.08);
  transform: scale(1.04);
}

.scene-card--alt1 .scene-card__bg {
  filter: hue-rotate(40deg) brightness(0.48) saturate(0.74);
}

.scene-card--alt2 .scene-card__bg {
  filter: hue-rotate(-26deg) brightness(0.5) saturate(0.68);
}

.scene-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.85rem, 2.2vw, 1.35rem);
  padding: clamp(1.75rem, 5vw, 3rem) clamp(1.25rem, 4vw, 2.5rem);
  text-align: center;
  pointer-events: none;
}

.scene-card__headline {
  margin: 0;
  max-width: min(720px, 92%);
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4.2vw, 3rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #f5f5f5;
  text-shadow:
    0 1px 2px rgb(0 0 0 / 0.5),
    0 12px 40px rgb(0 0 0 / 0.55);
}

.scene-card__text {
  margin: 0;
  max-width: min(42rem, 90%);
  font-size: clamp(0.9rem, 1.85vw, 1.0625rem);
  line-height: 1.65;
  color: rgb(242 242 242 / 0.9);
  text-shadow:
    0 1px 2px rgb(0 0 0 / 0.55),
    0 8px 28px rgb(0 0 0 / 0.5);
}

@media (max-width: 840px) {
  .scene-card {
    height: min(62vh, 520px);
    max-height: calc(100svh - var(--nav-height) - 1.25rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene-card {
    position: relative;
    top: auto;
    z-index: auto;
    height: min(58vh, 480px);
    max-height: none;
    margin-bottom: 1.25rem;
    box-shadow: none;
  }
}

/* ----- Space CTA ----- */
.space {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.space__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.space__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.space__bg-fallback {
  position: absolute;
  inset: 0;
  background: transparent;
}

.space__stars {
  position: absolute;
  inset: 0;
  opacity: 0.9;
}

.space__tagline {
  position: absolute;
  left: 50%;
  bottom: calc(clamp(1.5rem, 5vw, 3.5rem) + 120px);
  transform: translateX(-50%);
  z-index: 2;
  margin: 0;
  width: min(92vw, 64rem);
  text-align: center;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 100;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: rgb(255 255 255 / 0.8);
  text-shadow:
    0 2px 10px rgb(0 0 0 / 0.7),
    0 10px 32px rgb(0 0 0 / 0.5);
  pointer-events: none;
}

.space__tagline-accent {
  color: #e5023d;
}

.space__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--nav-height) 1.5rem 3rem;
  width: 100%;
  max-width: var(--content-max);
}

.space__figure {
  position: relative;
  width: min(55vw, 420px);
  max-height: 55vh;
  z-index: 1;
}

.space__figure img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  max-height: min(55vh, 720px);
  object-fit: contain;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.6));
}

.space__cta-block {
  position: relative;
  z-index: 4;
  margin-top: 1rem;
  transform: translateY(-130px);
  text-align: center;
}

.space__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem 1rem;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.55s ease,
    transform 0.25s var(--ease-out);
}

.space__cta-title {
  display: block;
  transform: translateY(-25px);
}

.space__cta-sub {
  display: block;
  margin-top: -0.8rem;
  transform: translateY(-10px);
  font-family: var(--font-body);
  font-size: clamp(0.8125rem, 1.75vw, 1rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  opacity: 0;
  transition: opacity 0.55s ease;
}

.space__cta.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.space__cta:hover {
  transform: scale(1.1);
}

.space__cta:hover .space__cta-title {
  color: var(--color-accent);
}

.space__cta.is-visible + .space__cta-sub {
  opacity: 1;
}

.space__cta:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .space__cta:hover {
    transform: none;
  }
}

/* ----- Footer ----- */
.site-footer {
  position: relative;
  top: -20px;
  padding: clamp(3rem, 8vw, 5rem) clamp(1.25rem, 4vw, 3rem) 2rem;
  background: #020408;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: var(--content-max);
  margin: 0 auto;
  justify-items: center;
}

.site-footer__col {
  text-align: center;
}

@media (max-width: 900px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

.site-footer__col h3 {
  font-size: 11pt;
  letter-spacing: var(--caption-tracking);
  text-transform: uppercase;
  color: #8d9298;
  margin: 0 0 1rem;
  font-weight: 800;
  text-decoration: none;
}

.site-footer__col a {
  display: block;
  font-size: 0.875rem;
  color: #8d9298;
  padding: 0.35rem 0;
  opacity: 1;
  transition: color 0.2s ease;
}

.site-footer__col a:hover,
.site-footer__col a:active {
  color: var(--color-accent);
}

.site-footer__social {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

.site-footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #8d9298;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.site-footer__social a:hover,
.site-footer__social a:active {
  color: var(--color-accent);
  border-color: rgb(229 2 61 / 0.45);
}

.site-footer__social svg {
  width: 18px;
  height: 18px;
}

.site-footer__copy {
  max-width: var(--content-max);
  margin: 2.5rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: var(--text-caption);
  letter-spacing: 0.04em;
  color: #8d9298;
  text-align: center;
}

/* ----- Modal ----- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.modal__dialog {
  position: relative;
  width: min(100%, 420px);
  padding: 2rem;
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  transform: translateY(12px);
  transition: transform 0.35s var(--ease-out);
}

.modal.is-open .modal__dialog {
  transform: translateY(0);
}

.modal__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.modal__text {
  font-size: 0.9375rem;
  color: var(--color-muted);
  margin: 0 0 1.5rem;
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  border-radius: 8px;
}

.modal__close:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.06);
}

.modal__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal__label {
  font-size: var(--text-caption);
  letter-spacing: var(--caption-tracking);
  text-transform: uppercase;
  color: var(--color-muted);
}

.modal__input {
  padding: 0.875rem 1rem;
  background: var(--color-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--color-text);
}

.modal__input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.modal__submit {
  padding: 0.875rem 1.25rem;
  background: var(--color-accent);
  color: var(--color-text);
  font-weight: 600;
  font-size: var(--text-caption);
  letter-spacing: var(--caption-tracking);
  text-transform: uppercase;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.modal__submit:hover {
  background: color-mix(in srgb, var(--color-accent) 88%, #ffffff 12%);
}

.modal__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.modal__status {
  font-size: 0.875rem;
  min-height: 1.25rem;
}

.modal__status.is-error {
  color: var(--color-accent);
}

.modal__status.is-success {
  color: var(--color-accent);
}

/* Reduced-motion static layouts */
body.motion-reduced .scenes__apple-wrap {
  opacity: 1 !important;
}

body.motion-reduced .scenes__bg {
  transform: none !important;
}

body.motion-reduced .scenes__inner {
  position: relative;
}

body.motion-reduced #features.scenes {
  min-height: auto;
}

body.motion-reduced .space__bg {
  transform: none !important;
}
