/* ============================================================
   ask-bridge — landing page
   Type:  Bricolage Grotesque (display) · Hanken Grotesk (body) · JetBrains Mono (code)
   Color: OKLCH, committed red on deep ink (dark) / pure white (light)
   ============================================================ */

:root {
  --bg: oklch(0.095 0 0);
  --surface: oklch(0.155 0.008 354);
  --surface-2: oklch(0.205 0.012 354);
  --ink: oklch(0.96 0.006 354);
  --muted: oklch(0.66 0.005 354);
  --faint: oklch(0.46 0.004 354);
  --primary: oklch(0.6 0.205 354);
  --primary-bright: oklch(0.68 0.215 356);
  --primary-deep: oklch(0.46 0.19 354);
  --accent: oklch(0.85 0.135 82);
  --accent-ink: oklch(0.22 0.03 82);
  --line: oklch(0.3 0.008 354);
  --line-soft: oklch(0.22 0.006 354);
  --glow: oklch(0.6 0.205 354 / 0.42);
  --glow-accent: oklch(0.85 0.135 82 / 0.18);
  --on-primary: oklch(0.99 0 0);
  --shadow: 0 1px 0 0 oklch(0 0 0 / 0.4), 0 24px 60px -28px oklch(0 0 0 / 0.7);

  --f-display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  --f-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1160px;
  --gut: clamp(1.1rem, 4vw, 2.4rem);
  --r: 16px;
  --r-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg: oklch(0.99 0 0);
  --surface: oklch(0.975 0.004 354);
  --surface-2: oklch(0.945 0.007 354);
  --ink: oklch(0.23 0.012 354);
  --muted: oklch(0.46 0.01 354);
  --faint: oklch(0.6 0.006 354);
  --primary: oklch(0.46 0.2 354);
  --primary-bright: oklch(0.46 0.2 356);
  --primary-deep: oklch(0.4 0.18 354);
  --accent: oklch(0.72 0.155 75);
  --accent-ink: oklch(0.2 0.02 82);
  --line: oklch(0.9 0.006 354);
  --line-soft: oklch(0.93 0.004 354);
  --glow: oklch(0.52 0.2 354 / 0.16);
  --glow-accent: oklch(0.72 0.155 75 / 0.14);
  --on-primary: oklch(0.99 0 0);
  --shadow: 0 1px 0 0 oklch(0.4 0.02 354 / 0.08), 0 24px 60px -30px oklch(0.4 0.02 354 / 0.2);
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--f-body);
  font-weight: 400;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.62;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; }
.prose, .hero__sub, .why__lead, .why__points p, .feat p, .how__timeline p, .usage__step > p, .cta__copy p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--primary-bright); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: fixed; top: -100px; left: 1rem; z-index: 200;
  background: var(--primary); color: var(--on-primary);
  padding: 0.6rem 1rem; border-radius: 8px; font-weight: 600;
}
.skip:focus { top: 1rem; }

/* ---- ambient background ---- */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient__grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  opacity: 0.5;
}
.ambient__glow {
  position: absolute; border-radius: 50%; filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
}
.ambient__glow--primary {
  width: 60vw; height: 60vw; max-width: 720px; max-height: 720px;
  top: -18vw; right: -10vw;
  background: radial-gradient(circle, var(--glow), transparent 70%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.ambient__glow--accent {
  width: 40vw; height: 40vw; max-width: 480px; max-height: 480px;
  top: 30vh; left: -12vw;
  background: radial-gradient(circle, var(--glow-accent), transparent 70%);
  opacity: 0.4;
  animation: drift-b 32s ease-in-out infinite alternate;
}
@keyframes drift-a { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-3vw, 4vw, 0); } }
@keyframes drift-b { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(4vw, -3vw, 0); } }

/* ---- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 100;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line-soft);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0.8rem var(--gut);
  display: flex; align-items: center; gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand__crab { font-size: 1.3rem; }
.nav__links { display: flex; gap: 0.3rem; margin-left: 0.8rem; }
.nav__links a {
  padding: 0.45rem 0.7rem; border-radius: 8px; font-size: 0.92rem; color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav__links a:hover { color: var(--ink); background: var(--surface); }
.nav__tools { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }

.ico { width: 20px; height: 20px; display: block; }
.nav__cta {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.5rem 0.85rem; border-radius: 10px;
  border: 1px solid var(--line); color: var(--ink);
  font-weight: 600; font-size: 0.9rem;
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}
.nav__cta:hover { border-color: var(--primary); background: var(--surface); transform: translateY(-1px); }

.theme, .lang__btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  width: 38px; height: 38px; justify-content: center;
  border-radius: 10px; border: 1px solid var(--line); color: var(--ink);
  transition: border-color 0.2s, background 0.2s;
}
.lang__btn { width: auto; padding: 0 0.6rem; font-size: 0.85rem; font-weight: 500; }
.theme:hover, .lang__btn:hover { border-color: var(--primary); background: var(--surface); }
.ico--moon { display: none; }
[data-theme="light"] .ico--sun { display: none; }
[data-theme="light"] .ico--moon { display: block; }

.lang { position: relative; }
.lang__menu {
  position: absolute; right: 0; top: calc(100% + 0.5rem);
  min-width: 150px; padding: 0.35rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
  z-index: 120;
  opacity: 0; transform: translateY(-6px) scale(0.97); transform-origin: top right;
  visibility: hidden; pointer-events: none;
  transition: opacity 0.22s var(--ease-out-expo), transform 0.22s var(--ease-out-expo), visibility 0s linear 0.22s;
}
.lang__menu.open {
  opacity: 1; transform: none; visibility: visible; pointer-events: auto;
  transition: opacity 0.22s var(--ease-out-expo), transform 0.22s var(--ease-out-expo), visibility 0s;
}
.lang__menu button { width: 100%; text-align: left; padding: 0.5rem 0.7rem; border-radius: 8px; font-size: 0.9rem; color: var(--ink); }
.lang__menu button:hover { background: var(--surface-2); }
.lang__menu button[aria-current="true"] { color: var(--primary-bright); font-weight: 600; }

.nav__burger { display: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); position: relative; }
.nav__burger span { position: absolute; left: 9px; right: 9px; height: 1.6px; background: var(--ink); transition: transform 0.25s var(--ease), opacity 0.2s; }
.nav__burger span:nth-child(1) { top: 14px; }
.nav__burger span:nth-child(2) { bottom: 14px; }
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ---- layout helpers ---- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(4rem, 8vw, 7rem) var(--gut); }
.section__head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.kicker {
  font-family: var(--f-mono); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.08em; color: var(--primary-bright);
  margin: 0 0 0.9rem; text-transform: uppercase;
}
.kicker::before { content: ""; display: inline-block; width: 1.6rem; height: 1px; background: var(--primary); vertical-align: middle; margin-right: 0.6rem; }
.section__title { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem); font-weight: 600; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.3rem; border-radius: 12px;
  font-weight: 600; font-size: 0.98rem;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn--primary { background: var(--primary-deep); color: var(--on-primary); box-shadow: 0 10px 30px -12px var(--glow); }
.btn--primary:hover { background: var(--primary); transform: translateY(-2px); box-shadow: 0 16px 38px -12px var(--glow); }
.btn--ghost { border: 1px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--primary); transform: translateY(-2px); }
.btn:active { transform: scale(0.97); }
.btn--primary:active { box-shadow: 0 8px 22px -14px var(--glow); }

/* ---- install strip ---- */
.install-strip {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 0.7rem 0.7rem 0.7rem 1rem;
  max-width: 30rem;
}
.install-strip code { font-family: var(--f-mono); font-size: 0.82rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.install-strip { min-width: 0; }
.hero__copy { min-width: 0; }
.cta__copy { min-width: 0; }
.copy {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); border: 1px solid var(--line);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.copy:hover { color: var(--ink); border-color: var(--primary); background: var(--surface-2); }
.copy { position: relative; }
.copy.copied { color: var(--accent); border-color: var(--accent); animation: copy-pop 0.32s var(--ease-out-expo); }
.copy svg { width: 16px; height: 16px; transition: opacity 0.15s; }
.copy.copied svg { opacity: 0; }
.copy::after {
  content: ""; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font: 700 15px/1 var(--f-body); color: var(--accent);
  opacity: 0; transform: scale(0.6); transition: opacity 0.18s var(--ease-out-expo), transform 0.28s var(--ease-out-expo);
}
.copy.copied::after { content: "\2713"; opacity: 1; transform: scale(1); }
@keyframes copy-pop { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
.install-strip--light { background: color-mix(in oklab, var(--on-primary) 14%, transparent); border-color: color-mix(in oklab, var(--on-primary) 30%, transparent); }
[data-theme="light"] .install-strip--light { background: oklch(0.96 0.01 354); border-color: var(--line); }

/* ---- code blocks ---- */
.code {
  position: relative; margin: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 0.9rem 1rem;
  font-family: var(--f-mono); font-size: 0.85rem; line-height: 1.65;
  color: var(--ink); overflow-x: auto; min-width: 0;
}
.code code { white-space: pre; }
.code--blk { padding-right: 3rem; }
.code .copy { position: absolute; top: 0.6rem; right: 0.6rem; background: var(--surface-2); }
.code .t-flag { color: var(--accent); }
.code .t-str { color: var(--primary-bright); }
/* allow flex/grid code blocks to shrink so long commands scroll instead of overflowing the viewport */
.feat, .feat__txt, .feat--wide .code, .usage__step, .tabs__panel { min-width: 0; }

/* ---- hero ---- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) var(--gut) clamp(3rem, 7vw, 6rem); max-width: var(--maxw); margin: 0 auto; }
.hero__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero__title { font-size: clamp(2.4rem, 1.3rem + 4vw, 4.2rem); font-weight: 700; letter-spacing: -0.035em; margin: 0.6rem 0 1.1rem; }
.hero__sub { font-size: clamp(1.02rem, 0.96rem + 0.3vw, 1.18rem); color: var(--muted); max-width: 32em; line-height: 1.6; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.6rem 0 1.4rem; }

.hero__visual { position: relative; }
.hero__art {
  border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}
.hero__art img { width: 100%; height: 100%; object-fit: cover; }
.terminal {
  position: absolute; left: -6%; bottom: -10%;
  width: min(78%, 340px);
  background: oklch(0.12 0.004 354); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 30px 70px -30px oklch(0 0 0 / 0.8);
  overflow: hidden;
  font-family: var(--f-mono);
}
.terminal__bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.55rem 0.8rem; background: oklch(0.16 0.005 354); border-bottom: 1px solid var(--line-soft); }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot--r { background: oklch(0.7 0.18 25); }
.dot--y { background: oklch(0.8 0.15 85); }
.dot--g { background: oklch(0.7 0.16 145); }
.terminal__title { margin-left: 0.4rem; font-size: 0.72rem; color: var(--faint); letter-spacing: 0.04em; }
.terminal__body { padding: 0.7rem 0.8rem 0.85rem; font-size: 0.76rem; line-height: 1.5; }
.terminal__line { color: var(--ink); }
.t-prompt { color: var(--accent); }
.t-cmd { color: var(--ink); }
.t-caret { display: inline-block; width: 7px; height: 1em; background: var(--primary-bright); margin-left: 2px; vertical-align: text-bottom; animation: blink 1.1s steps(2) infinite; }
.t-caret.done { animation: none; opacity: 0; }
@keyframes blink { 50% { opacity: 0; } }
.terminal__resp { color: var(--muted); margin-top: 0.5rem; opacity: 0; transform: translateY(4px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.terminal__resp.show { opacity: 1; transform: none; }

/* ---- why ---- */
.why__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.why__lead { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.25rem, 1rem + 1vw, 1.7rem); line-height: 1.4; letter-spacing: -0.015em; color: var(--ink); }
.why__points { display: grid; gap: 0; border-top: 1px solid var(--line); }
.why__points li { padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.why__points h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.why__points p { color: var(--muted); font-size: 0.96rem; }

/* ---- features ledger (asymmetric, not uniform cards) ---- */
.features__ledger { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(1rem, 2.5vw, 1.6rem); }
.feat {
  grid-column: span 3;
  display: flex; flex-direction: column; gap: 1rem;
  padding: clamp(1.3rem, 2.5vw, 1.8rem);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r);
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.feat:hover { border-color: var(--primary); transform: translateY(-3px); }
.feat--wide { grid-column: span 6; flex-direction: row; align-items: center; gap: clamp(1.2rem, 3vw, 2.4rem); }
.feat--wide .feat__txt { flex: 1.1; }
.feat--wide .code { flex: 1; }
.feat h3 { font-size: 1.18rem; }
.feat p { color: var(--muted); font-size: 0.94rem; }
.feat .code { font-size: 0.82rem; }

/* ---- usage ---- */
.usage__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.2rem, 3vw, 2rem); }
.usage__step { display: flex; flex-direction: column; gap: 0.7rem; }
.usage__tag { font-family: var(--f-mono); font-size: 0.8rem; font-weight: 600; color: var(--primary-bright); letter-spacing: 0.02em; }
.usage__step > p { color: var(--muted); font-size: 0.95rem; }

/* ---- how (earned numbered sequence) ---- */
.how__timeline { display: grid; gap: 0; counter-reset: step; }
.how__timeline li {
  display: grid; grid-template-columns: 5rem 1fr; gap: 1.2rem;
  padding: 1.6rem 0; border-top: 1px solid var(--line);
  position: relative;
}
.how__timeline li:last-child { border-bottom: 1px solid var(--line); }
.how__num { font-family: var(--f-mono); font-size: 0.9rem; font-weight: 700; color: var(--accent-ink); background: var(--accent); padding: 0.35rem 0.6rem; border-radius: 6px; height: fit-content; letter-spacing: 0.04em; }
.how__timeline h3 { font-size: 1.2rem; margin-bottom: 0.35rem; }
.how__timeline p { color: var(--muted); font-size: 0.97rem; max-width: 38em; }

/* ---- install tabs ---- */
.tabs__bar { display: flex; flex-wrap: wrap; gap: 0.3rem; border-bottom: 1px solid var(--line); margin-bottom: 1.4rem; }
.tab { padding: 0.6rem 1rem; font-size: 0.92rem; color: var(--muted); border-radius: 8px 8px 0 0; position: relative; transition: color 0.2s; }
.tab:hover { color: var(--ink); }
.tab::after { content: ""; position: absolute; left: 0.6rem; right: 0.6rem; bottom: -1px; height: 2px; background: var(--primary); border-radius: 2px; transform: scaleX(0); transform-origin: left center; transition: transform 0.3s var(--ease-out-expo); }
.tab--active { color: var(--ink); }
.tab--active::after { transform: scaleX(1); }
.tabs__panel { max-width: 44rem; }
.tabs__panel[hidden] { display: none; }

/* ---- cta band (committed red) ---- */
.cta { margin: clamp(2rem, 5vw, 4rem) var(--gut) 0; }
.cta__inner {
  max-width: var(--maxw); margin: 0 auto;
  background: linear-gradient(135deg, oklch(0.4 0.17 354), oklch(0.46 0.2 354));
  color: var(--on-primary);
  border-radius: clamp(1.2rem, 2.5vw, 2rem);
  padding: clamp(2rem, 5vw, 3.5rem);
  display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  position: relative; overflow: hidden;
  box-shadow: 0 30px 80px -30px var(--glow);
}
.cta__emblem { display: flex; justify-content: center; }
.cta__emblem img { width: min(220px, 80%); height: auto; opacity: 0.92; filter: drop-shadow(0 10px 40px oklch(0 0 0 / 0.4)); }
.cta__copy h2 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem); color: var(--on-primary); margin-bottom: 0.7rem; }
.cta__copy p { color: var(--on-primary); opacity: 0.92; margin-bottom: 1.4rem; max-width: 34em; }
.cta .install-strip--light { background: oklch(0.14 0.004 354); border-color: oklch(0.32 0.008 354); }
.cta .install-strip--light code { color: var(--on-primary); }
.cta .install-strip--light .copy { color: var(--on-primary); border-color: oklch(0.4 0.008 354); }
.cta .install-strip--light .copy:hover { background: oklch(0.22 0.006 354); }

/* ---- footer ---- */
.footer { border-top: 1px solid var(--line); margin-top: clamp(3rem, 7vw, 6rem); }
.footer__inner { max-width: var(--maxw); margin: 0 auto; padding: clamp(2.5rem, 5vw, 3.5rem) var(--gut); display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; align-items: start; }
.footer__brand { display: flex; align-items: center; gap: 0.7rem; }
.footer__brand .brand__crab { font-size: 1.8rem; }
.footer__name { font-family: var(--f-display); font-weight: 700; font-size: 1.1rem; }
.footer__tag { color: var(--muted); font-size: 0.88rem; }
.footer__links { display: flex; flex-direction: column; gap: 0.6rem; }
.footer__links a { color: var(--muted); font-size: 0.92rem; width: fit-content; transition: color 0.2s; }
.footer__links a:hover { color: var(--primary-bright); }
.footer__meta { text-align: right; }
.footer__by { font-size: 0.92rem; color: var(--muted); }
.footer__by a { color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--primary); padding-bottom: 1px; transition: color 0.2s; }
.footer__by a:hover { color: var(--primary-bright); }
.footer__lic { font-family: var(--f-mono); font-size: 0.8rem; color: var(--muted); margin-top: 0.5rem; }

/* ---- reveal + stagger (enhance visible default, never gate) ---- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.stagger > * { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.stagger.in > * { opacity: 1; transform: none; }

/* ---- hero entrance (scoped to html.hero-anim; visible by default otherwise) ---- */
.hero-anim .hero__copy > * { opacity: 0; transform: translateY(22px); filter: blur(6px); transition: opacity 0.72s var(--ease-out-expo), transform 0.72s var(--ease-out-expo), filter 0.72s var(--ease-out-expo); }
.hero-anim .hero__copy > *:nth-child(1) { transition-delay: 40ms; }
.hero-anim .hero__copy > *:nth-child(2) { transition-delay: 130ms; }
.hero-anim .hero__copy > *:nth-child(3) { transition-delay: 220ms; }
.hero-anim .hero__copy > *:nth-child(4) { transition-delay: 310ms; }
.hero-anim .hero__copy > *:nth-child(5) { transition-delay: 400ms; }
.hero-anim .hero-enter .hero__copy > * { opacity: 1; transform: none; filter: none; }

.hero-anim .hero__visual { opacity: 0; transform: translateY(26px) scale(0.985); transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo); transition-delay: 180ms; }
.hero-anim .hero-enter .hero__visual { opacity: 1; transform: none; }
.hero-anim .hero__art { clip-path: inset(0 0 100% 0); transition: clip-path 1.05s var(--ease-out-expo); transition-delay: 260ms; }
.hero-anim .hero-enter .hero__art { clip-path: inset(0 0 0 0); }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { order: -1; max-width: 560px; }
  .terminal { left: auto; right: 4%; bottom: -8%; }
  .why__grid { grid-template-columns: 1fr; }
  .feat--wide { grid-column: span 6; flex-direction: column; align-items: stretch; }
  .cta__inner { grid-template-columns: 1fr; text-align: left; }
  .cta__emblem { order: -1; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__meta { text-align: left; }
}

@media (max-width: 720px) {
  .nav__links {
    position: fixed; inset: 64px 0 auto 0;
    flex-direction: column; gap: 0;
    background: color-mix(in oklab, var(--bg) 92%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 0.6rem var(--gut) 1rem;
    transform: translateY(-110%); transition: transform 0.3s var(--ease);
    z-index: 90;
  }
  .nav__links.open { transform: none; }
  .nav__links a { padding: 0.7rem 0.7rem; border-radius: 8px; }
  .nav__burger { display: inline-flex; align-items: center; justify-content: center; }
  .nav__cta span { display: none; }
  .nav__cta { width: 38px; height: 38px; padding: 0; justify-content: center; }
  .lang__btn span { display: none; }
  .lang__btn { width: 38px; padding: 0; }

  .features__ledger { grid-template-columns: 1fr; }
  .feat { grid-column: span 1; }
  .feat--wide { grid-column: span 1; }
  .usage__grid { grid-template-columns: 1fr; }
  .how__timeline li { grid-template-columns: 3.4rem 1fr; gap: 0.8rem; }
  .install-strip { max-width: none; }
  .section { padding: clamp(3rem, 9vw, 4.5rem) var(--gut); }
}

@media (max-width: 420px) {
  .hero__title br { display: none; }
  .code { font-size: 0.78rem; }
}

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .stagger > * { opacity: 1; transform: none; }
  .hero-anim .hero__copy > *, .hero-anim .hero__visual { opacity: 1; transform: none; filter: none; }
  .hero-anim .hero__art { clip-path: inset(0); }
  .ambient__glow--primary, .ambient__glow--accent { animation: none; }
  .t-caret { animation: none; opacity: 0; }
  .terminal__resp { opacity: 1; transform: none; }
}

/* ---- touch targets: meet 44px min on coarse pointers ---- */
@media (pointer: coarse) {
  .theme, .nav__burger { width: 44px; height: 44px; }
  .lang__btn { min-height: 44px; }
  .nav__cta { min-height: 44px; }
  .copy { width: 44px; height: 44px; }
  .copy svg { width: 18px; height: 18px; }
}