/* Cinematic layer — scroll 3D unfold + video */

.hero--minimal {
  position: relative;
  min-height: calc(100vh - 88px);
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 4rem 0 5rem;
}

.hero--minimal .hero__backdrop,
.hero--minimal .hero__flow {
  display: none;
}

.hero--minimal .hero__content {
  padding: 0 1rem;
  max-width: 920px;
}

.hero--minimal h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.5rem);
  line-height: 1.05;
  max-width: 12ch;
  margin-inline: auto;
}

.hero--minimal .hero__kicker {
  max-width: 36ch;
  margin-inline: auto;
  font-size: 1.05rem;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(214, 228, 255, 0.45);
  opacity: calc(1 - var(--hero-scroll, 0) * 4);
}

.hero__scroll-hint::after {
  content: "";
  display: block;
  width: 1px;
  height: 2rem;
  margin: 0.5rem auto 0;
  background: linear-gradient(180deg, var(--scene-accent), transparent);
  animation: hintPulse 3.2s ease-in-out infinite;
}

@keyframes hintPulse {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  50% {
    transform: translateY(10px);
    opacity: 1;
  }
}

/* ── 3D unfold scene (Scale-like) ── */

.unfold-scene {
  --unfold-p: 0;
  position: relative;
}

.unfold-scene__stage {
  height: 340vh;
}

.unfold-scene__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.unfold-scene__inner {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.unfold-scene__text {
  padding-left: clamp(0px, 2vw, 24px);
}

.unfold-scene__label {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(214, 228, 255, 0.45);
}

.unfold-scene__title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.unfold-scene__steps {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.unfold-scene__steps span {
  font-family: var(--font-display, "Space Grotesk", sans-serif);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 600;
  color: rgba(214, 228, 255, 0.28);
  transition: color 0.65s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.unfold-scene__steps span.is-active {
  color: rgba(245, 250, 255, 0.95);
  transform: translateX(6px);
}

.unfold-scene__viewport {
  perspective: 1400px;
  perspective-origin: 50% 42%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: min(68vh, 560px);
}

.unfold-object {
  position: relative;
  width: min(520px, 88vw);
  height: min(320px, 52vw);
  transform-style: preserve-3d;
  transform:
    rotateX(calc(24deg - var(--unfold-p) * 24deg))
    rotateY(calc(-32deg + var(--unfold-p) * 32deg))
    scale(calc(0.58 + var(--unfold-p) * 0.55));
  will-change: transform;
}

.unfold-object__core {
  position: absolute;
  inset: 0;
  border-radius: calc(24px - var(--unfold-p) * 12px);
  overflow: hidden;
  border: 1px solid rgba(245, 250, 255, 0.14);
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.55),
    0 0 60px color-mix(in srgb, var(--scene-accent) 22%, transparent);
  transform: translateZ(calc(var(--unfold-p) * 40px));
  backface-visibility: hidden;
}

.unfold-object__core video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cinematic-media {
  position: relative;
  overflow: hidden;
  background: #050714;
}

.cinematic-media__canvas,
.cinematic-media__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cinematic-media__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  z-index: 2;
}

.cinematic-media__video[hidden] {
  display: none;
}

.cinematic-media.is-canvas-fallback .cinematic-media__video {
  display: none;
}

/* 21st-inspired unified icon frame */
.direction-card__icon--svg,
.case-panel__icon--svg {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 0.35rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(245, 250, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.direction-card:hover .direction-card__icon--svg,
.case-panel:hover .case-panel__icon--svg {
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 12px 32px rgba(34, 211, 238, 0.12);
}

.direction-card__svg,
.case-panel__svg {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.12));
}

.unfold-object__core::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), transparent 55%, rgba(167, 139, 250, 0.1));
  pointer-events: none;
}

.unfold-flap {
  position: absolute;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(245, 250, 255, 0.12);
  backdrop-filter: blur(12px);
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.unfold-flap span {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 250, 255, 0.7);
}

.unfold-flap--left {
  top: 8%;
  left: -2%;
  width: 42%;
  height: 84%;
  transform-origin: right center;
  transform: rotateY(calc((1 - var(--unfold-p)) * 88deg)) translateZ(calc(-30px + var(--unfold-p) * 80px));
  border-radius: 18px 0 0 18px;
  opacity: calc(1 - var(--unfold-p) * 0.85);
}

.unfold-flap--left span {
  right: 12%;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
}

.unfold-flap--right {
  top: 8%;
  right: -2%;
  width: 42%;
  height: 84%;
  transform-origin: left center;
  transform: rotateY(calc((1 - var(--unfold-p)) * -88deg)) translateZ(calc(-30px + var(--unfold-p) * 80px));
  border-radius: 0 18px 18px 0;
  opacity: calc(1 - var(--unfold-p) * 0.85);
}

.unfold-flap--right span {
  left: 12%;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
}

.unfold-flap--top {
  top: -4%;
  left: 8%;
  width: 84%;
  height: 38%;
  transform-origin: center bottom;
  transform: rotateX(calc((1 - var(--unfold-p)) * 82deg)) translateZ(calc(-16px + var(--unfold-p) * 70px));
  border-radius: 18px 18px 0 0;
  opacity: calc(1 - var(--unfold-p) * 0.9);
}

.unfold-flap--top span {
  left: 50%;
  top: 22%;
  transform: translateX(-50%);
}

/* Full-bleed video interlude */
.video-break {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.video-break__frame {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 21 / 9;
  border: 1px solid rgba(245, 250, 255, 0.1);
  box-shadow: var(--shadow);
}

.video-break__frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-break__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 7, 20, 0.5), transparent 40%, transparent 60%, rgba(5, 7, 20, 0.45));
  pointer-events: none;
}

.video-break__caption {
  margin: 1rem 0 0;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-family: var(--font-display, "Space Grotesk", sans-serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: rgba(245, 250, 255, 0.9);
}

/* Lean sections */
.section--lean .section-heading {
  margin-bottom: 1.5rem;
}

.section--lean .section-heading h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.section--lean .section-heading__subline {
  display: none;
}

.directions-grid--lean .direction-card {
  min-height: 0;
  padding: 1.5rem;
}

.directions-grid--lean .direction-card p {
  font-size: 0.92rem;
  line-height: 1.55;
}

.directions-grid--lean .direction-card__icon--svg {
  width: 48px;
  height: 48px;
  margin-bottom: 0.25rem;
}

.about-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.about-strip__card {
  padding: 1.75rem;
}

.about-strip__card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.about-strip__card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

.about-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.about-chip {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(245, 250, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
  color: rgba(214, 228, 255, 0.75);
}

.process-path--lean .process-step p {
  font-size: 0.9rem;
  line-height: 1.55;
}

.contact-hub--lean .contact-hub__visual,
.contact-hub--lean .hud-corner {
  display: none;
}

.contact-hub--lean .contact-hub__intro p {
  max-width: 42ch;
}

.page-shell--clean .ambient,
.page-shell--clean .hud-grid,
.page-shell--clean .scanlines,
.page-shell--clean .scroll-rail,
.page-shell--clean .scene-divider {
  display: none !important;
}

/* ── Final polish: pacing, progress, hero glow ── */

html {
  scroll-padding-top: 88px;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 100;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.04);
}

.scroll-progress__bar {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--scene-accent, #22d3ee), var(--scene-accent2, #a78bfa));
  box-shadow: 0 0 12px color-mix(in srgb, var(--scene-accent, #22d3ee) 50%, transparent);
  will-change: transform;
}

.hero__ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, color-mix(in srgb, var(--scene-accent) 14%, transparent), transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 60%, color-mix(in srgb, var(--scene-accent2) 8%, transparent), transparent);
  opacity: calc(1 - var(--hero-scroll, 0) * 1.2);
}

.section--lean {
  padding-block: clamp(4rem, 10vw, 6.5rem);
}

.section--lean + .section--lean,
.video-break + .section--lean,
.unfold-scene + .video-break {
  margin-top: 0;
}

.video-break {
  padding: clamp(4rem, 10vw, 7rem) 0;
}

.cases-marquee--scroll {
  position: relative;
}

.cases-marquee--scroll::before,
.cases-marquee--scroll::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2rem;
  z-index: 2;
  pointer-events: none;
}

.cases-marquee--scroll::before {
  left: 0;
  background: linear-gradient(90deg, rgba(3, 5, 8, 0.9), transparent);
}

.cases-marquee--scroll::after {
  right: 0;
  background: linear-gradient(270deg, rgba(3, 5, 8, 0.9), transparent);
}

.magnetic-card {
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease, border-color 0.35s ease;
}

.contact-hub--lean {
  padding: clamp(1.75rem, 4vw, 2.5rem);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 48%, rgba(34, 211, 238, 0.04) 100%);
  border-color: rgba(245, 250, 255, 0.14);
}

.contact-hub--lean .contact-hub__intro h2 {
  white-space: normal;
  line-height: 1.12;
  max-width: 14ch;
}

@media (max-width: 960px) {
  .unfold-scene__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .unfold-scene__text {
    padding: 0;
    order: 2;
  }

  .unfold-scene__viewport {
    order: 1;
    min-height: 42vh;
  }

  .unfold-scene__stage {
    height: 280vh;
  }

  .cases-marquee--scroll {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding: 0.25rem 0 1rem;
    margin: 0 -0.5rem;
    padding-inline: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .cases-marquee--scroll::-webkit-scrollbar {
    display: none;
  }

  .cases-marquee--scroll .case-panel {
    flex: 0 0 min(82vw, 300px);
    scroll-snap-align: start;
    min-height: 200px;
  }

  .cases-marquee--scroll::before,
  .cases-marquee--scroll::after {
    width: 1.25rem;
  }

  .about-strip {
    grid-template-columns: 1fr;
  }

  .video-break__frame {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 860px) {
  .nav a {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 0.35rem 0.5rem;
    font-size: 1.05rem;
  }

  .hero--minimal {
    min-height: calc(100svh - 88px);
    padding-bottom: 4rem;
  }

  .video-break__caption {
    font-size: 1.15rem;
    line-height: 1.45;
  }

  .unfold-scene__steps span.is-active {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cinematic-media__canvas {
    display: none;
  }

  .cinematic-media {
    background: url("design/media/cinematic-poster.png") center / cover no-repeat;
  }

  .unfold-object,
  .unfold-flap {
    transform: none !important;
  }

  .hero__scroll-hint::after {
    animation: none;
  }

  .unfold-scene__stage {
    height: auto;
  }

  .unfold-scene__sticky {
    position: relative;
    height: auto;
    padding: 3rem 0;
  }
}
