/* ATTABOTTY — shared site styles. Homepage v4: overview of the whole practice.
   Motion is driven by site.js (GSAP ScrollTrigger + SplitText); without JS every section is a complete static layout. */

@font-face { font-family: "AttabottyTitle"; src: url("../fonts/AttabottyTitleFont-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "AttabottyTitle"; src: url("../fonts/AttabottyTitleFont-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "AttabottyTitle"; src: url("../fonts/AttabottyTitleFont-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "AttabottyBody"; src: url("../fonts/AttabottyBodyText-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "AttabottyBody"; src: url("../fonts/AttabottyBodyText-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "AttabottyBody"; src: url("../fonts/AttabottyBodyText-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --ink: #090B0E;
  --paper: #F2F2ED;
  --cyan: #72E5DE;
  --violet: #9A83E8;
  --silver: #B8C1C8;

  --paper-soft: rgba(242, 242, 237, 0.76);
  --ink-soft: rgba(9, 11, 14, 0.74);
  --rule-ink: rgba(184, 193, 200, 0.2);
  --rule-paper: rgba(9, 11, 14, 0.16);

  --font-title: "AttabottyTitle", ui-sans-serif, system-ui, sans-serif;
  --font-body: "AttabottyBody", ui-sans-serif, system-ui, sans-serif;

  --gutter: clamp(1.1rem, 4.5vw, 4.5rem);
  --section-pad: clamp(6rem, 13vw, 12rem);
  --measure: 34rem;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0875rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
b, strong { font-weight: 700; }
i { font-style: normal; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
[data-tone="paper"] :focus-visible { outline-color: var(--ink); }
main:focus { outline: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: fixed; left: var(--gutter); top: -4rem; z-index: 300; background: var(--paper); color: var(--ink); padding: 0.75rem 1rem; font-weight: 700; }
.skip:focus { top: 1rem; }

/* ---------- Procedural surface ---------- */
.atmosphere { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: var(--ink) url("../img/ink-grain.png") 0 0 / 320px 320px repeat; }
.atmosphere-tone {
  position: absolute; inset: -10%;
  background:
    radial-gradient(55% 45% at 18% 22%, rgba(184, 193, 200, 0.04), transparent 70%),
    radial-gradient(40% 50% at 82% 78%, rgba(154, 131, 232, 0.03), transparent 70%);
}
.atmosphere-dust { position: absolute; inset: 0; width: 100%; height: 100%; }
.atmosphere-grain {
  display: none; position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  mix-blend-mode: overlay; opacity: 0.5;
}
main { position: relative; z-index: 1; }

/* ---------- Type ---------- */
h2, h3 { font-family: var(--font-title); font-weight: 400; }
.title-xl { font-size: clamp(2.3rem, 1rem + 3.6vw, 4.8rem); line-height: 1.02; letter-spacing: -0.012em; text-wrap: balance; }
.title-l { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.6rem); line-height: 1.08; }
.kicker {
  display: flex; align-items: center; gap: 0.75em; margin-bottom: 1.5rem;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan);
  font-variant-numeric: tabular-nums;
}
.kicker::before { content: ""; width: 0.5em; height: 0.5em; flex: none; background: var(--cyan); box-shadow: 0.7em -0.45em 0 -0.1em var(--violet); }
[data-tone="paper"] .kicker { color: var(--ink-soft); }
.prose { max-width: var(--measure); color: var(--paper-soft); }
.prose p + p { margin-top: 1em; }
.title-xl + .prose { margin-top: 1.6rem; }
.lede-copy { font-size: 1.14em; }
.meta { font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--silver); }

/* SplitText wrappers */
.split-line { padding-bottom: 0.06em; margin-bottom: -0.06em; }

/* ---------- Interaction vocabulary ---------- */
[data-glitch-text] { position: relative; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  [data-glitch-text]::before, [data-glitch-text]::after {
    content: attr(data-glitch-text); position: absolute; inset: 0;
    display: inherit; align-items: inherit; pointer-events: none; opacity: 0;
  }
  [data-glitch-text]::before { color: var(--cyan); }
  [data-glitch-text]::after { color: var(--violet); }
  [data-glitch-text]:hover::before { animation: glitch-a 480ms steps(2, end) both; }
  [data-glitch-text]:hover::after { animation: glitch-b 480ms steps(2, end) both; }
}
@keyframes glitch-a {
  0% { opacity: 0.9; translate: -3px 0; clip-path: inset(12% 0 58% 0); }
  33% { opacity: 0.8; translate: 2px 0; clip-path: inset(62% 0 8% 0); }
  66% { opacity: 0.5; translate: -1px 0; clip-path: inset(30% 0 40% 0); }
  100% { opacity: 0; translate: 0 0; clip-path: inset(0 0 100% 0); }
}
@keyframes glitch-b {
  0% { opacity: 0.9; translate: 3px 0; clip-path: inset(55% 0 20% 0); }
  33% { opacity: 0.8; translate: -2px 0; clip-path: inset(5% 0 75% 0); }
  66% { opacity: 0.5; translate: 1px 0; clip-path: inset(70% 0 12% 0); }
  100% { opacity: 0; translate: 0 0; clip-path: inset(0 0 100% 0); }
}

.site-nav a, .ways a {
  background: linear-gradient(var(--cyan), var(--cyan)) left calc(100% - 0.5em) / 0 1px no-repeat;
  transition: background-size 500ms var(--ease-out), color 300ms ease;
}
.site-nav a:hover, .ways a:hover { background-size: 100% 1px; }

.button {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 0.9em;
  min-height: 52px; padding: 0.8rem 1.5rem; margin-top: 2.5rem;
  font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase;
  border: 1px solid currentColor;
  transition: color 450ms var(--ease-out);
}
.button::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--paper); transform: scaleX(0); transform-origin: right center; transition: transform 600ms var(--ease-out); }
.button::after { content: ""; width: 0.55em; height: 0.55em; background: var(--cyan); transition: translate 450ms var(--ease-out); }
.button:hover { color: var(--ink); }
.button:hover::before { transform: scaleX(1); transform-origin: left center; }
.button:hover::after { translate: 0.35em 0; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem var(--gutter);
  transition: translate 650ms var(--ease-out), padding 500ms var(--ease-out);
}
.site-header::before {
  content: ""; position: absolute; inset: 0 0 -2.5rem 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(9, 11, 14, 0.8), rgba(9, 11, 14, 0.35) 55%, rgba(9, 11, 14, 0));
  transition: opacity 500ms ease;
}
.site-header::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(9, 11, 14, 0.78); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule-ink); opacity: 0; transition: opacity 500ms ease;
}
.site-header.is-solid { padding-block: 0.7rem; }
.site-header.is-solid::before { opacity: 0; }
.site-header.is-solid::after { opacity: 1; }
.site-header.is-hidden { translate: 0 -110%; }
.home-link { display: inline-flex; align-items: center; min-height: 44px; opacity: 0; transition: opacity 500ms ease; }
.home-link img { width: 8.5rem; height: auto; }
.site-header.is-solid .home-link, .no-js .home-link { opacity: 1; }
.site-nav ul { display: flex; gap: clamp(1rem, 2.2vw, 2.3rem); }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.76rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--paper-soft); }
.site-nav a:hover { color: var(--paper); }
.menu-toggle { display: none; }

@media (max-width: 960px) {
  .js .menu-toggle {
    display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; padding: 0 0.2rem 0 1rem; margin-left: auto;
    background: none; border: 0; font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; cursor: pointer;
  }
  .menu-toggle-icon { width: 22px; height: 10px; position: relative; }
  .menu-toggle-icon::before, .menu-toggle-icon::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; transition: transform 300ms var(--ease-out); }
  .menu-toggle-icon::before { top: 0; }
  .menu-toggle-icon::after { bottom: 0; right: 6px; background: var(--cyan); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon::before { transform: translateY(4px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon::after { transform: translateY(-4px) rotate(-45deg); right: 0; background: currentColor; }
  .js .site-nav {
    position: fixed; inset: 0; z-index: -1; background: var(--ink);
    display: flex; align-items: center; padding: 6rem var(--gutter) 3rem;
    visibility: hidden; clip-path: inset(0 0 100% 0);
    transition: clip-path 700ms var(--ease-out), visibility 0s 700ms;
  }
  .js .site-nav.is-open { visibility: visible; clip-path: inset(0); transition: clip-path 700ms var(--ease-out); }
  .js .site-nav ul { flex-direction: column; gap: 0.2rem; }
  .js .site-nav a { font-family: var(--font-title); font-size: 2.3rem; letter-spacing: 0.01em; text-transform: none; color: var(--paper); }
  .no-js .site-nav ul { flex-wrap: wrap; gap: 0 1rem; }
}

/* ---------- 1. Hero ---------- */
.hero { position: relative; isolation: isolate; height: 100svh; min-height: 640px; display: grid; align-items: end; padding: 6rem var(--gutter) 4rem; overflow: clip; }
.hero-plate { position: absolute; inset: -3%; z-index: -3; }
.hero-video { width: 100%; height: 100%; object-fit: cover; object-position: 72% center; }
.hero-plate-fade { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(to right, var(--ink) 4%, rgba(9, 11, 14, 0.55) 20%, rgba(9, 11, 14, 0) 34%); }
.hero-face { position: absolute; z-index: -2; right: -3vw; bottom: -9svh; width: min(60vw, 112svh); aspect-ratio: 1; will-change: transform; }
.hero-face img { width: 100%; height: 100%; }
.hero-field { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; image-rendering: pixelated; }
.hero-copy { position: relative; z-index: 2; }
.hero-title { position: relative; width: clamp(18rem, 64vw, 82rem); margin: 0 0 clamp(1.6rem, 3vw, 2.6rem) -0.6vw; line-height: 0; }
.hero-title img { width: 100%; height: auto; }
.wordmark-canvas { position: absolute; pointer-events: none; }
.hero-role { font-family: var(--font-title); font-size: clamp(1.1rem, 0.55rem + 1.35vw, 2rem); letter-spacing: 0.17em; text-transform: uppercase; line-height: 1.3; margin-bottom: 1.1rem; }
.hero-lede { color: var(--paper-soft); font-size: clamp(1rem, 0.9rem + 0.35vw, 1.2rem); max-width: 36rem; }
.line { display: block; overflow: clip; padding-bottom: 0.08em; }
.line > span { display: inline-block; }
.ways { margin-top: clamp(2.5rem, 6vh, 4.5rem); }
.ways ul { display: flex; flex-wrap: wrap; align-items: center; row-gap: 0.25rem; }
.ways li { display: inline-flex; align-items: center; }
.ways li + li::before { content: "/"; margin: 0 1.1rem; color: var(--cyan); }
.ways li:nth-child(even)::before { color: var(--violet); }
.ways a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; }
.hero-scroll { position: absolute; right: var(--gutter); bottom: 2.2rem; width: 1px; height: 4.5rem; background: rgba(242, 242, 237, 0.18); overflow: hidden; }
.hero-scroll span { position: absolute; inset: 0; background: var(--cyan); animation: scroll-cue 2.4s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
@keyframes scroll-cue { 0% { translate: 0 -100%; } 55% { translate: 0 0; } 100% { translate: 0 100%; } }

/* Opening sequence (classes set by site.js) */
.js .hero-video { opacity: 0; scale: 1.08; transition: opacity 2400ms ease 100ms, scale 3600ms var(--ease-out) 100ms; }
.js .hero-face img { opacity: 0; scale: 1.05; transition: opacity 1800ms ease 500ms, scale 2600ms var(--ease-out) 500ms; }
.js .hero-title img { opacity: 0; transition: opacity 900ms ease 700ms; }
.js .hero-title.is-canvas img { opacity: 0 !important; transition: none; }
.js .line > span { translate: 0 108%; transition: translate 1300ms var(--ease-out); }
.js .hero-role .line:nth-child(1) > span { transition-delay: 1500ms; }
.js .hero-role .line:nth-child(2) > span { transition-delay: 1620ms; }
.js .hero-lede .line > span { transition-delay: 1780ms; }
.js .hero-lede .line:nth-child(2) > span { transition-delay: 1900ms; }
.js .ways li { opacity: 0; translate: 0 0.8rem; transition: opacity 900ms ease, translate 1100ms var(--ease-out); }
.js .ways li:nth-child(1) { transition-delay: 2000ms; } .js .ways li:nth-child(2) { transition-delay: 2080ms; }
.js .ways li:nth-child(3) { transition-delay: 2160ms; } .js .ways li:nth-child(4) { transition-delay: 2240ms; }
.js .site-header { opacity: 0; transition: translate 650ms var(--ease-out), padding 500ms var(--ease-out), opacity 900ms ease 2200ms; }
.js .hero-scroll { opacity: 0; transition: opacity 900ms ease 2500ms; }
.is-loaded .hero-video { opacity: 1; scale: 1; }
.is-loaded .hero-face img { opacity: 1; scale: 1; }
.is-loaded .hero-title img { opacity: 1; }
.is-loaded .line > span { translate: 0 0; }
.is-loaded .ways li { opacity: 1; translate: 0 0; }
.is-loaded .site-header, .is-loaded .hero-scroll { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .js .hero-video, .js .hero-face img, .js .line > span, .js .ways li { scale: none; translate: none; filter: none; transition: opacity 600ms ease; }
  .hero-scroll span { animation: none; }
}

/* ---------- 2. Story: one pinned, scroll-scrubbed network film drawn by story.js ----------
   Without JS or with reduced motion the nine phrases read as a plain stacked passage. */
.story { position: relative; background: var(--ink); }
.story-pin { position: relative; padding: var(--section-pad) var(--gutter); }
.story-canvas, .story-count { display: none; }
.story-lines { display: grid; gap: 0.5em; max-width: 30em; font-size: clamp(1.35rem, 1rem + 1.3vw, 2.2rem); line-height: 1.3; }
.story-line { color: var(--paper-soft); text-wrap: pretty; margin: 0; }
.story-line .hl { color: var(--paper); }

.story.is-live .story-pin { height: 100svh; padding: 0; overflow: clip; }
.story.is-live .story-canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.story-grain { display: none; }
.story.is-live .story-grain {
  display: block; position: absolute; inset: -192px; pointer-events: none; background-size: 192px 192px;
  animation: story-grain 0.6s steps(1) infinite;
}
@keyframes story-grain {
  0% { transform: translate3d(0, 0, 0); } 20% { transform: translate3d(-61px, 37px, 0); } 40% { transform: translate3d(83px, -29px, 0); }
  60% { transform: translate3d(-17px, -88px, 0); } 80% { transform: translate3d(44px, 71px, 0); }
}
.story.is-live .story-count { display: flex; position: absolute; top: clamp(5.5rem, 12vh, 8rem); left: var(--gutter); margin: 0; z-index: 1; transition: color 500ms ease; }
.story.is-live.on-paper .story-count { color: var(--ink-soft); }
.story.is-live .story-count, .story.is-live .story-grain { transition: color 500ms ease, opacity 400ms ease; }
.story.is-through .story-count, .story.is-through .story-grain { opacity: 0; }
.story.is-live .story-lines { position: absolute; inset: 0; display: block; max-width: none; pointer-events: none; }
/* story.js places each phrase (left, top, width, alignment) where the film leaves room for it. */
.story.is-live .story-line {
  position: absolute; left: 50%; top: 50%; margin: 0; visibility: hidden; translate: -50% -50%;
  text-wrap: balance; font-size: clamp(1.8rem, 1rem + 2.4vw, 3.4rem); line-height: 1.14; letter-spacing: -0.01em;
}
.story.is-live .story-line .w { display: inline-block; will-change: transform, opacity, filter; }
.story.is-live [data-tone-line="ink"] { color: var(--paper); text-shadow: 0 0 1.2em rgba(9, 11, 14, 0.9); }
.story.is-live [data-tone-line="ink"] .hl { color: inherit; transition: color 600ms var(--ease-out); }
.story.is-live [data-tone-line="ink"] .hl.on { color: var(--cyan); }
.story.is-live [data-tone-line="paper"] { color: var(--ink); text-shadow: 0 0 1.2em rgba(242, 242, 237, 0.95); }
.story.is-live [data-tone-line="paper"] .hl { color: inherit; }
.story.is-live [data-tone-line="paper"] .hl .w { background: linear-gradient(var(--cyan), var(--cyan)) left 88% / 0% 0.38em no-repeat; transition: background-size 700ms var(--ease-out); }
.story.is-live [data-tone-line="paper"] .hl.on .w { background-size: 100% 0.38em; }
.story.is-live [data-tone-line="paper"] .hl.on .w + .w { transition-delay: 90ms; }

/* ---------- 3. Five preview slides ---------- */
.worlds { position: relative; }
/* When the story film runs, slide one sits under the story's last screen so the dive opens straight into it. */
.worlds.is-linked { margin-top: -100svh; z-index: 2; }
.worlds.gl-on .worlds-pin { background: transparent; }
.worlds-index { transition: opacity 600ms ease; }
.worlds.is-entering .worlds-index { opacity: 0; pointer-events: none; }
.worlds-pin { position: relative; height: 100svh; overflow: clip; background: var(--ink); }
.worlds-gl { position: absolute; inset: 0; width: 100%; height: 100%; }
.worlds-chapters { position: absolute; inset: 0; }
.chapter { position: absolute; inset: 0; visibility: hidden; }
.chapter.is-active { visibility: visible; }
.chapter-media { position: absolute; inset: 0; transition: opacity 700ms ease; }
.chapter-media img { width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.gl-on .chapter-media { opacity: 0; }
.chapter-copy { position: absolute; left: var(--gutter); bottom: clamp(3.5rem, 12vh, 8rem); width: min(46rem, 52vw); z-index: 2; }
.chapter-title { font-family: var(--font-title); font-size: clamp(2.4rem, 0.6rem + 4.3vw, 5.9rem); line-height: 0.98; letter-spacing: -0.02em; text-wrap: balance; }
.chapter-text { margin-top: 1.5rem; max-width: 32rem; color: var(--paper-soft); }
.chapter-lede { display: block; margin-bottom: 0.4em; color: var(--paper); font-size: 1.12em; }
/* The way into each page: a solid cyan button with an arrow, so it reads as a destination at a glance. */
.chapter-link {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 1.1rem; min-height: 60px; margin-top: 2rem; padding: 0.55rem 0.55rem 0.55rem 1.6rem;
  font-size: 0.9rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); background: var(--cyan);
  box-shadow: 0 0 0 1px rgba(114, 229, 222, 0.5), 0 14px 48px -12px rgba(114, 229, 222, 0.55);
  transition: box-shadow 500ms var(--ease-out), color 400ms ease;
}
.chapter-link::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--paper); transform: scaleX(0); transform-origin: right center; transition: transform 600ms var(--ease-out); }
.chapter-link::after {
  content: ""; position: absolute; inset: 0 auto 0 0; z-index: -1; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent); translate: -120% 0;
}
.chapter.is-active .chapter-link::after { animation: chapter-sheen 5.5s 1.4s ease-in-out infinite; }
@keyframes chapter-sheen { 0% { translate: -120% 0; } 22%, 100% { translate: 320% 0; } }
.chapter-arrow { display: grid; place-items: center; width: 46px; height: 46px; flex: none; background: var(--ink); color: var(--cyan); overflow: hidden; }
.chapter-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; transition: translate 500ms var(--ease-out); }
.chapter-link:hover, .chapter-link:focus-visible { box-shadow: 0 0 0 1px var(--paper), 0 18px 60px -10px rgba(114, 229, 222, 0.75); }
.chapter-link:hover::before, .chapter-link:focus-visible::before { transform: scaleX(1); transform-origin: left center; }
.chapter-link:hover .chapter-arrow svg { animation: chapter-arrow 650ms var(--ease-out); }
@keyframes chapter-arrow { 0% { translate: 0 0; } 45% { translate: 130% 0; } 46% { translate: -130% 0; } 100% { translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .chapter.is-active .chapter-link::after, .chapter-link:hover .chapter-arrow svg { animation: none; } }

.worlds-index { position: absolute; z-index: 3; right: var(--gutter); top: 50%; translate: 0 -50%; text-shadow: 0 0 10px rgba(9, 11, 14, 0.95), 0 0 2px rgba(9, 11, 14, 0.9); }
.worlds-index::before { content: ""; position: absolute; inset: -3rem -2rem -3rem -5rem; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(9, 11, 14, 0.62), transparent); }
.worlds-index ol { display: grid; gap: 0.2rem; }
.worlds-index button {
  display: flex; align-items: center; justify-content: flex-end; gap: 0.8rem; width: 100%; min-height: 40px;
  background: none; border: 0; padding: 0; cursor: pointer;
  font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(242, 242, 237, 0.62);
  transition: color 400ms ease;
}
.worlds-index button:hover { color: var(--paper); }
.worlds-index .wi-mark { order: 2; width: 18px; height: 1px; background: currentColor; transition: width 500ms var(--ease-out), height 300ms ease, background-color 300ms ease; }
.worlds-index button[aria-current="true"] { color: var(--paper); }
.worlds-index button[aria-current="true"] .wi-mark { width: 40px; height: 2px; background: var(--cyan); }

/* ---------- 4. Biography: a paper panel that blooms out of the ink ----------
   The portrait holds (sticky) on the left while the longer story scrolls past on the right. */
.about { position: relative; padding: 0; }
.about-panel {
  position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem; align-items: start;
  min-height: 100svh; padding: 0 var(--gutter); overflow: clip;
  background: var(--paper); color: var(--ink);
}
.about-panel::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.55; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.04  0 0 0 0 0.045  0 0 0 0 0.055  0 0 0 -0.9 0.62'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.about-figure {
  position: sticky; top: 0; grid-column: 1 / span 6; grid-row: 1; height: 100svh; margin-left: calc(-1 * var(--gutter)); z-index: 0; overflow: clip;
  -webkit-mask-image: linear-gradient(to left, transparent 2%, #000 34%); mask-image: linear-gradient(to left, transparent 2%, #000 34%);
}
.about-art { position: absolute; inset: -6% -10% -6% -6%; }
.about-art img { width: 100%; height: 100%; object-fit: cover; object-position: 35% center; }
.about-copy { position: relative; z-index: 1; grid-column: 7 / span 6; grid-row: 1; padding-block: var(--section-pad); }
.about-body { margin-top: 2.2rem; }
.about .prose { color: var(--ink-soft); }
.about .lede-copy { color: var(--ink); }
.about em { font-style: italic; color: var(--ink); }
.about .mark { color: var(--ink); background: linear-gradient(var(--cyan), var(--cyan)) left 88% / 100% 0.36em no-repeat; }

/* ---------- 5. Follow: the social ending and the name ---------- */
.contact { position: relative; padding: var(--section-pad) var(--gutter) 0; overflow: clip; }
.contact-title { font-family: var(--font-title); font-size: clamp(2.8rem, 0.8rem + 6.6vw, 8.8rem); line-height: 0.96; letter-spacing: -0.02em; max-width: 12em; text-wrap: balance; }
.contact .prose { margin-top: 2rem; }
.contact-routes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--rule-ink); }
.contact-routes a { position: relative; display: grid; gap: 0.35rem; padding: 1.6rem 1.25rem 1.6rem 0; border-bottom: 1px solid var(--rule-ink); overflow: clip; }
.contact-routes a + a { padding-left: 1.25rem; border-left: 1px solid var(--rule-ink); }
.contact-routes a::before { content: ""; position: absolute; inset: 0; background: rgba(114, 229, 222, 0.08); transform: scaleY(0); transform-origin: bottom; transition: transform 500ms var(--ease-out); }
.contact-routes a:hover::before { transform: scaleY(1); }
.contact-routes .platform { position: relative; font-family: var(--font-title); font-size: clamp(1.3rem, 1rem + 0.9vw, 1.9rem); }
.contact-routes .handle { position: relative; color: var(--silver); font-size: 0.88rem; transition: color 300ms ease; }
.contact-routes a:hover .handle { color: var(--cyan); }
.site-footer { margin-top: clamp(5rem, 10vw, 9rem); padding-bottom: 1.75rem; }
.footer-mark { width: 100%; height: auto; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule-ink); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--silver); }

/* ---------- Narrow screens ---------- */
@media (max-width: 900px) {

  .chapter-copy { width: auto; right: var(--gutter); bottom: 5.5rem; }
  .chapter-text { margin-top: 1rem; }
  .chapter-link { display: flex; justify-content: space-between; margin-top: 1.4rem; font-size: 0.82rem; }
  .chapter-media img { object-position: 70% center; }
  .worlds-index { top: auto; bottom: 1.25rem; left: var(--gutter); right: var(--gutter); translate: none; }
  .worlds-index ol { display: flex; justify-content: space-between; }
  .worlds-index::before { content: none; }
  .worlds-index button { min-height: 44px; font-size: 0; gap: 0; }
  .worlds-index .wi-mark { width: 100%; min-width: 2.2rem; }

  .about-panel { display: block; }
  .about-figure { position: relative; top: auto; height: 90vw; margin: 0 calc(-1 * var(--gutter)); -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent); mask-image: linear-gradient(to bottom, #000 65%, transparent); }
  .about-art { inset: 0 -40% 0 -20%; }
  .about-copy { padding-block: 0 var(--section-pad); margin-top: -12vw; }
  .contact-routes { grid-template-columns: 1fr; }
  .contact-routes a + a { padding-left: 0; border-left: 0; }
}
@media (max-width: 820px) {
  .hero { height: auto; min-height: 100svh; display: block; padding: 4.5rem var(--gutter) 3rem; }
  .hero-plate { inset: 0 0 auto 0; height: 132vw; }
  .hero-video { object-position: 70% center; }
  .hero-plate-fade { background: linear-gradient(to top, var(--ink) 2%, rgba(9, 11, 14, 0) 30%); }
  .hero-face img { -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent); mask-image: linear-gradient(to bottom, #000 78%, transparent); }
  .hero-face { position: relative; right: auto; bottom: auto; width: 112vw; margin: 0 0 0 -6vw; }
  .hero-copy { margin-top: -26vw; }
  .hero-title { width: 100%; margin-left: 0; }
  .ways ul { flex-direction: column; align-items: stretch; }
  .ways li + li::before { content: none; }
  .ways li { border-top: 1px solid var(--rule-ink); }
  .ways li:last-child { border-bottom: 1px solid var(--rule-ink); }
  .ways a { width: 100%; justify-content: space-between; min-height: 52px; background: none; }
  .ways a::after { content: ""; width: 0.45rem; height: 0.45rem; background: var(--cyan); }
  .hero-scroll { display: none; }
}

/* ---------- Holding pages for chapters still being built ---------- */
.holding { position: relative; min-height: 100svh; display: grid; align-items: center; padding: 8rem var(--gutter) 5rem; overflow: clip; }
.holding-art { position: absolute; inset: 0; z-index: 0; -webkit-mask-image: linear-gradient(to right, transparent 15%, #000 60%); mask-image: linear-gradient(to right, transparent 15%, #000 60%); }
.holding-art img { width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.holding-copy { position: relative; z-index: 1; max-width: 38rem; }
.site-nav a[aria-current="page"] { color: var(--paper); background-size: 100% 1px; }
@media (max-width: 960px) { .holding .site-nav, .holding ~ .site-nav { display: none; } }
.holding-lede { display: block; color: var(--paper); font-size: 1.14em; }
.holding .status { display: inline-flex; flex-wrap: wrap; row-gap: 0.2rem; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper); border: 1px solid var(--rule-ink); padding: 0.55rem 0.8rem; }
.holding .status span + span::before { content: "/"; margin: 0 0.6em; color: var(--cyan); }
.holding-entry .meta i { color: var(--cyan); margin: 0 0.3em; }
.holding .inline { color: var(--paper); background: linear-gradient(var(--cyan), var(--cyan)) left bottom / 100% 1px no-repeat; }
.holding-entry { margin-top: 2.75rem; padding-top: 1.75rem; border-top: 1px solid var(--rule-ink); max-width: var(--measure); color: var(--paper-soft); }
.holding-entry .title-l { margin: 0.6rem 0 1rem; color: var(--paper); }
.holding-entry p + p { margin-top: 0.8em; }
.holding-note { margin-top: 1.5rem; color: var(--silver); font-size: 0.92em; }
@media (max-width: 820px) {
  .holding { align-items: start; padding-top: 58vw; }
  .holding-art { inset: 0 0 auto 0; height: 92vw; -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent); mask-image: linear-gradient(to bottom, #000 45%, transparent); }
}
