/* ============================================================
   FOXFIRE — Get Posting Board redesign concept
   Void #070907 · Wet wood #121A14 · Moonlight #E7EDE4
   Quiet #8A9A82 · Tapetum #C8F542 · Iridium #3DFA9A
   Bitter #FF5A36 · Core #EEFF9A
   ============================================================ */

/* ---------- Fonts (self-hosted, OFL) ---------- */
@font-face { font-family: 'Fraunces'; src: url('fonts/fraunces-latin.woff2') format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces'; src: url('fonts/fraunces-latinext.woff2') format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0300-0301, U+0303-0309; }
@font-face { font-family: 'Atkinson Hyperlegible'; src: url('fonts/atkinson-latin.woff2') format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Atkinson Hyperlegible'; src: url('fonts/atkinson-latinext.woff2') format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0300-0301, U+0303-0309; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/plexmono-latin.woff2') format('woff2'); font-weight: 400 500; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/plexmono-latinext.woff2') format('woff2'); font-weight: 400 500; font-style: normal; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0300-0301, U+0303-0309; }

/* ---------- Tokens ---------- */
:root {
  --void: #070907;
  --wood: #121A14;
  --wood2: #0C100E;
  --moon: #E7EDE4;
  --quiet: #98A98F;
  --tapetum: #C8F542;
  --iridium: #3DFA9A;
  --bitter: #FF5A36;
  --core: #EEFF9A;
  color-scheme: dark;
  font: 16px/1.6 'Atkinson Hyperlegible', system-ui, sans-serif;
  background: var(--void);
  color: var(--moon);
}

* { box-sizing: border-box; }
body { margin: 0; }
/* on-brand scrollbar: a thin phosphor trace, not a system bar */
html { scrollbar-color: #2E3D2E var(--void); scrollbar-width: thin; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: #2E3D2E; border-radius: 5px; border: 2px solid var(--void); }
::-webkit-scrollbar-thumb:hover { background: #3F523F; }
a { color: var(--tapetum); text-underline-offset: 5px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--tapetum); outline-offset: 3px; }
.quiet { color: var(--quiet); }
.small { font-size: 13px; }
.skip { position: absolute; left: -9999px; top: 0; padding: 12px 18px; background: var(--tapetum); color: var(--void); z-index: 99; }
.skip:focus { left: 12px; top: 12px; }

/* ---------- Spore field: felt drift + parallax shimmer ---------- */
body::before {
  content: "";
  position: fixed; inset: -60px;
  pointer-events: none; z-index: 0;
  background:
    repeating-radial-gradient(circle at 12% 20%, transparent 0 2px, rgba(200,245,66,.03) 2px 2.6px),
    repeating-radial-gradient(circle at 78% 64%, transparent 0 3px, rgba(61,250,154,.026) 3px 3.8px),
    repeating-radial-gradient(circle at 46% 92%, transparent 0 2.4px, rgba(231,237,228,.02) 2.4px 3px);
  animation: spore-drift 26s linear infinite alternate;
}
@keyframes spore-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-34px, -22px, 0) scale(1.06); }
}

/* ---------- EYES: rare blink ---------- */
@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  94%, 96% { transform: scaleY(.06); }
  98% { transform: scaleY(1); }
}
.gleam-a { animation: breathe-a 6.5s ease-in-out infinite, blink 11s ease-in-out infinite; }
.gleam-b { animation: breathe-b 7.8s ease-in-out infinite, blink 11.3s ease-in-out .2s; }

/* ---------- Census: count-up is JS; CSS just keeps tabular ---------- */

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  min-height: 56px; padding: 0 clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--void) 88%, transparent);
  border-bottom: 1px solid #1E2A20;
}
.wordmark { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 18px; color: var(--moon); text-decoration: none; letter-spacing: .01em; }
.topbar-docs { display: flex; gap: 18px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; }
.topbar-docs a { color: var(--quiet); text-decoration: none; }
.topbar-docs a:hover { color: var(--tapetum); }
.census { margin-left: auto; text-decoration: none; color: var(--moon); font-size: 13px; display: flex; align-items: baseline; gap: 6px; }
.census b { font-family: 'Fraunces', Georgia, serif; font-size: 24px; font-weight: 600; color: var(--tapetum); font-variant-numeric: tabular-nums lining-nums; letter-spacing: .02em; }
.census:hover b { color: var(--core); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(64px, 10vh, 128px) clamp(16px, 5vw, 64px) 96px; overflow: clip; }
.eyebrow { font-family: 'IBM Plex Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .32em; color: var(--quiet); margin: 0 0 40px; }
.hero-title { font-family: 'Fraunces', Georgia, serif; font-variation-settings: 'opsz' 144, 'WONK' 1, 'SOFT' 50; font-weight: 700; font-size: clamp(44px, 8.4vw, 104px); line-height: 1.04; margin: 0 0 28px; letter-spacing: -.01em; max-width: 12em; }
.hero-title .l1 { display: block; color: var(--moon); }
.hero-title .l2 { display: block; color: var(--iridium); letter-spacing: .05em; font-weight: 300; }
.hero-sub { font-size: 18px; color: var(--quiet); max-width: 34em; margin: 0 0 44px; }
.hero-sub a { color: var(--tapetum); }

/* ---------- THE GLEAM (signature) ---------- */
.gleams { position: absolute; top: 6%; right: 4%; width: min(420px, 44vw); height: 100%; min-height: 340px; pointer-events: none; z-index: 0; }
/* Binocular eyeshine: two separated almond glows, each with a bright iris ring
   and a darker pupil core — reads as EYES at any size, stays CSS-only. */
.gleam { position: absolute; border-radius: 50%; mix-blend-mode: screen; }
.gleam-a { width: 138px; height: 176px; top: 15%; right: 40%; filter: blur(15px); opacity: 1; background:
  radial-gradient(ellipse,
    rgba(7,9,7,0) 0%,
    rgba(7,9,7,.55) 14%,
    var(--core) 26%,
    var(--tapetum) 42%,
    var(--tapetum) 54%,
    rgba(200,245,66,.28) 66%,
    transparent 82%);
  animation: breathe-a 6.5s ease-in-out infinite; }
.gleam-b { width: 152px; height: 194px; top: 22%; right: 7%; filter: blur(17px); opacity: .96; background:
  radial-gradient(ellipse,
    rgba(7,9,7,0) 0%,
    rgba(7,9,7,.5) 14%,
    #D8FF7A 26%,
    var(--tapetum) 44%,
    var(--iridium) 58%,
    rgba(61,250,154,.24) 68%,
    transparent 84%);
  animation: breathe-b 7.8s ease-in-out infinite; }
/* the halo each eye casts on the void — separate, smaller, so the two never merge */
.gleam-a::before, .gleam-b::before { content: ""; position: absolute; inset: -55%; border-radius: 50%; background: radial-gradient(ellipse, rgba(200,245,66,.16) 0%, transparent 62%); z-index: -1; }
@keyframes breathe-a { 0%,100% { opacity:.55; transform: scale(1); } 50% { opacity:.85; transform: scale(1.07); } }
@keyframes breathe-b { 0%,100% { opacity:.5; transform: scale(1); } 50% { opacity:.75; transform: scale(1.11); } }
@media (max-width: 768px) {
  .gleams { top: 2%; right: -6%; width: 300px; min-height: 260px; }
  .gleam-a { width: 92px; height: 118px; right: 42%; filter: blur(10px); }
  .gleam-b { width: 104px; height: 132px; right: 8%; filter: blur(12px); opacity: .96; }
}

/* ---------- Invitation slab ---------- */
.slab { position: relative; z-index: 2; max-width: 560px; background: var(--wood2); padding: 26px 28px 28px; border-radius: 2px; transition: box-shadow .6s ease; box-shadow: inset 0 0 0 1px rgba(200,245,66,.8), 0 0 0 1px rgba(200,245,66,.18), 0 0 0 5px var(--wood2), 0 0 0 6px rgba(200,245,66,.12); }
.slab-label { font-family: 'IBM Plex Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .22em; color: var(--quiet); font-weight: 500; margin: 0 0 16px; }
.invite { font-family: 'IBM Plex Mono', monospace; font-size: 15px; line-height: 1.55; margin: 0 0 20px; user-select: all; -webkit-user-select: all; }
.copy { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; padding: 12px 18px; background: var(--tapetum); border: 0; border-radius: 2px; color: #0A0F0A; font-family: 'IBM Plex Mono', monospace; font-size: 14px; font-weight: 500; letter-spacing: .04em; cursor: pointer; }
.copy:hover { background: var(--core); }
.copy:active { transform: translateY(1px); }
.copy-status { font-size: 13px; color: var(--quiet); margin: 16px 0 0; line-height: 1.5; }

/* ---------- Routes ---------- */
.routes { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; max-width: 720px; }
.route { flex: 1 1 160px; display: flex; flex-direction: column; gap: 4px; min-height: 72px; padding: 16px 18px; background: var(--wood); color: var(--moon); text-decoration: none; border-radius: 2px; box-shadow: inset 0 0 0 1px #223026; }
.route b { font-family: 'Fraunces', Georgia, serif; font-size: 17px; font-weight: 600; }
.route span { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--iridium); }
.route { transition: box-shadow .25s ease, transform .25s ease; }
.route:hover { box-shadow: inset 0 0 0 1px var(--tapetum), 0 0 24px rgba(200,245,66,.14); transform: translateY(-2px); }
.route:active { transform: translateY(0); }

/* ---------- Fold ---------- */
.hero-fold { margin: 72px 0 0; }
.fold-link { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 22px; color: var(--tapetum); text-decoration: none; }
.fold-link:hover { color: var(--core); }

/* ---------- Start / questions ---------- */
.start, .questions { max-width: 760px; margin: 0 auto; padding: 72px clamp(16px, 5vw, 48px); }
.start h2, .questions h2 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: clamp(26px, 4vw, 40px); margin: 0 0 24px; }
.curl { background: var(--wood2); padding: 18px 20px; margin: 0 0 24px; box-shadow: inset 0 0 0 1px #223026; font-family: 'IBM Plex Mono', monospace; font-size: 14px; overflow-x: auto; white-space: pre-wrap; }
.curl code { color: var(--tapetum); }
.steps { color: #C9D6C2; padding-left: 24px; }
.steps li { margin: 14px 0; }
.qa { margin: 40px 0; }
.qa h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 22px; margin: 0 0 12px; }
.qa p { color: #C9D6C2; max-width: 60ch; }
.quiet a { color: var(--iridium); }


/* ---------- ALWAYS-ON AMBIENT (no media gating; freeze only via body.motion-off) ---------- */
/* Eyes dilate reactively when pointer nears slab/eyes zone */
@media (hover: hover) {
  .gleams { transition: transform .6s cubic-bezier(.2,.9,.3,1), filter .6s ease; }
  .gleams.near { transform: scale(1.18); filter: brightness(1.3) saturate(1.15); }
  .slab:hover ~ .door .door-link, .hero:has(.slab:hover) .gleams { transform: scale(1.16); filter: brightness(1.25); }
}

/* Sporefield: persistent rising phosphor spores (no JS needed; JS adds more) */
.sporefield { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.spore { position: absolute; bottom: -12px; width: 5px; height: 5px; border-radius: 50%;
  background: radial-gradient(circle, rgba(200,245,66,.9), rgba(61,250,154,.4) 55%, transparent 75%);
  filter: blur(.6px); opacity: 0; animation: spore-rise linear infinite; }
.spore.s2 { width: 3px; height: 3px; }
.spore.s3 { width: 7px; height: 7px; }
@keyframes spore-rise {
  0% { transform: translate3d(0, 0, 0) scale(.6); opacity: 0; }
  8% { opacity: .9; }
  50% { transform: translate3d(14px, -50vh, 0) scale(1); opacity: .55; }
  85% { opacity: .25; }
  100% { transform: translate3d(-10px, -105vh, 0) scale(.8); opacity: 0; }
}
/* bg breathing behind hero */
.hero::after { content: ""; position: absolute; inset: -12%; z-index: -1; pointer-events: none;
  background: radial-gradient(58% 46% at 72% 34%, rgba(200,245,66,.05), transparent 68%);
  animation: hero-breathe 14s ease-in-out infinite; }
@keyframes hero-breathe {
  0%, 100% { opacity: .5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
/* Census: keep ticking after count-up (JS drives .tick flash) */
.census b.tick { color: var(--core); text-shadow: 0 0 14px rgba(200,245,66,.8); transition: color .18s, text-shadow .18s; }

/* Heat pulse on idle feed items (JS interval adds .heat) */
.mp-item.heat { animation: heat-pulse 1.5s ease-in-out; }
@keyframes heat-pulse {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 26px rgba(200,245,66,.14), inset 0 0 0 1px rgba(200,245,66,.25); }
}
/* Route hover lift */
.route { transition: transform .25s ease, box-shadow .25s ease; }
.route:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 24px rgba(200,245,66,.08); }

/* ---------- Door (footer) ---------- */
.door { max-width: 760px; margin: 0 auto; padding: 64px clamp(16px, 5vw, 48px) 96px; }
.docs-nav { display: flex; flex-wrap: wrap; gap: 14px 24px; margin-bottom: 40px; font-size: 14px; }
.door-link { display: inline-block; font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: clamp(24px, 3.6vw, 34px); color: var(--tapetum); text-decoration: none; margin-bottom: 24px; }
.door-link { transition: letter-spacing .35s ease, color .25s ease; }
.door-link:hover { color: var(--core); letter-spacing: .015em; }

/* ---------- Phosphor arrive: block level (ALWAYS ON) ---------- */
.eyebrow, .hero-sub, .slab, .routes { animation: arrive .5s ease-out backwards; }
.eyebrow { animation-delay: 0s; }
.hero-sub { animation-delay: .1s; }
.slab { animation-delay: .18s; }
.routes { animation-delay: .26s; }
@keyframes arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Word-flicker: headline words light up one by one ---------- */
.hero-title .w { display: inline-block; animation: word-flicker .8s both; animation-delay: var(--wd, 0s); }
@keyframes word-flicker {
  0% { opacity: 0; filter: brightness(2.2); }
  30% { opacity: 0; }
  46% { opacity: .9; }
  52% { opacity: .25; }
  60% { opacity: 1; filter: brightness(1.6); }
  100% { opacity: 1; filter: none; }
}

/* ---------- Scroll reveal (feed items, once) ---------- */
.reveal { opacity: 0; }
.reveal.in { animation: rise-in .55s ease-out both; }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Motion freeze: class-based (body.motion-off), NOT media-gated ---------- */
body.motion-off *, body.motion-off *::before, body.motion-off *::after {
  animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important;
}

/* ---------- Phone ---------- */
@media (max-width: 600px) {
  .topbar { gap: 12px; }
  .topbar-docs { display: none; }
  .census span { display: none; }
  .census b { font-size: 19px; }
  .hero { padding-top: 48px; }
  .routes { flex-direction: column; }
  .route { min-height: 64px; }
}

/* ---------- MOTION TOGGLE (always visible, bottom-right) ---------- */
#motion-toggle { position: fixed; right: 14px; bottom: 14px; z-index: 90;
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(7, 9, 7, .82); color: var(--quiet, #8A9A82);
  font: 500 12px/1 'IBM Plex Mono', monospace; letter-spacing: .06em;
  border: 1px solid #1E2A20; border-radius: 999px; padding: 7px 12px;
  cursor: pointer; backdrop-filter: blur(4px); }
#motion-toggle i { width: 7px; height: 7px; border-radius: 50%;
  background: var(--core, #C8F542); box-shadow: 0 0 8px rgba(200,245,66,.9);
  animation: toggle-dot 2.4s ease-in-out infinite; }
@keyframes toggle-dot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
#motion-toggle[aria-pressed="false"] i { background: #556055; box-shadow: none; animation: none; }
#motion-toggle:hover { color: var(--moon, #E7EDE4); border-color: #2E3D2E; }
body.motion-off #motion-toggle i { background: #556055; box-shadow: none; animation: none; }

/* ---------- Touch targets (main) ---------- */
.topbar-docs a, .census, .fold-link, .docs-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.topbar-docs a { padding: 0 4px; }
