/* ==========================================================================
   Algovane AI — Design System
   Extracted from Linear.app's structural principles, translated into an
   original identity. See /DESIGN.md for rationale.
   ========================================================================== */

/* --- legal pages (privacy.html, terms.html) --- */
.legal-wrap { max-width: 720px; margin: 0 auto; padding: var(--sp-9) var(--sp-5) var(--sp-11); }
.legal-wrap > .caption { margin-bottom: var(--sp-6); display: inline-block; }
.legal-wrap h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 650; letter-spacing: -0.02em; margin-bottom: var(--sp-2); }
.legal-updated { font-family: var(--font-mono); font-size: 13px; color: var(--graphite); margin-bottom: var(--sp-8); }
.legal-wrap h2 { font-size: 19px; font-weight: 600; margin: var(--sp-8) 0 var(--sp-3); }
.legal-wrap p { color: var(--ink-soft); font-size: 15.5px; line-height: 1.65; max-width: 68ch; }
.legal-wrap p + p { margin-top: var(--sp-3); }
.legal-wrap a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal-note {
  margin-top: var(--sp-9); padding: var(--sp-5); border-radius: var(--radius-md);
  background: var(--paper-raised); border: 1px solid var(--line);
}
.legal-note p { font-size: 13.5px; color: var(--graphite); }
.legal-fill { background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; }

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* --- color: light (default) --- */
  --ink: #0B0D10;
  --ink-soft: #3A3F46;
  --graphite: #6B7280;
  --paper: #FAFAF8;
  --paper-raised: #F1F0EC;
  --line: #E4E2DC;
  --accent: #C8702A;
  --accent-strong: #A85A1E;
  --accent-soft: #F4E3D3;
  --ink-on-accent: #FAFAF8;

  /* dark inverse section (used regardless of theme, e.g. Principles band) */
  --well-bg: #0B0D10;
  --well-ink: #F5F4F1;
  --well-ink-soft: #B9B7B0;
  --well-line: #262931;

  /* --- type --- */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* --- spacing scale (8px base) --- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;
  --sp-11: 160px;

  --container-w: 1200px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-pill: 999px;

  --ease: cubic-bezier(.4, 0, .2, 1);
  --dur: 180ms;

  --shadow-sm: 0 1px 2px rgba(11, 13, 16, 0.04);
  --shadow-md: 0 12px 32px rgba(11, 13, 16, 0.10);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #F5F4F1;
    --ink-soft: #C7C5BE;
    --graphite: #8A8F98;
    --paper: #0B0D10;
    --paper-raised: #15171B;
    --line: #262931;
    --accent: #E08A4B;
    --accent-strong: #F0A468;
    --accent-soft: rgba(224, 138, 75, 0.14);
    --ink-on-accent: #0B0D10;
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
  }
}

:root[data-theme="dark"] {
  --ink: #F5F4F1;
  --ink-soft: #C7C5BE;
  --graphite: #8A8F98;
  --paper: #0B0D10;
  --paper-raised: #15171B;
  --line: #262931;
  --accent: #E08A4B;
  --accent-strong: #F0A468;
  --accent-soft: rgba(224, 138, 75, 0.14);
  --ink-on-accent: #0B0D10;
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
}

/* --- reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}
@media (min-width: 900px) {
  .container { padding: 0 var(--sp-6); }
}

section { padding: var(--sp-9) 0; }
@media (min-width: 900px) {
  section { padding: var(--sp-11) 0; }
}

/* --- type ramp --- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

h1.display {
  font-size: clamp(40px, 6.4vw, 76px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: var(--sp-4) 0 0;
}
h2.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
h3.card-title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 56ch;
}
.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  max-width: 640px;
  margin-bottom: var(--sp-8);
}
.caption {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--graphite);
  letter-spacing: 0.02em;
}

/* --- buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease), color var(--dur) var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--ink-on-accent);
  border: 1px solid var(--accent);
}
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink-soft); background: var(--paper-raised); }
.btn:active { transform: translateY(1px); }

/* --- status bar --- */
.status-bar {
  background: var(--paper-raised);
  border-bottom: 1px solid var(--line);
}
.status-bar.is-dismissed { display: none; }
.status-bar-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 10px var(--sp-5);
  font-size: 13.5px;
  color: var(--ink-soft);
}
@media (min-width: 900px) { .status-bar-inner { padding: 10px var(--sp-6); } }
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  box-shadow: 0 0 0 0 var(--accent-soft);
  animation: status-pulse 2.4s ease-out infinite;
}
@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  70% { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .status-dot { animation: none; }
}
.status-bar-inner p { flex: 1; min-width: 0; }
.status-bar-inner p strong { color: var(--ink); font-weight: 600; }
.status-link {
  flex: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 13.5px;
  transition: color var(--dur) var(--ease);
}
.status-link:hover { color: var(--accent-strong); }
.status-dismiss {
  flex: none;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--graphite);
  font-size: 15px;
  line-height: 1;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.status-dismiss:hover { background: var(--line); color: var(--ink); }
@media (max-width: 640px) {
  .status-link { display: none; }
}

/* --- nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
}
/* Wordmark: "algovane" set in Outfit, lowercase, with a color split right
   at the algo/vane seam — the one place in the name the meaning actually
   splits. No added shapes, so nothing to misread as a different letter. */
.brand-word {
  font-family: 'Outfit', var(--font-sans);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  animation: brand-fade-in 480ms ease-out both;
}
.brand-word .algo { color: var(--ink); }
.brand-word .vane { color: var(--accent); transition: color 200ms var(--ease); }
.brand:hover .brand-word .vane,
.brand:focus-visible .brand-word .vane {
  color: var(--accent-strong);
}
@keyframes brand-fade-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .brand-word { animation: none; opacity: 1; }
}

/* Hero lockup: the wordmark wipes in left-to-right, then "vane" blooms
   with a brief signal glow as it settles — one orchestrated opening,
   not scattered effects. */
.hero-word-wrap { margin-bottom: var(--sp-5); }
.hero-wordmark {
  display: inline-block;
  font-family: 'Outfit', var(--font-sans);
  font-weight: 600;
  font-size: clamp(38px, 6vw, 62px);
  letter-spacing: -0.015em;
  clip-path: inset(0 100% 0 0);
  animation: wm-reveal 900ms cubic-bezier(.65, 0, .35, 1) forwards;
}
.hero-wordmark .algo { color: var(--ink); }
.hero-wordmark .vane {
  color: var(--accent);
  animation: vane-glow 1000ms ease-out 780ms both;
}
/* End state extends the clip region past the wordmark's own right edge —
   flush clipping would cut the text-shadow's own blur bleed off in a hard
   line right where the last letter ends. */
@keyframes wm-reveal { to { clip-path: inset(0 -60px 0 0); } }
@keyframes vane-glow {
  0% { text-shadow: 0 0 0 transparent; }
  40% { text-shadow: 0 0 16px color-mix(in srgb, var(--accent) 65%, transparent), 0 0 34px color-mix(in srgb, var(--accent) 35%, transparent); }
  100% { text-shadow: 0 0 0 transparent; }
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero .eyebrow,
.hero h1.display,
.hero .hero-lede,
.hero .hero-cta {
  opacity: 0;
  animation: hero-rise 620ms cubic-bezier(.22, 1, .36, 1) both;
}
.hero .eyebrow { animation-delay: 480ms; }
.hero h1.display { animation-delay: 580ms; }
.hero .hero-lede { animation-delay: 720ms; }
.hero .hero-cta { animation-delay: 840ms; }

@media (prefers-reduced-motion: reduce) {
  .hero-wordmark { animation: none; clip-path: inset(0 0 0 0); }
  .hero-wordmark .vane { animation: none; text-shadow: none; }
  .hero .eyebrow, .hero h1.display, .hero .hero-lede, .hero .hero-cta {
    animation: none; opacity: 1; transform: none;
  }
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--graphite);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 2px 7px;
  margin-left: 2px;
}
.nav-links {
  display: none;
  align-items: center;
  gap: var(--sp-7);
}
.nav-links a {
  position: relative;
  font-size: 14.5px;
  color: var(--ink-soft);
  padding: 4px 0;
  transition: color var(--dur) var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width var(--dur) var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: var(--sp-4); }
.nav-actions .btn-ghost { display: none; }
@media (min-width: 860px) {
  .nav-links { display: flex; }
  .nav-actions .btn-ghost { display: inline-flex; }
}

/* --- hero --- */
.hero {
  padding-top: var(--sp-10);
  padding-bottom: var(--sp-9);
  position: relative;
  overflow: hidden;
}
@media (min-width: 900px) { .hero { padding-top: var(--sp-11); } }
.hero-inner { max-width: 820px; position: relative; z-index: 1; }

/* Ambient background: thin flowing lines + soft glow, hero only. Kept to
   6-14% opacity with slow independent drift so it reads as atmosphere,
   not decoration — restraint is what keeps this in the "precise/
   engineered" register rather than tipping into consumer-gloss. */
.hero-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-bg svg { width: 100%; height: 100%; display: block; }
.hero-bg .flow-graphite { stroke: var(--graphite); }
.hero-bg .flow-accent { stroke: var(--accent); }
.hero-bg .glow-fill { fill: url(#heroGlow); }
.hero-bg .glow-stop-1, .hero-bg .glow-stop-2, .hero-bg .glow-stop-3 { stop-color: var(--accent); }
/* Drift starts only after the wordmark's own entrance (reveal + glow trail,
   done by ~1.8s) has fully settled, so the two motions never overlap and
   compete. Keyframes' 0%/100% match the untransformed resting state, so
   there's no jump when the delay ends — it just quietly starts breathing. */
.hero-bg .flow-a { animation: hero-drift-a 14s ease-in-out 1.9s infinite; }
.hero-bg .flow-b { animation: hero-drift-b 18s ease-in-out 1.9s infinite; }
.hero-bg .flow-c { animation: hero-drift-c 16s ease-in-out 1.9s infinite; }
@keyframes hero-drift-a { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(22px); } }
@keyframes hero-drift-b { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-18px); } }
@keyframes hero-drift-c { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(15px, -9px); } }
@media (prefers-reduced-motion: reduce) {
  .hero-bg .flow-a, .hero-bg .flow-b, .hero-bg .flow-c { animation: none; }
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-top: var(--sp-7);
}
.hero-lede { margin-top: var(--sp-5); }

.proof-strip {
  margin-top: var(--sp-9);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-6);
}
@media (min-width: 700px) {
  .proof-strip { grid-template-columns: repeat(4, 1fr); }
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.stat-label { font-size: 13.5px; color: var(--graphite); }

/* --- cards / grid --- */
.grid {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: var(--shadow-md);
}
.card-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.card-icon svg { width: 20px; height: 20px; }
.card p { color: var(--ink-soft); font-size: 15.5px; line-height: 1.6; }
.card-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--graphite);
  text-transform: uppercase;
}
.card-example {
  font-size: 14px;
  color: var(--ink-soft);
  padding-top: var(--sp-4);
  margin-top: auto;
  border-top: 1px solid var(--line);
}
.card-example strong {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-right: 4px;
}

/* --- process (numbered sequence, scroll-tracked timeline) --- */
.process-list { display: flex; flex-direction: column; position: relative; }
.process-rail {
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 19px;
  width: 2px;
  background: var(--line);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.process-rail-fill {
  position: absolute;
  top: 0; left: 0; width: 100%;
  height: 0%;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transition: height 90ms linear;
}
.process-rail-dot {
  position: absolute;
  left: 50%;
  top: 0%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 5px var(--accent-soft), 0 0 14px 2px color-mix(in srgb, var(--accent) 55%, transparent);
  transition: top 90ms linear;
  animation: rail-dot-pulse 1.7s ease-in-out infinite;
}
@keyframes rail-dot-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.3); }
}
.process-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--sp-5);
  padding: var(--sp-6) 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.process-item:last-child { border-bottom: 1px solid var(--line); }
.process-num {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--graphite);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    background var(--dur) var(--ease), box-shadow 260ms var(--ease), transform 260ms var(--ease);
}
.process-item.is-active .process-num {
  color: var(--ink-on-accent);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
  transform: scale(1.1);
}
.process-body { display: flex; flex-direction: column; gap: var(--sp-2); max-width: 640px; }
.process-body h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; transition: color var(--dur) var(--ease); }
.process-item.is-active .process-body h3 { color: var(--accent); }
.process-body p { color: var(--ink-soft); font-size: 15.5px; }
@media (prefers-reduced-motion: reduce) {
  .process-rail-fill { transition: none; }
  .process-rail-dot { animation: none; transition: none; }
}

/* --- principles (inverse/dark band) --- */
.well {
  background: var(--well-bg);
  color: var(--well-ink);
}
.well .eyebrow { color: var(--accent-strong); }
.well .section-head .lede { color: var(--well-ink-soft); }
.principles-grid {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: 1fr;
  margin-top: var(--sp-2);
}
@media (min-width: 700px) { .principles-grid { grid-template-columns: repeat(2, 1fr); } }
.principle {
  border-top: 1px solid var(--well-line);
  padding-top: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.principle .idx {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-strong);
}
.principle h3 { font-size: 18px; font-weight: 600; color: var(--well-ink); }
.principle p { font-size: 15px; color: var(--well-ink-soft); line-height: 1.6; }

/* --- CTA band --- */
.cta-band {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-6);
  padding: var(--sp-8) var(--sp-7);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 20px;
}
@media (min-width: 800px) {
  .cta-band { flex-direction: row; align-items: center; justify-content: space-between; }
}
.cta-band h2 { max-width: 480px; }
.cta-heading, .cta-lede { margin-top: 12px; }
.cta-actions { display: flex; gap: var(--sp-4); flex-wrap: wrap; }

/* --- footer --- */
.site-footer { border-top: 1px solid var(--line); padding: var(--sp-9) 0 var(--sp-6); }
.footer-top {
  display: grid;
  gap: var(--sp-7);
  grid-template-columns: 1fr;
  padding-bottom: var(--sp-8);
}
@media (min-width: 700px) {
  .footer-top { grid-template-columns: 1.4fr repeat(4, 1fr); }
}
.footer-brand p { color: var(--graphite); font-size: 14.5px; max-width: 32ch; margin-top: var(--sp-4); }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: var(--sp-4);
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--sp-3); }
.footer-col a { font-size: 14.5px; color: var(--ink-soft); transition: color var(--dur) var(--ease); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--graphite);
}
@media (min-width: 700px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* --- reveal-on-scroll --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* --- theme toggle --- */
.theme-toggle {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.theme-toggle:hover { background: var(--paper-raised); }
.theme-toggle svg { width: 16px; height: 16px; }

/* --- mobile nav --- */
.nav-toggle {
  display: inline-flex;
  width: 34px; height: 34px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
@media (min-width: 860px) { .nav-toggle { display: none; } }
.nav-toggle svg { width: 16px; height: 16px; }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-4) 0 var(--sp-5);
  border-top: 1px solid var(--line);
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
  padding: var(--sp-3) 0;
  font-size: 15.5px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 860px) { .mobile-menu { display: none !important; } }
