/* ==========================================================================
   MAKTALIS Y LAS SEMILLAS SAGRADAS — v5
   A screening room in the dark: the footage itself is the light source.
   Homage to hand-drawn production — grease-pencil marginalia, rubber stamps,
   a 35mm frame around the whole page — staged as floating screens in a void,
   not a desk covered in paper. Cinematic chrome: vignette, grain, letterbox,
   a cursor that talks back, chapters that announce themselves as you arrive.
   ========================================================================== */

@import url('../fonts/fonts.css');

:root{
  /* -- the void: cool, neutral, not the brown/rust of past drafts -- */
  --void:       #0c0f14;
  --void-2:     #151a22;
  --void-3:     #1e2530;
  --ink:        #f3ede0;
  --ink-soft:   rgba(243,237,224,.72);
  --ink-faint:  rgba(243,237,224,.44);
  --line:       rgba(243,237,224,.14);
  --line-2:     rgba(243,237,224,.07);

  /* -- accents: a watercolor pastel trio, drawn from the film's own frames
     (the blush of the crystal seeds, the lavender-blue of the lotus, the
     seafoam of the blight) instead of the terracotta/rust used in earlier
     drafts -- */
  --rust:       #ef8f7e;   /* dusty coral — primary accent */
  --rust-deep:  #f6b9ab;   /* pale blush — italic/soft accent */
  --coral:      #e2718a;   /* berry rose — the stamp's ink */
  --teal:       #8fd9c4;   /* seafoam — secondary accent */
  --gold:       #e6c68f;   /* champagne — festival/featured tag */
  --stamp:      var(--coral);

  /* -- the one true black: Maktalis's territory -- */
  --dusk:       #050507;
  --dusk-tx:    #f1e3c8;

  --font-display: 'Unbounded', sans-serif;
  --font-serif:   'Cormorant Garamond', serif;
  --font-body:    'Space Grotesk', sans-serif;
  --font-hand:    'Caveat', cursive;
  --font-marker:  'Permanent Marker', 'Caveat', cursive;

  --container: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --bar-h: clamp(10px, 2.4vw, 26px);
  --ease: cubic-bezier(.22,.61,.36,1);
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  color:var(--ink);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.5;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(239,143,126,.08), transparent 60%),
    radial-gradient(70% 50% at 85% 100%, rgba(143,217,196,.06), transparent 60%),
    var(--void);
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; }
::selection{ background:var(--rust); color:var(--void); }
h1,h2,h3,h4{ margin:0; font-family:var(--font-display); font-weight:800; letter-spacing:-.01em; }
p{ margin:0; }
.container{ max-width:var(--container); margin:0 auto; padding:0 var(--gutter); }

/* ============================================================
   CINEMATIC CHROME — the whole site sits inside this frame
   ============================================================ */

/* letterbox bars, with tiny film-perforation ticks along the inner edge */
.bars{ position:fixed; left:0; right:0; z-index:2200; height:var(--bar-h); background:var(--void); pointer-events:none; }
.bars.top{ top:0; border-bottom:1px solid var(--line-2); }
.bars.bot{ bottom:0; border-top:1px solid var(--line-2); }
.bars::after{
  content:''; position:absolute; left:0; right:0; top:50%; height:5px; transform:translateY(-50%);
  background-image:repeating-linear-gradient(90deg, var(--ink-faint) 0 5px, transparent 5px 17px);
  opacity:.3;
}

/* soft dark vignette over the whole viewport, deepens toward the edges */
.vignette{
  position:fixed; inset:0; z-index:2150; pointer-events:none;
  background:radial-gradient(120% 85% at 50% 45%, transparent 55%, rgba(10,12,16,.5) 88%, rgba(10,12,16,.82) 100%);
}

/* paper/film grain — subtle, everywhere */
.grain{
  position:fixed; inset:-20%; z-index:2160; pointer-events:none;
  opacity:.05; mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation:grain 8s steps(6) infinite;
}
@keyframes grain{ 0%{transform:translate(0,0)} 20%{transform:translate(-4%,3%)} 40%{transform:translate(3%,-4%)} 60%{transform:translate(-2%,2%)} 80%{transform:translate(4%,1%)} 100%{transform:translate(0,0)} }

/* custom cursor: a ring that speaks, a dot that doesn't */
.cursor-dot,.cursor-ring{ position:fixed; top:0; left:0; pointer-events:none; z-index:2001; border-radius:50%; transform:translate(-50%,-50%); }
.cursor-dot{ width:5px; height:5px; background:var(--rust); }
.cursor-ring{ width:34px; height:34px; border:1px solid rgba(243,237,224,.5); display:grid; place-items:center;
  transition:width .3s var(--ease),height .3s var(--ease),opacity .25s,border-color .25s,background .3s; opacity:.6; }
.cursor-ring.is-hot{ width:88px; height:88px; background:rgba(239,143,126,.16); border-color:var(--rust); opacity:1; }
.cursor-txt{ font-family:var(--font-body); font-size:.62rem; letter-spacing:.14em; text-transform:uppercase; color:var(--ink); opacity:0; transition:opacity .25s; white-space:nowrap; }
.cursor-ring.is-hot .cursor-txt{ opacity:1; }
@media (hover:none){ .cursor-dot,.cursor-ring{ display:none; } }

/* chapter scrim: clears the room — blurs the page behind the announcement */
.chapter-scrim{
  position:fixed; inset:0; z-index:2090; pointer-events:none; opacity:0;
  background:rgba(12,15,20,0); backdrop-filter:blur(0px); -webkit-backdrop-filter:blur(0px);
  transition:opacity .5s var(--ease), background .5s var(--ease), backdrop-filter .5s var(--ease), -webkit-backdrop-filter .5s var(--ease);
}
.chapter-scrim.show{ opacity:1; background:rgba(12,15,20,.42); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); }

/* chapter announcer: holds solid while the scene announces itself, then clears on scroll */
.chapter{ position:fixed; left:0; right:0; top:40%; z-index:2100; pointer-events:none; text-align:center; opacity:0; transition:opacity .6s var(--ease); }
.chapter.show{ opacity:1; }
.chapter__k{ display:block; font-family:var(--font-body); font-size:.72rem; letter-spacing:.32em; text-transform:uppercase; color:var(--rust-deep); margin-bottom:.9rem; transform:translateY(12px); transition:transform .7s var(--ease); }
.chapter__t{ display:block; font-family:var(--font-display); font-weight:800; font-size:clamp(2rem,6.5vw,5.4rem); letter-spacing:-.02em; line-height:1; color:var(--ink); transform:translateY(20px); transition:transform .8s var(--ease); text-shadow:0 6px 50px rgba(0,0,0,.7); max-width:22ch; margin-inline:auto; }
.chapter.show .chapter__k,.chapter.show .chapter__t{ transform:translateY(0); }
@media (max-width:600px){ .chapter{ top:36%; } }

/* HUD zone tag, bottom-left — persistent, low-key */
.hud-zone{ position:fixed; left:var(--gutter); bottom:calc(var(--bar-h) + 1.1rem); z-index:1550; display:flex; align-items:baseline; gap:.55rem; font-family:var(--font-body); pointer-events:none; }
.hz-n{ font-size:.68rem; color:var(--rust); letter-spacing:.06em; }
.hz-t{ font-size:.66rem; letter-spacing:.16em; text-transform:uppercase; color:var(--ink-faint); }
@media (max-width:640px){ .hud-zone{ display:none; } }

/* ---------------- preloader ---------------- */
#preloader{
  position:fixed; inset:0; z-index:3000; background:var(--void);
  display:flex; align-items:center; justify-content:center; flex-direction:column; gap:.9rem;
  transition:opacity .6s ease, visibility .6s ease;
}
#preloader.hide{ opacity:0; visibility:hidden; }
#preloader svg{ width:64px; height:64px; }
.pl-path{ fill:none; stroke:var(--ink); stroke-width:2.4; stroke-linecap:round; stroke-dasharray:220; stroke-dashoffset:220; animation:plDraw 1.6s ease-in-out infinite; }
.pl-path.seed-dot{ fill:var(--rust); stroke:none; animation:plPulse 1.6s ease-in-out infinite; }
@keyframes plDraw{ 0%{stroke-dashoffset:220;} 55%,100%{stroke-dashoffset:0;} }
@keyframes plPulse{ 0%,100%{ opacity:.4; } 50%{ opacity:1; } }
.pl-label{ font-family:var(--font-display); font-size:.62rem; letter-spacing:.3em; text-transform:uppercase; color:var(--ink-faint); }

/* ---------------- language switch ---------------- */
#langswitch{ position:fixed; top:calc(var(--bar-h) + .9rem); left:var(--gutter); z-index:1500; display:flex; gap:.15rem; background:rgba(18,21,27,.7); backdrop-filter:blur(8px); border:1px solid var(--line); border-radius:3px; padding:.2rem; transition:background .3s var(--ease); }
@media (max-width:680px){ #langswitch{ background:rgba(12,15,20,.94); backdrop-filter:blur(10px); box-shadow:0 8px 20px -8px rgba(0,0,0,.65); } }
#langswitch button{ border:0; background:transparent; font-family:var(--font-display); font-size:.62rem; letter-spacing:.08em; padding:.42rem .68rem; border-radius:2px; color:var(--ink-faint); transition:color .3s var(--ease); }
#langswitch button.active{ background:var(--ink); color:var(--void); transition:background .3s var(--ease), color .3s var(--ease); }

/* ---------------- index rail ---------------- */
#navdots{ position:fixed; right:0; top:0; height:100vh; z-index:1500; display:flex; align-items:center; }
#navdots .rail{ display:flex; flex-direction:column; gap:1.1rem; padding:1.1rem .8rem; }
#navdots a{ display:flex; align-items:center; gap:.5rem; justify-content:flex-end; }
#navdots .num{ font-family:var(--font-display); font-size:.58rem; color:var(--ink-faint); transition:color .3s; }
#navdots .lbl{
  font-family:var(--font-body); font-size:.62rem; letter-spacing:.14em; text-transform:uppercase;
  color:var(--ink-faint); writing-mode:vertical-rl; transform:rotate(180deg);
  max-height:0; opacity:0; overflow:hidden; transition:max-height .35s ease, opacity .35s ease, color .3s var(--ease);
}
#navdots a:hover .lbl, #navdots a.active .lbl{ max-height:120px; opacity:1; }
#navdots a.active .num{ color:var(--rust); }
#navdots .tick{ width:14px; height:1px; background:var(--line); transition:background .3s,width .3s; }
#navdots a.active .tick{ background:var(--rust); width:22px; }
@media (max-width:1050px){ #navdots{ display:none; } }

/* progress bar */
.progress-bar{ position:fixed; top:var(--bar-h); left:0; height:2px; width:0%; background:var(--rust); z-index:1600; box-shadow:0 0 10px var(--rust); }

/* -- fixed chrome (nav rail, HUD tag, language switch, cursor) sits OUTSIDE
   the sections, so it never picks up a section's scoped --ink override —
   without this, it would fade to near-invisible light-cream-on-white every
   time the scroll position is over one of the light passages (hero, world,
   cast, gallery). initNavRail() in main.js toggles this class on <body> from
   the same scroll-position check that drives the nav rail's active state. */
body.theme-light #langswitch{ background:rgba(255,255,255,.62); border-color:rgba(43,36,29,.14); }
body.theme-light #langswitch button{ color:rgba(43,36,29,.5); }
body.theme-light #langswitch button.active{ background:#2b241d; color:#f7f1e6; }
body.theme-light #navdots .num{ color:rgba(43,36,29,.42); }
body.theme-light #navdots .lbl{ color:rgba(43,36,29,.42); }
body.theme-light #navdots .tick{ background:rgba(43,36,29,.16); }
body.theme-light .hud-zone .hz-t{ color:rgba(43,36,29,.46); }
body.theme-light .cursor-ring{ border-color:rgba(43,36,29,.32); transition:width .3s var(--ease),height .3s var(--ease),opacity .25s,border-color .3s var(--ease),background .3s; }
body.theme-light .cursor-ring.is-hot{ border-color:var(--rust); }
body.theme-light .cursor-txt{ color:#2b241d; }

/* ---------------- reusable furniture ---------------- */

/* light table glow: a soft backlit halo behind any floating screen */
.lightbox-glow{ position:relative; }
.lightbox-glow::before{
  content:''; position:absolute; inset:-6%; z-index:-1; border-radius:12px;
  background:radial-gradient(ellipse at 50% 45%, rgba(239,143,126,.16) 0%, rgba(143,217,196,.07) 55%, transparent 78%);
  filter:blur(18px);
}

/* rubber ink stamp: the Machine's mark (and the festival seal) */
.stamp{
  display:inline-flex; align-items:center; gap:.35em; font-family:var(--font-marker); font-weight:400;
  font-size:1rem; letter-spacing:.02em; color:var(--stamp); border:3px solid var(--stamp); border-radius:7px 3px 6px 4px;
  padding:.3rem .85rem .22rem; transform:rotate(-5deg); position:relative; width:fit-content; line-height:1;
}
.stamp::before{ content:''; position:absolute; inset:3px; border:1px solid var(--stamp); border-radius:5px 2px 4px 3px; opacity:.5; }
.stamp-chip{ background:rgba(10,12,16,.72); backdrop-filter:blur(3px); font-size:.82rem; padding:.32rem .8rem; }

/* rough grease-pencil circle around a number */
.num-ring{ position:relative; display:inline-flex; align-items:center; justify-content:center; }
.num-ring::before{
  content:''; position:absolute; width:2.6em; height:2.6em; border:2px solid var(--stamp);
  border-radius:52% 48% 47% 53%/48% 52% 48% 52%; opacity:.6; transform:rotate(-4deg);
}

/* ---------------- eyebrow / section headers ---------------- */
.eyebrow{ font-family:var(--font-display); font-size:.66rem; letter-spacing:.24em; text-transform:uppercase; color:var(--rust); display:flex; align-items:center; gap:.6rem; }
.eyebrow::before{ content:''; width:1.6rem; height:1px; background:var(--rust); display:inline-block; }
.section-title{ font-size:clamp(1.9rem,3.6vw,3.4rem); line-height:1.06; margin-top:.8rem; max-width:18ch; color:var(--ink); }
.section-title em{ font-family:var(--font-serif); font-style:italic; font-weight:600; color:var(--rust-deep); }
.lede{ font-size:clamp(1rem,1.3vw,1.18rem); color:var(--ink-soft); max-width:52ch; margin-top:1.1rem; }
.section-head{ position:relative; padding-top:.5rem; }
.section-pad{ padding:clamp(4.5rem,9vw,8rem) 0; }

/* ==========================================================================
   HERO — one screen, floating in the dark. The footage is the light.
   ========================================================================== */
#hero{
  position:relative; min-height:100svh; display:flex; flex-direction:column; justify-content:center; gap:clamp(1.6rem,3.4vw,2.6rem);
  padding:calc(var(--bar-h) + 4.5rem) var(--gutter) calc(var(--bar-h) + 2.5rem);
  overflow:hidden;
  /* the one light passage — matched exactly to intro.webm's own backdrop
     (sampled from the footage: ~#e3e2e1) so the video has no visible edge
     at all, instead of sitting in a framed box on top of a different tone */
  --ink:        #2b241d;
  --ink-soft:   rgba(43,36,29,.7);
  --ink-faint:  rgba(43,36,29,.46);
  --line:       rgba(43,36,29,.13);
  --line-2:     rgba(43,36,29,.08);
  --rust-deep:  #c1604a;
  background:#e3e2e1;
}
/* an inverted stamp-like chip reads better than reusing --ink/--void here */
#hero .hero-meta .badge{ background:#2b241d; color:#f7f1e6; }
/* no shadow, no border, no corner ticks: the footage's own background
   matches the page exactly, so the screen should read as part of it,
   not as a card floating on top of it */
#hero .hero-screen{ box-shadow:none; border-radius:0; background:#e3e2e1; }
#hero .hero-screen-ticks{ display:none; }
/* intro.webm has a faint 1-2px dark seam baked into its own top/bottom edge
   (an export artifact, not a design element) — scale it up a touch so that
   seam is cropped outside the visible frame instead of reading as a border */
#hero .hero-screen video{ transform:scale(1.025); }
/* a true per-pixel alpha channel on the video wouldn't actually help here —
   plain <video> playback in a browser always composites as fully opaque,
   alpha channels only work through a canvas/WebGL render loop — and the
   footage's own backdrop isn't a flat color anyway (it has its own soft
   vignette), so a hard color-key would leave halos around hair/edges.
   A CSS edge feather gets the same practical result (any last sliver of
   tone mismatch dissolves gradually into the page instead of cutting off
   in a hard rectangle) without touching the source file at all. */
#hero .hero-screen{
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 34px, #000 calc(100% - 34px), transparent),
    linear-gradient(to bottom, transparent, #000 34px, #000 calc(100% - 34px), transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 34px, #000 calc(100% - 34px), transparent),
    linear-gradient(to bottom, transparent, #000 34px, #000 calc(100% - 34px), transparent);
  mask-composite: intersect;
}
.hero-copy-top{ position:relative; z-index:2; text-align:center; }
.hero-title-wrap{ position:relative; display:inline-block; max-width:96%; }
.hero-title{ font-size:clamp(2.7rem,8.4vw,6.4rem); line-height:1; margin:0; position:relative; }
.split-line{ display:block; position:relative; color:var(--ink); white-space:nowrap; }
.split-line .split-char{ display:inline-block; will-change:transform; }
.split-line.accent{ font-family:var(--font-serif); font-style:italic; font-weight:600; font-size:.36em; text-transform:none; letter-spacing:0; color:var(--rust-deep); margin-top:.3em; }
.hero-underline{ width:min(260px,60%); height:14px; margin:.35rem auto 0; display:block; }
.hero-underline path{ fill:none; stroke:var(--rust); stroke-width:2.5; stroke-linecap:round; }

/* the screen itself: true 16:9, never cropped, never boxed in decoration */
.hero-screen{
  position:relative; z-index:2; width:min(1200px,94vw); aspect-ratio:16/9; margin:0 auto; border-radius:6px; overflow:hidden;
  background:#000; box-shadow:0 40px 90px -30px rgba(0,0,0,.75), 0 0 0 1px rgba(243,237,224,.08);
}
.hero-screen video,.hero-screen img,.hero-screen iframe{ width:100%; height:100%; object-fit:cover; display:block; border:0; }
.hero-screen-ticks{ position:absolute; width:20px; height:20px; z-index:2; opacity:.7; pointer-events:none; }
.hero-screen-ticks::before,.hero-screen-ticks::after{ content:''; position:absolute; background:var(--ink); }
.hero-screen-ticks::before{ width:100%; height:1.5px; top:0; }
.hero-screen-ticks::after{ width:1.5px; height:100%; left:0; }
.hero-screen-ticks.tl{ top:10px; left:10px; }
.hero-screen-ticks.tr{ top:10px; right:10px; transform:scaleX(-1); }
.hero-screen-ticks.bl{ bottom:10px; left:10px; transform:scaleY(-1); }
.hero-screen-ticks.br{ bottom:10px; right:10px; transform:scale(-1,-1); }

.hero-copy-bottom{ position:relative; z-index:2; text-align:center; }
.hero-sub{ font-family:var(--font-serif); font-style:italic; font-size:clamp(1.05rem,1.6vw,1.35rem); color:var(--ink-soft); max-width:40ch; margin:0 auto; line-height:1.4; }
.hero-meta{ margin-top:1.5rem; display:flex; flex-wrap:wrap; gap:.9rem; align-items:center; justify-content:center; }
.hero-meta .badge{ font-family:var(--font-body); font-size:.72rem; letter-spacing:.05em; background:var(--ink); color:var(--void); padding:.5rem 1rem; border-radius:3px; }
.hero-meta .studio-credit{ font-size:.82rem; color:var(--ink-faint); }
.hero-scroll-cue{ margin-top:1.8rem; display:flex; align-items:center; gap:.7rem; font-size:.68rem; letter-spacing:.16em; text-transform:uppercase; color:var(--ink-faint); justify-content:center; }
.hero-scroll-cue .ln{ width:34px; height:1px; background:var(--ink-faint); position:relative; overflow:hidden; }
.hero-scroll-cue .ln::after{ content:''; position:absolute; inset:0; background:var(--rust); transform:translateX(-100%); animation:cueSweep 2.2s ease-in-out infinite; }
@keyframes cueSweep{ 0%{transform:translateX(-100%);} 50%{transform:translateX(0);} 100%{transform:translateX(100%);} }

.hero-halo{ position:absolute; top:-8%; right:-6%; width:min(60vw,640px); opacity:.4; pointer-events:none; z-index:1; }
.hero-halo .orbit{ transform-origin:50% 50%; animation:spin 60s linear infinite; }
.hero-halo .orbit-2{ animation-duration:90s; animation-direction:reverse; }
@keyframes spin{ to{ transform:rotate(360deg); } }

@media (max-width:700px){
  .hero-screen{ width:100%; }
}

/* marquee */
.marquee{ overflow:hidden; border-top:1px solid var(--line); border-bottom:1px solid var(--line); background:var(--void-2); padding:1.1rem 0; white-space:nowrap; }
@media (max-width:680px){ .marquee{ position:relative; z-index:1501; } }
.marquee-track{ display:inline-flex; gap:3rem; animation:marquee 26s linear infinite; padding-right:3rem; }
.marquee span{ font-family:var(--font-display); font-weight:800; font-size:clamp(1.4rem,3vw,2.2rem); color:var(--ink); }
.marquee span.hollow{ color:transparent; -webkit-text-stroke:1.2px var(--rust); }
@keyframes marquee{ to{ transform:translateX(-50%); } }

/* ==========================================================================
   LOGLINE
   ========================================================================== */
#logline{ padding:clamp(4rem,9vw,7rem) 0; }
.logline-grid{ display:grid; grid-template-columns:1fr .8fr; gap:clamp(2rem,6vw,5rem); align-items:center; }
.logline-text p{ font-family:var(--font-serif); font-style:italic; font-size:clamp(1.2rem,2vw,1.6rem); line-height:1.45; color:var(--ink); margin-top:1.3rem; }
.logline-text p:first-of-type{ margin-top:1.6rem; }
.seed-svg-wrap{ display:flex; justify-content:center; }
.seed-svg{ width:100%; max-width:220px; }
.seed-path{ fill:none; stroke:var(--teal); stroke-width:2.2; stroke-linecap:round; }
.seed-dot{ fill:var(--rust); }
@media (max-width:820px){ .logline-grid{ grid-template-columns:1fr; } .seed-svg-wrap{ order:-1; max-width:160px; margin:0 auto; } }

/* ==========================================================================
   WORLD — screens adrift, not photographs pinned to a board
   ========================================================================== */
/* a watercolor wash — the one deliberately light passage, for balance */
#world{
  --ink:        #2b241d;
  --ink-soft:   rgba(43,36,29,.7);
  --ink-faint:  rgba(43,36,29,.46);
  --line:       rgba(43,36,29,.13);
  --line-2:     rgba(43,36,29,.08);
  --rust-deep:  #c1604a;
  background:
    radial-gradient(55% 55% at 12% 15%, rgba(239,143,126,.38), transparent 70%),
    radial-gradient(50% 60% at 88% 10%, rgba(167,181,232,.32), transparent 70%),
    radial-gradient(65% 55% at 50% 105%, rgba(143,217,196,.3), transparent 70%),
    #f2ebe0;
}
.world-gallery{ margin-top:3.6rem; display:grid; grid-template-columns:repeat(6,1fr); grid-template-rows:repeat(2,minmax(160px,220px)); gap:1.6rem 1.3rem; }
.wg-item{ position:relative; overflow:hidden; border-radius:5px; box-shadow:0 16px 34px -14px rgba(43,36,29,.25), 0 0 0 1px var(--line-2); }
.wg-item img{ width:100%; height:100%; object-fit:cover; display:block; filter:saturate(1.03); }
.wg-cap{ position:absolute; left:.6rem; right:.6rem; bottom:.5rem; font-family:var(--font-hand); font-size:1.15rem; color:#f7f1e6; text-shadow:0 2px 6px rgba(0,0,0,.8); }
.wg-a{ grid-column:1/4; grid-row:1/3; }
.wg-b{ grid-column:4/7; grid-row:1/2; }
.wg-c{ grid-column:4/6; grid-row:2/3; }
.wg-d{ grid-column:6/7; grid-row:2/3; }
@media (max-width:820px){
  .world-gallery{ grid-template-columns:1fr 1fr; grid-template-rows:repeat(3,160px); }
  .wg-a{ grid-column:1/3; grid-row:1/2; } .wg-b{ grid-column:1/2; grid-row:2/3; } .wg-c{ grid-column:2/3; grid-row:2/3; } .wg-d{ grid-column:1/3; grid-row:3/4; }
}

/* ==========================================================================
   JOURNEY — an exposure sheet, read in the dark
   ========================================================================== */
#journey{ position:relative; }
.journey-spine{ position:absolute; left:calc(var(--gutter) + 2.6rem); top:14rem; bottom:6rem; width:1px; background:var(--line); }
@media (max-width:700px){ .journey-spine{ display:none; } }
.beat{ display:grid; grid-template-columns:5rem 1fr 1.1fr; gap:2rem; align-items:center; padding:2.6rem 0; border-bottom:1px solid var(--line-2); }
.beat:first-child{ padding-top:3.4rem; }
.beat-num{ font-family:var(--font-display); font-size:1.4rem; color:var(--ink-soft); position:relative; z-index:1; }
.beat-media{ aspect-ratio:5/4; overflow:hidden; border-radius:5px; box-shadow:0 14px 30px -14px rgba(0,0,0,.6), 0 0 0 1px var(--line-2); }
.beat-media img{ width:100%; height:100%; object-fit:cover; }
.beat-text h3{ font-size:clamp(1.2rem,2vw,1.7rem); font-weight:800; color:var(--ink); }
.beat-text p{ font-family:var(--font-serif); font-style:italic; color:var(--ink-soft); font-size:1.08rem; margin-top:.7rem; line-height:1.4; }
@media (max-width:700px){ .beat{ grid-template-columns:2.4rem 1fr; } .beat-media{ grid-column:1/3; order:-1; } }

/* ==========================================================================
   CAST — Maktalis featured (the one true black), four screens in a row
   ========================================================================== */
#cast{
  position:relative;
  /* second light passage — same watercolor wash as #world, for the same balance */
  --ink:        #2b241d;
  --ink-soft:   rgba(43,36,29,.7);
  --ink-faint:  rgba(43,36,29,.46);
  --line:       rgba(43,36,29,.13);
  --line-2:     rgba(43,36,29,.08);
  --rust-deep:  #c1604a;
  background:
    radial-gradient(55% 55% at 12% 15%, rgba(239,143,126,.38), transparent 70%),
    radial-gradient(50% 60% at 88% 10%, rgba(167,181,232,.32), transparent 70%),
    radial-gradient(65% 55% at 50% 105%, rgba(143,217,196,.3), transparent 70%),
    #f2ebe0;
}
/* the four character cards keep their own dark "screen" surface, so their
   text needs to stay light regardless of the section wash around them */
#cast .cast-card .cast-name{ color:#f3ede0; }
#cast .cast-card .cast-role{ color:#f6b9ab; }
#cast .cast-card .cast-bio{ color:rgba(243,237,224,.72); }
.cast-feature{
  margin-top:3.2rem; background:var(--dusk); color:var(--dusk-tx); overflow:hidden; border-radius:6px;
  display:grid; grid-template-columns:1.05fr 1fr; align-items:stretch;
  box-shadow:0 30px 60px -22px rgba(0,0,0,.7), 0 0 0 1px rgba(255,90,60,.12);
}
.cast-feature-media{ position:relative; min-height:340px; }
.cast-feature-media img{ width:100%; height:100%; object-fit:cover; opacity:.94; }
.cast-feature-media::after{ content:''; position:absolute; inset:0; background:linear-gradient(115deg, rgba(0,0,0,.2), transparent 55%); }
.cast-feature-body{ padding:clamp(1.8rem,3vw,3.4rem); display:flex; flex-direction:column; justify-content:center; gap:1rem; }
.cast-feature .tag{ font-size:.68rem; letter-spacing:.18em; text-transform:uppercase; color:var(--gold); display:flex; align-items:center; gap:.6rem; }
.cast-feature .tag::before{ content:''; width:1.6rem; height:1px; background:var(--gold); }
.cast-feature .name{ font-family:var(--font-display); font-size:clamp(2.4rem,4.5vw,4rem); line-height:1; margin-top:.3rem; }
.cast-feature .role{ font-family:var(--font-serif); font-style:italic; font-size:1.2rem; color:rgba(241,227,200,.7); margin-top:.3rem; }
.cast-feature .bio{ font-size:.98rem; line-height:1.55; color:rgba(241,227,200,.85); margin-top:1rem; max-width:46ch; }
.cast-feature .stamp{ color:var(--stamp); border-color:var(--stamp); margin-top:.4rem; }
@media (max-width:820px){ .cast-feature{ grid-template-columns:1fr; } .cast-feature-media{ min-height:220px; } }

.cast-grid{ margin-top:1.8rem; display:grid; grid-template-columns:repeat(4,1fr); gap:1.6rem 1.4rem; }
.cast-card{ position:relative; background:var(--void-2); border-radius:6px; box-shadow:0 16px 34px -16px rgba(0,0,0,.6), 0 0 0 1px var(--line-2); overflow:hidden; transition:box-shadow .3s var(--ease),transform .3s var(--ease); }
.cast-card:hover{ transform:translateY(-4px); box-shadow:0 22px 44px -16px rgba(0,0,0,.65), 0 0 0 1px rgba(239,143,126,.35); }
.cast-photo{ aspect-ratio:3/4; overflow:hidden; background:var(--void-3); }
.cast-photo img{ width:100%; height:100%; object-fit:cover; }
.cast-body{ padding:1.1rem 1.2rem 1.4rem; }
.cast-name{ font-family:var(--font-display); font-weight:800; font-size:1.15rem; color:var(--ink); }
.cast-role{ font-family:var(--font-hand); font-size:1.25rem; color:var(--rust-deep); margin-top:.1rem; }
.cast-bio{ font-size:.86rem; color:var(--ink-soft); margin-top:.6rem; line-height:1.5; }
@media (max-width:900px){ .cast-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:520px){ .cast-grid{ grid-template-columns:1fr; } }

/* ==========================================================================
   WORKFLOW
   ========================================================================== */
#workflow{ background:var(--void-2); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.workflow-intro{ display:grid; grid-template-columns:1fr 1.2fr; gap:clamp(2rem,5vw,4rem); align-items:end; }
.pipeline{ margin-top:1.7rem; display:flex; flex-wrap:wrap; align-items:center; gap:.6rem; font-size:.85rem; color:var(--ink-soft); }
.pipeline .step{ display:inline-flex; align-items:center; gap:.35rem; }
.pipeline .step b{ font-family:var(--font-display); color:var(--rust); font-size:.78rem; }
.pipeline .arrow{ color:var(--ink-faint); }
.tool-cards{ margin-top:3.2rem; display:grid; grid-template-columns:1fr 1fr; gap:1.8rem; }
.tool-card{ background:var(--void-3); border-radius:6px; box-shadow:0 16px 34px -16px rgba(0,0,0,.6), 0 0 0 1px var(--line-2); overflow:hidden; }
.tool-video{ position:relative; aspect-ratio:16/9; background:#000; overflow:hidden; }
.tool-video video{ width:100%; height:100%; object-fit:cover; }
.tool-body{ padding:1.4rem 1.5rem 1.6rem; }
.tool-tag{ font-size:.68rem; letter-spacing:.14em; text-transform:uppercase; color:var(--rust); }
.tool-name{ font-family:var(--font-display); font-weight:800; font-size:1.15rem; margin-top:.4rem; color:var(--ink); }
.tool-desc{ font-size:.88rem; color:var(--ink-soft); margin-top:.6rem; line-height:1.5; }

.workflow-tagline{
  margin-top:clamp(3rem,6vw,4.6rem); font-family:var(--font-serif); font-style:italic; font-weight:600;
  font-size:clamp(1.4rem,2.6vw,2rem); color:var(--ink); max-width:24ch; line-height:1.25;
}

.stack-list{ margin-top:2.6rem; display:flex; flex-direction:column; }
.stack-row{ display:grid; grid-template-columns:3.4rem 1fr; gap:1.4rem; padding:1.5rem 0; border-top:1px solid var(--line); align-items:start; }
.stack-row:last-child{ border-bottom:1px solid var(--line); }
.stack-meta{ display:flex; flex-direction:column; align-items:flex-start; gap:.85rem; }
.stack-num{ font-family:var(--font-display); font-size:.8rem; color:var(--rust); }
.stack-icon{ display:block; color:var(--ink-faint); opacity:.75; transition:color .35s var(--ease), opacity .35s var(--ease); }
.stack-icon svg{ width:27px; height:27px; display:block; }
.stack-row:hover .stack-icon{ color:var(--rust-deep); opacity:1; }
.stack-title{ font-family:var(--font-display); font-weight:800; font-size:1.05rem; color:var(--ink); margin-bottom:.45rem; }
.stack-row p{ font-size:.92rem; color:var(--ink-soft); line-height:1.58; max-width:64ch; }
@media (max-width:600px){
  .stack-row{ grid-template-columns:1fr; gap:.3rem; }
  .stack-meta{ flex-direction:row; align-items:center; gap:.7rem; margin-bottom:.3rem; }
  .stack-num{ font-size:.72rem; color:var(--rust); }
  .stack-icon svg{ width:21px; height:21px; }
}

.davinci-strip{ margin-top:clamp(3rem,6vw,4.6rem); }
.davinci-cap{ font-size:.78rem; letter-spacing:.06em; color:var(--ink-faint); margin-bottom:1.1rem; }
.davinci-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:1rem; }
.davinci-shot{ border-radius:4px; overflow:hidden; box-shadow:0 14px 30px -16px rgba(0,0,0,.6), 0 0 0 1px var(--line-2); aspect-ratio:16/9.2; background:#0a0a0a; }
.davinci-shot img{ width:100%; height:100%; object-fit:cover; object-position:top; opacity:.94; }
@media (max-width:820px){ .workflow-intro{ grid-template-columns:1fr; } .tool-cards{ grid-template-columns:1fr; } .davinci-grid{ grid-template-columns:repeat(2,1fr); } }

/* ==========================================================================
   GALLERY — horizontal drift of workbench fragments
   ========================================================================== */
#gallery{
  padding-top:clamp(4.5rem,9vw,8rem);
  /* third light passage — same watercolor wash, closing the rhythm before Festival */
  --ink:        #2b241d;
  --ink-soft:   rgba(43,36,29,.7);
  --ink-faint:  rgba(43,36,29,.46);
  --line:       rgba(43,36,29,.13);
  --line-2:     rgba(43,36,29,.08);
  --rust-deep:  #c1604a;
  background:
    radial-gradient(55% 55% at 12% 15%, rgba(239,143,126,.38), transparent 70%),
    radial-gradient(50% 60% at 88% 10%, rgba(167,181,232,.32), transparent 70%),
    radial-gradient(65% 55% at 50% 105%, rgba(143,217,196,.3), transparent 70%),
    #f2ebe0;
}
.gal-head{ padding-bottom:2.4rem; }
.concept-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:1.4rem; padding:0 var(--gutter) 1rem; }
.concept-item{ margin:0; border-radius:5px; overflow:hidden; aspect-ratio:16/9; box-shadow:0 18px 36px -14px rgba(0,0,0,.65), 0 0 0 1px var(--line-2); }
.concept-item img{ width:100%; height:100%; object-fit:cover; display:block; transition:transform .6s var(--ease); }
.concept-item:hover img{ transform:scale(1.04); }
@media (max-width:900px){ .concept-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:520px){ .concept-grid{ grid-template-columns:1fr; gap:1.1rem; } }

/* ==========================================================================
   PREVIEW — the film taking shape: a placeholder cut, then its raw frames
   ========================================================================== */
#preview{ background:var(--void-2); border-top:1px solid var(--line); border-bottom:1px solid var(--line); overflow:hidden; }
.preview-screen-wrap{ display:flex; flex-direction:column; align-items:center; gap:1.1rem; }

/* frame cells — reused as the continuous strip inside #festival below */
.frame-cell{ position:relative; flex:none; width:min(40vw,300px); aspect-ratio:16/9; margin:0; background:#000; overflow:hidden; }
.frame-cell img{ width:100%; height:100%; object-fit:cover; display:block; filter:grayscale(.12) contrast(1.05); }
.frame-cell::after{ content:''; position:absolute; inset:0; box-shadow:inset 0 0 0 1px rgba(255,255,255,.07); pointer-events:none; }
.frame-tc{
  position:absolute; left:8px; bottom:7px; font-family:var(--font-body); font-size:.66rem; letter-spacing:.03em;
  color:#f5c542; background:rgba(0,0,0,.55); padding:.16rem .42rem; border-radius:2px; pointer-events:none;
}
@media (max-width:700px){ .frame-cell{ width:min(70vw,260px); } }

/* ==========================================================================
   FESTIVAL — the last light, before the credits
   ========================================================================== */
/* a continuous film-reel masthead flows straight into the festival copy below —
   no pinned gap, no separate section: the frames and the statement share one screen */
.fest-strip{ position:relative; overflow:hidden; background:#050505; border-bottom:1px solid rgba(255,255,255,.06); }
.fest-strip-track{ display:flex; gap:3px; padding:1.4rem var(--gutter) 1.5rem; width:max-content; animation:festStripScroll 62s linear infinite; }
.fest-strip:hover .fest-strip-track{ animation-play-state:paused; }
@keyframes festStripScroll{ to{ transform:translateX(-50%); } }
#festival{ position:relative; padding:clamp(5rem,10vw,9rem) 0; overflow:hidden; }
.festival-bg{ position:absolute; inset:0; background-size:cover; background-position:center 40%; filter:grayscale(.4) brightness(.4) contrast(1.1); }
#festival::before{ content:''; position:absolute; inset:0; background:linear-gradient(180deg, rgba(10,12,16,.94), rgba(10,12,16,.88) 35%, rgba(10,12,16,.7)); }
.festival-inner{
  position:relative; z-index:2; text-align:center; max-width:720px;
  background:rgba(18,21,27,.6); backdrop-filter:blur(4px);
  border:1px solid var(--line); border-radius:8px; padding:clamp(2rem,5vw,3.4rem) clamp(1.4rem,4vw,3rem);
  box-shadow:0 30px 60px -24px rgba(0,0,0,.7);
}
.festival-badge{ font-family:var(--font-marker); font-size:.85rem; color:var(--stamp); display:inline-block; transform:rotate(-2deg); }
.festival-theme{ font-family:var(--font-serif); font-style:italic; font-weight:600; font-size:clamp(1.8rem,4vw,2.8rem); margin-top:.8rem; color:var(--ink); }
.festival-statement{ font-size:1.02rem; color:var(--ink-soft); margin-top:1.3rem; line-height:1.55; }
.festival-link{
  display:inline-flex; align-items:center; gap:.5rem; margin-top:1.9rem; background:var(--ink); color:var(--void);
  padding:.85rem 1.7rem; font-size:.85rem; font-family:var(--font-display);
  clip-path:polygon(10px 0,calc(100% - 10px) 0,100% 50%,calc(100% - 10px) 100%,10px 100%,0 50%);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer{ padding:clamp(3.5rem,7vw,5.5rem) 0 calc(var(--bar-h) + 2rem); border-top:1px solid var(--line); }
.footer-top{ display:flex; justify-content:space-between; align-items:flex-start; gap:2rem; flex-wrap:wrap; }
.footer-brand{ font-family:var(--font-display); font-weight:800; font-size:clamp(1.6rem,3vw,2.2rem); color:var(--ink); }
.footer-brand span{ display:block; font-family:var(--font-serif); font-style:italic; font-weight:500; font-size:.5em; color:var(--rust-deep); }
.footer-studio{ margin-top:.7rem; font-size:.9rem; color:var(--ink-soft); }
.footer-studio a{ color:var(--rust); border-bottom:1px solid var(--rust); }
.footer-top .badge{ font-size:.72rem; background:var(--ink); color:var(--void); padding:.5rem .9rem; border-radius:3px; }
.footer-meta{ margin-top:2.4rem; padding-top:1.6rem; border-top:1px solid var(--line-2); display:flex; flex-wrap:wrap; gap:1.4rem; font-size:.78rem; color:var(--ink-faint); justify-content:space-between; }
.back-top{ cursor:pointer; text-decoration:underline; text-underline-offset:3px; }

/* ---------------- reveal utility ---------------- */
[data-reveal]{ opacity:0; transform:translateY(28px); }

@media (prefers-reduced-motion:reduce){
  *{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
}
