/* KellyRene — Concept 2
   Dark, luminous, cinematic. Space Mono + Oswald + Cormorant Garamond.
   Palette: cosmic navy, morpho blue, gold, teal, cream.
*/

:root {
  --void: #05070c;
  --navy: #0a1020;
  --navy-2: #10182c;
  --ink: #070b14;
  --cream: #f6f0e7;
  --cream-dim: #cfc6b8;
  --gold: #e8c872;
  --gold-deep: #c9a24a;
  --gold-soft: rgba(232, 200, 114, 0.55);
  --morpho: #1e8fff;
  --morpho-bright: #6fd0ff;
  --teal: #2ec4c4;
  --ember: #e85a2a;
  --ember-soft: rgba(232, 90, 42, 0.45);
  --ember-deep: #a83312;
  --line: rgba(246, 240, 231, 0.14);
  --glass: rgba(10, 16, 32, 0.55);

  --font-mono: "Space Mono", "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --font-cond: "Oswald", "Arial Narrow", Impact, sans-serif;
  --font-serif: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;

  --wide: 72rem;
  --header-h: 4.6rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.7;
  min-height: 100%;
}
img, svg { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--morpho-bright); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--gold); color: var(--ink);
  padding: 0.5rem 1rem; z-index: 100; border-radius: 0.2rem;
}
.skip-link:focus { top: 0.75rem; }

/* ---------- Tintable signature (CSS mask) ---------- */
.sig {
  display: inline-block;
  aspect-ratio: 2269 / 1277;
  width: 8.5rem;
  background: var(--cream);
  -webkit-mask: url("../assets/img/logo-signature.png") center / contain no-repeat;
          mask: url("../assets/img/logo-signature.png") center / contain no-repeat;
  vertical-align: middle;
}
.sig--hero {
  width: min(28rem, 70vw);
  background: linear-gradient(180deg, #fff6d0 0%, #e8c872 45%, #c9a24a 100%);
  filter: drop-shadow(0 0 22px rgba(232, 200, 114, 0.55)) drop-shadow(0 0 48px rgba(30, 143, 255, 0.22));
}
.sig--gold {
  background: linear-gradient(180deg, #fff3c4, #e8c872 60%, #c9a24a);
  filter: drop-shadow(0 0 16px rgba(232, 200, 114, 0.5));
}
.sig--cream {
  background: var(--cream);
  filter: drop-shadow(0 0 10px rgba(246, 240, 231, 0.28));
}
.sig--blue {
  background: linear-gradient(180deg, #b8f0ff, #1e8fff 55%, #0a4a9c);
  filter: drop-shadow(0 0 16px rgba(30, 143, 255, 0.55));
}
.sig--red {
  background: linear-gradient(180deg, #ffb3a8, #e23b3b 60%, #8a1212);
  filter: drop-shadow(0 0 14px rgba(226, 59, 59, 0.45));
}
.sig--footer {
  width: 11rem;
  background: linear-gradient(180deg, #fff6d0, #e8c872);
  filter: drop-shadow(0 0 14px rgba(232, 200, 114, 0.4));
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: inherit; min-width: 0; }
.brand:hover { color: inherit; }
.brand-butterfly { width: 1.7rem; height: 1.7rem; flex: none; filter: drop-shadow(0 0 8px rgba(30,143,255,.5)); }
.brand-butterfly img { width: 100%; height: 100%; object-fit: contain; }
.brand .sig { width: 7.25rem; flex: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 7, 12, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.25rem;
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav-toggle {
  display: none; width: 2.75rem; height: 2.75rem;
  border: 0; background: transparent; cursor: pointer; position: relative; flex: none;
}
.nav-toggle span {
  display: block; position: absolute; left: 0.7rem; right: 0.7rem; height: 1.5px;
  background: var(--cream); transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle span:nth-child(1) { top: 0.95rem; }
.nav-toggle span:nth-child(2) { top: 1.32rem; }
.nav-toggle span:nth-child(3) { top: 1.69rem; }
body.nav-open .nav-toggle span:nth-child(1) { top: 1.32rem; transform: rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { top: 1.32rem; transform: rotate(-45deg); }

.site-nav ul { display: flex; gap: 0.2rem 1.15rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.site-nav a {
  color: var(--cream-dim); text-decoration: none;
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.14em; text-transform: uppercase; padding: 0.3rem 0;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--gold); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--gold); }

/* ---------- Type + layout ---------- */
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.25rem; }
.wrap--narrow { max-width: 42rem; }
.kicker {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 0.85rem;
}
h1, h2, h3, h4 {
  font-family: var(--font-cond); font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  line-height: 1.05; margin: 0 0 0.8rem; color: var(--cream);
}
h1 { font-size: clamp(2.4rem, 1.4rem + 4vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 3.1rem); }
h3 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem); }
.lede { font-family: var(--font-serif); font-size: clamp(1.2rem, 1rem + 0.5vw, 1.45rem); color: var(--cream-dim); max-width: 36rem; }
.muted { color: var(--cream-dim); }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.4rem; border: 1px solid var(--gold);
  background: var(--gold); color: var(--ink);
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; border-radius: 0; transition: background .2s, color .2s, box-shadow .2s;
}
.btn:hover { background: #fff3c4; color: var(--ink); box-shadow: 0 0 24px var(--gold-soft), 0 0 18px var(--ember-soft); }
.btn--ghost { background: transparent; color: var(--cream); }
.btn--ghost:hover { background: var(--gold); color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.35rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: calc(100svh - var(--header-h));
  display: flex; align-items: center;
  overflow: hidden; padding: 3.15rem 0 2.75rem;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background: url("../assets/img/story-cosmos.webp") center / cover no-repeat, var(--void);
  transform: scale(1.06);
}
.hero-veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 55% 50% at 12% 100%, rgba(232,90,42,0.22), transparent 60%),
    radial-gradient(ellipse 70% 60% at 80% 0%, rgba(30,143,255,0.2), transparent 55%),
    linear-gradient(180deg, rgba(5,7,12,0.22) 0%, rgba(5,7,12,0.52) 55%, rgba(5,7,12,0.92) 100%);
}
.hero-rays {
  position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background: conic-gradient(from 200deg at 80% -10%, transparent 0 62%, rgba(232,200,114,0.08) 66%, transparent 70%);
  animation: ray-shift 28s linear infinite;
  mix-blend-mode: screen;
}
@keyframes ray-shift { to { transform: rotate(18deg); } }

.hero-bokeh, .hero-bokeh span { pointer-events: none; }
.hero-bokeh { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-bokeh span {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,200,114,0.45), rgba(232,200,114,0) 70%);
  filter: blur(2px); animation: bokeh 16s ease-in-out infinite;
}
.hero-bokeh span:nth-child(1) { width: 7rem; height: 7rem; left: 8%; top: 18%; animation-delay: 0s; }
.hero-bokeh span:nth-child(2) { width: 3.5rem; height: 3.5rem; left: 22%; bottom: 16%; background: radial-gradient(circle, rgba(30,143,255,0.4), transparent 70%); animation-delay: -4s; }
.hero-bokeh span:nth-child(3) { width: 5rem; height: 5rem; right: 12%; top: 28%; animation-delay: -7s; }
.hero-bokeh span:nth-child(4) { width: 2.4rem; height: 2.4rem; right: 28%; bottom: 22%; background: radial-gradient(circle, rgba(46,196,196,0.4), transparent 70%); animation-delay: -11s; }
.hero-bokeh span:nth-child(5) { width: 4rem; height: 4rem; left: 48%; top: 8%; animation-delay: -2s; }
@keyframes bokeh {
  0%, 100% { transform: translateY(0) scale(1); opacity: .55; }
  50% { transform: translateY(-18px) scale(1.08); opacity: .9; }
}

.drift {
  position: absolute; z-index: 1; width: 3.2rem; height: auto;
  filter: drop-shadow(0 0 10px rgba(30,143,255,.45));
  animation: drift 22s linear infinite;
  opacity: 0.85; pointer-events: none;
}
.drift--2 { width: 2.1rem; top: 22%; left: -6%; animation-duration: 28s; animation-delay: -8s; }
.drift--3 { width: 2.6rem; top: 64%; left: -8%; animation-duration: 26s; animation-delay: -15s; }
.drift--1 { top: 12%; left: -8%; }
@keyframes drift {
  0% { transform: translate(-10vw, 0) rotate(-8deg); }
  50% { transform: translate(60vw, 18px) rotate(8deg); }
  100% { transform: translate(115vw, -10px) rotate(-6deg); }
}

.hero-inner { position: relative; z-index: 2; max-width: 52rem; margin: 0 auto; padding: 0 1.25rem; }
.hero-sig { margin: 0 0 1.05rem; }
.poster { margin: 0; }
.poster .line {
  font-family: var(--font-mono); font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  line-height: 1.12; margin: 0;
}
.poster .whisper {
  display: block; font-size: clamp(0.85rem, 0.7rem + 0.6vw, 1.05rem);
  color: var(--cream-dim); letter-spacing: 0.18em; font-weight: 400; margin-bottom: 0.25rem;
}
.poster .shout {
  display: block;
  font-size: clamp(1.4rem, 0.85rem + 2.25vw, 2.7rem);
  color: var(--cream);
}
.poster .shout--gold { color: var(--gold); text-shadow: 0 0 24px rgba(232,200,114,.35); }
.poster .shout--blue { color: var(--morpho-bright); text-shadow: 0 0 24px rgba(30,143,255,.35); }
.poster-group { margin: 0 0 1rem; }
.poster-attr {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--cream-dim); margin: 1.25rem 0 0;
}

/* ---------- Chapters (scroll story) ---------- */
.chapter {
  position: relative; isolation: isolate;
  min-height: 86svh; display: flex; align-items: center;
  overflow: hidden; padding: 6rem 0;
}
.chapter-bg {
  position: absolute; inset: -8% 0; z-index: -2;
  background: center / cover no-repeat;
  will-change: transform;
}
.chapter-veil {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(5,7,12,0.92) 0%, rgba(5,7,12,0.74) 46%, rgba(5,7,12,0.35) 100%);
}
.chapter--right .chapter-veil {
  background: linear-gradient(270deg, rgba(5,7,12,0.92) 0%, rgba(5,7,12,0.74) 46%, rgba(5,7,12,0.35) 100%);
}
.chapter-body { max-width: 34rem; }
.chapter--right .chapter-inner { display: flex; justify-content: flex-end; }
.chapter h2 { text-shadow: 0 8px 40px rgba(0,0,0,.45); }
.chapter .lede, .chapter p { color: #e8e0d4; }
.chapter p { margin: 0 0 1rem; }

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

/* ---------- Shard cards ---------- */
.section { padding: 5rem 0; }
.section--void { background: var(--void); }
.section--navy { background: var(--navy); }
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; margin-top: 2.25rem; }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.shard {
  position: relative;
  background: linear-gradient(160deg, rgba(16,24,44,0.95), rgba(8,12,22,0.95));
  border: 1px solid rgba(232,200,114,0.22);
  padding: 1.6rem 1.4rem 1.5rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 1.15rem), calc(100% - 1.15rem) 100%, 0 100%);
  box-shadow: 0 0 0 1px rgba(30,143,255,0.05), 0 16px 40px rgba(0,0,0,0.35), 0 0 40px rgba(30,143,255,0.06);
  display: flex; flex-direction: column; min-height: 100%;
  text-decoration: none; color: inherit;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.shard:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px rgba(232,200,114,0.4), 0 18px 44px rgba(0,0,0,0.4), 0 0 36px rgba(232,200,114,0.14), 0 0 28px rgba(232,90,42,0.1);
  color: inherit; text-decoration: none;
}
.shard h3 { margin-top: 0.2rem; }
.shard p { color: var(--cream-dim); flex: 1; margin: 0 0 1rem; font-size: 1.05rem; }
.shard .more { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.badge {
  align-self: flex-start;
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink); background: var(--gold); padding: 0.2rem 0.55rem; margin-bottom: 0.85rem;
}

/* Books */
.book-card { text-align: center; padding-top: 1.75rem; }
.book-card .emblem { width: 7.5rem; height: auto; margin: 0.2rem auto 1.1rem; color: var(--gold); filter: drop-shadow(0 0 12px rgba(232,200,114,.35)); }
.book-card h2, .book-card h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); text-transform: none; letter-spacing: 0.02em; font-family: var(--font-serif); font-weight: 600; }
.definition { font-family: var(--font-serif); font-style: italic; color: var(--cream-dim); margin: 0.15rem 0 1rem; }
.book-card .tagline-line { font-weight: 600; color: var(--cream); margin: 0 0 0.6rem; font-family: var(--font-serif); text-transform: none; letter-spacing: 0; }
.book-card .subtitle { font-size: 0.95rem; color: var(--cream-dim); }
.book-body { text-align: left; margin-top: 1rem; }

/* Portrait */
.portrait {
  width: 11rem; height: 11rem; border-radius: 50%; object-fit: cover; object-position: center 20%;
  box-shadow: 0 0 0 3px var(--void), 0 0 0 5px var(--gold), 0 0 36px rgba(232,200,114,0.45);
}
.portrait--lg { width: 14rem; height: 14rem; }
.portrait-wrap { margin: 0; }
.intro-grid, .split, .contact-grid, .two-col {
  display: grid; gap: 2.25rem 3rem; align-items: center;
}
.intro-grid { grid-template-columns: auto 1fr; }
.split, .contact-grid { grid-template-columns: 0.9fr 1.1fr; }
.split--reverse { grid-template-columns: 1.1fr 0.9fr; }
.two-col { grid-template-columns: 1.1fr 0.9fr; align-items: start; }

.prose { max-width: 40rem; }
.prose p { margin: 0 0 1.15rem; }
.prose .pull {
  font-family: var(--font-serif); font-style: italic; font-size: 1.45rem;
  line-height: 1.4; color: var(--gold); margin: 1.75rem 0;
  padding-left: 1.15rem; border-left: 2px solid var(--gold);
}

.photo-slot {
  min-height: 18rem; border-radius: 0;
  clip-path: polygon(0 0, 100% 0, 100% 92%, 92% 100%, 0 100%);
  background: url("../assets/img/story-shards.webp") center / cover no-repeat;
  position: relative; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 40px rgba(30,143,255,0.15);
}
.photo-slot .slot-motif { width: 7rem; filter: drop-shadow(0 0 16px rgba(30,143,255,.5)); }
.photo-slot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 70% 20%, rgba(232,200,114,0.28), transparent 45%),
    radial-gradient(ellipse at 20% 90%, rgba(232,90,42,0.22), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(30,143,255,0.2), transparent 50%);
  mix-blend-mode: screen;
}
.photo-slot .slot-caption { display: none; /* decorative panel, not a file slot */
  /* original caption styles retained below if display is turned back on */

  position: absolute; left: 0.85rem; bottom: 0.7rem;
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cream); background: rgba(5,7,12,0.7); padding: 0.2rem 0.5rem;
}

.page-hero { padding: 3.5rem 0 1.5rem; position: relative; }

/* Quotes rotator */
.quotes {
  padding: 5.5rem 0; text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(30,143,255,0.12), transparent 55%),
    var(--navy);
}
.quote-frame { min-height: 12rem; display: flex; flex-direction: column; justify-content: center; }
.quote-text {
  font-family: var(--font-mono); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; line-height: 1.35;
  font-size: clamp(1.15rem, 0.9rem + 1.4vw, 1.85rem);
  color: var(--cream); max-width: 34rem; margin: 0 auto;
}
.quote-attr {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold); margin-top: 1.25rem;
}
.quote-nav { display: flex; justify-content: center; gap: 0.45rem; margin-top: 1.75rem; }
.quote-nav button {
  width: 0.55rem; height: 0.55rem; padding: 0; border-radius: 50%;
  border: 1px solid var(--gold); background: transparent; cursor: pointer;
}
.quote-nav button[aria-current="true"] { background: var(--gold); }

/* Forms */
.form {
  background: rgba(16,24,44,0.8); border: 1px solid rgba(232,200,114,0.22);
  padding: 1.75rem 1.5rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 1.15rem), calc(100% - 1.15rem) 100%, 0 100%);
}
.form h2, .form h3 { margin-top: 0; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.3rem; color: var(--gold); }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid rgba(246,240,231,0.2);
  background: rgba(5,7,12,0.6); color: var(--cream);
  border-radius: 0; padding: 0.7rem 0.85rem;
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,200,114,0.18);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 0.88rem; color: var(--cream-dim); margin: 0.75rem 0 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.signup-inline { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.85rem; }
.signup-inline input[type="email"] {
  flex: 1 1 14rem; border: 1px solid rgba(246,240,231,0.2);
  background: rgba(255,255,255,0.04); color: var(--cream);
  padding: 0.75rem 0.9rem;
}
.signup-inline input[type="email"]::placeholder { color: #9aa3ad; }
.signup-inline input[type="email"]:focus { outline: none; border-color: var(--gold); }

/* Footer */
.site-footer { background: #05070c; color: var(--cream-dim); padding: 3.5rem 0 1.5rem; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1fr 0.8fr; gap: 2.5rem 2rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); align-items: start; }
.site-footer h2, .site-footer h3 { color: var(--cream); font-size: 1.15rem; margin: 0 0 0.5rem; }
.site-footer p { margin: 0.55rem 0 0; }
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--gold); }
.site-footer .signup-inline { flex-direction: column; align-items: stretch; flex: none; height: auto; }
.site-footer .signup-inline .btn, .site-footer .signup-inline input[type="email"] { width: 100%; flex: 0 0 auto; height: 2.85rem; max-height: 2.85rem; }
.site-footer form.signup { height: auto; display: block; }
.socials { display: flex; gap: 0.7rem; margin-top: 1.1rem; }
.socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  border: 1px solid var(--line); color: var(--cream); text-decoration: none;
}
.socials a:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.socials svg { width: 1.1rem; height: 1.1rem; }
.footer-meta { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.25rem; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: #8b93a0; }
.footer-meta a { color: #c9d0d8; }
.contact-socials { margin-top: 1.25rem; }

.thanks, .error-page { min-height: calc(100vh - 14rem); display: flex; align-items: center; text-align: center; padding: 4rem 1.25rem; }
.error-page .hero-butterfly, .error-page .drift { position: static; width: 8rem; margin: 0 auto 1.5rem; animation: none; }

html, body { overflow-x: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0; width: 100%; max-width: 100%;
    background: var(--void); padding: 1rem 1.25rem 2rem;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .25s var(--ease), visibility .25s;
    overflow: auto; border-top: 1px solid var(--line);
  }
  body.nav-open .site-nav { opacity: 1; visibility: visible; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { display: block; font-size: 1rem; padding: 0.9rem 0.2rem; border-bottom: 1px solid var(--line); }
  .hero-inner, .intro-grid, .split, .split--reverse, .contact-grid, .footer-grid, .card-grid, .card-grid--3, .form-row, .two-col, .chapter--right .chapter-inner {
    display: block;
  }
  .intro-grid, .split, .two-col, .contact-grid { display: grid; grid-template-columns: 1fr; }
  .chapter, .chapter--right { min-height: 0; padding: 4.5rem 0; }
  .chapter-veil, .chapter--right .chapter-veil {
    background: linear-gradient(180deg, rgba(5,7,12,0.35) 0%, rgba(5,7,12,0.82) 45%, rgba(5,7,12,0.95) 100%);
  }
  .chapter-bg { inset: 0; }
  .intro-grid { justify-items: center; text-align: center; }
  .intro-grid .lede { margin-left: auto; margin-right: auto; }
  .portrait, .portrait--lg { width: 9.5rem; height: 9.5rem; }
  .hero { min-height: 0; padding: 3.25rem 0 2.5rem; }
  .sig--hero { width: min(19.5rem, 88vw); }
  .poster .shout { font-size: 1.42rem; letter-spacing: 0.035em; }
  .brand .sig { width: 6.1rem; }
  .card-grid, .card-grid--3 { display: grid; grid-template-columns: 1fr; }
  .footer-grid { display: grid; grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .header-inner, .wrap, .hero-inner { padding-left: 1rem; padding-right: 1rem; }
  .actions .btn { width: 100%; }
  .poster .shout { font-size: 1.28rem; letter-spacing: 0.02em; }
  .sig--hero { width: min(17.5rem, 90vw); }
  .signup-inline { flex-direction: column; }
  .signup-inline .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-rays, .hero-bokeh span, .drift { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
