/* ansh v5. Behaviour, measures and resting colours follow a90.com as of 28 Nov 2026 (our own code):
   white ground, near-black type, greys mixed from them. Each name's world takes that company's brand. */

@font-face { font-family: "Inter Variable"; src: url("fonts/inter.woff2") format("woff2-variations"), url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Obel Mono"; src: url("fonts/obel-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
/* the companies' own type, used only inside their worlds */
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("fonts/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("fonts/general-sans.woff2") format("woff2"); font-weight: 200 700; font-display: swap; }

@property --page { syntax: "<color>"; inherits: true; initial-value: #ffffff; }
@property --text { syntax: "<color>"; inherits: true; initial-value: #0a0a0a; }

:root {
  --page: #ffffff;            /* a90's rest: white */
  --text: #0a0a0a;            /* a90's rest: near-black */
  --mute-p: 55%;
  --quiet-p: 68%;
  --mute: color-mix(in srgb, var(--text) var(--mute-p), var(--page));
  --quiet: color-mix(in srgb, var(--text) var(--quiet-p), var(--page));
  --sans: "Inter Variable", "Inter", system-ui, -apple-system, sans-serif;
  --mono: "Obel Mono", ui-monospace, "SFMono-Regular", monospace;
  --t48: -.022em;
  --t20: -.017em;
  --t15: -.009em;
  --ease: cubic-bezier(.22, .7, .16, 1);
  --pad: clamp(20px, 4vw, 52px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 400 16px/1.4 var(--sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s var(--ease);
}
::selection { background: var(--text); color: var(--page); }
a { color: inherit; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

body { position: relative; }
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  grid-template-columns: minmax(0, 1fr);
  padding: var(--pad);
}

/* the Phoslabs kit's grain, only inside the Phoslabs world */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  background: url("brands/phoslabs/grain.png") 0 0 / 256px 256px;
  mix-blend-mode: overlay;
  opacity: 0;
  transition: opacity .2s var(--ease);
}
:root[data-world="phoslabs"] body::after { opacity: .14; }

/* ---------- world canvas ---------- */
.bg {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0;
}
.bg.on { opacity: 1; }
.ghost { pointer-events: none !important; }

/* ---------- the sentence ---------- */
.main { position: relative; z-index: 1; width: 100%; text-align: center; pointer-events: none; }
.sentence {
  pointer-events: auto;
  width: fit-content;
  max-width: 15.5em;
  margin: 0 auto;
  font-size: clamp(28px, min(3.6vw, 5.8vh), 48px);
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: var(--t48);
  text-transform: lowercase;
  text-wrap: balance;
}
.br { display: none; }
@media (min-width: 900px) {
  .sentence { max-width: none; white-space: nowrap; font-size: clamp(32px, min(3.5vw, 6.6vh), 60px); }
  .br { display: inline; }
}
.k { text-transform: none; }

.w { color: var(--mute); transition: opacity .22s var(--ease), color .2s var(--ease); }
.lead {
  color: var(--text);
  text-decoration: none;
  outline: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 92%;
  background-size: 0% .06em;
  transition: color .22s var(--ease), background-size .3s var(--ease);
}
.lead.on { background-size: 100% .06em; }
.lead:focus-visible { outline: 2px solid; outline-offset: 4px; border-radius: 2px; }

.d {
  position: relative;
  white-space: nowrap;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  outline: none;
  transition: opacity .22s var(--ease);
}
.d .ic {
  display: inline-block;
  width: .7em; height: .7em;
  margin-right: .2em;
  vertical-align: .02em;
  border-radius: .14em;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 9%, transparent);
  transition: transform .3s var(--ease), opacity .22s var(--ease), box-shadow .3s var(--ease);
}
.d-name {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 92%;
  background-size: 0% .06em;
  transition: color .22s var(--ease), background-size .3s var(--ease);
}
.d.on .d-name { color: var(--text); background-size: 100% .06em; }
.d.on .ic { opacity: 1; box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 28%, transparent); transform: translateY(-.05em) rotate(-4deg); }
.d:focus-visible .d-name { outline: 2px solid; outline-offset: 4px; border-radius: 2px; }

:root[data-focus] .lead:not(.on),
:root[data-focus] .d:not(.on) .d-name { color: var(--mute); }
:root[data-focus] .d:not(.on) .ic { opacity: .45; }

/* entrance: each piece of the sentence settles in, a beat apart */
.js .sentence > * { opacity: 0; }
.js.ready .sentence > * { animation: settle .55s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 55ms); }
.js.ready .sentence .d .ic { animation: pop .5s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 55ms + .12s); }
@keyframes settle { from { opacity: 0; filter: blur(3px); transform: translateY(.18em); } to { opacity: 1; filter: none; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.5); } }

/* ---------- captions ---------- */
.caption {
  position: absolute;
  left: 50%;
  top: calc(100% + clamp(26px, 4.5vh, 52px));
  width: min(32em, 100%);
  transform: translateX(-50%);
  display: grid;
  pointer-events: none;
}
.cap { grid-area: 1 / 1; margin: 0; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.cap > * { opacity: 0; transform: translateY(6px); transition: opacity .3s var(--ease), transform .45s var(--ease); }
.cap.on { pointer-events: auto; }
.cap.on > * { opacity: 1; transform: none; }
.cap.on > :first-child { transition-delay: 50ms; }
.cap.on > :nth-child(2) { transition-delay: .13s; }
.cap:not(.on) > * { visibility: hidden; transition: opacity .3s var(--ease), transform .45s var(--ease), visibility 0s .3s; }

.cap-about {
  max-width: 25em;
  font-size: clamp(18px, 1.65vw, 23px);
  line-height: 1.38;
  letter-spacing: var(--t20);
  color: var(--text);
  text-wrap: balance;
}
.cap-meta {
  margin-top: 14px;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  font-size: 15px; line-height: 1.4;
  letter-spacing: var(--t15);
  color: var(--quiet);
}
.cap-meta > * + *::before { content: "·"; display: inline-block; margin: 0 .6em; color: var(--mute); }
.cap-av { width: 18px; height: 18px; margin-right: 8px; border-radius: 50%; vertical-align: -4px; object-fit: cover; }
.cap-go, .cap-in {
  color: var(--text);
  text-decoration: underline 1px;
  text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, var(--text) 35%, transparent);
  transition: text-decoration-color .2s;
}
.cap-in { text-underline-offset: .18em; }
.cap-go:hover, .cap-go:focus-visible, .cap-in:hover, .cap-in:focus-visible { outline: none; text-decoration-color: currentColor; }
.cap-go span { display: inline-block; margin-left: 3px; transition: transform .3s var(--ease); }
.cap-go:hover span { transform: translate(2px, -2px); }
.cap time { font-variant-numeric: tabular-nums; }

@media (min-width: 900px) and (min-height: 601px) {
  .main { width: fit-content; }
  .caption { left: 0; width: 100%; top: calc(100% + clamp(30px, 5vh, 56px)); transform: none; }
  .cap {
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(16px, 1.6vw, 28px);
    align-items: baseline;
    padding-top: clamp(18px, 2.6vh, 26px);
    text-align: left;
  }
  /* a rule draws itself across, above each caption */
  .cap:not(.cap--rest)::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0;
    height: 1px;
    background: color-mix(in srgb, var(--text) 22%, transparent);
    transform: scaleX(0); transform-origin: 0;
    transition: transform .6s var(--ease);
  }
  .cap.on::before { transform: none; }
  .cap-about { grid-column: 1 / span 7; max-width: none; font-size: clamp(22px, 2.05vw, 31px); line-height: 1.2; letter-spacing: -.021em; text-wrap: pretty; }
  .cap-meta { grid-column: 9 / -1; flex-direction: column; align-items: flex-start; gap: 3px; margin-top: 0; }
  .cap-meta > *::before { display: none !important; }
}
@media (max-height: 600px) and (min-width: 700px) {
  .hero { grid-template-rows: 1fr auto; place-items: stretch; }
  .main { align-self: center; padding: 28px 0; }
  .caption { position: static; transform: none; width: auto; max-width: 32em; min-height: 9.5em; margin: 26px auto 0; }
}

/* ---------- the scroll cue under the hero ---------- */
.cue {
  position: absolute; left: 50%; bottom: calc(var(--pad) * .8); z-index: 2;
  transform: translateX(-50%);
  display: grid; justify-items: center; gap: 6px;
  font-size: 14px; color: var(--quiet); text-decoration: none; text-transform: lowercase;
  transition: opacity .2s var(--ease), color .2s var(--ease);
}
.cue:hover, .cue:focus-visible { color: var(--text); outline: none; }
.cue i { font-style: normal; animation: cue 2s var(--ease) infinite; }
@keyframes cue { 50% { transform: translateY(4px); } }
:root[data-focus] .cue { opacity: 0; }
.panels, .edge, .snap { display: none; }

/* ---------- phones ---------- */
@media (max-width: 699px) {
  html, body { transition: none; }
  .hero { display: block; padding: 0; min-height: 0; }
  .snap { display: block; height: 1px; margin-bottom: -1px; scroll-snap-align: start; scroll-snap-stop: always; }
  .edge { display: block; position: fixed; left: 0; right: 0; z-index: 30; height: 12px; pointer-events: none; background: var(--page); }
  .edge--top { top: -7px; }
  .edge--bottom { bottom: -7px; }

  .main, .panel {
    --mute: color-mix(in srgb, var(--text) var(--mute-p), var(--page));
    --quiet: color-mix(in srgb, var(--text) var(--quiet-p), var(--page));
    color: var(--text);
  }
  .main {
    --page: #ffffff; --text: #0a0a0a;
    min-height: 100lvh;
    padding: max(var(--pad), env(safe-area-inset-top)) var(--pad);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
  }
  .sentence { font-size: min(8.2vw, 36px); line-height: 1.22; }
  /* a tapped name shows its caption under the sentence (JS sets the top) */
  .caption { position: absolute; left: 28px; right: 28px; width: auto; top: 72%; transform: none; }
  .cap-about { font-size: 18px; }
  .cap-meta { gap: 4px 16px; }
  .cap-meta > *::before { display: none !important; }

  .cue { top: calc(100svh - 64px - env(safe-area-inset-bottom)); bottom: auto; }

  .panels { display: block; }
  .panel {
    position: relative; isolation: isolate; overflow: hidden;
    min-height: 100lvh;
    padding: max(var(--pad), calc(env(safe-area-inset-top) + 16px)) 28px calc(9vh + env(safe-area-inset-bottom) + (100lvh - 100svh));
    display: grid; grid-template-columns: minmax(0, 1fr); align-content: end; justify-items: center; gap: 26px;
    text-align: center;
  }
  .panel > .bg { position: absolute; inset: 0; z-index: 0; }
  .panel > :not(.bg) { position: relative; z-index: 1; }
  .panel-name {
    margin: 0;
    display: inline-flex; align-items: baseline; gap: .28em;
    font-size: min(9vw, 40px); font-weight: 400; line-height: 1.1;
    letter-spacing: var(--t48); text-transform: lowercase;
  }
  .panel-name .ic { display: block; width: .727em; height: .727em; border-radius: .16em; }
  .panel-sub { display: grid; justify-items: center; gap: 16px; max-width: 21em; }
  .panel-about { margin: 0; font-size: 19px; line-height: 1.5; letter-spacing: var(--t20); color: var(--text); text-wrap: balance; }
  .panel-meta { margin: 0; display: flex; gap: 14px; font-size: 14px; color: var(--quiet); }
  .panel-go {
    margin-top: 8px;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 22px; border-radius: 999px;
    background: var(--text); color: var(--page);
    font-size: 15px; font-weight: 500; letter-spacing: var(--t15); text-decoration: none;
  }
  .panel-go--line { margin-top: 0; background: none; color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 32%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
  .js .sentence > * { opacity: 1; animation: none !important; }
  *, ::before, ::after { transition-duration: 0s !important; transition-delay: 0s !important; }
  .cue i { animation: none; }
}


/* ================================================================== */
/* THE STORY: a line down the middle that draws with the scroll;       */
/* each beat unfolds from it, alternating sides.                       */
/* ================================================================== */
.story, .log, .foot { position: relative; z-index: 2; background: var(--page); transition: background-color .2s var(--ease); }
.story { padding: clamp(56px, 8vh, 96px) var(--pad) clamp(72px, 10vh, 120px); }
.story-title {
  margin: 0 auto clamp(32px, 5vh, 64px);
  text-align: center;
  font-size: clamp(32px, 3.4vw, 52px); font-weight: 400; line-height: 1.1; letter-spacing: var(--t48);
}
.tl { position: relative; max-width: 1180px; margin: 0 auto; }
.tl-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; transform: translateX(-.5px); background: color-mix(in srgb, var(--text) 12%, transparent); }
.tl-fill { position: absolute; inset: 0; background: var(--text); transform-origin: 50% 0; transform: scaleY(var(--p, 0)); will-change: transform; }

.beat {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(64px, 9vw, 128px) minmax(0, 1fr);
  align-items: center;
  padding: clamp(40px, 7vh, 72px) 0;
}
.beat-dot {
  position: absolute; left: 50%; top: 50%;
  width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px;
  border-radius: 50%;
  background: var(--page);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--text) 30%, transparent);
  transition: background-color .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease);
}
.beat.lit .beat-dot { background: var(--dot, var(--text)); box-shadow: inset 0 0 0 1.5px var(--dot, var(--text)); transform: scale(1.15); }
.beat[data-brand="digitea"] { --dot: #047A3F; }
.beat[data-brand="snowball"] { --dot: #007AFF; }
.beat[data-brand="phoslabs"] { --dot: #FF1A2E; }

.beat[data-side="l"] .beat-text { grid-column: 1; grid-row: 1; justify-self: end; }
.beat[data-side="l"] .beat-media { grid-column: 3; grid-row: 1; justify-self: start; }
.beat[data-side="r"] .beat-text { grid-column: 3; grid-row: 1; justify-self: start; }
.beat[data-side="r"] .beat-media { grid-column: 1; grid-row: 1; justify-self: end; }

.beat-text { max-width: 26em; }
.beat-when {
  margin: 0 0 14px;
  font: 500 13px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--quiet);
}
.beat-title { margin: 0; font-size: clamp(26px, 2.5vw, 38px); font-weight: 400; line-height: 1.12; letter-spacing: -.024em; text-wrap: balance; }
.beat-copy { margin: 14px 0 0; font-size: clamp(17px, 1.3vw, 19px); line-height: 1.5; letter-spacing: var(--t15); color: color-mix(in srgb, var(--text) 78%, var(--page)); text-wrap: pretty; }
.beat-go {
  display: inline-block; margin-top: 16px;
  font-size: 15px; color: var(--text);
  text-decoration: underline 1px; text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, var(--text) 35%, transparent);
}
.beat-go:hover, .beat-go:focus-visible { text-decoration-color: currentColor; outline: none; }
.beat-go span { display: inline-block; margin-left: 3px; transition: transform .3s var(--ease); }
.beat-go:hover span { transform: translate(2px, -2px); }

.beat-media { margin: 0; width: min(100%, 480px); }
.scene { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; }

/* unfold from the line: text and picture slide out from the centre */
.js .beat .beat-text, .js .beat .beat-media { opacity: 0; transition: opacity .7s var(--ease), transform .9s var(--ease); }
.js .beat[data-side="l"] .beat-text { transform: translateX(28px); }
.js .beat[data-side="l"] .beat-media { transform: translateX(-28px) scale(.97); }
.js .beat[data-side="r"] .beat-text { transform: translateX(-28px); }
.js .beat[data-side="r"] .beat-media { transform: translateX(28px) scale(.97); }
.js .beat.in .beat-text, .js .beat.in .beat-media { opacity: 1; transform: none; }
.js .beat.in .beat-media { transition-delay: .12s; }

/* --- scene: Delhi and Uttarakhand --- */
.scene-map { background: color-mix(in srgb, var(--text) 4%, var(--page)); }
.scene-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-hills { fill: none; stroke: color-mix(in srgb, var(--text) 30%, transparent); stroke-width: 1.5; stroke-linejoin: round; }
.map-route { fill: none; stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 4 6; stroke-dashoffset: 0; clip-path: inset(0 100% 0 0); transition: clip-path 1.6s var(--ease) .3s; }
.beat.in .map-route { clip-path: inset(0 0 0 0); }
.map-pt { fill: var(--text); }
.map-pt--far { fill: var(--page); stroke: var(--text); stroke-width: 1.5; }
.map-label { position: absolute; font: 500 13px/1.35 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--quiet); }
.map-label--a { left: 18%; top: 82%; }
.map-label--b { left: 70%; top: 64%; }

/* --- scene: the 85% report cards --- */
.scene-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 18px; background: color-mix(in srgb, var(--text) 4%, var(--page)); }
.card { position: relative; border-radius: 8px; background: var(--page); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 12%, transparent); padding: 14px; display: flex; flex-direction: column; gap: 6px; opacity: 0; transform: translateY(10px) rotate(-2deg); transition: opacity .5s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--k) * 110ms + .2s); }
.card i { display: block; height: 5px; width: 70%; border-radius: 3px; background: color-mix(in srgb, var(--text) 12%, transparent); }
.card i + i { width: 46%; }
.card b { margin-top: auto; font: 600 clamp(22px, 2vw, 30px)/1 var(--mono); letter-spacing: -.02em; }
.beat.in .card { opacity: 1; transform: none; }

/* --- scene: the hill photo with its 13 houses --- */
.scene-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.houses {
  position: absolute; left: 14px; bottom: 14px; right: 14px;
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 10px;
  padding: 14px 16px; border-radius: 10px;
  background: rgba(10, 10, 10, .72); color: #fff;
}
.houses-n { font: 600 34px/1 var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.houses-l { font: 500 13px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.houses-row { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(13, 1fr); gap: 5px; margin-top: 12px; }
.houses-row i { aspect-ratio: 1; border-radius: 2px; background: rgba(255, 255, 255, .18); transition: background-color .3s var(--ease); }
.houses-row i.on { background: #fff; }

/* --- scene: the white Sony Vaio --- */
.scene-laptop { display: grid; place-items: center; align-content: center; background: #e6e4df; }
.lap-screen { width: 72%; aspect-ratio: 16 / 10; border-radius: 10px 10px 4px 4px; background: #0d0d0d; border: 10px solid #fbfbfa; padding: 14px; }
.lap-code { margin: 0; font: 500 clamp(11px, 1vw, 14px)/1.6 var(--mono); color: #e8e8e8; white-space: pre-wrap; }
.lap-code::after { content: ""; display: inline-block; width: .55em; height: 1.05em; margin-left: 1px; vertical-align: -.2em; background: #e8e8e8; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.lap-base { width: 86%; height: 14px; margin-top: -1px; border-radius: 0 0 14px 14px; background: #fbfbfa; clip-path: polygon(4% 0, 96% 0, 100% 100%, 0 100%); }

/* --- scene: two self-taught years --- */
.scene-term { background: #0d0d0d; color: #e8e8e8; padding: 0 22px 18px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.term-bar { position: absolute; top: 14px; left: 18px; margin: 0; display: flex; gap: 6px; }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.2); }
.term-row { margin: 0; display: flex; align-items: baseline; gap: 10px; font: 500 clamp(13px, 1.2vw, 16px)/1.3 var(--mono); opacity: 0; transform: translateY(6px); transition: opacity .4s var(--ease), transform .5s var(--ease); }
.term-row span::after { content: ""; flex: 1; }
.term-row { justify-content: space-between; }
.term-row::before { content: "›"; color: rgba(255,255,255,.4); margin-right: -2px; }
.term-row span { flex: 1; }
.term-row b { font-weight: 500; color: #9be7a8; }
.term-row--x b { color: rgba(255,255,255,.55); }
.term-row:nth-of-type(2) { transition-delay: .3s; } .term-row:nth-of-type(3) { transition-delay: .6s; }
.term-row:nth-of-type(4) { transition-delay: .9s; } .term-row:nth-of-type(5) { transition-delay: 1.3s; }
.beat.in .term-row { opacity: 1; transform: none; }

/* --- brand scenes --- */
.scene-brand { isolation: isolate; }
.scene-digitea { background: #04130D; color: #fff; }
.dg-sky { position: absolute; left: 0; right: 0; bottom: -18%; width: 100%; opacity: .2; }
.dg-logo { position: absolute; left: 22px; top: 20px; height: 22px; width: auto; }
.dg-chart { position: absolute; left: 22px; right: 22px; bottom: 18px; width: calc(100% - 44px); height: auto; overflow: visible; }
.dg-area { fill: rgba(59, 240, 140, .09); opacity: 0; transition: opacity .8s var(--ease) 1.2s; }
.dg-line { fill: none; stroke: #3BF08C; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease) .35s; }
.dg-head { fill: #3BF08C; opacity: 0; transition: opacity .3s 1.8s; }
.beat.in .dg-area { opacity: 1; } .beat.in .dg-line { stroke-dashoffset: 0; } .beat.in .dg-head { opacity: 1; }
.dg-pill { position: absolute; right: 22px; top: 18%; padding: .35em .65em; border-radius: .42em; background: #3BF08C; color: #04130D; font: 700 clamp(15px, 1.4vw, 19px)/1 "Bricolage Grotesque", var(--sans); opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease) 1.9s, transform .6s var(--ease) 1.9s; }
.dg-meta { position: absolute; right: 22px; top: calc(18% + 44px); font: 500 13px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.6); opacity: 0; transition: opacity .5s 2s; }
.beat.in .dg-pill { opacity: 1; transform: none; } .beat.in .dg-meta { opacity: 1; }

.scene-snowball {
  background-color: #F5F3EF; color: #141416;
  background-image: linear-gradient(rgba(20,20,22,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(20,20,22,.05) 1px, transparent 1px);
  background-size: 28px 28px;
}
.sb-mark { position: absolute; left: 22px; top: 20px; height: 18px; width: auto; }
.sb-num { position: absolute; left: 22px; top: 48px; font: 800 clamp(26px, 2.6vw, 38px)/1 Manrope, var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.sb-label { position: absolute; left: 22px; top: calc(48px + clamp(26px, 2.6vw, 38px) + 8px); font: 500 13px/1 "General Sans", var(--sans); color: rgba(20,20,22,.58); transition: color .3s; }
.scene-snowball.done .sb-label { color: #007AFF; }
.sb-chart { position: absolute; left: 22px; right: 22px; bottom: 14px; width: calc(100% - 44px); height: auto; overflow: visible; }
.sb-area { fill: rgba(0, 122, 255, .08); opacity: 0; transition: opacity .8s var(--ease) 1.2s; }
.sb-line { fill: none; stroke: #007AFF; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s var(--ease) .3s; }
.beat.in .sb-area { opacity: 1; } .beat.in .sb-line { stroke-dashoffset: 0; }
.sb-ball { position: absolute; right: 7%; top: 8%; width: 22%; height: auto; opacity: 0; transform: translate(-260%, 210%) scale(.25) rotate(-200deg); transition: transform 1.8s var(--ease) .3s, opacity .4s .3s; }
.beat.in .sb-ball { opacity: 1; transform: none; }

.scene-phos { background: #202020; color: #F5F5F5; padding: 22px; display: flex; flex-direction: column; gap: 12px; font-family: "Bricolage Grotesque", var(--sans); }
.scene-phos::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 110% at 0% 0%, rgba(169,18,37,.5) 0%, rgba(112,20,35,.28) 30%, rgba(67,28,34,.1) 56%, rgba(42,42,42,0) 80%); }
.ph-logo { height: 26px; width: auto; align-self: flex-start; margin-bottom: auto; }
.ph-big { margin: 0 0 6px; font-size: clamp(26px, 2.6vw, 38px); font-weight: 600; line-height: 1.05; letter-spacing: -.01em; color: #FF1A2E; opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease) .3s, transform .6s var(--ease) .3s; }
.beat.in .ph-big { opacity: 1; transform: none; }
.ph-row { margin: 0; display: flex; align-items: center; gap: 10px; font-size: clamp(14px, 1.2vw, 16px); opacity: 0; transform: translateY(6px); transition: opacity .4s var(--ease), transform .5s var(--ease); transition-delay: calc(var(--k) * 350ms + .4s); }
.ph-row i { flex: 1; height: 2px; background-image: radial-gradient(circle, #3D3D3D 1px, transparent 1.5px); background-size: 8px 2px; }
.ph-row b { font-weight: 500; color: #FF1A2E; }
.beat.in .ph-row { opacity: 1; transform: none; }
.ph-bar { display: block; height: 4px; background: #3D3D3D; margin-top: 6px; }
.ph-bar i { display: block; height: 100%; width: 0; background: #FF1A2E; transition: width 1.6s var(--ease) .5s; }
.beat.in .ph-bar i { width: 100%; }

/* --- scene: Masters Union --- */
.scene-mu { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 24px; background: var(--page); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 14%, transparent); }
.mu-big { font-size: clamp(56px, 6vw, 92px); font-weight: 400; line-height: .95; letter-spacing: -.04em; margin-bottom: auto; padding-top: 4px; }
.mu-row { font-size: 18px; letter-spacing: var(--t15); }
.mu-row--q { font-size: 15px; color: var(--quiet); }

/* --- scene: failed ideas, won case comps --- */
.scene-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 26px; background: color-mix(in srgb, var(--text) 4%, var(--page)); align-content: center; }
.list-h { margin: 0 0 14px; font: 500 13px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--quiet); }
.list-i { position: relative; margin: 0 0 12px; font-size: clamp(17px, 1.5vw, 21px); letter-spacing: -.012em; width: fit-content; }
.list-i--x::after { content: ""; position: absolute; left: -2px; right: -2px; top: 54%; height: 1.5px; background: var(--text); transform: scaleX(0); transform-origin: 0; transition: transform .5s var(--ease); transition-delay: calc(var(--k) * 260ms + .4s); }
.list-i--x { color: var(--quiet); }
.beat.in .list-i--x::after { transform: none; }
.list-i--v { padding-left: 26px; }
.list-i--v::before { content: ""; position: absolute; left: 0; top: .28em; width: 16px; height: 9px; border-left: 2px solid var(--text); border-bottom: 2px solid var(--text); transform: rotate(-45deg) scale(0); transform-origin: 30% 70%; transition: transform .4s var(--ease); transition-delay: calc(var(--k) * 260ms + .4s); }
.beat.in .list-i--v::before { transform: rotate(-45deg) scale(1); }

/* ================================================================== */
/* BUILD LOG + FOOTER                                                  */
/* ================================================================== */
.log {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 96px); align-items: center;
  max-width: 1180px; margin: 0 auto; padding: clamp(64px, 10vh, 120px) var(--pad);
}
.log-title { margin: 0; font-size: clamp(32px, 3.4vw, 52px); font-weight: 400; line-height: 1.1; letter-spacing: var(--t48); }
.log-about { margin: 16px 0 0; max-width: 26em; font-size: clamp(18px, 1.4vw, 21px); line-height: 1.45; letter-spacing: var(--t15); color: color-mix(in srgb, var(--text) 78%, var(--page)); }
.log-list { list-style: none; margin: 32px 0 0; padding: 0; }
.log-row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; padding: 18px 20px; border-radius: 12px; background: color-mix(in srgb, var(--text) 4%, var(--page)); font-size: 17px; }
.log-n, .log-when { font: 500 13px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--quiet); }
.log-photo { margin: 0; }
.log-photo img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px 32px;
  max-width: 1180px; margin: 0 auto; padding: 40px var(--pad) calc(48px + env(safe-area-inset-bottom));
  font-size: 15px; color: var(--quiet);
}
.foot-line { margin: 0; }
.foot-line time { font-variant-numeric: tabular-nums; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-links a { color: var(--text); text-decoration: underline 1px; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--text) 30%, transparent); }
.foot-links a:hover, .foot-links a:focus-visible { text-decoration-color: currentColor; outline: none; }

/* ---------- phones: the line moves to the left edge, beats stack ---------- */
@media (max-width: 699px) {
  .story { padding: 72px 20px 64px; }
  .story-title { text-align: left; margin: 0 0 40px 34px; font-size: 32px; }
  .tl-line { left: 6px; }
  .beat { grid-template-columns: minmax(0, 1fr); padding: 28px 0 28px 34px; gap: 20px; }
  .beat-dot { left: 6px; top: 40px; }
  .beat[data-side] .beat-text, .beat[data-side] .beat-media { grid-column: 1; justify-self: stretch; }
  .beat[data-side] .beat-text { grid-row: 1; }
  .beat[data-side] .beat-media { grid-row: 2; width: 100%; }
  .js .beat[data-side] .beat-text, .js .beat[data-side] .beat-media { transform: translateX(14px); }
  .js .beat.in[data-side] .beat-text, .js .beat.in[data-side] .beat-media { transform: none; }
  .log { grid-template-columns: minmax(0, 1fr); padding: 56px 20px; }
  .log-photo { order: -1; }
  .log-photo img { aspect-ratio: 1; }
  .foot { flex-direction: column; padding: 32px 20px calc(40px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .js .beat .beat-text, .js .beat .beat-media { opacity: 1 !important; transform: none !important; }
  .tl-fill { transform: none; }
}
