/* RYL NeuroAcademy — editorial line-art theme */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --paper: #fbfaf7;
  --paper-2: #f3f1ea;
  --ink: #0d0d0d;
  --ink-2: #3a3a3a;
  --muted: #77756e;
  --line: #d9d6cc;
  --accent: #ec3b1c;      /* red-orange accent words */
  --accent-2: #ff6a13;    /* UI orange */
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans); color: var(--ink); line-height: 1.6;
  background-color: var(--paper);
  background-image: radial-gradient(circle, rgba(0,0,0,.09) 1px, transparent 1.2px);
  background-size: 14px 14px;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.acc { font-style: italic; color: var(--accent); }
[hidden] { display: none !important; }

/* ── type ── */
.display, .headline, .display-sm, .wordmark, .index-title, .person h3, .stat-num, .form h3, .card h3, .values h3 {
  font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em;
}
.display { font-size: clamp(3.2rem, 10vw, 9.5rem); line-height: .9; max-width: 13ch; }
.headline { font-size: clamp(2.4rem, 5.6vw, 4.8rem); line-height: .95; margin-bottom: 20px; max-width: 18ch; }
.display-sm { font-size: clamp(2.6rem, 7vw, 6rem); line-height: .95; text-align: center; max-width: 16ch; margin: 0 auto; }
.eyebrow {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px; display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: currentColor; }
.lede { font-size: clamp(1.02rem, 1.5vw, 1.2rem); color: var(--ink-2); max-width: 56ch; margin-bottom: 48px; }
.body { color: var(--ink-2); margin-bottom: 18px; max-width: 58ch; }
.num { font-family: var(--mono); font-size: .75rem; color: var(--muted); }

/* ── intro counter ── */
.intro {
  position: fixed; inset: 0; z-index: 200; background: var(--paper);
  background-image: inherit; background-size: 14px 14px;
  display: grid; place-items: center; transition: opacity .7s var(--ease), visibility .7s;
}
.intro.done { opacity: 0; visibility: hidden; }
.intro-digits {
  font-family: var(--sans); font-weight: 700; font-size: clamp(7rem, 30vw, 26rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 3px var(--ink); letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.intro-skip {
  position: absolute; bottom: 12vh; font-size: 1rem; color: var(--accent-2);
  display: inline-flex; gap: 8px; align-items: center;
}
.intro-skip::before { content: '\2192'; }
html.no-intro .intro { display: none; }

/* ── top bar ── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px var(--gutter); pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: .95rem; }
.brand-mark { width: 30px; height: 30px; display: block; flex: none; transition: transform .4s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.06); }
.brand-name { background: rgba(251,250,247,.8); padding: 2px 6px; border-radius: 6px; }
.pills { display: flex; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(251,250,247,.85); backdrop-filter: blur(8px);
  font-size: .84rem; text-decoration: none; transition: border-color .2s, background .2s;
}
.pill:hover { border-color: var(--ink); background: #fff; }
.burger { width: 14px; height: 9px; position: relative; display: inline-block; }
.burger i { position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
.burger i:first-child { top: 0; } .burger i:last-child { bottom: 0; }
.menu-open .burger i:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-open .burger i:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 45; background: var(--paper); padding: 96px var(--gutter) 40px;
  display: flex; flex-direction: column; justify-content: space-between; overflow-y: auto;
}
.menu[hidden] { display: none; }
.menu-list { list-style: none; }
.menu-list a {
  display: flex; align-items: baseline; gap: 18px; text-decoration: none; padding: 6px 0;
  font-family: var(--serif); font-size: clamp(2.2rem, 7vw, 4.6rem); line-height: 1.05;
  border-bottom: 1px solid var(--line); transition: color .2s, padding-left .3s var(--ease);
}
.menu-list a:hover { color: var(--accent); padding-left: 12px; }
.menu-foot { font-family: var(--mono); font-size: .85rem; margin-top: 24px; }

/* ── progress rail ── */
.rail { position: fixed; left: 14px; top: 50%; transform: translateY(-50%); height: 40vh; width: 30px; z-index: 40; pointer-events: none; }
.rail-ticks { position: absolute; left: 0; top: 0; bottom: 0; width: 8px;
  background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 6px); }
.rail-mark { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 6px; transform: translateY(-50%); }
.rail-mark::before { content: ''; width: 14px; height: 2px; background: var(--ink); }
.rail-mark span { font-family: var(--mono); font-size: .62rem; color: var(--ink-2); }

/* ── hero ── */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 140px; overflow: hidden; }
.hero-field { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.hero .wrap { position: relative; width: 100%; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px; border: 1px solid var(--line);
  border-radius: 999px; background: rgba(255,255,255,.7); font-size: .8rem; margin-bottom: 28px;
}
.kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.hero .lede { margin: 28px 0 36px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-wave { position: absolute; left: 0; right: 0; bottom: 70px; width: 100%; height: 120px; }
.hero-wave path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 3.2s .6s var(--ease) forwards; vector-effect: non-scaling-stroke; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.scroll-cue { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; text-decoration: none; color: var(--muted); }
.scroll-cue i { width: 1px; height: 28px; background: var(--ink); animation: cue 1.8s infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: .95rem; text-decoration: none;
  transition: transform .2s var(--ease), background .2s, color .2s, box-shadow .2s;
}
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--accent); transform: translateY(-2px); }
.btn-line { border: 1px solid var(--ink); background: rgba(255,255,255,.6); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.link-arrow { display: inline-block; margin-top: 28px; font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }
.link-arrow:hover { color: var(--accent); }

/* ── story (sticky chapters) ── */
.story { position: relative; height: calc(var(--n) * 85vh + 100vh); }
.story-stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; overflow: hidden; }
.story-frame {
  position: relative; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  height: min(78vh, 720px); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
}
.story-frame::before, .story-frame::after { content: ''; position: absolute; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--ink); }
.story-frame::before { top: 6px; } .story-frame::after { bottom: 6px; }
.story-count { position: absolute; top: 22px; right: var(--gutter); font-family: var(--mono); font-size: .78rem; }
.chapter {
  position: absolute; inset: 0 var(--gutter); display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: center;
  opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility .6s;
}
.chapter.is-active { opacity: 1; visibility: visible; }
.chapter-text > * { transform: translateY(24px); opacity: 0; transition: transform .8s var(--ease), opacity .8s var(--ease); }
.chapter.is-active .chapter-text > * { transform: none; opacity: 1; }
.chapter.is-active .chapter-text > *:nth-child(2) { transition-delay: .08s; }
.chapter.is-active .chapter-text > *:nth-child(3) { transition-delay: .16s; }
.chapter-body { color: var(--ink-2); max-width: 46ch; font-size: 1.05rem; }
.chapter-art { color: var(--ink); }
.illus { width: 100%; height: auto; max-height: 60vh; }
.illus [pathLength]:not([stroke-dasharray]) { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s var(--ease); }
.illus [stroke-dasharray] { opacity: 0; transition: opacity 1s .9s; }
.illus text { opacity: 0; transition: opacity .6s 1.2s; }
.is-active .illus [pathLength]:not([stroke-dasharray]), .drawn .illus [pathLength]:not([stroke-dasharray]) { stroke-dashoffset: 0; }
.is-active .illus [stroke-dasharray], .is-active .illus text, .drawn .illus [stroke-dasharray], .drawn .illus text { opacity: 1; }
.story-dots { position: absolute; bottom: 22px; left: var(--gutter); display: flex; gap: 6px; }
.story-dots i { width: 18px; height: 3px; background: var(--line); transition: background .3s, width .3s; }
.story-dots i.on { background: var(--accent); width: 34px; }

/* ── marquee ── */
.marquee { padding: 56px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.55); overflow: hidden; }
.marquee-label { text-align: center; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); margin-bottom: 26px; }
.marquee-track { display: flex; width: max-content; animation: scroll-x 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-row { display: flex; list-style: none; }
.marquee-row li { display: flex; align-items: baseline; gap: 12px; padding: 0 44px; border-right: 1px solid var(--line); white-space: nowrap; }
.marquee-row b { font-family: var(--serif); font-weight: 400; font-size: 2.6rem; line-height: 1; }
.marquee-row span { font-weight: 600; font-size: .92rem; }
.marquee-row small { font-family: var(--mono); font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ── sections ── */
.section { padding: clamp(80px, 12vw, 150px) 0; }
.section-tint { background: rgba(243,241,234,.75); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.sub-head { margin-top: clamp(80px, 10vw, 130px); }

.vision { margin-top: 36px; padding: 28px 0 0; border-top: 3px solid var(--ink); }
.vision p:last-child { font-family: var(--serif); font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.12; }
.values { list-style: none; border-top: 1px solid var(--ink); }
.values li { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.values h3 { font-size: 1.8rem; line-height: 1.05; margin-bottom: 8px; }
.values p { color: var(--ink-2); font-size: .95rem; }

/* stats */
.stats { padding: 64px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: var(--ink); color: var(--paper); }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.stat-num { font-size: clamp(3rem, 6vw, 5.2rem); line-height: 1; }
.stat:nth-child(2n) .stat-num { font-style: italic; color: var(--accent-2); }
.stat p { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; opacity: .7; margin-top: 10px; }

/* focus index list */
.index-list { list-style: none; border-top: 1px solid var(--ink); }
.index-list li { border-bottom: 1px solid var(--line); }
.index-row { width: 100%; display: grid; grid-template-columns: 56px 1fr 32px; align-items: center; gap: 12px; padding: 26px 0; text-align: left; }
.index-title { font-size: clamp(1.7rem, 3.6vw, 3rem); line-height: 1.05; transition: color .25s, transform .35s var(--ease); }
.index-row:hover .index-title { color: var(--accent); transform: translateX(10px); }
.plus { position: relative; width: 22px; height: 22px; }
.plus::before, .plus::after { content: ''; position: absolute; left: 50%; top: 50%; width: 18px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); transition: transform .35s var(--ease); }
.plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.index-row[aria-expanded="true"] .plus::after { transform: translate(-50%, -50%) rotate(0deg); }
.index-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.index-body > p { overflow: hidden; color: var(--ink-2); max-width: 62ch; padding-left: 68px; }
.index-row[aria-expanded="true"] + .index-body { grid-template-rows: 1fr; }
.index-row[aria-expanded="true"] + .index-body > p { padding-bottom: 28px; }

/* innovation */
.video-frame { border: 3px solid var(--ink); padding: 6px; background: #fff; margin-bottom: 48px; }
.video-frame video, .video-frame iframe { width: 100%; aspect-ratio: 16/9; background: #000; border: 0; display: block; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--ink); }
.card { padding: 28px 28px 34px 0; border-bottom: 1px solid var(--line); }
.card + .card { padding-left: 28px; border-left: 1px solid var(--line); }
.card h3 { font-size: 2rem; line-height: 1.05; margin: 14px 0 10px; }
.card p { color: var(--ink-2); font-size: .95rem; }

/* press & hold */
.hold { padding: clamp(90px, 14vw, 170px) 0; text-align: center; }
.hold-btn { position: relative; margin: 44px auto 0; width: 132px; height: 132px; display: grid; place-items: center; user-select: none; -webkit-user-select: none; touch-action: none; }
.hold-btn svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.hold-btn circle { fill: none; }
.hold-btn .track { stroke: var(--line); stroke-width: 2; }
.hold-btn .fill { stroke: var(--accent-2); stroke-width: 4; stroke-dasharray: 1; stroke-dashoffset: 1; }
.hold-btn .core { stroke: var(--accent-2); stroke-width: 1.5; transform-origin: center; animation: ring 2.2s infinite; }
.hold-btn .core2 { stroke: var(--accent-2); stroke-width: 1.5; fill: rgba(255,106,19,.1); }
@keyframes ring { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
.hold-label { position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .9rem; }
.hold-hint { margin-top: 56px; font-size: .85rem; color: var(--muted); }

/* people */
.group-label { display: flex; align-items: baseline; gap: 12px; font-family: var(--mono); font-weight: 500; font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--ink); padding: 14px 0; margin: 8px 0 28px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.group-label span { color: var(--muted); }
.people + .group-label { margin-top: 64px; }
.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.people.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.person { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 32px 24px 28px; background: #fff; border: 1px solid var(--line); transition: border-color .25s, transform .35s var(--ease), box-shadow .35s var(--ease); }
.person:hover { border-color: var(--ink); transform: translateY(-4px); box-shadow: 6px 6px 0 var(--ink); }
.person-photo { position: relative; width: 148px; height: 148px; flex: none; border-radius: 50%; padding: 5px; border: 1px solid var(--ink); background: #fff; margin-bottom: 22px; }
.person-photo::after { content: ''; position: absolute; inset: -9px; border-radius: 50%; border: 1px dashed var(--line); transition: border-color .3s, transform 1.2s var(--ease); }
.person:hover .person-photo::after { border-color: var(--accent-2); transform: rotate(40deg); }
.person-photo .ph-inner { position: relative; display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--paper-2); }
.person-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: scale(var(--zoom, 1)); z-index: 1; filter: grayscale(1) contrast(1.04); transition: filter .4s; }
.person:hover .person-photo img { filter: none; }
.ph-initials { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 3.2rem; color: var(--accent); }
.person-name { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; line-height: 1.05; letter-spacing: -0.01em; text-wrap: balance; }
.person-role { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-top: 10px; line-height: 1.5; text-wrap: balance; }
.person-bio { color: var(--ink-2); font-size: .92rem; margin-top: 12px; }
.quals { list-style: none; font-size: .88rem; color: var(--ink-2); margin-top: 16px; width: 100%; border-top: 1px dashed var(--line); }
.quals li { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.tag { display: inline-block; margin-top: 16px; padding: 4px 12px; border: 1px solid var(--accent); color: var(--accent); border-radius: 999px; font-size: .78rem; }

/* join + contact */
.roles { list-style: none; margin-top: 26px; border-top: 1px solid var(--ink); }
.roles li { padding: 14px 0; border-bottom: 1px solid var(--line); font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; display: flex; gap: 14px; align-items: center; }
.roles li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); flex: none; }
.form { background: #fff; border: 1px solid var(--ink); padding: clamp(24px, 4vw, 40px); box-shadow: 8px 8px 0 var(--ink); }
.form h3 { font-size: 2.4rem; line-height: 1; margin-bottom: 6px; }
.form-sub { color: var(--muted); font-size: .9rem; margin-bottom: 24px; }
.form label { display: block; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 18px; color: var(--ink-2); }
.form input, .form select, .form textarea {
  display: block; width: 100%; margin-top: 8px; padding: 12px 0; font: inherit; font-size: 1rem; text-transform: none; letter-spacing: 0;
  color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; outline: none; transition: border-color .2s;
}
.form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 10px) 52%, calc(100% - 5px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.form textarea { resize: vertical; min-height: 96px; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--ink); }
.form .invalid { border-color: var(--accent); }
.form .btn { margin-top: 8px; }
.form-status { min-height: 1.4em; margin-top: 12px; font-size: .88rem; }
.form-status.ok { color: #157a4c; } .form-status.err { color: var(--accent); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.contact-list { margin-top: 30px; border-top: 1px solid var(--ink); }
.contact-list dt { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding-top: 18px; }
.contact-list dd { padding: 4px 0 18px; border-bottom: 1px solid var(--line); font-size: 1.02rem; }
.contact-list a { text-decoration: none; border-bottom: 1px solid var(--accent); }
.spinner { display: inline-block; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* email box (join) */
.mail-card { background: #fff; border: 1px solid var(--ink); padding: clamp(24px, 4vw, 40px); box-shadow: 8px 8px 0 var(--ink); min-width: 0; }
.mail-card h3 { font-family: var(--serif); font-weight: 400; font-size: 2.4rem; line-height: 1; margin-bottom: 12px; }
.mail-sub { color: var(--ink-2); font-size: .98rem; margin-bottom: 24px; }
.mail-list { list-style: none; border-top: 1px solid var(--ink); }
.mail-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.mail-addr { min-width: 0; overflow-wrap: anywhere; font-family: var(--serif); font-size: clamp(1.35rem, 2.6vw, 1.8rem); line-height: 1.15; text-decoration: none; user-select: all; -webkit-user-select: all; }
.mail-addr:hover { color: var(--accent); }
.mail-copy { flex: none; padding: 7px 14px; border: 1px solid var(--ink); border-radius: 999px; font-size: .8rem; font-weight: 600; transition: background .2s, color .2s; }
.mail-copy:hover, .mail-copy.done { background: var(--ink); color: var(--paper); }
.mail-tips-h { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 26px 0 10px; }
.mail-tips { list-style: none; counter-reset: tip; display: grid; gap: 8px; }
.mail-tips li { counter-increment: tip; display: flex; gap: 12px; font-size: .95rem; color: var(--ink-2); }
.mail-tips li::before { content: counter(tip); flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-2); color: #fff; font: 600 .72rem/22px var(--sans); text-align: center; }
.footer-blurb p + p { margin-top: 14px; }
.footer-brand { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.footer-mark { width: 40px; height: 40px; flex: none; }
.footer-addr { font-size: .88rem; color: var(--muted); }

/* footer */
.footer { padding: 80px 0 28px; border-top: 3px solid var(--ink); }
.footer-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-blurb { max-width: 44ch; color: var(--ink-2); }
.footer-links { list-style: none; display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; border-bottom: 1px solid var(--line); }
.footer-links a:hover { border-color: var(--accent); }
.wordmark { font-size: clamp(3.4rem, 13.5vw, 13rem); line-height: .9; margin: 50px 0 30px; white-space: nowrap; letter-spacing: -0.03em; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.footer-bottom a { text-decoration: none; }

/* toast */
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 120; max-width: min(400px, calc(100vw - 40px)); padding: 14px 20px; background: var(--ink); color: var(--paper); font-size: .92rem; transform: translateY(20px); opacity: 0; pointer-events: none; transition: .35s var(--ease); }
.toast.show { transform: none; opacity: 1; }
.toast.err { background: var(--accent); }

/* visitor guide */
.guide {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 70;
  transform: translateX(-50%); display: flex; align-items: stretch;
  max-width: calc(100vw - 32px); background: var(--ink); color: var(--paper);
  border-radius: 999px; box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.guide.swap { animation: guide-in .5s var(--ease); }
@keyframes guide-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.guide-main { display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 12px; min-width: 0; text-align: left; color: inherit; }
.guide-icon { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent-2); }
.guide-icon svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.guide-icon .wheel { animation: wheel 1.4s infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(4px); opacity: 0; } 100% { opacity: 0; } }
.guide-icon .pulse { transform-origin: center; animation: ring 1.6s infinite; }
.guide-icon .sweep { stroke-dasharray: 13; transform-origin: 12px 12px; animation: sweep 1.6s infinite linear; }
@keyframes sweep { to { transform: rotate(360deg); } }
.guide-text { font-size: .9rem; font-weight: 500; line-height: 1.3; min-width: 0; }
.guide-step { font-family: var(--mono); font-size: .68rem; opacity: .55; padding-left: 4px; flex: none; }
.guide-close { flex: none; width: 40px; border-left: 1px solid rgba(255,255,255,.15); color: inherit; font-size: 1.2rem; line-height: 1; opacity: .7; border-radius: 0 999px 999px 0; }
.guide-close:hover { opacity: 1; }
.guide-main:hover .guide-text { text-decoration: underline; text-underline-offset: 3px; }
.hold-btn.nudge { animation: nudge .5s 3; }
@keyframes nudge { 50% { transform: scale(1.08); } }
.menu-open .guide { display: none; }
@media (max-width: 640px) {
  .guide { left: 16px; right: 16px; transform: none; max-width: none; }
  .guide.swap { animation-name: guide-in-sm; }
  @keyframes guide-in-sm { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  .guide-main { flex: 1; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

/* reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ── responsive ── */
@media (max-width: 960px) {
  .grid-2 { grid-template-columns: 1fr; }
  .people, .people.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-3 { grid-template-columns: 1fr; }
  .card + .card { padding-left: 0; border-left: 0; }
  .chapter { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 12px; align-content: center; padding: 56px 0 44px; }
  .chapter .headline { font-size: clamp(2rem, 8vw, 3rem); }
  .chapter-body { font-size: .95rem; }
  .illus { max-height: 34vh; margin: 0 auto; }
  .story-frame { height: min(86vh, 760px); }
}
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .rail { display: none; }
  .people, .people.cols-4 { grid-template-columns: 1fr; }
  .index-row { grid-template-columns: 36px 1fr 24px; }
  .index-body > p { padding-left: 48px; }
  .form { box-shadow: 5px 5px 0 var(--ink); }
  .marquee-row b { font-size: 2rem; }
  .brand-name { display: none; }
  .hero { padding-bottom: 150px; }
  .hero-wave { bottom: 56px; height: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .marquee-track { animation: none; flex-wrap: wrap; }
  .marquee-row[aria-hidden] { display: none; }
}
