/* AfterSpike — site styles, from the brand tokens (afterspike-brand v1) */
:root {
  --ink: #221E33; --ink-2: #2C2740; --ink-3: #3A3452;
  --salt: #F3F2EC; --salt-2: #E8E6DD; --salt-3: #D9D6CA;
  --slate: #8E8AA3; --slate-2: #B8B4C7;
  --fern: #2E9C6E; --fern-text: #3DB584; --fern-soft: #CFEADB; --fern-deep: #1F7A54;
  --ember: #F2613F; --ember-text: #F47A5C; --iris: #7A66E8; --iris-text: #9B8CF3; --amber: #F0A34A;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --ui: "Instrument Sans", system-ui, sans-serif;
  --r1: 6px; --r2: 12px; --r3: 20px;
  --ease: cubic-bezier(.3,.7,.2,1);
  --gutter: 20px;
  --bg: var(--ink); --surface: var(--ink-2); --line: var(--ink-3);
  --text: var(--salt); --muted: var(--slate-2); --accent: var(--fern); --accent-text: var(--fern-text);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.5 var(--ui); font-variant-numeric: tabular-nums;
  padding-inline: var(--gutter);
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--fern); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; text-wrap: balance; color: var(--text); }
h1 { font-size: clamp(40px, 7vw, 64px); line-height: 1; letter-spacing: -0.035em; font-variation-settings: "opsz" 96; }
h2 { font-size: clamp(28px, 4vw, 36px); line-height: 1.1; letter-spacing: -0.025em; }
h3 { font-size: 22px; line-height: 1.25; font-weight: 500; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 1.45; }
.wrap { max-width: 1080px; margin-inline: auto; }
.prose { max-width: 68ch; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.top nav { display: flex; gap: 22px; flex-wrap: wrap; font-weight: 500; }
.top nav a { color: var(--muted); }
.top nav a:hover { color: var(--text); text-decoration: none; }
.lockup { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.lockup:hover { text-decoration: none; }
.lockup .word { font-family: var(--display); font-weight: 600; font-size: 26px; letter-spacing: -0.035em; line-height: 1; }
.lockup img { width: 30px; height: 30px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; font: 600 16px/1 var(--ui); border: 0; cursor: pointer; transition: transform 120ms var(--ease), background 120ms var(--ease); }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn.primary { background: var(--fern); color: var(--ink); }
.btn.primary:hover { background: #35a878; }
.btn.quiet { background: var(--ink-3); color: var(--text); }
.btn.quiet:hover { background: #45405f; }

/* hero */
.hero { padding-block: 48px 8px; max-width: 64ch; }
.hero .lead { font-size: 20px; line-height: 1.5; color: var(--muted); max-width: 50ch; margin-top: 20px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero .note { margin-top: 14px; }
.hero-mark { width: 120px; height: 120px; margin-bottom: 26px; }
.hero-mark path { stroke-dasharray: 210; stroke-dashoffset: 210; animation: draw 1s var(--ease) 200ms forwards; }
.hero-mark circle { opacity: 0; transform: scale(.4); transform-origin: 91px 72px; animation: land 220ms var(--ease) 1.15s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes land { to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .hero-mark path { animation: none; stroke-dashoffset: 0; }
  .hero-mark circle { animation: none; opacity: 1; transform: none; }
}

/* phones */
.phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: end; }
.phone { background: #0f0d19; border: 1px solid var(--line); border-radius: 44px; padding: 10px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.7); }
.phone img { border-radius: 36px; width: 100%; aspect-ratio: 1206 / 2622; object-fit: cover; }
.phone.tall { transform: translateY(-16px); }
.phones.four { grid-template-columns: repeat(4, 1fr); gap: 16px; }
.phones.two { grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 520px; margin-inline: auto; }
figure { margin: 0; }
figcaption { margin-top: 12px; text-align: center; color: var(--muted); font-size: 14px; }

/* the three screens */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.screens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; align-items: start; }
.screens .phone { max-width: 300px; margin-inline: auto; }
.screens figcaption { text-align: left; margin-top: 20px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.screens h3 { color: var(--text); margin-bottom: 6px; }
.strip { display: grid; grid-template-columns: 1fr 1.6fr; gap: 28px; align-items: center; background: var(--surface); border-radius: var(--r3); padding: 28px 32px; }
.strip .eyebrow { margin-bottom: 6px; }
.strip h2 { font-size: clamp(24px, 3vw, 30px); }

/* sections */
section { padding-block: 56px; }
.eyebrow { font-weight: 600; font-size: 14px; color: var(--accent-text); margin-bottom: 12px; }
.section-head { max-width: 60ch; margin-bottom: 32px; }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border-radius: var(--r3); padding: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); }
.card .num { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--fern); color: var(--ink); font: 600 12px/1 var(--ui); margin-bottom: 14px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split .phone { max-width: 320px; margin-inline: auto; }
.rule-card { border-left: 3px solid var(--fern); padding-left: 16px; }
.rule-card.ember { border-color: var(--ember); }
.rule-card.iris { border-color: var(--iris); }
.stack { display: grid; gap: 18px; }
.list { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.list li { display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: start; color: var(--muted); }
.list li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--fern); margin-top: 8px; margin-left: 4px; }
.list li strong { color: var(--text); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--ink-3); font: 600 14px/1 var(--ui); color: var(--text); }
.chip.on { background: var(--fern); color: var(--ink); }
.quote { font-family: var(--display); font-weight: 500; font-size: 22px; line-height: 1.3; color: var(--text); }
.direction { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.direction .card { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.direction .state { font: 600 12px/1 var(--ui); padding: 6px 10px; border-radius: 999px; background: var(--ink-3); color: var(--muted); white-space: nowrap; margin-top: 4px; }
.direction .state.done { background: rgba(46,156,110,.18); color: var(--fern-text); }
.beta { background: var(--surface); border-radius: var(--r3); padding: 36px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }

/* copyable addresses */
.addr { white-space: nowrap; }
button.copy { margin-left: 8px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font: 600 12px/1 var(--ui); cursor: pointer; vertical-align: middle; }
button.copy:hover { color: var(--text); border-color: var(--slate); }

/* footer */
footer { padding-block: 40px 48px; border-top: 1px solid var(--line); margin-top: 24px; display: grid; gap: 20px; }
footer .links { display: flex; gap: 22px; flex-wrap: wrap; font-weight: 500; }
footer .links a { color: var(--muted); }
footer .links a:hover { color: var(--text); }
footer .legal { color: var(--slate); font-size: 14px; max-width: 70ch; }

/* legal pages */
.doc { padding-block: 40px 64px; max-width: 72ch; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 8px; }
.doc .updated { color: var(--muted); margin-bottom: 36px; }
.doc h2 { font-size: 26px; margin-top: 40px; margin-bottom: 12px; }
.doc h3 { font-size: 19px; margin-top: 24px; margin-bottom: 8px; }
.doc p, .doc li { color: var(--muted); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 20px; margin: 10px 0; }
.doc li + li { margin-top: 6px; }
.doc strong { color: var(--text); font-weight: 500; }
.callout { background: var(--surface); border-left: 3px solid var(--ember); border-radius: var(--r2); padding: 16px 18px; margin: 20px 0; color: var(--text); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-block: 36px 24px; }
  .grid-2, .grid-3, .split, .direction, .beta, .strip { grid-template-columns: 1fr; }
  .screens { grid-template-columns: 1fr; gap: 36px; }
  .screens .phone { max-width: 260px; }
  .screens figcaption { text-align: center; max-width: 44ch; margin-inline: auto; }
  .split .phone { max-width: 280px; }
  .phones { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .phones.four { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .phones.two { grid-template-columns: repeat(2, 1fr); gap: 10px; max-width: 420px; }
  .phone { border-radius: 28px; padding: 6px; }
  .phone img { border-radius: 22px; }
  .phone.tall { transform: none; }
  section { padding-block: 40px; }
  .beta { padding: 24px; }
}
@media (max-width: 480px) {
  .top nav { gap: 14px; font-size: 15px; }
  .hero-mark { width: 88px; height: 88px; }
  .phones { grid-template-columns: 1fr 1fr; }
  .phones figure:nth-child(3) { display: none; }
  .phones.four figure:nth-child(3) { display: block; }
}
