/* Studio Trograin × The Seven Outcasts — one design system, two themes.
   Light  = The Seven Outcasts (the character sheets' palette).
   Dark   = Studio Trograin (the same palette, flipped).
   Change data-theme on <html> and the whole page follows. */

/* ---------- Fonts (Google Fonts, SIL Open Font License, self-hosted) ---------- */
@font-face { font-family: "Hubot Sans"; font-style: normal; font-weight: 200 900; font-stretch: 75% 125%; font-display: swap;
  src: url(../assets/fonts/hubot-sans.woff2) format("woff2"); }
@font-face { font-family: "Mona Sans"; font-style: normal; font-weight: 200 900; font-stretch: 75% 125%; font-display: swap;
  src: url(../assets/fonts/mona-sans.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(../assets/fonts/jetbrains-mono.woff2) format("woff2"); }

/* Japanese: Noto Serif JP and Noto Sans JP (SIL OFL), cut down by tools/jpfont.py to the characters our pages use */
@font-face { font-family: "Trograin JP Serif"; font-weight: 400 900; font-display: swap; src: url(../assets/fonts/noto-serif-jp-sub.woff2) format("woff2"); unicode-range: U+3000-30FF, U+3400-9FFF, U+FF00-FFEF; }
@font-face { font-family: "Trograin JP Sans"; font-weight: 300 800; font-display: swap; src: url(../assets/fonts/noto-sans-jp-sub.woff2) format("woff2"); unicode-range: U+3000-30FF, U+3400-9FFF, U+FF00-FFEF; }

/* ---------- Tokens ---------- */
@property --accent { syntax: "<color>"; inherits: true; initial-value: #CB4420; }

:root {
  --font-display: "Hubot Sans", "Trograin JP Sans", "Arial Narrow", system-ui, sans-serif;
  --font-text: "Mona Sans", "Trograin JP Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Trograin JP Sans", ui-monospace, monospace;

  /* the sheets' shared palette */
  --pearl: #F2F1EE; --mist: #C9CCD3; --lavender: #B9B6D3; --graphite: #3A3D44; --strap: #1E1F24; --obsidian: #0B0B0D;
  --stamp: #9E1E12;                       /* the red of the TG stamp in the outro */

  --gutter: clamp(16px, 4vw, 64px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --accent: #CB4420;
  transition: --accent .9s var(--ease-out);
}
:root[data-theme="outcasts"] {
  --bg: var(--pearl); --ink: var(--strap); --ink-2: var(--graphite); --muted: #6E717A;
  --line: rgb(30 31 36 / .14); --band-a: #E6E5EE; --band-b: #D2D3DC;
  --accent-ink: color-mix(in oklab, var(--accent) 78%, black);
  color-scheme: light;
}
:root[data-theme="studio"] {
  --gold: #C9A55A; --gold-hi: #EBD49C; --gold-deep: #8C6A2C;
  --bg: var(--obsidian); --ink: var(--pearl); --ink-2: var(--mist); --muted: #8B8E97;
  --line: rgb(242 241 238 / .12); --band-a: #121215; --band-b: #0E0E11;
  --accent: #C3301F; --accent-ink: #E0503C;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--font-text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.label { font: 500 11px/1.4 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.label--accent { color: var(--accent-ink); }

/* ---------- Navigation ---------- */
.nav { position: absolute; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; gap: 24px;
  padding: 22px var(--gutter); }
.brand { display: flex; align-items: center; gap: 12px; }
.stamp { width: 34px; aspect-ratio: 1; background: var(--stamp); flex: none;
  -webkit-mask: url(../assets/tg-stamp.svg) center / contain no-repeat; mask: url(../assets/tg-stamp.svg) center / contain no-repeat; }
:root[data-theme="studio"] .stamp { background: var(--accent); }
.brand__name { font: 800 13px/1 var(--font-display); font-stretch: 112%; letter-spacing: .14em; text-transform: uppercase; }
.nav__links { display: flex; gap: clamp(18px, 2.6vw, 40px); margin-inline: auto; }
.nav__links a { position: relative; font: 600 12px/1 var(--font-display); font-stretch: 110%; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); padding-block: 6px; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease-out); }
.nav__links a:hover::after, .nav__links a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 12px; height: 44px; padding: 0 22px;
  background: var(--ink); color: var(--bg); font: 700 11px/1 var(--font-display); font-stretch: 115%; letter-spacing: .18em; text-transform: uppercase; }
.btn::before { content: ""; width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); transition: transform .6s var(--ease-out); }
.btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .22) 50%, transparent 65%);
  transform: translateX(-120%); transition: transform .9s var(--ease-out); }
.btn:hover::after { transform: translateX(120%); }
.btn:hover::before { transform: rotate(225deg); }
.menu-btn { display: none; width: 44px; height: 44px; margin-left: auto; position: relative; }
.menu-btn span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); }
.menu-btn span:first-child { top: 18px; } .menu-btn span:last-child { top: 25px; right: 17px; }

/* ---------- Hero shell ---------- */
.hero { position: relative; min-height: 100svh; min-height: max(100svh, 640px); overflow: clip; isolation: isolate; background: var(--bg); }
.hero__rule { position: absolute; top: 0; bottom: 0; left: calc(var(--gutter) + 2px); width: 1px; background: var(--line); }
.hero__copy { position: absolute; left: var(--gutter); top: clamp(120px, 24svh, 260px); width: min(44vw, 760px); z-index: 5; }
.kicker { display: flex; align-items: center; gap: 14px; margin: 0 0 clamp(18px, 3svh, 34px); }
.hero__copy--wide { width: min(58vw, 980px); }
.kicker::before { content: ""; width: 44px; height: 1px; background: var(--ink); opacity: .5; }

/* The big title: a variable font that breathes from wide and light to condensed and black on arrival. */
.display { margin: 0; font-family: var(--font-display); font-weight: 900; font-stretch: 75%; line-height: .86; letter-spacing: -.005em;
  text-transform: uppercase; font-size: clamp(56px, 9.6vw, 176px); }
.display .line { display: block; overflow: clip; padding-bottom: .04em; }
.display .line > span { display: inline-block; animation: rise 1.25s var(--ease-out) both, breathe 2.2s var(--ease-out) both; }
.display .line:nth-child(2) > span { animation-delay: .12s, .12s; }
.display .accent { color: var(--accent); transition: color .9s var(--ease-out); }
@keyframes rise { from { transform: translateY(105%); } }
@keyframes breathe { from { font-stretch: 125%; font-weight: 250; letter-spacing: .02em; } }

.lede { margin: clamp(20px, 3.4svh, 36px) 0 0; max-width: 34ch; font: 400 clamp(15px, 1.15vw, 18px)/1.6 var(--font-text); color: var(--ink-2);
  animation: fade 1.2s .55s var(--ease-out) both; }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } }

/* ---------- The band, the ink and the figure (Outcasts) ---------- */
.stage { position: absolute; inset: 0; pointer-events: none; }  /* no z-index: the ink must blend with the page itself */
.band { position: absolute; z-index: 2; left: 47%; width: 25.5vw; top: 15svh; bottom: 0;
  background: linear-gradient(180deg, var(--band-a), var(--band-b)); isolation: isolate; overflow: hidden;
  animation: band-in 1.4s .1s var(--ease-out) both; }
.band::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); z-index: 3; }
@keyframes band-in { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
/* The ink blooms around the figure and spills past the band; multiply lets the white paper vanish into the page. */
.ink { position: absolute; left: calc(47% + 9.5vw); top: -2svh; width: min(84svh, 60vw); aspect-ratio: 1; translate: -50% 0; z-index: 3;
  mix-blend-mode: multiply; }
.ink video, .ink img { width: 100%; height: 100%; object-fit: cover;
  -webkit-mask: radial-gradient(closest-side, #000 72%, transparent); mask: radial-gradient(closest-side, #000 72%, transparent); }

.figure { position: absolute; left: calc(47% + 12.75vw); bottom: 2svh; height: 90svh; aspect-ratio: .46; translate: -50% 0; z-index: 4;
  animation: figure-in 1.5s .25s var(--ease-out) both; }
.figure__float { height: 100%; animation: float 8s 1.8s var(--ease-io) infinite alternate; }
.figure picture { display: block; height: 100%; }
.figure img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; max-width: none; filter: drop-shadow(0 30px 40px rgb(30 31 36 / .16)); }
@keyframes figure-in { from { opacity: 0; transform: translateY(5svh) scale(.985); } }
@keyframes float { to { transform: translateY(-1.1svh); } }

/* the slice transition: strips of the next character slide in on a slant */
.slices { position: absolute; inset: 0; }
.slices__layer { position: absolute; inset: 0; }
.slices i { position: absolute; inset: 0; background: 50% 100% / contain no-repeat; will-change: transform, opacity; }

/* ---------- Right column: who this is ---------- */
.who { position: absolute; right: var(--gutter); top: clamp(140px, 30svh, 320px); width: min(21vw, 340px); z-index: 5; }
.who__name { margin: 10px 0 6px; font: 800 clamp(26px, 2.5vw, 42px)/.95 var(--font-display); font-stretch: 85%; text-transform: uppercase; letter-spacing: .01em; }
.who__kanji { font: 400 13px/1 var(--font-text); color: var(--muted); letter-spacing: .3em; }
.who__theme { margin: 18px 0 0; color: var(--ink-2); font-size: 15px; max-width: 30ch; }
.who__facts { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 18px; }
.who__facts li { border-top: 1px solid var(--line); padding-top: 12px; }
.who__facts b { display: block; margin-top: 6px; font: 800 18px/1.1 var(--font-display); font-stretch: 90%; text-transform: uppercase; letter-spacing: .02em; }
/* the way down to the character's chapter */
.meet { margin-top: 30px; height: 50px; gap: 14px; }
.meet::before { background: var(--accent); }
.meet__arrow { width: 10px; height: 10px; margin-left: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-3px) rotate(45deg); transition: transform .5s var(--ease-out); }
.meet:hover .meet__arrow { transform: translateY(2px) rotate(45deg); }
.meet.is-locked { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); cursor: default; }
.meet.is-locked::before { background: transparent; box-shadow: inset 0 0 0 1px var(--muted); }
.meet.is-locked .meet__arrow, .meet.is-locked::after { display: none; }
.hero .figure { pointer-events: auto; cursor: pointer; }
.hero .figure img { transition: filter .6s var(--ease-out); }
.hero .figure:hover img { filter: drop-shadow(0 30px 40px rgb(30 31 36 / .16)) drop-shadow(0 0 1px color-mix(in oklab, var(--accent) 60%, transparent)); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.swap { transition: opacity .35s var(--ease-io), transform .5s var(--ease-out); }
.swap.is-out { opacity: 0; transform: translateY(8px); }

/* ---------- Bottom left: next card and pager ---------- */
.next { position: absolute; left: var(--gutter); bottom: clamp(28px, 6svh, 64px); z-index: 6; display: flex; align-items: center; gap: 28px; }
.next__card { display: flex; align-items: stretch; height: 92px; background: var(--bg); box-shadow: 0 18px 50px -18px rgb(30 31 36 / .28);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out); }
.next__card:hover { transform: translateY(-4px); box-shadow: 0 26px 60px -20px rgb(30 31 36 / .34); }
.next__thumb { width: 96px; overflow: hidden; background: var(--next-accent, var(--accent)); position: relative; }
.next__thumb img { position: absolute; left: 50%; top: 6%; height: 300%; width: auto; max-width: none; translate: -50% 0; mix-blend-mode: luminosity; opacity: .9; }
.next__text { display: grid; align-content: center; gap: 6px; padding: 0 26px 0 22px; }
.next__text b { font: 800 15px/1 var(--font-display); font-stretch: 105%; letter-spacing: .1em; text-transform: uppercase; }
.pager { display: flex; gap: 12px; }
.pager button { width: 11px; height: 11px; border: 1px solid var(--muted); transform: rotate(45deg); transition: background .4s, border-color .4s, transform .5s var(--ease-out); }
.pager button[aria-current="true"] { background: var(--accent); border-color: var(--accent); transform: rotate(45deg) scale(1.15); }
.pager button.is-locked { border-style: dashed; }

.scroll-cue { position: absolute; right: var(--gutter); bottom: clamp(28px, 6svh, 64px); z-index: 6; display: grid; justify-items: center; gap: 10px; }
.scroll-cue::after { content: ""; width: 1px; height: 38px; background: linear-gradient(var(--ink), transparent); animation: cue 2.4s var(--ease-io) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Studio (dark) hero ---------- */
/* Gold is the brush, red is the seal: gold for everything painted or drawn by hand, red only in the TG stamp. */
.label--gold { color: var(--gold); }
:root[data-theme="studio"] .btn::before { background: var(--gold); }
:root[data-theme="studio"] .btn::after { background: linear-gradient(105deg, transparent 35%, rgb(235 212 156 / .35) 50%, transparent 65%); }
:root[data-theme="studio"] .kicker::before { background: var(--gold); opacity: .8; }

/* gold painted by our engine: white on black, mapped to gold, laid over the dark page with screen so black vanishes */
.gilded { position: relative; display: inline-block; }
.goldbar { position: absolute; left: 0; right: -.12em; top: 52%; aspect-ratio: 8 / 1; translate: 0 -50%; z-index: -1; }  /* its black is the page's own colour, so no blending is needed */
.goldbar video, .goldbar img { width: 100%; height: 100%; object-fit: fill; }
.gold { position: absolute; inset: 0; isolation: isolate; mix-blend-mode: screen; z-index: 1; overflow: hidden; background: #000; }  /* black: the glint can only ever light the gold */
.gold video, .gold img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* a slow glint that only lights the gold: colour-dodge leaves black untouched */
.glint { position: absolute; inset: -30%; background: linear-gradient(115deg, transparent 42%, rgb(255 236 190 / .7) 50%, transparent 58%);
  mix-blend-mode: color-dodge; animation: glint 9s 3s var(--ease-io) infinite; transform: translateX(-60%); }
@keyframes glint { 0% { transform: translateX(-60%); } 35%, 100% { transform: translateX(60%); } }



.pressed { color: color-mix(in oklab, var(--bg) 86%, white);
  text-shadow: -2px -2px 1px rgb(0 0 0 / .95), 1px 1px 0 rgb(255 255 255 / .14), 2px 2px 3px rgb(255 255 255 / .05); }
.barred { position: relative; display: inline-block; }
.barred::before { content: ""; position: absolute; left: -100vw; right: .08em; top: 50%; height: .085em; background: var(--accent); z-index: -1;
  transform-origin: left; animation: bar 1.6s .5s var(--ease-out) both; }
@keyframes bar { from { transform: scaleX(0); } }
.display--studio { font-size: clamp(58px, 11vw, 200px); }
.display--studio .solid { color: var(--ink); }

.panel { position: absolute; right: var(--gutter); top: 13svh; bottom: 9svh; width: min(27vw, 460px); z-index: 2; overflow: hidden;
  background: #000; box-shadow: var(--lift); animation: panel-in 1.5s .2s var(--ease-out) both, lift-in 1.6s 1.1s var(--ease-out) both; }
@keyframes panel-in { from { clip-path: inset(100% -200px -200px -200px); } to { clip-path: inset(-200px -200px -200px -200px); } }
/* a screen lifted just off the page: a faint gold shadow all round, a little deeper below; it settles in after the panel */
:root[data-theme="studio"] { --lift: 0 0 0 1px rgb(201 165 90 / .07), 0 2px 10px rgb(201 165 90 / .07), 0 22px 60px -18px rgb(201 165 90 / .26), 0 0 110px -30px rgb(201 165 90 / .22); }
@keyframes lift-in { from { box-shadow: 0 0 0 1px transparent, 0 2px 10px transparent, 0 22px 60px -18px transparent, 0 0 110px -30px transparent; } }
/* the panel keeps its smoke inside (the smoke drifts up as you scroll); its own shadow isn't cut by that */
.panel video, .panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: screen; }
/* the smoke carries the page's black inside it, so it is laid on plainly: screen would lift its black and show the panel's edge */
.panel > video, .panel > img { mix-blend-mode: normal; }
.panel__cap { position: absolute; left: 18px; right: 18px; bottom: 16px; display: flex; justify-content: space-between; gap: 12px; z-index: 2; }
.panel__glow { position: absolute; inset: auto 0 0; height: 40%; background: radial-gradient(60% 70% at 50% 100%, color-mix(in oklab, var(--gold, var(--accent)) 16%, transparent), transparent 70%); }

.studio-meta { position: absolute; left: var(--gutter); bottom: clamp(28px, 6svh, 64px); z-index: 5; display: flex; gap: clamp(28px, 5vw, 72px); }
.studio-meta div { display: grid; gap: 8px; }
.studio-meta b { font: 800 clamp(18px, 1.5vw, 24px)/1 var(--font-display); font-stretch: 90%; text-transform: uppercase; }

/* The bridge: the studio presents its project, half dark, half light. */
.bridge { position: relative; display: grid; grid-template-columns: 1fr 1fr; min-height: 92svh; padding-block: clamp(56px, 10svh, 120px); }
.bridge__light { --bg: var(--pearl); --ink: var(--strap); --ink-2: var(--graphite); --muted: #6E717A; --line: rgb(30 31 36 / .14);
  --band-a: #E6E5EE; --band-b: #D2D3DC; --accent: #CB4420; --accent-ink: #A8361A;
  background: var(--bg); color: var(--ink); position: relative; overflow: clip; box-shadow: var(--lift); }  /* an element's own shadow isn't cut by its overflow */
.bridge__light .band { left: 22%; width: 56%; top: 14%; animation: none; }
.bridge__light .ink { left: 50%; top: 6%; width: 86%; }
.bridge__light .figure { left: 50%; height: 84%; bottom: 0; animation: none; }
.bridge__dark { position: relative; display: grid; align-content: center; gap: 22px; padding: var(--gutter) calc(var(--gutter) * 1.5); }
.bridge__dark h2 { margin: 0; font: 900 clamp(44px, 6.4vw, 112px)/.86 var(--font-display); font-stretch: 75%; text-transform: uppercase; }
.bridge__dark p { margin: 0; max-width: 40ch; color: var(--ink-2); }


/* ---------- Cast chapter (Outcasts) ---------- */
/* One chapter per character: a turnaround that turns as you scroll beside his story, then his faces, colours and talks. */
.chapter { --accent-ink: color-mix(in oklab, var(--accent) 78%, black); position: relative; background: var(--bg);
  padding: clamp(72px, 14svh, 160px) var(--gutter) clamp(72px, 12svh, 140px); display: grid; gap: clamp(56px, 10svh, 120px); }
.chapter__head { display: flex; align-items: center; gap: 18px; }
.chapter__rule { flex: 1; height: 1px; background: var(--line); }
.chapter__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 110px); align-items: start; }

.turn { position: sticky; top: 7svh; height: 86svh; min-height: 520px; touch-action: pan-y; cursor: grab; user-select: none; }
.turn:active { cursor: grabbing; }
.turn__band { position: absolute; left: 18%; right: 18%; top: 9%; bottom: 7%; background: linear-gradient(180deg, var(--band-a), var(--band-b)); }
.turn__band::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.turn__scale { position: absolute; left: 4%; top: 6%; bottom: 9%; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; justify-content: space-between; }
.turn__scale li { font: 500 10px/1 var(--font-mono); color: var(--muted); display: flex; align-items: center; gap: 8px; }
.turn__scale li::after { content: ""; width: 18px; height: 1px; background: var(--line); }
.turn__stack { position: absolute; inset: 2% 0 7%; }
.turn__stack img { position: absolute; left: 50%; bottom: 0; height: 100%; width: auto; max-width: none; translate: -50% 0; opacity: 0;
  filter: drop-shadow(0 24px 30px rgb(30 31 36 / .14)); transition: opacity .12s linear; pointer-events: none; }
.turn__stack img.is-on { opacity: 1; }
.turn__foot { position: absolute; left: 18%; right: 0; bottom: 0; display: flex; gap: 18px; align-items: baseline; }
.turn__foot [data-turn-name] { color: var(--ink); min-width: 13ch; }
.turn__hint { margin-left: auto; }

.story { display: grid; gap: clamp(56px, 12svh, 140px); padding-block: 4svh 10svh; max-width: 680px; }
.story__block { display: grid; gap: 16px; }
.story p { margin: 0; font-size: clamp(16px, 1.2vw, 19px); line-height: 1.65; color: var(--ink-2); max-width: 58ch; }
.chapter__name { margin: 0; font: 900 clamp(64px, 8.6vw, 156px)/.84 var(--font-display); font-stretch: 75%; text-transform: uppercase; text-wrap: balance; }
.chapter__kanji { margin: 6px 0 0; font-size: 18px; letter-spacing: .4em; color: var(--muted) !important; }
.story .chapter__essence { margin-top: 18px; font: 300 clamp(22px, 2vw, 32px)/1.3 var(--font-display); font-stretch: 112%; color: var(--ink); max-width: 26ch; }

.quote { margin: 0; display: grid; gap: 14px; }
.quote blockquote { margin: 0; }
.quote blockquote p { font: 800 clamp(30px, 3.3vw, 56px)/1.02 var(--font-display) !important; font-stretch: 80% !important; text-transform: uppercase; color: var(--ink) !important; max-width: 18ch !important; text-wrap: balance; }
.quote blockquote p::before { content: "“"; color: var(--accent); }
.quote blockquote p::after { content: "”"; color: var(--accent); }
.quote figcaption a { border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.quote figcaption a:hover { color: var(--accent-ink); }
.quote--small blockquote p { font: 400 clamp(18px, 1.5vw, 24px)/1.45 var(--font-text) !important; text-transform: none; color: var(--ink-2) !important; max-width: 40ch !important; }
.quote--hit blockquote p { font-size: clamp(48px, 6vw, 104px) !important; font-stretch: 75% !important; }
.story .story__big { font: 300 clamp(22px, 2.1vw, 34px)/1.25 var(--font-display); font-stretch: 115%; color: var(--ink); max-width: 30ch; }

.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; }
.facts div { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 6px; align-content: start; }
.facts dd { margin: 0; font: 800 clamp(17px, 1.4vw, 21px)/1.15 var(--font-display); font-stretch: 90%; text-transform: uppercase; }
.facts .facts__note { font: 400 14px/1.4 var(--font-text); text-transform: none; color: var(--muted); }

.palette { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: end; }
.palette__chips ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.palette__chips li { display: grid; gap: 6px; min-width: 0; }
.palette__chips i { display: block; aspect-ratio: 3 / 4; background: var(--c); box-shadow: inset 0 0 0 1px var(--line); transition: transform .5s var(--ease-out); }
.palette__chips li:hover i { transform: translateY(-6px); }
.palette__chips b { min-height: 2.4em; font: 700 clamp(9px, .8vw, 11px)/1.2 var(--font-display); font-stretch: 80%; text-transform: uppercase; letter-spacing: .03em; overflow-wrap: break-word; }  /* narrow letters: names wrap between words, never mid-word */
.palette__chips span { font: 500 10px/1 var(--font-mono); color: var(--muted); }
.usage { margin-top: 16px; display: flex; height: 64px; gap: 2px; }
.usage i { flex: var(--w) 0 0; background: var(--c); box-shadow: inset 0 0 0 1px var(--line); }
.usage__key { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; }
.usage__key li { display: flex; gap: 8px; align-items: baseline; font: 500 10px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.usage__key li::before { content: ""; flex: none; width: 9px; height: 9px; background: var(--c); box-shadow: inset 0 0 0 1px var(--line); translate: 0 1px; }
.usage__key b { color: var(--ink); font-weight: 600; }
/* Wide screens: both halves share four rows (title, swatches, names, hex), so the titles, the swatches' bottoms,
   and the hex codes line up with the colour bar and the key's two rows. */
@media (min-width: 901px) {
  .palette { grid-template-rows: repeat(4, auto); row-gap: 0; align-items: stretch; }
  .palette__chips, .palette__use { grid-row: 1 / 5; display: grid; grid-template-rows: subgrid; align-items: start; }
  .palette__chips > .label, .palette__use > .label { margin-bottom: 16px; }
  .palette__chips ul { grid-row: 2 / 5; grid-template-rows: subgrid; margin: 0; row-gap: 0; }
  .palette__chips li { grid-row: 1 / 4; grid-template-rows: subgrid; gap: 0; }
  .palette__chips b { padding-top: 12px; min-height: 0; }
  .palette__chips span, .usage__key li:nth-child(n+4) { padding-top: 8px; }
  .palette__chips span { line-height: 1.3; }
  .usage { grid-row: 2; align-self: stretch; height: auto; margin: 0; }
  .usage__key { grid-row: 3 / 5; grid-template-rows: subgrid; margin: 0; row-gap: 0; align-items: start; }
  .usage__key li:nth-child(-n+3) { padding-top: 12px; }
}
.chapter__kanji, .facts [lang="ja"] { font-family: "Trograin JP Sans", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", "Noto Sans CJK JP", sans-serif; }

.talks { display: grid; gap: 18px; padding-top: 28px; }
.talks ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 32px); }
.talks a { display: grid; gap: 10px; }
.talks img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .7s var(--ease-out), filter .7s; filter: saturate(.85); }
.talks a:hover img { transform: translateY(-6px); filter: saturate(1); }
.talks b { font: 800 clamp(18px, 1.5vw, 24px)/1.1 var(--font-display); font-stretch: 88%; text-transform: uppercase; text-wrap: balance; }
.talks__when { font-size: 14px; color: var(--muted); }
.story__link { color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .2em; }
.story__link:hover { color: var(--accent-ink); }

@media (max-width: 900px) {
  .chapter__grid { grid-template-columns: 1fr; }
  .turn { position: relative; top: auto; height: 74svh; min-height: 460px; }
  .turn__band { left: 22%; right: 22%; }
  .turn__foot { left: 0; gap: 12px; white-space: nowrap; }
  .turn__foot [data-turn-name] { min-width: 0; }
  .story { padding-block: 0; }
  .palette { grid-template-columns: 1fr; }
  .palette__chips ul { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .palette__chips i { aspect-ratio: 2 / 1; }
  .palette__chips b { font-size: 11px; }
  .talks ul { grid-template-columns: 1fr; }
  .talks li a { grid-template-columns: 42% 1fr; grid-template-rows: auto auto 1fr; column-gap: 14px; row-gap: 6px; align-items: start; }
  .talks li img { grid-row: 1 / 4; }
}

/* ---------- Scroll-driven motion (Chrome, Edge; others simply don't move) ---------- */
@supports (animation-timeline: scroll()) {
  .figure__float { animation: float 8s 1.8s var(--ease-io) infinite alternate; }
  .stage .figure img { animation: drift linear both; animation-timeline: scroll(root); animation-range: 0 100svh; }
  .hero__copy { animation: lift linear both; animation-timeline: scroll(root); animation-range: 0 90svh; }
  .panel > video { animation: drift linear both; animation-timeline: scroll(root); animation-range: 0 100svh; }
  .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
  @keyframes drift { to { transform: translateY(-9svh); } }
  @keyframes lift { to { transform: translateY(-6svh); opacity: .15; } }
  @keyframes reveal { from { opacity: 0; transform: translateY(40px); clip-path: inset(0 0 30% 0); } }
}

/* ---------- Phone ---------- */
/* Phones and small tablets: the hero becomes a column that flows (title, then stage, then the name bar),
   so the title can never land on a character, whatever the browser's bars leave of the screen. */
@media (max-width: 900px) {
  .nav { padding: 14px 16px; }
  .nav__links, .nav .btn { display: none; }
  .menu-btn { display: block; }
  .brand__name { font-size: 11px; }
  .hero { display: flex; flex-direction: column; padding-top: 76px; }
  .hero__rule, .scroll-cue, .who, .lede, .kicker__index { display: none; }
  .hero__copy { position: static; width: auto; padding-inline: 16px; }
  .kicker { margin-bottom: 12px; }
  .display { font-size: min(17.6vw, 150px); }

  .hero .stage { position: relative; inset: auto; flex: 1 1 auto; min-height: max(440px, 58svh); margin-top: 16px; }
  .hero .band { left: 50%; translate: -50% 0; width: min(58vw, 420px); top: 13%; bottom: 0; }
  .hero .figure { left: 50%; top: 0; bottom: 0; height: auto; }
  .hero .ink { left: 44%; top: 4%; width: min(112vw, 760px); }

  .next { position: relative; left: auto; bottom: auto; height: 74px; flex: none; padding: 0 16px; gap: 14px; justify-content: space-between;
    background: var(--bg); border-top: 1px solid var(--line); }
  .next__card { display: none; }
  .m-who { display: flex !important; align-items: center; gap: 14px; min-width: 0; }
  .m-who__txt { display: grid; gap: 4px; min-width: 0; }
  .m-who b { font: 800 19px/1 var(--font-display); font-stretch: 85%; text-transform: uppercase; }
  .m-who__go { flex: none; width: 34px; height: 34px; display: grid; place-items: center; background: var(--ink); }
  .m-who__go::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid var(--bg); border-bottom: 1.5px solid var(--bg); transform: translateY(-2px) rotate(45deg); }
  .m-who.is-locked .m-who__go { display: none; }

  .display--studio { font-size: min(19vw, 160px); }
  .studio-lede { display: block !important; margin-top: 16px; font-size: 15px; }
  .hero .panel { position: relative; inset: auto; width: auto; height: max(380px, 56svh); margin: 28px 16px 0; flex: none; }
  /* the caption keeps to the left on phones, clear of the incense stick in the middle */
  .panel__cap { flex-direction: column; justify-content: flex-end; gap: 6px; right: auto; max-width: 36%; }
  .studio-meta { position: static; padding: 28px 16px 32px; gap: 22px; }
  .bridge { grid-template-columns: 1fr; }
  .bridge__light { min-height: 70svh; }
}
.m-who { display: none; }

/* ---------- Calm for those who ask for it ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .ink video { display: none; }
}
