/* ─────────────────────────────────────────────────────────────
   Popcorn Studio · website · shared styles
   Source of truth: 01-brand-foundations-D.html
   ───────────────────────────────────────────────────────────── */

:root {
  --gunmetal: #20373B;
  --gunmetal-deep: #16272a;
  --gunmetal-soft: #2a4347;
  --parchment: #F5EDD8;
  --parchment-warm: #ece2c5;
  --saffron: #FFC64F;
  --saffron-deep: #c8902a;
  --teal: #0097A7;
  --teal-deep: #00808e;
  --blanc: #FAFAF7;
  --ink: #20373B;

  --f-display: "Piazzolla", "Times New Roman", serif;
  --f-body: "neue-haas-grotesk-text", "Neue Haas Grotesk Text Pro", "Lato", -apple-system, system-ui, sans-serif;
  --f-body-display: "neue-haas-grotesk-display", "Neue Haas Grotesk Display Pro", "Lato", -apple-system, system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;

  --page-x: clamp(24px, 5vw, 64px);
  --max: 1440px;

  --t-fast: 0.25s;
  --t-med: 0.5s;
  --t-slow: 0.9s;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  background: var(--gunmetal);
  color: var(--parchment);
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html { scroll-behavior: smooth; }

::selection { background: var(--saffron); color: var(--gunmetal); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

img, svg { display: block; max-width: 100%; }

/* ─── Page chrome ─────────────────────────────────────── */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 32px;
  padding: 20px var(--page-x);
  background: transparent;
  transition: background var(--t-med) var(--ease), backdrop-filter var(--t-med) var(--ease);
}
.nav.scrolled {
  background: rgba(22, 39, 42, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.nav.on-parchment { color: var(--ink); }
.nav.on-parchment.scrolled { background: rgba(245, 237, 216, 0.86); }

.nav-mark { display: flex; align-items: center; gap: 10px; }
.nav-mark img { height: 26px; }
.nav-links { display: flex; justify-content: center; gap: 36px; }
.nav-links a {
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  opacity: 0.7;
  transition: opacity var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  position: relative;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  opacity: 1; color: var(--saffron);
}
.nav-links a[aria-current="page"]::before {
  content: ""; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 4px; border-radius: 999px; background: var(--saffron);
}
.nav-cta {
  display: flex; align-items: center; gap: 18px;
  font-family: var(--f-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.16em;
}
.nav-lang {
  display: none; gap: 0;
  border: 1px solid currentColor;
  opacity: 0.65;
  font-weight: 500;
}
.nav-lang span {
  padding: 4px 8px;
  opacity: 0.55;
  transition: all var(--t-fast) var(--ease);
}
.nav-lang span.active { background: currentColor; color: var(--gunmetal); opacity: 1; }
.nav.on-parchment .nav-lang span.active { color: var(--parchment); }
.nav-contact {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid currentColor;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  font-weight: 500;
}
.nav-contact:hover { background: var(--saffron); color: var(--gunmetal); border-color: var(--saffron); }
.nav-contact .dot {
  width: 6px; height: 6px; border-radius: 999px; background: var(--saffron);
  animation: pulse 2.4s infinite;
}
.nav-contact:hover .dot { background: var(--gunmetal); }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ─── Phosphor Icons ─────────────────────────────────────── */
.proc-acc-trigger-cue svg { display: inline-block; width: 14px; height: 14px; }

/* ─── Back-to-top FAB ─────────────────────────────────────── */
.fab-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 48;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--saffron);
  color: var(--gunmetal);
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease), transform 0.25s var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.fab-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.fab-top:hover { background: var(--gunmetal); color: var(--saffron); }
.fab-top svg { width: 20px; height: 20px; }

/* ─── Burger button + Mobile menu ─────────────────────────────────────── */

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: 1px solid currentColor;
  cursor: pointer;
  opacity: 0.8;
  flex-shrink: 0;
  transition: opacity var(--t-fast) var(--ease);
}
.nav-burger:hover { opacity: 1; }
.nav-burger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--t-med) var(--ease), opacity var(--t-med) var(--ease);
  transform-origin: center;
}
.nav.menu-open .nav-burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav.menu-open .nav-burger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav.menu-open .nav-burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile-menu {
  display: none;
}
@media (max-width: 800px) {
  .nav-mobile-menu {
    display: flex;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 49;
    background: var(--gunmetal-deep);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
    padding: 80px var(--page-x) 64px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
  }
  .nav-mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}
.nav-mobile-menu a {
  font-family: var(--f-display);
  font-size: clamp(36px, 10vw, 64px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  opacity: 0.7;
  color: var(--parchment);
  text-decoration: none;
  transition: opacity var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.nav-mobile-menu a:hover,
.nav-mobile-menu a[aria-current="page"] { opacity: 1; color: var(--saffron); }
.nav-mobile-menu .nav-mobile-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  padding: 14px 24px;
  border: 1px solid currentColor;
  font-family: var(--f-mono);
  font-size: clamp(11px, 2.5vw, 13px);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 500;
  color: var(--parchment);
  opacity: 0.9;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.nav-mobile-menu .nav-mobile-cta:hover {
  background: var(--saffron);
  color: var(--gunmetal);
  border-color: var(--saffron);
  opacity: 1;
}
.nav-mobile-menu .nav-mobile-cta .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--saffron);
  animation: pulse 2.4s infinite;
}
.nav-mobile-menu .nav-mobile-cta:hover .dot { background: var(--gunmetal); }

/* ─── Footer ─────────────────────────────────────── */

.footer {
  background: var(--gunmetal-deep);
  color: var(--parchment);
  padding: 96px var(--page-x) 32px;
  position: relative;
}
.footer-tagline {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(56px, 10vw, 168px);
  line-height: 0.88;
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 30;
  text-wrap: balance;
  margin-bottom: 64px;
}
.footer-tagline em {
  font-style: italic; font-weight: 400; color: var(--saffron);
}
.footer-bottom {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(245,237,216,0.18);
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(245,237,216,0.55);
  align-items: end;
}
.footer-bottom a { color: rgba(245,237,216,0.78); transition: color var(--t-fast) var(--ease); }
.footer-bottom a:hover { color: var(--saffron); }
.footer-channels { display: flex; gap: 24px; }
.footer-meta { text-align: right; }
.footer-meta div + div { margin-top: 4px; }

/* ─── Section primitives ─────────────────────────────────────── */

.section-head {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 32px;
  align-items: baseline;
  padding-bottom: 28px;
  margin-bottom: 56px;
  border-bottom: 1px solid currentColor;
  opacity: 0.96;
}
.section-head .num {
  font-family: var(--f-display);
  font-weight: 700; font-size: 56px;
  line-height: 0.9; letter-spacing: -0.04em;
  font-variation-settings: "opsz" 30;
}
.section-head .num em { font-style: italic; font-weight: 400; color: var(--saffron); }
.section-head .title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(36px, 4.8vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  text-wrap: balance;
  font-variation-settings: "opsz" 30;
}
.section-head .title em { font-style: italic; font-weight: 400; color: var(--saffron); }
.section-head .kicker {
  font-family: var(--f-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.18em;
  align-self: end; padding-bottom: 10px;
  opacity: 0.6;
  text-align: right;
}

.on-parchment .section-head .num em,
.on-parchment .section-head .title em { color: var(--saffron-deep); }

/* ─── Letterboxed media frames (placeholders) ─────────────── */

.frame {
  position: relative;
  background: var(--gunmetal-soft);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: grid; place-items: center;
}
.frame.tall { aspect-ratio: 4 / 5; }
.frame.square { aspect-ratio: 1 / 1; }
.frame::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(135deg, rgba(245,237,216,0.04) 0 1px, transparent 1px 22px);
  pointer-events: none;
}
.frame .cap {
  position: relative; z-index: 1;
  font-family: var(--f-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: rgba(245,237,216,0.55);
  text-align: center;
  padding: 24px;
  text-wrap: balance;
}
.frame .cap b { color: var(--saffron); font-weight: 500; }
.frame .corner {
  position: absolute; z-index: 1;
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(245,237,216,0.45);
}
.frame .corner.tl { top: 16px; left: 16px; }
.frame .corner.tr { top: 16px; right: 16px; }
.frame .corner.bl { bottom: 16px; left: 16px; }
.frame .corner.br { bottom: 16px; right: 16px; }

/* ─── Scroll reveal ─────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

.line-mask { display: block; overflow: hidden; }
.line-mask > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.9s var(--ease-out);
  will-change: transform;
}
.line-mask.in > span { transform: translateY(0); }

/* ─── Utility ─────────────────────────────────────── */

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--f-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--saffron);
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.on-parchment .eyebrow { color: var(--saffron-deep); }

.section { padding: 120px var(--page-x); position: relative; }
.section.parchment { background: var(--parchment); color: var(--ink); }
.section.parchment .section-head { border-bottom-color: rgba(32,55,59,0.4); }
.section.gunmetal { background: var(--gunmetal); color: var(--parchment); }
.section.gunmetal-deep { background: var(--gunmetal-deep); color: var(--parchment); }

@media (max-width: 800px) {
  .section { padding: 80px var(--page-x); }
  .nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .section-head { grid-template-columns: 1fr; gap: 12px; }
  .section-head .kicker { text-align: left; padding-bottom: 0; }
  .section-head .num { font-size: 36px; }
  .footer-bottom { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
}

/* ─── Hero Reel ─────────────────────────────────────── */

.hero-reel {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: var(--gunmetal-deep);
  color: var(--parchment);
}

.hero-reel-bg {
  position: absolute;
  inset: -10%;
  background:
    repeating-linear-gradient(0deg, rgba(245,237,216,0.025) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(90deg, transparent 0 24px, rgba(0,0,0,0.22) 24px 25px),
    radial-gradient(60% 80% at 50% 50%, rgba(255,198,79,0.07), transparent 70%),
    var(--gunmetal-deep);
  will-change: transform;
}

.hero-reel-bg::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 32px;
  background: repeating-linear-gradient(
    180deg,
    transparent 0 12px,
    rgba(245,237,216,0.06) 12px 22px
  );
}
.hero-reel-bg::after {
  content: "";
  position: absolute; right: 0; top: 0; bottom: 0; width: 32px;
  background: repeating-linear-gradient(
    180deg,
    transparent 0 12px,
    rgba(245,237,216,0.06) 12px 22px
  );
}

/* fullscreen bg video — sits above the static filmstrip fallback */
.hero-reel-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-reel-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(80% 60% at 50% 60%, transparent 30%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
  z-index: 2;
}


.hero-reel-meta {
  position: absolute;
  top: clamp(80px, 10vh, 100px); right: var(--page-x);
  z-index: 4;
  font-family: var(--f-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: rgba(245,237,216,0.7);
  text-align: right;
  display: grid; gap: 5px;
}
.hero-reel-meta b { color: var(--saffron); font-weight: 500; }

.hero-reel-overlay {
  position: absolute;
  left: var(--page-x); right: var(--page-x);
  top: 80px; bottom: clamp(40px, 6vh, 72px);
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 20px;
}

@media (max-width: 768px) {
  .hero-reel-overlay { top: 72px; justify-content: center; }
}

/* ─── Process scroll scrubber ─────────────────────────────── */
.proc-scrubber-section {
  background: var(--gunmetal);
  color: var(--parchment);
  position: relative;
}
.proc-scroll-wrapper {
  height: calc(500vh + 100px);
  position: relative;
}
.proc-sticky-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  padding: clamp(80px, 10vh, 120px) var(--page-x) 0;
}
.proc-scrubber-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  padding-bottom: 40px;
}
.proc-scrubber-header h2 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(32px, 4vw, 60px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 30;
  text-wrap: balance;
}
.proc-scrubber-header h2 em { font-style: italic; font-weight: 400; color: var(--saffron); }
.proc-scrubber-counter {
  font-family: var(--f-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: rgba(245,237,216,0.6);
  text-align: right;
}
.proc-scrubber-bar {
  position: relative;
  padding-bottom: 56px;
}
.proc-scrubber-track {
  position: absolute;
  left: 11px; /* padding-left(4) + half-pip(7) = first pip center */
  right: calc(100% / 6 - 11px); /* last column width minus same inset = last pip center */
  top: 6px; /* (pip 14px − track 2px) / 2 = 6 → track center = 7px = pip center */
  height: 2px;
  background: rgba(245,237,216,0.2);
}
.proc-scrubber-fill {
  position: absolute; left: 0; top: -1px; bottom: -1px;
  width: 0%;
  background: var(--saffron);
  transition: width 0.1s linear;
}
.proc-scrubber-dots {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  position: relative;
  z-index: 1; /* pips sit above track */
}
.proc-scrubber-dot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding-left: 4px;
  cursor: pointer;
}
.proc-scrubber-dot .dot-pip {
  width: 14px; height: 14px;
  border-radius: 999px;
  background: var(--gunmetal);
  border: 2px solid rgba(245,237,216,0.4);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.proc-scrubber-dot.done .dot-pip {
  background: var(--saffron);
  border-color: var(--saffron);
}
.proc-scrubber-dot.active .dot-pip {
  background: var(--saffron);
  border-color: var(--saffron);
  transform: scale(1.5);
  box-shadow: 0 0 0 6px rgba(255,198,79,0.2);
}
.proc-scrubber-dot .dot-label {
  font-family: var(--f-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: rgba(245,237,216,0.5);
  line-height: 1.3;
  transition: color var(--t-fast) var(--ease);
}
.proc-scrubber-dot.active .dot-label { color: var(--saffron); }
.proc-scrubber-dot .dot-name {
  display: block;
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(13px, 1vw, 16px);
  font-weight: 400;
  color: var(--parchment);
  text-transform: none;
  letter-spacing: -0.01em;
}
.proc-scrubber-stage {
  display: grid;
  grid-template-columns: 0.65fr 1fr 0.65fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  padding: clamp(24px, 4vh, 56px) 0 0;
  min-height: 0;
  overflow: hidden;
}
.proc-stage-ghost {
  opacity: 0.28;
  transition: opacity 0.4s var(--ease);
}
.proc-stage-ghost .ghost-cue {
  font-family: var(--f-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--saffron);
  margin-bottom: 14px;
}
.proc-stage-ghost .ghost-name {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 30;
  margin-bottom: 10px;
}
.proc-stage-ghost .ghost-blurb {
  font-size: 14px; line-height: 1.5;
  color: rgba(245,237,216,0.65);
}
.proc-stage-active .active-name {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 30;
  margin-bottom: 20px;
  text-wrap: balance;
}
.proc-stage-active .active-name em { font-style: italic; font-weight: 400; color: var(--saffron); }
.proc-stage-active .active-blurb {
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.55;
  color: rgba(245,237,216,0.85);
  max-width: 52ch;
  text-wrap: pretty;
}
.proc-stage-active .active-receipts {
  display: flex; gap: 32px; flex-wrap: wrap;
  margin-top: 28px;
  font-family: var(--f-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: rgba(245,237,216,0.6);
}
.proc-stage-active .active-receipts b { color: var(--saffron); font-weight: 500; }
.proc-scrubber-nav {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid rgba(245,237,216,0.15);
  font-family: var(--f-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: rgba(245,237,216,0.55);
}
.proc-scrubber-nav button {
  background: transparent;
  color: inherit;
  padding: 8px 18px;
  border: 1px solid currentColor;
  font-family: var(--f-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.16em;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity var(--t-fast) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.proc-scrubber-nav button:hover {
  opacity: 1;
  background: var(--saffron); color: var(--gunmetal); border-color: var(--saffron);
}
@media (max-width: 900px) {
  .proc-scrubber-stage { grid-template-columns: 1fr; }
  .proc-stage-ghost { display: none; }
  .proc-scrubber-dots .dot-name { display: none; }
}
@media (max-width: 600px) {
  .proc-sticky-panel { padding-top: 72px; }
}
