/* =====================================================================
   Focus & Film — Production Without Limits landing page
   Site-level styles on top of the design system.
   ===================================================================== */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
}
::selection { background: var(--pale-sun); color: var(--walnut-brown); }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ---------- Scroll-driven reveal -----------------------------------
   Elements default to visible (so even if JS or IntersectionObserver
   fails, content is never stuck hidden). The .pre class — added by
   useReveal only to elements that are below the fold at mount time —
   pre-hides them, and .is-in animates them back in when they enter.
------------------------------------------------------------------ */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
  will-change: opacity, transform;
}
.reveal.pre {
  opacity: 0;
  transform: translateY(14px);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }
.reveal-delay-5 { transition-delay: 400ms; }

/* ---------- "Word-by-word" narrative dim/brighten ------------------ */
.narrative {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(40px, 5.6vw, 96px);
  line-height: 1.02;
  letter-spacing: var(--tr-display);
  text-wrap: balance;
}
.narrative .word {
  display: inline-block;
  color: color-mix(in oklab, currentColor 18%, transparent);
  transition: color 480ms var(--ease-out);
}
.narrative .word.lit { color: currentColor; }
.narrative .space { display: inline-block; width: .28em; }

/* The Shift headline — sits in the right column, large, wraps naturally */
.narrative-shift {
  font-size: clamp(40px, 5vw, 88px);
  max-width: none;
}

/* ---------- Page chrome ------------------------------------------ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px clamp(20px, 3vw, 48px);
  z-index: 50;
  transition: background var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-light {
  background: color-mix(in oklab, var(--pale-cream) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--rule);
  color: var(--walnut-brown);
}
.nav.is-dark {
  color: var(--pale-cream);
}
.nav-links {
  display: flex; gap: 36px; align-items: center;
}
.nav-link {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: var(--tr-mark);
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}
.nav-link::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.nav-link:hover::after { transform: scaleX(1); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: var(--tr-mark);
  text-transform: uppercase;
  font-weight: 500;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.nav-cta:hover { background: currentColor; color: var(--bg); }
.nav-cta:hover .nav-cta__arrow { color: var(--bg); }

/* Tiny scroll progress bar at very top */
.scroll-rail {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: transparent; z-index: 60; pointer-events: none;
}
.scroll-rail__fill {
  height: 100%; background: var(--pale-sun); width: 0%;
  transition: width 80ms linear;
}

/* ---------- Make surface-* classes paint their own bg/fg --------- *
 * The design system only sets the --bg/--fg vars; we need any tag
 * that wears a surface-* class to actually paint with them. */
.surface-cream,
.surface-walnut,
.surface-sun,
.surface-suede-sun,
.surface-suede,
.surface-black,
.surface-cream-black {
  background: var(--bg);
  color: var(--fg);
}

/* ---------- Section base ----------------------------------------- */
section { position: relative; }
.section-pad {
  padding: clamp(96px, 12vh, 180px) clamp(20px, 3vw, 64px);
}
.section-pad-tight {
  padding: clamp(64px, 8vh, 120px) clamp(20px, 3vw, 64px);
}
.wrap { max-width: 1320px; margin: 0 auto; }

/* ---------- Big primary button ----------------------------------- */
.btn-pill {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 30px;
  background: var(--walnut-brown);
  color: var(--pale-sun);
  border: 0;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: var(--tr-mark);
  text-transform: uppercase;
  transition: transform var(--dur-base) var(--ease-out),
              background var(--dur-base) var(--ease-out);
}
.btn-pill:hover { background: color-mix(in oklab, var(--walnut-brown) 80%, var(--carbon-black)); }
.btn-pill:active { transform: scale(.98); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 18px 0;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: var(--tr-mark);
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  background: none; border-radius: 0;
  color: var(--fg);
}
.btn-ghost:hover { opacity: .7; }

/* ---------- Numerical index ("01") in editorial way -------------- */
.idx {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 24px;
  color: var(--fg-muted);
}

/* ---------- Hero ------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: clamp(110px, 14vh, 160px) clamp(20px, 3vw, 64px) clamp(40px, 6vh, 72px);
  position: relative;
  overflow: hidden;
}
.hero__display {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(64px, 11vw, 200px);
  line-height: .94;
  letter-spacing: -0.025em;
  margin: 0;
  max-width: 14ch;
}
.hero__mark-row {
  display: flex; justify-content: space-between; align-items: end;
  flex-wrap: wrap; gap: 24px;
  font-family: var(--sans-mark);
  font-size: 11px;
  letter-spacing: var(--tr-mark);
  text-transform: uppercase;
}
.hero__sub {
  font-family: var(--serif-display);
  font-size: clamp(22px, 2.2vw, 32px);
  font-style: italic;
  max-width: 24ch;
  line-height: 1.1;
}

/* The slow "breathing" scroll cue at hero bottom */
.scroll-cue {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: var(--tr-mark);
  text-transform: uppercase;
}
.scroll-cue__line {
  width: 56px; height: 1px;
  background: currentColor;
  position: relative; overflow: hidden;
}
.scroll-cue__line::after {
  content: "";
  position: absolute; inset: 0; width: 40%;
  background: var(--pale-cream);
  animation: cueSlide 2.4s var(--ease-in-out) infinite;
}
@keyframes cueSlide {
  0% { transform: translateX(-100%); }
  60% { transform: translateX(260%); }
  100% { transform: translateX(260%); }
}

/* ---------- Stat blocks ------------------------------------------ */
.stat {
  display: flex; flex-direction: column; gap: 12px;
}
.stat__num {
  font-family: var(--serif-display);
  font-size: clamp(72px, 9vw, 168px);
  line-height: .9;
  letter-spacing: -0.03em;
}
.stat__num em { font-style: italic; }
.stat__label {
  font-family: var(--sans-mark);
  font-size: 11px;
  letter-spacing: var(--tr-mark);
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* ---------- Numbered list (editorial) ---------------------------- */
.num-list { list-style: none; margin: 0; padding: 0; }
.num-list li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.num-list li:last-child { border-bottom: 1px solid var(--rule); }
/* Dark-surface variant — lighten the hairlines so they read on walnut */
.num-list--dark li { border-top-color: color-mix(in oklab, var(--pale-cream) 22%, transparent); }
.num-list--dark li:last-child { border-bottom-color: color-mix(in oklab, var(--pale-cream) 22%, transparent); }
.num-list .n {
  font-family: var(--sans-mark);
  font-size: 11px;
  letter-spacing: var(--tr-mark);
  color: var(--fg-muted);
  padding-top: 4px;
}
.num-list .t {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.1;
}

/* ---------- Capability/feature card ------------------------------ */
.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 64px 48px;
}
@media (max-width: 880px) {
  .capability-grid { grid-template-columns: 1fr; gap: 56px; }
}
.capability {
  display: flex; flex-direction: column; gap: 20px;
}
.capability__img {
  aspect-ratio: 4 / 5;
  background-size: cover; background-position: center;
  filter: saturate(.95);
  transition: transform 700ms var(--ease-out);
}
.capability:hover .capability__img { transform: scale(1.015); }
.capability__title {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(28px, 2.6vw, 40px);
  margin: 8px 0 0;
  line-height: 1;
}
.capability__copy {
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg);
  max-width: 32ch;
}

/* ---------- Old vs New comparison (sticky scroll) ---------------- */
.compare {
  position: relative;
  background: var(--walnut-brown);
  color: var(--pale-cream);
}
.compare__sticky {
  position: sticky; top: 0;
  height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
  overflow: hidden;
}
.compare__col {
  position: relative;
  padding: clamp(56px, 8vh, 120px) clamp(28px, 4vw, 80px);
  display: flex; flex-direction: column; justify-content: space-between;
  transition: opacity 800ms var(--ease-out);
}
.compare__col.is-dim { opacity: .25; }
.compare__col-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: var(--tr-mark);
  text-transform: uppercase;
  font-style: italic;
  font-weight: 400;
}
.compare__col-h {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(56px, 8vw, 128px);
  line-height: .9;
  letter-spacing: var(--tr-display);
  margin: 0;
}
.compare__divider {
  position: absolute; top: 0; bottom: 0;
  left: 50%; width: 1px;
  background: color-mix(in oklab, currentColor 25%, transparent);
}
.compare__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
}
.compare__list li {
  padding: 14px 0;
  border-top: 1px solid color-mix(in oklab, currentColor 20%, transparent);
  display: grid; grid-template-columns: 28px 1fr; gap: 16px;
  align-items: baseline;
  font-size: 16px; line-height: 1.4;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.compare__list li:last-child { border-bottom: 1px solid color-mix(in oklab, currentColor 20%, transparent); }
.compare__list.is-in li {
  opacity: 1; transform: none;
}
.compare__list.is-in li:nth-child(1) { transition-delay: 100ms; }
.compare__list.is-in li:nth-child(2) { transition-delay: 180ms; }
.compare__list.is-in li:nth-child(3) { transition-delay: 260ms; }
.compare__list.is-in li:nth-child(4) { transition-delay: 340ms; }
.compare__list.is-in li:nth-child(5) { transition-delay: 420ms; }
.compare__list .n {
  font-family: var(--sans-mark);
  font-size: 11px;
  letter-spacing: var(--tr-mark);
  opacity: .55;
}
.compare__progress {
  position: absolute; left: 50%; bottom: 32px;
  transform: translateX(-50%);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: var(--tr-mark);
  text-transform: uppercase;
  opacity: .55;
}

/* ---------- Case study (Flerish) --------------------------------- */
.case {
  background: var(--pale-sun);
  color: var(--walnut-brown);
}
.case__display {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(72px, 10vw, 200px);
  line-height: .92;
  letter-spacing: -.03em;
  margin: 0;
}
.case__grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: 32px;
  margin-top: clamp(48px, 6vh, 96px);
}
.case__img {
  grid-column: span 7;
  aspect-ratio: 4/5;
  background-size: cover; background-position: center;
}
.case__meta {
  grid-column: span 5;
  display: flex; flex-direction: column; gap: 64px;
  padding-top: 8px;
}
@media (max-width: 880px) {
  .case__img { grid-column: span 12; }
  .case__meta { grid-column: span 12; gap: 48px; }
}
.case__stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px;
  padding-top: 32px;
  border-top: 1px solid color-mix(in oklab, var(--walnut-brown) 25%, transparent);
}

/* ---------- Onboarding & delivery steps -------------------------- */
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; } }
.step {
  padding: clamp(32px, 4vw, 56px);
  background: var(--pale-cream);
  color: var(--walnut-brown);
  border: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 18px;
  min-height: 360px;
  transition: background var(--dur-slow) var(--ease-out);
}
.step:hover {
  background: color-mix(in oklab, var(--pale-sun) 60%, var(--pale-cream));
}
.step__n {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 40px;
}
.step__t {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.1;
  margin: 0;
}
.step__body {
  font-size: 15px; line-height: 1.55;
  color: color-mix(in oklab, var(--walnut-brown) 75%, transparent);
  max-width: 36ch;
}

/* ---------- Closing call to action ------------------------------- */
.closing {
  background: var(--carbon-black);
  color: var(--pale-cream);
  padding: clamp(96px, 14vh, 200px) clamp(20px, 3vw, 64px);
  position: relative; overflow: hidden;
}
.closing__display {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(72px, 11vw, 220px);
  line-height: .92;
  letter-spacing: -.03em;
  margin: 0;
  text-wrap: balance;
}

/* ---------- Footer ----------------------------------------------- */
.footer {
  background: var(--walnut-brown);
  color: var(--pale-cream);
  padding: clamp(48px, 6vh, 96px) clamp(20px, 3vw, 64px) 32px;
}

/* ---------- Page transitions / hover micro-interactions ---------- */
.hover-shift { transition: transform var(--dur-base) var(--ease-out); }
.hover-shift:hover { transform: translateX(6px); }

/* Image with subtle parallax-ish on scroll */
.parallax-img {
  background-size: cover;
  background-position: center;
  will-change: transform;
}

/* =====================================================================
   Mobile / small-tablet responsiveness
   .mstack  → collapse a multi-column grid to a single column
   .mstack-2 → collapse to two columns (image grids), then 1 col <480
   ===================================================================== */
@media (max-width: 720px) {
  .mstack { grid-template-columns: 1fr !important; }
  .mstack-2 { grid-template-columns: repeat(2, 1fr) !important; }

  /* Nav — hide the inline text links, keep brand + Inquire CTA */
  .nav { padding: 14px 20px; }
  .nav-links { gap: 0; }
  .nav-links .nav-link { display: none; }
  .nav-cta { padding: 9px 15px; font-size: 10px; }

  /* Hero */
  .hero { padding: 104px 22px 40px; }
  .hero__display { font-size: clamp(48px, 15vw, 92px); max-width: 100%; }
  .hero__mark-row { gap: 16px; }
  .hero__sub { max-width: 100%; }

  /* Old vs New — release the sticky two-column pin and stack it */
  .compare__sticky {
    position: relative;
    height: auto;
    grid-template-columns: 1fr;
  }
  .compare__divider { display: none; }
  .compare__col { padding: 52px 22px; }
  .compare__col.is-dim { opacity: 1; }
  .compare__col-h { font-size: clamp(46px, 13vw, 72px); }
  .compare__progress { display: none; }

  /* Case study stats stack */
  .case__stats { grid-template-columns: 1fr; gap: 24px; }
  .case__stats .stat__num,
  .case__stats p { font-size: clamp(44px, 12vw, 72px) !important; white-space: normal !important; }

  /* Catalog grid — keep stills legible */
  .mix-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Tame the very large display headlines a touch on phones */
  .narrative, .narrative-shift { font-size: clamp(34px, 9vw, 56px); }
}

@media (max-width: 480px) {
  .mstack-2 { grid-template-columns: 1fr !important; }
  .num-list li { grid-template-columns: 30px 1fr; gap: 14px; }
  .section-pad { padding: 72px 20px; }
  .section-pad-tight { padding: 56px 20px; }
  .compare__list li { grid-template-columns: 24px 1fr; gap: 12px; }
}
