/* ============================================================================
 * Epic-Codirector — Cinematic · LIGHT variant
 * Warm cream "screenplay paper" backdrop · hero stays dark for film-craft contrast
 * ============================================================================ */

:root {
  /* Light surfaces — warm cream feel, like a script page */
  --bg:         #faf6ef;
  --bg-2:       #f5f0e7;
  --surface:    #ffffff;
  --surface-2:  #f5f0e7;
  --surface-3:  #ede5d6;
  --border-0:   rgba(0,0,0,0.07);
  --border-1:   rgba(0,0,0,0.12);
  --border-2:   rgba(0,0,0,0.20);
  --hairline:   rgba(0,0,0,0.06);

  /* Dark ink on cream */
  --fg:         #1a1410;
  --fg-1:       #2a241f;
  --muted:      #5a554c;
  --muted-2:    #7d7768;
  --muted-3:    #b3aca0;

  /* Brand — slightly deeper for white-cream contrast */
  --orange:     #ea580c;
  --orange-hi:  #f97316;
  --pink:       #db2777;
  --pink-hi:    #ec4899;
  --purple:     #6d28d9;
  --purple-2:   #8b5cf6;
  --teal:       #0d9488;
  --teal-2:     #14b8a6;
  --green:      #16a34a;
  --yellow:     #ca8a04;
  --red:        #dc2626;

  --r-sm: 6px; --r-md: 10px; --r-lg: 14px;
  --r-xl: 20px; --r-2xl: 24px; --r-full: 9999px;

  --shadow-sm: 0 1px 0 rgba(0,0,0,0.04) inset, 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 22px -10px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg: 0 24px 60px -24px rgba(0,0,0,0.22), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-xl: 0 36px 80px -30px rgba(0,0,0,0.30), 0 6px 20px rgba(0,0,0,0.08);
  --shadow-orange: 0 14px 40px -14px rgba(234,88,12,0.40), inset 0 1px 0 rgba(255,255,255,0.20);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.18, 0.89, 0.32, 1.28);

  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, "Cascadia Mono", Consolas, monospace;
  --font-display: ui-sans-serif, system-ui, -apple-system, "Inter", sans-serif;

  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: transparent; border: 0; color: inherit; padding: 0; }
input, select, textarea { font-family: inherit; color: inherit; }
select { color: var(--fg); }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(234,88,12,0.25); color: inherit; }

.container { max-width: 1400px; margin: 0 auto; }
.container-sm { max-width: 1100px; margin: 0 auto; }
.min-h-screen { min-height: 100vh; }
.relative { position: relative; } .sticky { position: sticky; top: 0; }
.fixed { position: fixed; } .absolute { position: absolute; }
.inset-0 { inset: 0; }
.z-10 { z-index: 10; } .z-20 { z-index: 20; } .z-30 { z-index: 30; } .z-40 { z-index: 40; }
.overflow-hidden { overflow: hidden; } .overflow-y-auto { overflow-y: auto; } .overflow-x-auto { overflow-x: auto; }
.hidden { display: none !important; } .block { display: block; } .inline-block { display: inline-block; } .inline-flex { display: inline-flex; }

.flex { display: flex; } .flex-col { flex-direction: column; } .flex-row { flex-direction: row; }
.items-center { align-items: center; } .items-start { align-items: flex-start; } .items-end { align-items: flex-end; } .items-stretch { align-items: stretch; }
.justify-between { justify-content: space-between; } .justify-center { justify-content: center; } .justify-end { justify-content: flex-end; }
.flex-1 { flex: 1 1 0%; } .flex-shrink-0 { flex-shrink: 0; } .flex-wrap { flex-wrap: wrap; } .grow { flex-grow: 1; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: minmax(0, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-full { grid-column: 1 / -1; }

.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-3\.5 { gap: 0.875rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }

.p-0 { padding: 0; } .p-1 { padding: .25rem; } .p-2 { padding: .5rem; }
.p-3 { padding: .75rem; } .p-4 { padding: 1rem; } .p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; } .p-7 { padding: 1.75rem; } .p-8 { padding: 2rem; } .p-10 { padding: 2.5rem; }
.px-2 { padding-left: .5rem; padding-right: .5rem; }
.px-2\.5 { padding-left: .625rem; padding-right: .625rem; }
.px-3 { padding-left: .75rem; padding-right: .75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-7 { padding-left: 1.75rem; padding-right: 1.75rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
.py-1 { padding-top: .25rem; padding-bottom: .25rem; }
.py-1\.5 { padding-top: .375rem; padding-bottom: .375rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.py-2\.5 { padding-top: .625rem; padding-bottom: .625rem; }
.py-3 { padding-top: .75rem; padding-bottom: .75rem; }
.py-3\.5 { padding-top: .875rem; padding-bottom: .875rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }

.pl-72 { padding-left: 18rem; }
.pr-10 { padding-right: 2.5rem; }
.pt-12 { padding-top: 3rem; } .pt-14 { padding-top: 3.5rem; }
.pt-16 { padding-top: 4rem; } .pt-20 { padding-top: 5rem; } .pt-24 { padding-top: 6rem; }
.pb-8 { padding-bottom: 2rem; } .pb-12 { padding-bottom: 3rem; }
.pb-16 { padding-bottom: 4rem; } .pb-24 { padding-bottom: 6rem; } .pb-32 { padding-bottom: 8rem; }

.m-0 { margin: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-2 { margin-top: .5rem; } .mt-3 { margin-top: .75rem; } .mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; } .mt-14 { margin-top: 3.5rem; } .mt-16 { margin-top: 4rem; }
.mb-1 { margin-bottom: .25rem; }
.mb-1\.5 { margin-bottom: .375rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; } .mb-4 { margin-bottom: 1rem; } .mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; } .mb-8 { margin-bottom: 2rem; } .mb-10 { margin-bottom: 2.5rem; }
.ml-1 { margin-left: .25rem; } .ml-2 { margin-left: .5rem; } .ml-3 { margin-left: .75rem; }
.mr-1 { margin-right: .25rem; } .mr-2 { margin-right: .5rem; }

.stack > * + * { margin-top: var(--stack-gap, 0.5rem); }
.stack-sm > * + * { margin-top: 0.5rem; }
.stack-md > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 1.5rem; }
.stack-xl > * + * { margin-top: 2rem; }

.w-1 { width: .25rem; } .w-1\.5 { width: .375rem; } .w-2 { width: .5rem; } .w-2\.5 { width: .625rem; }
.w-3 { width: .75rem; } .w-3\.5 { width: .875rem; } .w-4 { width: 1rem; } .w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; } .w-7 { width: 1.75rem; } .w-8 { width: 2rem; } .w-9 { width: 2.25rem; }
.w-10 { width: 2.5rem; } .w-11 { width: 2.75rem; } .w-12 { width: 3rem; } .w-14 { width: 3.5rem; }
.w-16 { width: 4rem; } .w-24 { width: 6rem; } .w-32 { width: 8rem; } .w-60 { width: 15rem; } .w-64 { width: 16rem; }
.w-full { width: 100%; }
.h-1 { height: .25rem; } .h-1\.5 { height: .375rem; } .h-2 { height: .5rem; } .h-2\.5 { height: .625rem; }
.h-3 { height: .75rem; } .h-3\.5 { height: .875rem; } .h-4 { height: 1rem; } .h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; } .h-7 { height: 1.75rem; } .h-8 { height: 2rem; } .h-9 { height: 2.25rem; }
.h-10 { height: 2.5rem; } .h-11 { height: 2.75rem; } .h-12 { height: 3rem; } .h-14 { height: 3.5rem; } .h-px { height: 1px; }
.h-full { height: 100%; }
.max-w-md { max-width: 28rem; } .max-w-lg { max-width: 32rem; } .max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; } .max-w-3xl { max-width: 48rem; } .max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; } .max-w-6xl { max-width: 72rem; }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.4rem; }
.text-base { font-size: 1rem; line-height: 1.55rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1.06; }
.text-6xl { font-size: 3.75rem; line-height: 1.04; }
.text-7xl { font-size: 4.5rem; line-height: 1.02; }
.text-\[9px\] { font-size: 9px; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.text-\[13px\] { font-size: 13px; }
.font-mono { font-family: var(--font-mono); }
.font-display { font-family: var(--font-display); }
.font-serif { font-family: var(--font-display); }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.tracking-tight { letter-spacing: -0.018em; }
.tracking-tighter { letter-spacing: -0.03em; }
.tracking-wide { letter-spacing: 0.04em; }
.tracking-widest { letter-spacing: 0.18em; }
.tracking-\[\.22em\] { letter-spacing: 0.22em; }
.tracking-\[\.28em\] { letter-spacing: 0.28em; }
.leading-none { line-height: 1; }
.leading-tight { line-height: 1.15; }
.leading-snug { line-height: 1.3; }
.leading-relaxed { line-height: 1.65; }
.leading-\[1\.05\] { line-height: 1.05; }
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.italic { font-style: italic; }
.whitespace-nowrap { white-space: nowrap; }
.tabular-nums { font-variant-numeric: tabular-nums; }

.text-fg { color: var(--fg); }
.text-fg-1 { color: var(--fg-1); }
.text-muted { color: var(--muted); }
.text-muted-2 { color: var(--muted-2); }
.text-orange { color: var(--orange); }
.text-pink { color: var(--pink); }
.text-purple { color: var(--purple); }
.text-purple-2 { color: var(--purple-2); }
.text-teal { color: var(--teal); }
.text-teal-2 { color: var(--teal-2); }
.text-green { color: var(--green); }
.text-yellow { color: var(--yellow); }
.text-red { color: var(--red); }
.text-white { color: #fff; }

.bg-bg { background: var(--bg); }
.bg-bg-2 { background: var(--bg-2); }
.bg-surface { background: var(--surface); }
.bg-surface-2 { background: var(--surface-2); }
.bg-surface-3 { background: var(--surface-3); }
.bg-orange { background: var(--orange); }
.bg-red { background: var(--red); }
.bg-green { background: var(--green); }
.bg-teal { background: var(--teal); }
.bg-purple { background: var(--purple); }
.bg-purple-2 { background: var(--purple-2); }
.bg-yellow { background: var(--yellow); }
.bg-pink { background: var(--pink); }
.bg-white { background: #fff; }

.border { border: 1px solid var(--border-0); }
.border-1 { border: 1px solid var(--border-1); }
.border-2 { border: 1px solid var(--border-2); }
.border-r { border-right: 1px solid var(--border-0); }
.border-l { border-left: 1px solid var(--border-0); }
.border-b { border-bottom: 1px solid var(--border-0); }
.border-t { border-top: 1px solid var(--border-0); }
.border-dashed { border-style: dashed; }
.border-orange { border-color: var(--orange); }
.border-transparent { border-color: transparent; }

.rounded { border-radius: var(--r-sm); }
.rounded-md { border-radius: var(--r-md); }
.rounded-lg { border-radius: var(--r-lg); }
.rounded-xl { border-radius: var(--r-xl); }
.rounded-2xl { border-radius: var(--r-2xl); }
.rounded-full { border-radius: var(--r-full); }
.rounded-t-lg { border-top-left-radius: var(--r-lg); border-top-right-radius: var(--r-lg); }
.rounded-t-md { border-top-left-radius: var(--r-md); border-top-right-radius: var(--r-md); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

.opacity-40 { opacity: 0.4; }
.opacity-50 { opacity: 0.5; }
.opacity-60 { opacity: 0.6; }
.opacity-70 { opacity: 0.7; }
.pointer-events-none { pointer-events: none; }
.cursor-not-allowed { cursor: not-allowed; opacity: 0.65; }
.cursor-pointer { cursor: pointer; }

.aspect-video { aspect-ratio: 16 / 9; }
.aspect-photo { aspect-ratio: 16 / 10; }
.aspect-portrait { aspect-ratio: 9 / 16; }
.aspect-square { aspect-ratio: 1; }

/* ─── CINEMA MOTIFS — light theme ─────────────────────────── */

/* Film strip becomes darker holes on cream */
.film-strip {
  position: relative;
  background: var(--bg-2);
  border-right: 1px solid var(--border-0);
}

.grain { position: relative; }
.grain::after {
  content: ""; position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(0,0,0,0.020) 1px, transparent 1px),
    radial-gradient(rgba(0,0,0,0.012) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 1px;
  mix-blend-mode: multiply;
  z-index: 1;
}

.glow-bg {
  background:
    radial-gradient(700px 400px at 15% 10%, rgba(109,40,217,0.06), transparent 60%),
    radial-gradient(700px 400px at 85% 0%, rgba(234,88,12,0.06), transparent 60%),
    radial-gradient(900px 600px at 50% 100%, rgba(219,39,119,0.05), transparent 60%);
}

.glow-orange {
  background:
    radial-gradient(800px 480px at 20% 30%, rgba(234,88,12,0.07), transparent 60%),
    radial-gradient(900px 540px at 80% 10%, rgba(219,39,119,0.05), transparent 60%);
}

.glow-purple {
  background:
    radial-gradient(800px 480px at 25% 20%, rgba(109,40,217,0.07), transparent 60%),
    radial-gradient(900px 540px at 75% 80%, rgba(13,148,136,0.05), transparent 60%);
}

.dot-grid::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(0,0,0,0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}

/* SMPTE bar stays same — colors are saturated enough */
.smpte-bar { display: flex; gap: 1px; height: 3px; border-radius: 1px; overflow: hidden; opacity: .85; }
.smpte-bar div { flex: 1; }
.smpte-bar .b1 { background: #c5c5c5; }
.smpte-bar .b2 { background: #c5c500; }
.smpte-bar .b3 { background: #00c5c5; }
.smpte-bar .b4 { background: #00c500; }
.smpte-bar .b5 { background: #c500c5; }
.smpte-bar .b6 { background: #c50000; }
.smpte-bar .b7 { background: #0000c5; }

/* Timecode — dark text on cream */
.timecode {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.10em;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  background: rgba(0,0,0,0.05);
  border: 1px solid var(--border-0);
  color: var(--muted);
}
.timecode .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px rgba(220,38,38,.5); }

.slate {
  display: inline-flex; align-items: center; gap: 0.625rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-0);
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--muted-2);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted-2);
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--orange);
}
.eyebrow.purple::before { background: var(--purple-2); }
.eyebrow.teal::before { background: var(--teal); }
.eyebrow.yellow::before { background: var(--yellow); }
.eyebrow.green::before { background: var(--green); }
.eyebrow.pink::before { background: var(--pink); }

/* ─── COMPONENTS ───────────────────────────────────────────── */

.gradient-text {
  background: linear-gradient(90deg, var(--orange) 0%, var(--pink) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.multi-gradient {
  background: linear-gradient(90deg, var(--teal) 0%, var(--purple-2) 50%, var(--pink) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.amber-gradient {
  background: linear-gradient(90deg, var(--orange-hi) 0%, var(--orange) 50%, var(--pink) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: var(--r-md);
  font-size: 0.875rem; font-weight: 500;
  border: 1px solid var(--border-1);
  background: var(--surface);
  color: var(--fg);
  transition: background .18s var(--ease-out), border-color .18s var(--ease-out), transform .15s var(--ease-out);
}
.btn:hover { background: var(--surface-2); border-color: var(--border-2); transform: translateY(-1px); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--fg); border-color: var(--border-0); transform: none; }

.gradient-cta {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--r-md);
  font-weight: 600; font-size: 0.875rem;
  background: linear-gradient(90deg, var(--orange) 0%, var(--pink) 100%);
  color: #fff;
  box-shadow: var(--shadow-orange);
  transition: transform .18s var(--ease-out), filter .18s var(--ease-out), box-shadow .18s var(--ease-out);
}
.gradient-cta:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 22px 50px -18px rgba(234,88,12,0.55); }
.gradient-cta:active { transform: translateY(0); }
.gradient-cta-lg { padding: 1rem 1.75rem; font-size: 1rem; }

.teal-cta {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--r-md);
  font-weight: 600; font-size: 0.875rem;
  background: linear-gradient(90deg, var(--teal) 0%, var(--teal-2) 100%);
  color: #fff;
  box-shadow: 0 14px 40px -14px rgba(13,148,136,0.40);
  transition: transform .18s var(--ease-out), filter .18s var(--ease-out);
}
.teal-cta:hover { transform: translateY(-2px); filter: brightness(1.05); }

.purple-gradient { background: linear-gradient(135deg, var(--purple) 0%, var(--purple-2) 100%); }

.card-hover { transition: transform .2s var(--ease-out), border-color .2s var(--ease-out), box-shadow .25s var(--ease-out); }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.stage-item {
  width: 100%;
  display: flex; align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--r-md);
  font-size: 0.875rem;
  text-align: left;
  color: var(--fg-1);
  transition: background .18s var(--ease-out), color .18s var(--ease-out);
}
.stage-item:not(.active):not(.locked):hover { background: var(--surface-2); }
.stage-item.active {
  background: var(--fg);
  color: var(--surface);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.stage-item.locked { color: var(--muted-3); cursor: not-allowed; }

.stage-num {
  font-family: var(--font-mono);
  font-size: 10px;
  width: 1rem; text-align: center;
  color: inherit;
  opacity: 0.6;
}

.select-card {
  position: relative;
  border: 1px solid var(--border-1);
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 0.75rem;
  font-size: 0.875rem;
  text-align: left;
  font-weight: 500;
  transition: border-color .18s var(--ease-out), background .18s var(--ease-out), transform .12s var(--ease-out);
  color: var(--fg);
  cursor: pointer;
}
.select-card:hover { border-color: var(--border-2); background: var(--surface-2); transform: translateY(-1px); }
.select-card.selected { border-color: var(--orange); background: rgba(234,88,12,0.06); box-shadow: 0 8px 22px -12px rgba(234,88,12,0.3); }
.select-card.teal-selected.selected { border-color: var(--teal); background: rgba(13,148,136,0.06); box-shadow: 0 8px 22px -12px rgba(13,148,136,0.3); }
.select-card .check {
  position: absolute; top: 0.5rem; right: 0.5rem;
  width: 1.25rem; height: 1.25rem; border-radius: 9999px;
  background: var(--orange);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.85);
  transition: opacity .18s var(--ease-out), transform .18s var(--ease-spring);
}
.select-card.teal-selected .check { background: var(--teal); }
.select-card.selected .check { opacity: 1; transform: scale(1); }
.select-card .check svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 3; fill: none; }

.pill {
  padding: 0.5rem 1rem;
  border-radius: var(--r-full);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border-1);
  background: var(--surface);
  color: var(--fg-1);
  transition: background .18s var(--ease-out), color .18s var(--ease-out), border-color .18s var(--ease-out), transform .12s;
  cursor: pointer;
}
.pill:hover:not(.active) { background: var(--surface-2); border-color: var(--border-2); }
.pill.active {
  background: var(--orange); color: #fff; border-color: var(--orange);
  box-shadow: 0 6px 18px -8px rgba(234,88,12,0.55);
}

.tab {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top-left-radius: var(--r-md); border-top-right-radius: var(--r-md);
  border: 1px solid transparent; border-bottom: 0;
  font-size: 0.875rem;
  color: var(--muted);
  transition: background .18s var(--ease-out), color .18s var(--ease-out), border-color .18s var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
}
.tab:hover:not(.locked):not(.active) { background: var(--surface-2); color: var(--fg); }
.tab.active {
  background: rgba(234,88,12,0.08);
  color: var(--fg);
  border-color: rgba(234,88,12,0.40);
}
.tab.active svg { color: var(--orange); }
.tab.locked { color: var(--muted-3); cursor: not-allowed; }
.tab.purple-active.active { background: rgba(109,40,217,0.10); border-color: rgba(109,40,217,0.40); }
.tab.purple-active.active svg { color: var(--purple-2); }

.chip {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.375rem 0.5rem 0.375rem 0.75rem;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(234,88,12,0.08);
  color: var(--orange);
  border: 1px solid rgba(234,88,12,0.30);
  animation: chipIn .22s var(--ease-spring);
}
.chip button {
  width: 1rem; height: 1rem; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s var(--ease-out);
}
.chip button:hover { background: rgba(234,88,12,0.25); }
@keyframes chipIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.92); }
  to { opacity: 1; transform: none; }
}

.badge {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--r-full);
  font-weight: 500;
}

.float-btn {
  display: flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; border-radius: 9999px;
  transition: transform .22s var(--ease-out), box-shadow .25s var(--ease-out), filter .18s;
}
.float-btn:hover { transform: translateY(-2px) scale(1.05); filter: brightness(1.08); }

.pulse-dot { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 0.35; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.1); } }
.animate-pulse { animation: softpulse 2s ease-in-out infinite; }
@keyframes softpulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }
.animate-spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.animate-fade-up { animation: fadeUp .35s var(--ease-out); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px rgba(220,38,38,0.4), 0 0 4px rgba(220,38,38,0.6);
  animation: liveBlink 1.6s ease-in-out infinite;
}
@keyframes liveBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.icon { width: 1rem; height: 1rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: middle; }
.icon-sm { width: 0.75rem; height: 0.75rem; }
.icon-md { width: 1.25rem; height: 1.25rem; }
.icon-lg { width: 1.5rem; height: 1.5rem; }
.icon-xl { width: 1.75rem; height: 1.75rem; }
.icon-2xl { width: 2rem; height: 2rem; }

.scrollbar::-webkit-scrollbar { width: 8px; height: 8px; }
.scrollbar::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 8px; }
.scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }
.scrollbar::-webkit-scrollbar-track { background: transparent; }

.backdrop { background: rgba(255,255,255,0.85); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.backdrop-blur-deep { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); background: rgba(0,0,0,0.20); }

.modal-enter { animation: modalIn .3s var(--ease-spring); }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.director-card {
  border: 1px solid var(--border-1);
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  transition: border-color .2s var(--ease-out), transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.director-card:hover { border-color: rgba(109,40,217,0.40); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.principle-card {
  border: 1px solid var(--border-1);
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 1rem;
  transition: border-color .18s var(--ease-out), background .18s var(--ease-out);
}
.principle-card:hover { border-color: var(--border-2); background: var(--surface-2); }
.fam-card {
  border: 1px solid var(--border-1);
  background: var(--surface);
  border-radius: var(--r-lg);
  transition: border-color .18s var(--ease-out), background .18s var(--ease-out);
}
.fam-card:hover { border-color: var(--border-2); background: var(--surface-2); }
.fam-card.expanded {
  border-color: var(--purple-2);
  background: rgba(109,40,217,0.05);
  box-shadow: 0 14px 40px -20px rgba(109,40,217,0.3);
}
.technique-pill {
  font-size: 11px;
  padding: 0.25rem 0.5rem;
  border-radius: var(--r-full);
  background: var(--surface-2);
  border: 1px solid var(--border-1);
  color: var(--muted);
  transition: background .15s var(--ease-out), border-color .15s var(--ease-out), color .15s var(--ease-out);
}
.technique-pill:hover { background: rgba(109,40,217,0.10); border-color: rgba(109,40,217,0.30); color: var(--fg); }

.custom-card {
  border: 1.5px dashed rgba(109,40,217,0.30);
  background: rgba(109,40,217,0.03);
  border-radius: var(--r-md);
  padding: 0.75rem;
  font-size: 0.875rem;
  text-align: left;
  transition: border-color .18s var(--ease-out), background .18s var(--ease-out);
  cursor: pointer;
}
.custom-card:hover { border-color: rgba(109,40,217,0.60); background: rgba(109,40,217,0.06); }

/* HERO — stays dark for film-craft contrast (editorial pattern) */
.hero-cinematic {
  position: relative;
  background-color: #160710;
  overflow: hidden;
  isolation: isolate;
}
.hero-cinematic::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(700px 700px at 78% 30%, rgba(220,90,130,0.55), transparent 60%),
    radial-gradient(800px 600px at 18% 70%, rgba(70,25,45,0.65), transparent 65%),
    radial-gradient(80% 50% at 50% 0%, rgba(180,70,100,0.30), transparent 60%),
    linear-gradient(180deg, transparent 0%, rgba(8,3,8,0.45) 100%);
  z-index: 0;
}
.hero-cinematic::after {
  content: ""; position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at center 50%, transparent 30%, rgba(0,0,0,0.45) 100%);
  z-index: 1;
}
.hero-figure {
  position: absolute;
  top: 50%; left: 62%;
  transform: translate(-50%, -50%);
  width: 36%; max-width: 420px;
  aspect-ratio: 3 / 5;
  z-index: 1; pointer-events: none;
}
.hero-figure::before {
  content: "";
  position: absolute;
  top: 22%; left: 12%; right: 12%; bottom: 0;
  background: radial-gradient(60% 50% at 50% 50%, rgba(18,6,12,0.65) 0%, rgba(18,6,12,0.35) 50%, transparent 80%);
  border-radius: 45% 45% 25% 25% / 35% 35% 10% 10%;
  filter: blur(14px);
}
.hero-figure::after {
  content: "";
  position: absolute;
  top: 4%; left: 28%; width: 44%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(12,4,8,0.72) 0%, rgba(12,4,8,0.35) 55%, transparent 80%);
  filter: blur(10px);
}
.hero-rim {
  position: absolute;
  top: 18%; left: 73%;
  width: 4%; height: 60%;
  background: linear-gradient(180deg, transparent 0%, rgba(255,170,180,0.18) 30%, rgba(255,140,170,0.12) 70%, transparent 100%);
  filter: blur(8px); z-index: 2; pointer-events: none;
}
.hero-cinematic .grain {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.4;
  background-image:
    radial-gradient(rgba(255,255,255,0.022) 1px, transparent 1.5px),
    radial-gradient(rgba(255,255,255,0.015) 1px, transparent 1.5px),
    radial-gradient(rgba(0,0,0,0.020) 1px, transparent 1.5px);
  background-size: 3px 3px, 5px 5px, 7px 7px;
  background-position: 0 0, 1px 1px, 2px 0;
  mix-blend-mode: overlay; z-index: 2;
}
.hero-fade-out {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 140px;
  background: linear-gradient(180deg, transparent 0%, rgba(8,3,8,0.6) 50%, var(--bg) 100%);
  pointer-events: none; z-index: 3;
}

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:text-5xl { font-size: 3rem; line-height: 1.05; }
  .md\:text-6xl { font-size: 3.75rem; line-height: 1.04; }
  .md\:text-7xl { font-size: 4.5rem; line-height: 1.02; }
  .md\:px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .xl\:grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

/* === Family-card accordion (synced from modern variant) === */
.family-card-body { display: none; }
.family-card.expanded .family-card-body { display: block; }
.family-card .family-card-head { cursor: pointer; user-select: none; }
.genre-group [data-genre-grid] { align-items: start; }
