/* ============================================================
   Taylor Cinematics — scroll-driven video hero + page sections
   Palette: warm off-white, charcoal ink, navy/blue accents
   ============================================================ */

:root {
  --cream: #f5efe6;        /* page background + light type over footage */
  --surface: #fbf8f2;      /* card / tile surfaces */
  --warm-cream: #f5efe6;
  --warm-grey: #8d857a;
  --ink: #2b2723;          /* dark text + CTA fill + dark sections */
  --charcoal: #2b2723;
  --navy: #24466e;         /* accent — stat numbers, step numbers */
  --blue: #6c93be;         /* accent — links, small highlights */
  --line: rgba(43, 39, 35, 0.14);
  --line-light: rgba(245, 239, 230, 0.16);
  --nav-h: 68px;
  --serif: "Playfair Display", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   FIXED NAV
   ============================================================ */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0 clamp(1.5rem, 6vw, 5rem);
  color: var(--cream);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* Legibility gradient over the hero: ~35% black at the very top,
   transparent by 120px. Fades away once the nav goes solid. */
.site-nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0));
  transition: opacity 0.3s ease;
}

.site-nav.is-solid {
  background: var(--ink);
  border-bottom-color: var(--line-light);
}

.site-nav.is-solid::before { opacity: 0; }

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--cream);
  min-width: 0;
}

.nav-mark { height: 32px; width: auto; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 3vw, 2.4rem);
  margin-left: auto;
}

.nav-links a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav-links a:hover { color: var(--blue); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-cta {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: var(--warm-cream);
  border-radius: 4px;
  white-space: nowrap;
  transition: background 0.25s ease;
}

.nav-cta:hover { background: #ffffff; }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--cream);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */

.hero-scroll {
  /* ~three screen-heights of scroll drive the whole video */
  height: 300vh;
  position: relative;
}

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--ink);
}

.hero-video,
.hero-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster {
  z-index: 2;
  transition: opacity 0.6s ease;
}

.hero-poster.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Full-width bottom scrim behind the intro text. Starts at 38%
   viewport height, easing to rgba(0,0,0,0.45) at the bottom —
   keeps the type readable when it crosses the pale gravel. */

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 38%,
      rgba(0, 0, 0, 0.28) 68%,
      rgba(0, 0, 0, 0.45) 100%
    );
}

/* ---- Hero text overlays ----------------------------------- */

.overlay {
  position: absolute;
  z-index: 4;
  max-width: 40rem;
  will-change: opacity;
}

/* Intro: lower-left third, warm cream on the darker footage */
.overlay-intro {
  left: clamp(1.5rem, 6vw, 5rem);
  bottom: clamp(2rem, 10vh, 6rem);
  color: var(--warm-cream);
}

.overlay-intro.is-faded { pointer-events: none; }

.intro-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--warm-cream);
}

/* Hold the manual two-line break at desktop widths */
@media (min-width: 768px) {
  .intro-title { white-space: nowrap; }
}

.intro-sub {
  margin-top: 1rem;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  letter-spacing: 0.02em;
  color: rgba(245, 239, 230, 0.92);
  max-width: 28rem;
}

.intro-actions { margin-top: 1.7rem; }

.text-link {
  display: block;
  margin-top: 1.1rem;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: rgba(245, 239, 230, 0.9);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(245, 239, 230, 0.45);
}

.text-link:hover { color: var(--warm-cream); text-decoration-color: var(--warm-cream); }

/* ---- Scroll cue ------------------------------------------- */

.scroll-cue {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  width: 1px;
  height: 56px;
  overflow: hidden;
  background: rgba(245, 239, 230, 0.25);
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.scroll-cue span {
  display: block;
  width: 100%;
  height: 40%;
  background: var(--cream);
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-cue span { animation: cue-drop 2s ease-in-out infinite; }
}

@keyframes cue-drop {
  0%   { transform: translateY(-110%); }
  60%  { transform: translateY(260%); }
  100% { transform: translateY(260%); }
}

.scroll-cue.is-hidden { opacity: 0; }

/* No scrub mechanic → no cue */
@media (prefers-reduced-motion: reduce) {
  .scroll-cue { display: none; }
}

body.is-static .scroll-cue { display: none; }

/* ---- Buttons ---------------------------------------------- */

.cta {
  display: inline-block;
  margin-top: 1.8rem;
  padding: 1.1rem 2.5rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--warm-cream);
  background: var(--ink);
  border: none;
  border-radius: 4px;
  transition: background 0.25s ease;
}

.cta:hover,
.cta:focus-visible {
  background: #443e37;
}

/* Light variant for the intro block, over darker footage */
.cta-light {
  margin-top: 0;
  color: var(--ink);
  background: var(--warm-cream);
}

.cta-light:hover,
.cta-light:focus-visible {
  background: #ffffff;
}

/* ============================================================
   PAGE SECTIONS
   ============================================================ */

/* One spacing scale everywhere: 140px top/bottom on desktop,
   80px on mobile (see media query). Backgrounds run full-bleed;
   .section-inner is the single 1140px content column. */
.section {
  padding: 140px 2.5rem;
}

.section-inner {
  max-width: 1140px;
  margin: 0 auto;
}

/* Dark band sections */
.section--dark {
  background: var(--ink);
  color: var(--cream);
}

.section--dark .section-label { color: var(--blue); }
.section--dark .section-title { color: var(--cream); }
.section--dark .section-note { color: rgba(245, 239, 230, 0.75); }
.section--dark .cta { color: var(--ink); background: var(--warm-cream); }
.section--dark .cta:hover,
.section--dark .cta:focus-visible { background: #ffffff; }

.section-label {
  font-size: 0.8rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 2.2rem;
}

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 2.6rem;
}

/* ---- Section 2: positioning ------------------------------- */

.section-positioning { text-align: center; }

.positioning {
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  line-height: 1.65;
  letter-spacing: 0.005em;
  max-width: 46rem;
  margin: 0 auto;
  color: rgba(43, 39, 35, 0.92);
}

/* ---- Before / after --------------------------------------- */

.ba-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.2rem, 2.5vw, 2rem);
}

.ba-item img,
.ba-item video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

/* The comparison is the strongest argument on the page — labels
   read at full strength, with a plain-language line under each. */
.ba-item figcaption {
  margin-top: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ba-item figcaption strong {
  font-size: 1.125rem;   /* ~18px */
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream);
}

.ba-item figcaption span {
  font-size: 0.95rem;
  color: rgba(245, 239, 230, 0.75);
}

/* ---- Section 3: stats ------------------------------------- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
}

/* Flex column so every "Source: NAR" line sits on a shared
   baseline at the bottom, regardless of body copy length. */
.stat {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(3.2rem, 6vw, 5rem);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--navy);
  display: block;
}

.stat-text {
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(43, 39, 35, 0.85);
  max-width: 18rem;
}

.stat-src {
  display: block;
  margin-top: auto;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--warm-grey);
}

.stats-kicker {
  margin-top: 3.5rem;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* ---- Section 4: the three cuts ---------------------------- */

.cuts-row {
  display: flex;
  align-items: flex-end;
  gap: clamp(1.2rem, 2.5vw, 2rem);
  flex-wrap: wrap;
}

.cut { flex: 0 1 auto; }

.cut-frame {
  height: clamp(200px, 26vw, 320px);
  border-radius: 4px;
  overflow: hidden;
  background: #1d1a17;
  border: 1px solid var(--line-light);
}

.cut-16x9 { aspect-ratio: 16 / 9; }
.cut-9x16 { aspect-ratio: 9 / 16; }

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

.cut figcaption {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cut figcaption strong {
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--cream);
}

.cut figcaption span {
  font-size: 0.88rem;
  color: rgba(245, 239, 230, 0.65);
}

.section-note {
  margin-top: 2.4rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: rgba(43, 39, 35, 0.8);
  max-width: 40rem;
}

/* ---- Section 5: process ----------------------------------- */

.process-list {
  list-style: none;
  max-width: 46rem;
}

.process-step {
  display: flex;
  gap: clamp(1.4rem, 3vw, 2.5rem);
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.process-step:first-child { padding-top: 0; }
.process-step:last-child { border-bottom: none; padding-bottom: 0; }

.step-num {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--navy);
  min-width: 2.6rem;
  line-height: 1.3;
}

.step-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.step-text {
  font-size: 0.98rem;
  line-height: 1.6;
  color: rgba(43, 39, 35, 0.8);
}

/* ---- About ------------------------------------------------ */

/* Text block spans the shared 1140px column so the heading aligns
   and fits one line at desktop; paragraphs keep a readable measure. */
.about-para {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(43, 39, 35, 0.85);
  max-width: 720px;
}

/* Keep the last two words together — never a single-word last line */
.no-orphan { white-space: nowrap; }

.about-para + .about-para { margin-top: 1.2rem; }

.about-cols {
  display: grid;
  grid-template-columns: 2fr 3fr; /* portrait ≈ 40% */
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  margin-top: clamp(3rem, 6vw, 5rem);
}

/* Frame doubles as the pending-photo state: cream tile, hairline
   charcoal border, centered PHOTO caps. The img covers it entirely
   when it loads; if the file is missing, the tile shows instead. */
.portrait-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #ede5da;
  border: 1px solid rgba(43, 39, 35, 0.15);
  border-radius: 4px;
  overflow: hidden;
}

.portrait-frame::before {
  content: "Photo";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(43, 39, 35, 0.55);
}

.about-portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* subtle warm treatment — slight desaturation, no heavy filter */
  filter: saturate(0.88) sepia(0.08);
}

.about-portrait.is-missing { display: none; }

.about-bio {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(43, 39, 35, 0.85);
}

.about-lead {
  font-weight: 600;
  color: var(--ink);
}

/* ---- Section 6: turnaround -------------------------------- */

.turnaround-list {
  list-style: none;
  max-width: 42rem;
}

.turnaround-list li {
  font-size: clamp(1.02rem, 1.5vw, 1.15rem);
  line-height: 1.6;
  padding: 0.85rem 0 0.85rem 1.6rem;
  position: relative;
  color: rgba(245, 239, 230, 0.9);
}

.turnaround-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.55rem;
  width: 0.55rem;
  height: 1px;
  background: var(--blue);
}

/* ---- Section 7: portfolio tiles (cream band) -------------- */

.tile-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 2.5vw, 2rem);
}

.tile video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #1d1a17;
}

.tile-title {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.tile-caption {
  margin-top: 2.2rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--warm-grey);
}

/* ---- Section 8: closing CTA ------------------------------- */

.section-closing { text-align: center; }

.closing-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.closing-sub {
  margin-top: 1.4rem;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: rgba(245, 239, 230, 0.75);
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-foot {
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  padding: clamp(4rem, 8vh, 6rem) 2.5rem;
  border-top: 1px solid var(--line-light);
}

.foot-mark {
  height: 48px;
  width: auto;
  margin: 0 auto;
  display: block;
}

.foot-tagline {
  margin-top: 1.2rem;
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  color: rgba(245, 239, 230, 0.85);
}

.foot-phone { margin-top: 1.8rem; }

.foot-phone a {
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.06em;
}

.foot-phone a:hover { color: var(--blue); }

.foot-legal {
  margin-top: 2.2rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: rgba(245, 239, 230, 0.55);
}

/* ============================================================
   REVEAL ON SCROLL — fades disabled under reduced motion
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   SPACING COLLAPSE — where two same-background sections meet,
   their stacked paddings would read as one oversized gap (the
   dark-band boundaries visually split theirs). Process → About
   are both cream, so About drops its top padding. Placed after
   the mobile media query so it wins at every width.
   ============================================================ */

.section.section-about { padding-top: 0; }

/* ============================================================
   STATIC FALLBACK — reduced motion, or video load failure.
   The .is-static class is applied by hero.js in either case.
   ============================================================ */

body.is-static .hero-scroll { height: 100vh; height: 100svh; }

body.is-static .overlay-intro {
  opacity: 1 !important;
  pointer-events: auto;
}

/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 767px) {
  /* Mobile spacing scale */
  .section { padding: 80px 1.5rem; }

  /* Nav: collapse anchor links into a dropdown behind the burger */
  .nav-burger { display: flex; }

  .nav-mark { height: 26px; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--line-light);
    padding: 0.6rem 0;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }

  .site-nav.nav-open .nav-links {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 1rem clamp(1.5rem, 6vw, 5rem);
  }

  .overlay-intro { bottom: 1.6rem; }
  .intro-sub { font-size: 0.95rem; margin-top: 0.7rem; }
  .intro-actions { margin-top: 1.2rem; }
  .cta { padding: 0.95rem 1.9rem; }

  .ba-row,
  .stat-row,
  .tile-row {
    grid-template-columns: 1fr;
    gap: 2.4rem;
  }

  /* About: stack, photo above text, capped and left-aligned */
  .about-cols {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .portrait-frame { max-width: 320px; }

  .stat-text { max-width: none; }

  .cuts-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .cut-frame { height: auto; width: 100%; }
  .cut-9x16 { width: min(62vw, 300px); }
}
