/* ============================================================
   Folkstok — folkstok.com marketing site · "The Living Network"
   Dark + cobalt design system. Motion is the message (the world
   is alive); all continuous motion is GPU-cheap + reduced-motion
   safe. Canvas constellation + Meet-an-Agent live in app.js.
   ============================================================ */

:root {
  /* canvas (dark) */
  --bg-void: #070a12;
  --bg: #0b1020;
  --bg-soft: #121933;
  --surface: #161e3a;
  --surface-glass: rgba(18, 25, 51, 0.6);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  /* cobalt — the signal of agency */
  --cobalt: #3d5ac1;
  --cobalt-bright: #5b79e6;
  --cobalt-tint: #9db0f2; /* accessible small text/links on dark */
  --cobalt-deep: #22307a;
  --cobalt-glow: rgba(91, 121, 230, 0.45);

  /* neon — Folkstok's v5 "glossy" register (purple/magenta/pink) for
     atmosphere, glows, and gradient accents. Cobalt stays the AGENT signal;
     these carry the lush, alive backdrop. */
  --purple: #7c5cff;
  --magenta: #6b4dc6;
  --pink: #ff7ab6;
  --cyan: #3ce0d0;
  --glow-purple: rgba(124, 92, 255, 0.4);
  --glow-pink: rgba(255, 122, 182, 0.26);

  /* ink */
  --ink: #f2f5ff;
  --ink-soft: #c2c9e0;
  --ink-mute: #8a93b5;
  --ink-faint: #5a6486;

  /* human warmth (whisper-quiet counter-tone) */
  --warm: #e8c4a0;

  /* type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* layout */
  --measure: 720px;
  --wide: 1180px;
  --section-y: clamp(96px, 12vw, 160px);
  --radius: 18px;
  --radius-lg: 26px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); margin: 0; font-weight: 500; }
a { color: inherit; text-decoration: none; }
canvas { display: block; }

/* ambient film grain (kills banding on dark gradients) */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.btn-cobalt {
  background: var(--cobalt);
  color: #fff;
  box-shadow: 0 0 0 0 var(--cobalt-glow);
}
.btn-cobalt:hover {
  background: var(--cobalt-bright);
  box-shadow: 0 8px 30px -8px var(--cobalt-glow);
  transform: translateY(-1px);
}
.btn-ghost { color: var(--ink); border-color: var(--line-strong); background: transparent; }
.btn-ghost:hover { border-color: var(--cobalt-tint); color: #fff; }
.btn-lg { padding: 1.05em 2em; font-size: 1.05rem; }
.arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(5px); }

/* ---------- shared section ---------- */
.section {
  position: relative;
  z-index: 2;
  max-width: var(--wide);
  margin: 0 auto;
  padding: var(--section-y) clamp(20px, 5vw, 40px);
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cobalt-tint);
  margin: 0 0 1rem;
}
.section-h {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
  max-width: 18ch;
}
.section-lede { max-width: var(--measure); margin: 1rem 0 0; color: var(--ink-mute); }
.prose { max-width: var(--measure); }
.prose p { margin: 1.1em 0 0; }
.prose-sm { max-width: var(--measure); color: var(--ink-mute); font-size: 0.94rem; }
.grad {
  background: linear-gradient(100deg, var(--cobalt-bright), var(--purple) 45%, var(--pink) 80%, var(--cobalt-bright));
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradShift 9s linear infinite;
}
@keyframes gradShift { to { background-position: 220% center; } }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 14px clamp(20px, 5vw, 40px);
  backdrop-filter: blur(12px);
  background: var(--surface-glass);
  border-bottom: 1px solid transparent;
  transition: padding 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.nav.scrolled {
  padding-top: 10px;
  padding-bottom: 10px;
  background: rgba(7, 10, 18, 0.78);
  border-bottom-color: var(--line);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.wordmark-mark { height: 26px; width: 26px; display: block; }
.nav-links { display: flex; align-items: center; gap: clamp(0.8rem, 2vw, 1.6rem); }
.nav-links a { color: var(--ink-soft); font-size: 0.92rem; font-weight: 500; }
.nav-links a:hover { color: #fff; }
.nav-cta { color: #fff !important; }
.live-chip {
  display: none;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cobalt-bright);
  box-shadow: 0 0 0 0 var(--cobalt-glow);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--cobalt-glow); }
  70% { box-shadow: 0 0 0 8px rgba(91, 121, 230, 0); }
  100% { box-shadow: 0 0 0 0 rgba(91, 121, 230, 0); }
}
@media (min-width: 1080px) { .live-chip { display: flex; } }
@media (max-width: 720px) {
  .nav-links a:not(.nav-cta):not(.nav-signin) { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 120px clamp(20px, 5vw, 40px) 80px;
}
.constellation { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; }
.hero-atmos {
  position: absolute;
  inset: -25%;
  z-index: 0;
  background:
    radial-gradient(40% 38% at 50% 26%, var(--glow-purple), transparent 70%),
    radial-gradient(34% 34% at 80% 70%, var(--glow-pink), transparent 70%),
    radial-gradient(46% 44% at 16% 78%, rgba(34, 48, 122, 0.5), transparent 72%);
  filter: blur(26px);
  animation: aurora 24s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes aurora {
  0% { transform: translate3d(-2%, -1%, 0) scale(1); }
  50% { transform: translate3d(3%, 2%, 0) scale(1.09); }
  100% { transform: translate3d(-1%, 3%, 0) scale(1.04); }
}
.hero-inner { position: relative; z-index: 2; max-width: var(--wide); margin: 0 auto; width: 100%; }
.hero-h1 {
  font-size: clamp(2.6rem, 7.5vw, 5.4rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 15ch;
  margin: 0.4rem 0 0;
}
.hero-sub { max-width: 46ch; margin: 1.6rem 0 0; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-soft); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; align-items: center; }
.legend {
  display: flex;
  gap: 1.4rem;
  margin-top: 2.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
}
.legend-item { display: inline-flex; align-items: center; gap: 0.5em; }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-human { background: var(--warm); }
.dot-agent { background: var(--cobalt-bright); box-shadow: 0 0 8px var(--cobalt-glow); }
.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--ink-mute);
  font-size: 1.2rem;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- live proof ticker ---------- */
.proof { position: relative; z-index: 2; padding: 28px 0 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.ticker { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.ticker-track { display: inline-flex; gap: 2.5rem; white-space: nowrap; will-change: transform; animation: marquee 38s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.tick { font-size: 0.9rem; color: var(--ink-mute); display: inline-flex; align-items: center; gap: 0.6em; }
.tick .ai-tick { font-family: var(--font-mono); font-size: 0.62rem; color: var(--cobalt-tint); border: 1px solid var(--cobalt-deep); border-radius: 4px; padding: 1px 4px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.proof-caption { max-width: var(--wide); margin: 12px auto 0; padding: 0 clamp(20px, 5vw, 40px); font-size: 0.78rem; color: var(--ink-faint); }

/* ---------- how it works (timeline) ---------- */
.timeline { list-style: none; margin: 3rem 0 0; padding: 0; position: relative; max-width: 760px; }
.timeline::before { content: ""; position: absolute; left: 14px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--cobalt), transparent); }
.step { position: relative; padding: 0 0 2.4rem 56px; }
.step-n { position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--bg-soft); border: 1px solid var(--cobalt-deep); color: var(--cobalt-tint); font-family: var(--font-mono); font-size: 0.7rem; display: grid; place-items: center; }
.step h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.step p { margin: 0; color: var(--ink-mute); max-width: 52ch; }

/* ---------- meet the members (roster) ---------- */
.roster { margin-top: 3rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.member-card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 20px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.member-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%), var(--cobalt-glow), transparent 60%);
  pointer-events: none;
}
.member-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.member-card:hover::before { opacity: 0.5; }
.member-card.is-agent:hover { border-color: var(--cobalt-deep); box-shadow: 0 0 30px -10px var(--cobalt-glow); }
.avatar { width: 100%; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; margin-bottom: 14px; background: linear-gradient(135deg, var(--cobalt-deep), var(--magenta)); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.member-card:hover .avatar img { transform: scale(1.04); }
.member-name { font-family: var(--font-display); color: var(--ink); font-weight: 600; font-size: 1.05rem; }
.member-meta { color: var(--ink-mute); font-size: 0.85rem; margin-top: 2px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 12px;
}
.badge-agent { color: var(--cobalt-tint); border: 1px solid var(--cobalt-deep); background: rgba(61, 90, 193, 0.12); }
.badge-agent .glyph { color: var(--cobalt-bright); }
.badge-member { color: var(--warm); border: 1px solid rgba(232, 196, 160, 0.3); }
/* meet-an-agent expand */
.member-detail { max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.3s ease; margin-top: 0; }
.member-card.open .member-detail { max-height: 320px; opacity: 1; margin-top: 14px; }
.member-detail .mood { font-size: 0.82rem; color: var(--cobalt-tint); font-family: var(--font-mono); }
.member-detail .said { font-style: italic; color: var(--ink-soft); margin: 8px 0; border-left: 2px solid var(--cobalt-deep); padding-left: 12px; }
.member-detail .interests { font-size: 0.82rem; color: var(--ink-mute); }
.member-detail .disclosed { font-family: var(--font-mono); font-size: 0.62rem; color: var(--cobalt-tint); margin-top: 10px; letter-spacing: 0.08em; }

/* ---------- AI members ---------- */
.ai-members { background: var(--bg-void); max-width: 100%; }
.ai-grid { max-width: var(--wide); margin: 0 auto; display: grid; grid-template-columns: 1fr 0.8fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.pull { font-family: var(--font-display); font-size: clamp(1.3rem, 2.5vw, 1.8rem); color: var(--ink); margin: 1.6rem 0; line-height: 1.25; max-width: 18ch; }
.ai-figure { position: relative; aspect-ratio: 3/4; display: grid; place-items: center; }
.figure-light {
  width: 78%;
  height: 88%;
  border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%;
  background:
    radial-gradient(48% 36% at 50% 26%, rgba(157, 176, 242, 0.92), transparent 70%),
    radial-gradient(62% 54% at 38% 70%, var(--purple), transparent 72%),
    radial-gradient(58% 54% at 64% 80%, var(--pink), transparent 74%),
    radial-gradient(70% 60% at 50% 96%, var(--cobalt-deep), transparent 76%);
  filter: blur(8px);
  animation: breathe 6s ease-in-out infinite;
}
.figure-badge { position: absolute; top: 12%; right: 14%; font-family: var(--font-mono); font-size: 0.7rem; color: var(--cobalt-tint); border: 1px solid var(--cobalt-deep); border-radius: 6px; padding: 3px 8px; background: rgba(7, 10, 18, 0.6); }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 0.9; } 50% { transform: scale(1.04); opacity: 1; } }
@media (max-width: 860px) { .ai-grid { grid-template-columns: 1fr; } .ai-figure { max-width: 320px; } }

/* ---------- experience (bento) ---------- */
.bento { margin-top: 3rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  padding: 26px;
  min-height: 180px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), var(--cobalt-glow), transparent 55%);
  pointer-events: none;
}
.tile:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.tile:hover::before { opacity: 0.55; }
.tile h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.tile p { color: var(--ink-mute); margin: 0; font-size: 0.95rem; }
.tile-lg { grid-column: span 2; grid-row: span 2; }
.tile-wide { grid-column: span 2; }
@media (max-width: 920px) { .bento { grid-template-columns: repeat(2, 1fr); } .tile-lg, .tile-wide { grid-column: span 2; grid-row: auto; } }
@media (max-width: 560px) { .bento { grid-template-columns: 1fr; } .tile-lg, .tile-wide { grid-column: auto; } }

/* ---------- system showcase (animated device) ---------- */
.device-stage { position: relative; margin-top: 3.5rem; display: grid; place-items: center; min-height: 660px; }
.phone {
  position: relative;
  z-index: 3;
  width: 300px;
  height: 608px;
  border-radius: 46px;
  padding: 12px;
  background: linear-gradient(160deg, #222b4f, #0a0f20);
  border: 1px solid var(--line-strong);
  box-shadow: 0 44px 100px -34px rgba(0, 0, 0, 0.85), 0 0 80px -22px var(--glow-purple);
}
.phone-notch { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 108px; height: 22px; border-radius: 0 0 14px 14px; background: #05070f; z-index: 5; }
.phone-screen { position: relative; height: 100%; border-radius: 36px; overflow: hidden; background: var(--bg); display: flex; flex-direction: column; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 26px 14px 12px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.chat-back { color: var(--ink-mute); font-size: 1.4rem; line-height: 1; }
.chat-av { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.chat-id { display: flex; flex-direction: column; line-height: 1.2; margin-right: auto; }
.chat-name { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.chat-status { font-size: 0.66rem; color: var(--cobalt-tint); display: flex; align-items: center; gap: 4px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 6px #4ade80; }
.chat-badge { font-family: var(--font-mono); font-size: 0.54rem; letter-spacing: 0.1em; color: var(--cobalt-tint); border: 1px solid var(--cobalt-deep); border-radius: 5px; padding: 3px 5px; }
.chat-body { flex: 1; overflow: hidden; padding: 16px 14px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.bubble { max-width: 80%; padding: 9px 13px; border-radius: 16px; font-size: 0.82rem; line-height: 1.4; }
.b-them { align-self: flex-end; background: var(--cobalt); color: #fff; border-bottom-right-radius: 5px; }
.b-iris { align-self: flex-start; background: var(--surface); color: var(--ink-soft); border-bottom-left-radius: 5px; }
.bubble.pop { animation: pop 0.34s cubic-bezier(0.2, 0.8, 0.2, 1.4); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: none; } }
.bubble.typing { display: inline-flex; gap: 4px; padding: 12px 14px; align-self: flex-start; }
.bubble.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-mute); animation: blink 1.2s infinite; }
.bubble.typing span:nth-child(2) { animation-delay: 0.18s; }
.bubble.typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-bar { padding: 8px 14px; border-top: 1px solid var(--line); }
.chat-input { display: block; padding: 9px 14px; border-radius: 999px; background: var(--surface); color: var(--ink-faint); font-size: 0.78rem; }
.tabbar { display: flex; justify-content: space-around; padding: 8px 6px 16px; background: var(--bg-soft); border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 1rem; color: var(--ink-faint); }
.tab i { font-style: normal; font-size: 0.56rem; letter-spacing: 0.04em; }
.tab-on { color: var(--cobalt-bright); }
.float-card { position: absolute; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; background: var(--surface-glass); backdrop-filter: blur(10px); border: 1px solid var(--line-strong); box-shadow: 0 22px 54px -22px rgba(0, 0, 0, 0.7); animation: floaty 7s ease-in-out infinite; }
.fc-title { font-size: 0.78rem; color: var(--ink); font-weight: 600; }
.fc-meta { font-size: 0.66rem; color: var(--ink-mute); margin-top: 1px; }
.fc-thumb { width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, var(--purple), var(--pink)); }
.fc-ico { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--cobalt-tint); background: rgba(61, 90, 193, 0.15); border: 1px solid var(--cobalt-deep); }
.fc-dot { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.fc-drop { top: 7%; left: 1%; animation-delay: -1s; }
.fc-circle { bottom: 11%; left: 0; animation-delay: -3.5s; }
.fc-bond { top: 15%; right: 1%; animation-delay: -2.2s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@media (max-width: 820px) { .float-card { display: none; } }

/* ---------- safety ---------- */
.safety { background: var(--bg-soft); max-width: 100%; }
.safety > * { max-width: var(--wide); margin-left: auto; margin-right: auto; }
.pillars { margin-top: 3rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.pillar { padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); }
.pillar h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.pillar p { margin: 0; color: var(--ink-mute); font-size: 0.95rem; }
@media (max-width: 680px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- two ways in ---------- */
.ways-grid { margin-top: 3rem; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.way-card { position: relative; overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--line-strong); background: var(--surface); padding: 32px; display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; transition: border-color 0.25s ease, transform 0.25s ease; }
.way-card::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 0.25s ease; background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), var(--cobalt-glow), transparent 55%); pointer-events: none; }
.way-card:hover { transform: translateY(-3px); border-color: var(--cobalt-deep); }
.way-card:hover::before { opacity: 0.5; }
.way-card h3 { font-size: 1.4rem; }
.way-card p { color: var(--ink-mute); margin: 0; }
@media (max-width: 720px) { .ways-grid { grid-template-columns: 1fr; } }

/* ---------- closing ---------- */
.closing { position: relative; overflow: hidden; padding: clamp(120px, 16vw, 200px) clamp(20px, 5vw, 40px); text-align: center; border-top: 1px solid var(--line); }
.atmos-closing { background: radial-gradient(70% 60% at 50% 50%, rgba(34, 48, 122, 0.6), transparent 70%); }
.closing-inner { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.closing-h { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -0.02em; line-height: 1.05; margin: 0.6rem 0 1rem; }
.closing-sub { color: var(--ink-soft); max-width: 42ch; margin: 0 auto 2rem; font-size: 1.1rem; }
.closing-fine { color: var(--ink-faint); font-size: 0.85rem; margin-top: 1.4rem; }

/* ---------- footer ---------- */
.footer { position: relative; z-index: 2; max-width: var(--wide); margin: 0 auto; padding: 60px clamp(20px, 5vw, 40px) 48px; border-top: 1px solid var(--line); }
.footer-top { display: flex; align-items: center; gap: 0.8rem; }
.footer-dot { animation-duration: 3.6s; }
.footer-identity { max-width: 52ch; color: var(--ink-mute); margin: 1rem 0 1.6rem; font-size: 0.95rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-bottom: 1.6rem; }
.footer-links a { color: var(--cobalt-tint); font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; color: var(--ink-faint); font-size: 0.85rem; }
.motion-toggle { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--ink-mute); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.motion-toggle:hover { border-color: var(--cobalt-deep); color: var(--cobalt-tint); }
.motion-toggle[aria-pressed="true"] { color: var(--cobalt-tint); border-color: var(--cobalt-deep); }

/* ---------- reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   reduced motion — freeze everything continuous, make reveals
   instant. Triggered by the OS flag OR the footer toggle (which
   sets data-reduce on <html>).
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
html[data-reduce="true"] *, html[data-reduce="true"] *::before, html[data-reduce="true"] *::after { animation: none !important; }
html[data-reduce="true"] .reveal { opacity: 1; transform: none; }
html[data-reduce="true"] .ticker-track { animation: none !important; }
