/* Studio Gaami — one-page site */

:root {
  --bg: #0c0c0c;
  --bg-2: #111111;
  --card: #151515;
  --card-2: #1a1a1a;
  --line: rgba(255, 255, 255, 0.08);
  --text: #ece6da;
  --dim: #a9a397;
  --faint: #8b857a;
  --yellow: #f7c21b;
  --yellow-hi: #ffd84d;
  --red: #c8372a;
  --ink: #2a1c13;      /* writing on the torn paper */
  --ink-red: #8c2618;

  --f-sans: "Hubot Sans", system-ui, -apple-system, "Segoe UI", sans-serif;  /* everything: body and UI (Regular-SemiBold), headlines (Bold),
                                                                            display caps (Expanded), labels (Semi-condensed), the story notes (Condensed) */
  --f-brand: "Fredoka One", "Hubot Sans", system-ui, sans-serif;            /* the studio's own voice: GAAMI, the studio line, founder names,
                                                                            "Let's create worlds together", the 404 */

  --gutter: clamp(16px, 4.5vw, 56px);
  --max: 1200px;
  --track: 0.3em;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.7 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip; /* clip, not hidden, so sticky story scenes keep working */
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
svg { display: block; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--yellow); color: #111; padding: 8px 14px; border-radius: 4px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow { font: 600 12px/1.5 var(--f-sans); font-stretch: semi-condensed; letter-spacing: .22em; text-transform: uppercase; color: var(--text); text-wrap: balance; }
.rule { display: block; width: 30px; height: 2px; background: var(--yellow); }

/* ---------- buttons ---------- */
.btn-pill {
  display: inline-flex; align-items: center; gap: 22px;
  padding: 5px 5px 5px 24px;
  background: var(--yellow); color: #141414;
  border: 2px solid var(--yellow); border-radius: 999px;
  font: 600 12.5px/1 var(--f-sans); letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none;
  transition: background .25s, box-shadow .25s;
}
.btn-pill:hover { background: var(--yellow-hi); box-shadow: 0 0 0 6px rgba(247,194,27,.14); }
.btn-pill__icon { width: 34px; height: 34px; border-radius: 50%; background: #141414; color: var(--yellow); display: grid; place-items: center; transition: transform .25s; }
.btn-pill__icon svg { width: 16px; height: 16px; }
.btn-pill:hover .btn-pill__icon { transform: translateX(3px); }
.btn-pill--lg { padding-left: 28px; gap: 26px; }
.btn-pill--lg .btn-pill__icon { width: 40px; height: 40px; }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 20px; min-height: 40px;
  border: 1px solid var(--yellow); border-radius: 999px;
  color: var(--yellow); text-decoration: none;
  font: 600 11.5px/1 var(--f-sans); letter-spacing: 0.12em; text-transform: uppercase;
  transition: background .25s, color .25s;
}
.btn-outline:hover { background: var(--yellow); color: #141414; }

.btn-outline--light { border-color: rgba(255,255,255,.35); color: var(--text); min-height: 46px; padding: 14px 22px; }
.btn-outline--light:hover { border-color: var(--yellow); background: transparent; color: var(--yellow); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  transition: padding .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
/* the frosted bar once you scroll sits on its own layer behind the bar: a blur on the bar itself would make it the frame
   for anything fixed inside it, so the phone menu (meant to cover the whole screen) would be squeezed into the bar */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(12,12,12,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.nav.is-scrolled::before { opacity: 1; }
.nav.is-scrolled { border-color: var(--line); padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.brand__logo { width: 52px; height: 52px; }
.brand__text { display: flex; flex-direction: column; gap: 6px; }
.brand__studio { font: 700 11px/1 var(--f-sans); letter-spacing: 0.46em; text-transform: uppercase; color: var(--text); }
.brand__word { font: 400 32px/0.86 var(--f-brand); letter-spacing: 0.1em; text-transform: uppercase; color: #fff; }
.nav__menu { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); }
.nav__links { display: flex; gap: clamp(18px, 2.6vw, 40px); }
.nav__links a {
  position: relative; padding: 8px 0;
  font: 600 12px/1 var(--f-sans); letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; color: var(--text); transition: color .2s;
}
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--yellow); transform: scaleX(0); transition: transform .25s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--yellow); }
.nav__links a.is-active::after { transform: scaleX(1); }
.nav__toggle { display: none; }

@media (max-width: 900px) {
  .nav__toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 44px; height: 44px; padding: 10px; background: none; border: 0; cursor: pointer; z-index: 2;
  }
  .nav__toggle span:not(.sr-only) { display: block; height: 2px; background: var(--text); transition: transform .25s; }
  .nav__toggle[aria-expanded="true"] span:nth-of-type(2) { transform: translateY(4px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-of-type(3) { transform: translateY(-4px) rotate(-45deg); }
  .nav__menu {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; justify-content: center; gap: 36px;
    background: rgba(10,10,10,.98);
    opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
  }
  .nav__menu.is-open { opacity: 1; visibility: visible; }
  .nav__links { flex-direction: column; align-items: center; gap: 26px; }
  .nav__links a { font-size: 15px; letter-spacing: 0.28em; }
  .brand { position: relative; z-index: 2; }
  .brand__logo { width: 44px; height: 44px; }
  .brand__word { font-size: 27px; }
}

/* ---------- hero ----------
   Studio intro. Default (reduced motion, short landscape screens, no JS): a normal intro with everything stacked and
   the timer showing "1952 → 1700". html.story-live (set by main.js otherwise; phones and portrait screens also get
   story-tall, further down): the intro pins while you scroll; the landing image shrinks away to reveal the kottaram,
   the story steps ([data-beat]) take turns in the middle of the screen, and main.js rolls the year back to 1700 while
   the palace changes from ruin to restored. */
.hero { position: relative; background: radial-gradient(ellipse 55% 50% at 50% 46%, rgba(247,194,27,.10), transparent 70%), #0a0a0a; }
.hero__stage { position: relative; overflow: hidden; isolation: isolate; min-height: clamp(600px, 88vh, 860px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.hero__content { position: relative; z-index: 2; width: 100%; max-width: var(--max); margin: 0 auto; padding: 140px var(--gutter) 130px; display: flex; flex-direction: column; align-items: center; gap: 22px; text-shadow: 0 2px 18px rgba(10,10,10,.9); }
.hero__content > * { max-width: 840px; }
.hero__statement { font: 400 clamp(36px, 5vw, 68px)/1.08 var(--f-brand); letter-spacing: 0.005em; margin-top: 4px; text-shadow: 0 2px 6px rgba(10,10,10,.85), 0 0 30px rgba(10,10,10,.9); } /* stays readable over the artwork */
.hero__statement span { display: block; }
.hero__statement .accent { color: var(--yellow); }
.hero__lede { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; color: var(--text); }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; margin-top: 10px; }
.hero__link {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 10px; color: var(--text); text-decoration: none;
  font: 600 12px/1 var(--f-sans); letter-spacing: .12em; text-transform: uppercase; transition: color .2s;
}
.hero__link svg { width: 14px; height: 14px; transition: transform .2s; }
.hero__link:hover { color: var(--yellow); }
.hero__link:hover svg { transform: translateX(3px); }
.hero__scroll { position: absolute; z-index: 2; left: 50%; bottom: 26px; width: 1px; height: 52px; background: linear-gradient(var(--yellow), transparent); transform-origin: top; animation: drip 2.4s ease-in-out infinite; }
@keyframes drip { 0%, 100% { opacity: .25; transform: scaleY(.55); } 50% { opacity: 1; transform: scaleY(1); } }

/* the palace behind the intro, ruin → restored */
/* starts just below the menu bar and is anchored to its top edge, so the whole sky (and each stage's moon) always shows;
   any cropping happens at the bottom, on the steps. The top edge fades into the page behind the menu. */
.hero__frames { position: absolute; inset: 80px 0 0; z-index: 0; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 56px); mask-image: linear-gradient(to bottom, transparent, #000 56px); }
.hero__fit, .hero__frame { position: absolute; inset: 0; }
.hero__frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; }
.hero__frame:not(:first-child) { display: none; }
.hero__shade { position: absolute; inset: 0; z-index: 0; background: radial-gradient(ellipse 50% 32% at 50% 50%, rgba(10,10,10,.62), transparent 100%), radial-gradient(ellipse 70% 90% at 50% 40%, transparent 55%, rgba(10,10,10,.78) 100%), linear-gradient(to top, rgba(10,10,10,.85), transparent 22%); } /* soft vignette on the sides and corners; the sky stays clear */

/* the story steps: studio line → one-line story beats → Vaelora */
/* each story line is written on a scrap of torn paper, laid slightly askew (alternating) */
.hero__line { position: relative; z-index: 2; width: fit-content; max-width: min(900px, calc(100% - 2 * var(--gutter))); margin: 22px auto; padding: 26px 40px 28px; font: 500 clamp(22px, 4.4vw, 52px)/1.18 var(--f-sans); font-stretch: condensed; letter-spacing: 0; text-wrap: balance; color: var(--ink); text-align: center; rotate: var(--tilt, -1deg); filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .6)); }
.hero__line:nth-of-type(even) { --tilt: .8deg; }
.hero__line::before { content: ""; position: absolute; inset: 0; z-index: -1; }
.hero__line::before, .tear { background: url("../assets/img/paper-torn-narrow.webp?v=1") center / 100% 100% no-repeat; } /* phones: a squarer scrap */
.story-live .hero__line::before, .story-live .tear { background-image: url("../assets/img/paper-torn-wide.webp?v=1"); } /* one long strip per line */
/* once main.js has wrapped a line (for the tearing and burning below), the paper sits on the wrapper instead */
.hero__line.is-split { padding: 0; }
.hero__line.is-split::before { content: none; }
.tear { display: block; padding: 26px 40px 28px; }
.hero__line-kicker { display: block; margin-bottom: 12px; font: 600 12px/1 var(--f-sans); font-stretch: semi-condensed; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-red); }
.hero__finale { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 60px var(--gutter) 150px; text-align: center; text-shadow: 0 2px 18px rgba(10,10,10,.9); }
.hero__finale { scroll-margin-top: 64px; } /* lands below the fixed menu bar */
.hero__synopsis { max-width: 520px; font-size: clamp(15px, 1.4vw, 17px); line-height: 1.75; color: var(--text); }

/* Achyut at the door: the landing image. Phones show it under the studio line; on larger screens it sits
   right-middle and, as you scroll (--door, 0 → 1), glides down into the kottaram's gate and fades into it
   while the kottaram behind it comes into view. */
.hero__door { position: relative; z-index: 1; margin: 0 auto 24px; width: min(280px, 66vw); }
.hero__door img {
  display: block; width: 100%; height: auto;
  filter: contrast(1.12) brightness(.94); /* pushes the sketch's near-blacks down to the page colour */
  /* fade every edge into the page so no rectangle shows */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 24%, #000 78%, transparent), linear-gradient(to bottom, transparent, #000 16%, #000 80%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 24%, #000 78%, transparent), linear-gradient(to bottom, transparent, #000 16%, #000 80%, transparent);
  mask-composite: intersect;
}

/* play the story by itself: bottom left, mirroring the year timer (desktop only; main.js runs it) */
.hero__play { display: none; }
.story-live .hero__play {
  position: absolute; z-index: 3; left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); bottom: clamp(26px, 5vh, 46px);
  display: inline-flex; align-items: center; gap: 14px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 600 11px/1 var(--f-sans); font-stretch: semi-condensed; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); transition: color .2s ease;
}
.hero__play-icon { position: relative; width: 44px; height: 44px; border: 1px solid rgba(247, 194, 27, .55); border-radius: 50%; transition: border-color .2s ease, background-color .2s ease; }
.hero__play-icon::before { content: ""; position: absolute; left: 50%; top: 50%; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent var(--yellow); transform: translate(-38%, -50%); } /* play */
.hero__play[data-playing] .hero__play-icon::before { width: 4px; height: 14px; border: 0; background: var(--yellow); box-shadow: 7px 0 0 var(--yellow); transform: translate(-115%, -50%); } /* pause */
.hero__play:hover, .hero__play:focus-visible { color: var(--text); }
.hero__play:hover .hero__play-icon, .hero__play:focus-visible .hero__play-icon { border-color: var(--yellow); background-color: rgba(247, 194, 27, .08); }
.hero__play:focus-visible { outline: none; }

/* the year timer, bottom right */
.hero__timer { position: absolute; z-index: 2; right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); bottom: clamp(26px, 5vh, 46px); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.hero__timer-label { font: 600 11px/1 var(--f-sans); font-stretch: semi-condensed; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); }
.hero__timer-year { font: 700 clamp(32px, 3.4vw, 50px)/1 var(--f-sans); letter-spacing: -.01em; color: var(--yellow); font-variant-numeric: tabular-nums; }

/* live, scroll-driven version */
.story-live .hero--studio { --p: 0; height: 420vh; }
.story-live .hero .beat { position: absolute; left: 50%; top: 50%; width: min(940px, calc(100% - 2 * var(--gutter))); padding: 0; transform: translate(-50%, -46%); opacity: 0; transition: opacity .6s ease, transform .6s ease; }
.story-live .hero .beat.is-on { opacity: 1; transform: translate(-50%, -50%); }
.story-live .hero .beat:not(.is-on) { pointer-events: none; }
.story-live .hero__line { width: max-content; max-width: none; white-space: nowrap; font-size: min(3.3vw, 52px); } /* each story beat stays on one line */
/* the paper settles into place as its line comes in */
.story-live .hero .hero__line { width: max-content; padding: 28px 58px 30px; transition: opacity .6s ease, transform .6s ease, rotate .8s cubic-bezier(.2, .7, .2, 1); }
.story-live .hero .hero__line:not(.is-on) { rotate: calc(var(--tilt, -1deg) * 3); }
/* the mask image for the tear edge is embedded here:
   browsers load mask images under cross-origin rules, so as separate files they fail when the page is opened straight
   from disk, and a failed mask hides the element completely. */
.hero {
  --mask-tear: url("data:image/webp;base64,UklGRl4DAABXRUJQVlA4TFIDAAAvX8ksEJVIjCRJkaTTX+k4UKEsLI/vPx4iFAAAQPz///////////9/E8D/zQrTDtWjJZ5wtCvUI2VXGATRrsQ76HKF/d2pV0sRYld2p14t0yvkA2dXClm7Aj8u0MmVIlavBL5eiWW9QoZeIVOu8BosyLsVbHekHi4VxHpleiXY5QprO1EvF2qAsCuVXUGFlwh0K/1qcqW41StTK3zTCvzcSk2vsIeFXYlJPOQKC1g/AMgVcmdXplfCTK9kV96BtivxxFco/FIr1T865QrdXMevW+EN4F2n5wvpG+hmBZcdqMdLsQegXNmBertwwRvcNKIAl1kh939xOrMSid/Qza3gyUtypbDWK9MrIahXPtGwK8GrV0qu0MN6Ya1WKlimVn5FFLZu5SX5bmXX6f3CeQTLleq/XCFgA8ethMRu0/tl5+n9UoDYlV2nxwuRrJM8t1IIyxXQoZtcCSPg7EqRDYlaQRU9gneeHi/RPrsSLnolXuB1KyzDufP0eGFrB+rxUrjiZFcYpQs0vGFSKwG56/R+IRFhu1LZFcLhtSuxD5JbYYroHaf3S6S6FUqpZg8pt1J8zq7UUFArvBUMUysVxEPArdCx4/SAeYmvWmGOtSJVrVTggD3Y3EpssDu50uwKS3aFRZztSrMrjEFGHTJuBVCEYOIHYLHCOAEgwLnD9IIprGmQKzAiMLnCGI2FvFqpXaZHDGvUA+FWGMYZrrmVdpkeMWGHuV2BCVK7Ejh2hT+60MKHfLXC5wAiamoljvYqV+IZZrsSBm6F9t2lV0zE6BXc9UrRA45dKbnC5K7SMwamyRUmWBuEaoXXYnFqhQs2iJpa4bgAdisRFuXIqZWPXaYnDLtY2JWXcgXRXaYnDFqzK5RCY1cGKBRoqRX222l6wfCHl12BCTy5Qt6O0wOGgYEuV4jlm1tigFUrqO84PWB40yuB5VeYkSuUPQAcpwfMS4DVCvuRvdP0gInf2ZXYpBggtYLnjtMDBj+5gtTO0/OlercrjM+uVCQCL1do2Gl6wpDekHMrMQjb5Ar+iNKCiFsJ+d8zKyzStNP0gqnsym8SgJYrYTC7kl+B0q38q/7yS5RYKYKxooQGONRKtbv0hmESAcDlStEsV4DYZXrDVH4F07sE");
}
/* each line's scrap is ripped off left to right as it comes in (a ragged edge sweeps across: --mask-tear, twice the
   scrap's width with the tear in the middle) and burns away as it leaves (main.js runs an SVG burn filter on it).
   main.js wraps each line in .tear so the paper and its text tear and burn together; the shadow sits on the line itself,
   so it follows the torn and burnt shapes. */
.story-live .hero .hero__line.is-split { padding: 0; transition: opacity .25s ease, transform .6s ease, rotate .8s cubic-bezier(.2, .7, .2, 1); }
.story-live .tear { padding: 28px 58px 30px; }
.story-live .hero__line.is-on .tear {
  -webkit-mask: var(--mask-tear) 103% 0 / 200% 100% no-repeat;
  mask: var(--mask-tear) 103% 0 / 200% 100% no-repeat;
  animation: tear-in .7s cubic-bezier(.55, 0, .3, 1) both;
}
/* while it burns, it holds still, and keeps the fully torn-in mask, so nothing about it changes but the burn */
.story-live .hero .hero__line.is-burning { opacity: 1; rotate: var(--tilt, -1deg); transform: translate(-50%, -50%); }
.story-live .hero__line.is-burning .tear {
  -webkit-mask: var(--mask-tear) 0% 0 / 200% 100% no-repeat;
  mask: var(--mask-tear) 0% 0 / 200% 100% no-repeat;
}
@keyframes tear-in {
  from { -webkit-mask-position: 103% 0; mask-position: 103% 0; } /* just past the tear: nothing shows yet */
  to { -webkit-mask-position: 0% 0; mask-position: 0% 0; }
}

/* landing: studio line on the left, Achyut at the door on the right */
.story-live .hero .beat--studio { left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); width: min(620px, 46vw); transform: translate(0, -46%); align-items: flex-start; text-align: left; }
.story-live .hero .beat--studio.is-on { transform: translate(0, -50%); }
.story-live .beat--studio .hero__cta { justify-content: flex-start; }
.story-live .beat--studio .hero__statement { font-size: min(4.1vw, 58px); }
.story-live .hero__door {
  position: absolute; z-index: 1; margin: 0; width: auto;
  right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); top: 50%;
  height: min(78vh, 780px); aspect-ratio: 941 / 1672;
  /* glides (--dx/--dy, set by main.js) so its lit doorway lands on the kottaram's gate, shrinking a little, then fades into it */
  transform: translate(calc(var(--dx, 0px) * var(--door, 0)), calc(var(--dy, 0px) * var(--door, 0))) translateY(-50%) scale(calc(1 - var(--door, 0) * var(--shrink, .4)));
  transform-origin: 52% 53%; /* the gate */
  opacity: clamp(0, calc((1 - var(--door, 0)) / .45), 1); will-change: transform, opacity; pointer-events: none;
}
.story-live .hero__door img { height: 100%; object-fit: cover; }
/* the kottaram and its shade come into view as the landing image shrinks */
.story-live .hero__frames, .story-live .hero__shade { opacity: var(--door, 0); }
.story-live .hero__stage { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 0; }
.story-live .hero__scroll { opacity: calc(1 - var(--p) * 6); }
.story-live .hero__frame { display: block; will-change: opacity; }
/* desktop: show the whole drawing (no crop, no blow-up), centred under the menu bar, its edges fading into the page.
   The edges fade once, on the box holding all six stages: the stages themselves stay solid, so one dissolving into
   the next never doubles up the soft edges (which would then drop back in a single frame, a flicker). */
.story-live .hero__fit {
  inset: 0 auto auto 50%; width: auto; height: min(100%, calc(100vw * 941 / 1672)); aspect-ratio: 1672 / 941;
  transform: translateX(-50%);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, #000 80%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, #000 80%, transparent);
  mask-composite: intersect;
}
/* phones and portrait tablets (story-tall, set by main.js): the same story on a tall screen. The painting is shown
   about twice the screen's width across the middle, its top and bottom fading into the page, and pans from right to
   left as the years roll back (--pan: the fraction of the painting at the centre), following each stage's moon with
   the gate always in view.
   Achyut's door fills the screen behind the studio line, then the camera moves in and it dissolves into the Kottaram. */
.story-tall .hero__frames { inset: 0; -webkit-mask-image: none; mask-image: none; }
.story-tall .hero__fit {
  inset: 50% auto auto 50%; width: calc(100vw / .54); height: auto; aspect-ratio: 1672 / 941;
  transform: translate(calc(var(--pan, .69) * -100%), -50%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 76%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 76%, transparent);
}
.story-tall .hero__door {
  inset: 0; width: 100%; height: 100%; aspect-ratio: auto;
  transform: scale(calc(1 + var(--door, 0) * .14)); transform-origin: 52% 53%;
  opacity: min(calc(.42 + var(--door, 0) * 2.4), calc((1 - var(--door, 0)) / .55));
}
.story-tall .hero__door img { width: 100%; height: 100%; object-position: 52% 50%; }
.story-tall .hero .beat--studio { left: 50%; width: calc(100% - 2 * var(--gutter)); transform: translate(-50%, -46%); align-items: center; text-align: center; }
.story-tall .hero .beat--studio.is-on { transform: translate(-50%, -50%); }
.story-tall .beat--studio .hero__cta { justify-content: center; }
.story-tall .beat--studio .hero__statement { font-size: clamp(34px, 10vw, 60px); }
/* the story lines wrap onto a squarer scrap (a little bigger on tablets) */
.story-tall .hero .hero__line { width: min(560px, calc(100% - 2 * var(--gutter))); white-space: normal; text-wrap: balance; font-size: clamp(22px, 6.6vw, 40px); }
.story-tall .tear { padding: 22px 26px 24px; }
.story-tall .hero__line::before, .story-tall .tear { background-image: url("../assets/img/paper-torn-narrow.webp?v=1"); }
.story-tall .hero__play { bottom: 28px; }
.story-tall .hero__scroll { display: none; } /* the play button sits where the scroll cue would */

@media (max-width: 760px) {
  .hero__stage { min-height: 92svh; }
  .hero__content { padding: 120px var(--gutter) 130px; }
  .hero__timer { bottom: 28px; }
  .hero__timer-year { font-size: 26px; }
}

/* shared Vaelora title styles */
/* the Vaelora title is the game's logo artwork, graded with the painting's own sepia stone tones and moonlight;
   a soft dark shadow keeps it clear of the palace behind it */
.hero__title { margin-top: 4px; line-height: 0; }
.hero__title img { display: block; width: min(640px, 82vw); height: auto; filter: drop-shadow(0 4px 18px rgba(10, 10, 10, .85)); }
.hero__finale .rule { margin: -8px 0 -6px; } /* the title, its rule and the tagline sit close together as one block */
.hero__tagline { font: italic 700 clamp(22px, 2.6vw, 36px)/1.25 var(--f-sans); letter-spacing: 0; text-wrap: balance; color: #f3ead9; text-shadow: 0 2px 4px rgba(10,10,10,.95), 0 0 22px rgba(10,10,10,.9); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 0 rgba(247,194,27,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(247,194,27,0); } 100% { box-shadow: 0 0 0 0 rgba(247,194,27,0); } }

/* ---------- about ---------- */
.about__grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.about .display { margin-top: 16px; }
.about__text { padding-top: 6px; }
.credits { margin-top: clamp(40px, 5vw, 60px); padding-top: clamp(28px, 3.5vw, 40px); border-top: 1px solid var(--line); }
.credits__label { font: 600 11px/1 var(--f-sans); font-stretch: semi-condensed; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); margin-bottom: 18px; }
.credits__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; row-gap: 12px; }
.credits__list li { font: 600 clamp(18px, 1.9vw, 24px)/1.3 var(--f-sans); color: var(--text); }
.credits__list li:not(:last-child)::after { content: "·"; color: var(--yellow); margin: 0 18px; }
@media (max-width: 860px) { .about__grid { grid-template-columns: 1fr; gap: 20px; } }
.section.founders-band { border-top: 0; padding-top: 0; } /* continues the About block */

/* ---------- key facts ---------- */
.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); }
.facts__grid { margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.facts__grid > div { padding: 26px 24px; border-left: 1px solid var(--line); }
.facts__grid > div:first-child { border-left: 0; padding-left: 0; }
.facts dt { font: 600 11px/1 var(--f-sans); font-stretch: semi-condensed; letter-spacing: 0.22em; text-transform: uppercase; color: var(--yellow); margin-bottom: 10px; }
.facts dd { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--text); }
@media (max-width: 860px) {
  .facts__grid { grid-template-columns: 1fr 1fr; }
  .facts__grid > div { padding: 20px 0 20px 18px; }
  .facts__grid > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .facts__grid > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- sections ---------- */
.section { padding: clamp(56px, 7vw, 84px) 0; }
.section--alt { background: var(--bg-2); border-top: 1px solid var(--line); }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: clamp(24px, 3vw, 34px); }
.section__title { display: flex; align-items: center; gap: 22px; font: 800 clamp(15px, 1.5vw, 19px)/1 var(--f-sans); font-stretch: expanded; letter-spacing: .14em; text-transform: uppercase; }
.section__title::after { content: ""; width: 30px; height: 2px; background: var(--yellow); }
.section__aside { font: 600 11px/1.4 var(--f-sans); font-stretch: semi-condensed; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); text-align: right; }
.section__head { align-items: flex-end; }
.section__head .display { margin-top: 16px; }
@media (max-width: 700px) { .section__aside { text-align: left; } .section__aside br { display: none; } }

/* shared type */
.display { font: 700 clamp(32px, 4.2vw, 52px)/1.06 var(--f-sans); letter-spacing: -0.015em; margin-top: 16px; }
.link { color: var(--yellow); text-decoration: none; font-weight: 500; font-size: 13px; letter-spacing: .04em; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }
.lead { font-size: clamp(16px, 1.5vw, 18px); line-height: 1.8; color: var(--text); max-width: 560px; }
.lead + .lead { margin-top: 14px; }

.beat__badge { display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(10,10,10,.55); font: 600 11px/1 var(--f-sans); font-stretch: semi-condensed; letter-spacing: .16em; text-transform: uppercase; margin-top: 6px; }
@media (max-width: 760px) { .beat__badge { white-space: nowrap; font-size: 10px; letter-spacing: .12em; padding: 9px 14px; gap: 10px; } }

/* ---------- gameplay ---------- */
.play__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.play__note { margin-top: 18px; color: var(--dim); max-width: 360px; }
.play__steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.play__steps li { display: grid; grid-template-columns: 44px 1fr; gap: 6px; padding: 16px 20px; border: 1px solid var(--line); background: var(--card); transition: border-color .3s, transform .3s; }
.play__steps li:hover { border-color: rgba(247,194,27,.5); transform: translateX(4px); }
.play__n { font: 700 13px/1.6 var(--f-sans); font-variant-numeric: tabular-nums; letter-spacing: .2em; color: var(--yellow); }
.play__steps h3 { font: 700 15px/1.4 var(--f-sans); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.play__steps p { font-size: 14px; line-height: 1.6; color: var(--dim); }
@media (max-width: 860px) { .play__grid { grid-template-columns: 1fr; } }

/* roadmap */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 28px; position: relative; }
.timeline::before, .timeline::after { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: rgba(255,255,255,.16); }
.timeline::after { height: 2px; top: 6.5px; background: var(--yellow); transform-origin: left; }
.story-live .timeline::after { transform: scaleX(clamp(0, calc((var(--p) - .3) * 3), 1)); }
.story-live .timeline__item.is-on .timeline__dot { border-color: var(--yellow); }
.timeline__dot { transition: border-color .4s; }
.timeline__item { position: relative; padding-top: 38px; }
.timeline__dot { position: absolute; top: 0; left: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--bg); border: 2px solid rgba(255,255,255,.4); }
.timeline__item.is-now .timeline__dot { background: var(--yellow); border-color: var(--yellow); box-shadow: 0 0 0 6px rgba(247,194,27,.16); }
.timeline__when { font: 600 11.5px/1.3 var(--f-sans); font-stretch: semi-condensed; letter-spacing: .18em; text-transform: uppercase; color: var(--yellow); margin-bottom: 12px; }
.timeline__item h3 { font: 600 clamp(20px, 1.9vw, 24px)/1.2 var(--f-sans); letter-spacing: -.01em; margin-bottom: 12px; }
.timeline__item p:not(.timeline__when) { font-size: 14px; line-height: 1.7; color: var(--dim); }
.timeline__item .link { display: inline-block; margin-top: 14px; }
.timeline__tag { display: inline-block; margin-top: 16px; padding: 6px 12px; border-radius: 999px; background: rgba(247,194,27,.12); color: var(--yellow); font: 600 10px/1 var(--f-sans); font-stretch: semi-condensed; letter-spacing: .16em; text-transform: uppercase; }
@media (max-width: 900px) {
  .timeline { grid-template-columns: 1fr; gap: 34px; padding-left: 34px; }
  .timeline::before, .timeline::after { left: 7px; right: auto; top: 6px; bottom: 6px; width: 1px; height: auto; }
  .timeline::after { width: 2px; left: 6.5px; transform-origin: top; }
  .story-live .timeline::after { transform: scaleY(clamp(0, calc((var(--p) - .25) * 2.2), 1)); }
  .timeline__item { padding-top: 0; }
  .timeline__dot { left: -34px; top: 2px; }
}

/* founders */
.founders { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.founder {
  position: relative; display: flex; flex-direction: column;
  padding: 26px 22px 28px 24px;
  background: var(--card); border: 1px solid var(--line); overflow: hidden;
}
.founder__head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.founder::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 50%, rgba(247,194,27,.08), transparent 55%); pointer-events: none; }
.founder__text { position: relative; min-width: 0; }
.founder h3 { font: 400 19px/1.2 var(--f-brand); letter-spacing: 0.05em; white-space: nowrap; text-transform: uppercase; margin-bottom: 8px; }
.founder__title { font: 600 10.5px/1 var(--f-sans); font-stretch: semi-condensed; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.founder__role { font: 500 14px/1.4 var(--f-sans); color: var(--text); }
.founder__work { position: relative; margin-top: 20px; font-size: 14px; line-height: 1.65; color: var(--dim); } /* what they've worked on */
.founder__rule { display: block; width: 22px; height: 2px; background: var(--yellow); margin-top: 16px; }
/* every founder the same: a round photo with a yellow disc offset behind it */
.founder__photo { position: relative; flex: none; width: 104px; height: 104px; }
.founder__photo::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--yellow); transform: translate(10px, -8px); }
.founder__photo img { position: relative; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center 25%; filter: grayscale(1) contrast(1.08); }
.founder:hover .founder__photo img { filter: grayscale(.2) contrast(1.05); }
.founder__photo img { transition: filter .4s; }
@media (max-width: 1000px) { .founders { grid-template-columns: 1fr; max-width: 560px; } }

/* cta */
.cta { padding: clamp(52px, 6vw, 72px) 0; border-top: 1px solid var(--line); }
.cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta__title { font: 400 clamp(24px, 3vw, 34px)/1.2 var(--f-brand); letter-spacing: 0.05em; text-transform: uppercase; }
.cta__title span { display: block; font-size: 0.6em; letter-spacing: var(--track); font-weight: 400; margin-bottom: 4px; }
.cta__title em { font-style: normal; color: var(--yellow); }
.cta__epigraph { font: italic 500 clamp(28px, 4.2vw, 56px)/1.15 var(--f-sans); letter-spacing: -0.015em; text-align: center; margin: 0 auto clamp(48px, 6vw, 72px); max-width: 1100px; text-wrap: balance; }
.cta__sub { margin-top: 14px; font-size: 13.5px; color: var(--dim); }
/* the button, with the address itself written out under it (to read or copy when no mail app opens) */
.cta__contact { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.cta__email { display: inline-flex; align-items: center; gap: 10px; font: 600 15px/1 var(--f-sans); letter-spacing: .02em; color: var(--text); text-decoration: none; transition: color .2s; }
.cta__email svg { width: 18px; height: 18px; color: var(--yellow); }
.cta__email:hover { color: var(--yellow); }
@media (max-width: 760px) { .cta__contact { align-items: flex-start; } }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 30px 0 34px; }
.footer__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.footer__brand { display: inline-flex; flex-direction: column; gap: 7px; text-decoration: none; justify-self: start; }
.footer__brand .brand__studio { font-size: 9.5px; }
.footer__word { font: 400 28px/0.86 var(--f-brand); letter-spacing: 0.1em; text-transform: uppercase; color: #fff; }
.socials { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.socials a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--text); transition: color .2s, background .2s; }
.socials a:hover { color: var(--yellow); background: rgba(255,255,255,.05); }
.socials svg { width: 19px; height: 19px; }
.footer__meta { justify-self: end; text-align: right; font-size: 11px; color: var(--dim); }
.footer__pillars { font: 600 10px/1 var(--f-sans); font-stretch: semi-condensed; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text); margin-bottom: 10px; }
.footer__pillars i { font-style: normal; color: var(--faint); }
@media (max-width: 700px) {
  .footer__inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer__brand, .footer__meta { justify-self: center; text-align: center; }
  .footer__brand { align-items: center; }
}

/* scroll reveal */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
.timeline .reveal:nth-child(2), .founders .reveal:nth-child(2) { transition-delay: .1s; }
.timeline .reveal:nth-child(3), .founders .reveal:nth-child(3) { transition-delay: .2s; }
.timeline .reveal:nth-child(4) { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
