/* Oopsend design system v2: quiet, monochrome, one signal colour.
   Neutral ink and white do the work. Coral is the only accent (the playhead, undo). Lime appears only for the undo window. */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #09090b;
  --bg-2: #0f0f12;
  --bg-3: #17171b;
  --line: rgba(255, 255, 255, .085);
  --line-2: rgba(255, 255, 255, .17);
  --text: #f4f4f2;
  --text-2: #c9c9c6;
  --mute: #8d8d93;
  --accent: #d4ff3a;          /* the undo window, nothing else */
  --accent-ink: #151a00;
  --signal: #ff5a36;          /* coral: playhead, undo, refusal */
  --signal-ink: #2a0b04;
  --r: 10px;
  --r-lg: 16px;
  --hdr: 64px;
  --f-display: 'Geist', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Geist', 'Segoe UI', system-ui, sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --f-dot: var(--f-mono);
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* legacy names still used by inline styles and older rules */
  --ink: var(--bg); --stage: var(--bg-2); --stage-2: var(--bg-2); --stage-3: var(--bg-3);
  --text-d: var(--text); --mute-d: var(--mute); --line-d: var(--line);
  --paper: var(--bg); --mist: var(--bg-2); --white: var(--bg-2);
  --text-l: var(--text); --mute-l: var(--mute); --line-l: var(--line);
  --acid: var(--accent); --acid-ink: var(--accent-ink); --acid-deep: var(--accent);
  --coral: var(--signal); --coral-deep: var(--signal); --ok: var(--accent);
}
/* docs read better on light paper: same tokens, inverted */
body.docs-body {
  --bg: #fbfbf9; --bg-2: #ffffff; --bg-3: #f2f2ef;
  --line: rgba(10, 10, 12, .1); --line-2: rgba(10, 10, 12, .2);
  --text: #0f0f12; --text-2: #34343a; --mute: #66666d;
  --accent: #567000; --accent-ink: #ffffff; --signal: #e0392d;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 24px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--f-body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--signal); color: #fff; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }
.mono { font-family: var(--f-mono); }
.tc { font-family: var(--f-mono); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* ---------- type */
.h-xl { font-family: var(--f-display); font-weight: 600; font-size: clamp(46px, 7vw, 104px); line-height: .98; letter-spacing: -.045em; margin: 0; }
.h-lg { font-family: var(--f-display); font-weight: 600; font-size: clamp(32px, 4.2vw, 58px); line-height: 1.04; letter-spacing: -.038em; margin: 0; }
.h-md { font-family: var(--f-display); font-weight: 600; font-size: clamp(20px, 2vw, 25px); line-height: 1.2; letter-spacing: -.022em; margin: 0; }
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--mute); max-width: 58ch; margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .02em; color: var(--mute); }
.eyebrow .tc { padding: 0; background: none; color: var(--text); font-size: 12.5px; }
.eyebrow .tc::after { content: ''; display: inline-block; width: 28px; height: 1px; background: var(--line-2); vertical-align: middle; margin-left: 12px; }
.hl { color: var(--text); background: none; padding: 0; }
.undo-word { color: var(--signal); }
.mute { color: var(--mute); }

/* ---------- sections */
.sec { position: relative; padding: clamp(80px, 11vw, 152px) 0; border-top: 1px solid var(--line); }
.sec--paper, .sec--stage { background: var(--bg); }
.sec--mist, .sec--ink { background: var(--bg-2); }
.stage { background: var(--bg); color: var(--text); }
.sec-head { display: grid; gap: 20px; margin-bottom: clamp(40px, 5vw, 72px); max-width: 820px; }

/* ---------- buttons: one shape, no decoration */
.ticks::after, .ticks--top::after { content: none; }
.btn {
  --bg-b: transparent; --fg: var(--text); --bd: var(--line-2);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px; border: 1px solid var(--bd); border-radius: var(--r);
  background: var(--bg-b); color: var(--fg); text-decoration: none; white-space: nowrap;
  font-family: var(--f-display); font-weight: 500; font-size: 15px; letter-spacing: -.005em;
  transition: background .2s, border-color .2s, color .2s, transform .2s var(--ease);
}
.btn::after { content: none; }
.btn:hover { border-color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn--acid, .btn--ink { --bg-b: var(--text); --fg: var(--bg); --bd: var(--text); }
.btn--acid:hover, .btn--ink:hover { --bg-b: var(--text-2); border-color: var(--text-2); }
.btn--undo { --bg-b: var(--signal); --fg: var(--signal-ink); --bd: var(--signal); }
.btn--undo:hover { filter: brightness(1.08); border-color: var(--signal); }
.btn--ghost, .btn--ghost-ink { --bd: var(--line-2); color: var(--text); }
.btn--foe { --bd: rgba(255, 90, 54, .45); color: var(--signal); }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 8px; }
.btn[disabled], .btn.is-off { opacity: .4; pointer-events: none; }
.btn .ico { width: 17px; height: 17px; flex: none; }
.arrow { display: inline-block; transition: transform .2s var(--ease); }
a:hover > .arrow, .btn:hover .arrow { transform: translateX(3px); }

.card { position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-2); padding: 30px 28px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 999px; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .01em; color: var(--mute); }
.chip--acid { color: var(--accent); border-color: rgba(212, 255, 58, .4); }
.chip--coral { color: var(--signal); border-color: rgba(255, 90, 54, .45); }
.chip--ok { color: var(--text); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.dot--live { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.ul { text-decoration: underline; text-decoration-color: var(--line-2); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-color .2s; }
.ul:hover { text-decoration-color: var(--text); }

/* ---------- header = the site timeline (always dark) */
.tl { position: fixed; inset: 0 0 auto 0; z-index: 90; height: var(--hdr); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(16px, 3vw, 48px); padding: 0 clamp(18px, 3vw, 32px); background: rgba(9, 9, 11, .95); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); color: #f4f4f2; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.tl-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 600; font-size: 19px; letter-spacing: -.03em; color: #f4f4f2; }
.tl-brand img { width: 30px; height: 30px; display: block; }
.tl-track { display: flex; align-items: center; gap: 18px; min-width: 0; }
.tl-time { font-family: var(--f-mono); font-size: 12px; color: #8d8d93; width: 74px; flex: none; font-weight: 400; }
.tl-rail { position: relative; flex: 1; height: 44px; min-width: 0; }
.tl-rail::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(255, 255, 255, .12); }
.tl-fill { position: absolute; left: 0; top: 50%; height: 1px; background: rgba(255, 255, 255, .55); width: 0; }
.tl-tick { position: absolute; top: 0; height: 100%; width: 1px; transform: translateX(-.5px); display: block; text-decoration: none; }
.tl-tick::before { content: ''; position: absolute; left: 0; top: 50%; margin-top: -4px; width: 1px; height: 8px; background: #5b5b61; transition: background .2s, height .2s, margin .2s; }
.tl-tick span { position: absolute; left: 7px; top: 50%; margin-top: -20px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .01em; color: #6f6f75; white-space: nowrap; transition: color .2s; }
.tl-tick:hover::before, .tl-tick.on::before { background: #f4f4f2; height: 14px; margin-top: -7px; }
.tl-tick:hover span, .tl-tick.on span { color: #f4f4f2; }
.tl-tick.flip span { left: auto; right: 7px; }
.tl-head { position: absolute; top: 50%; left: 0; width: 0; height: 0; pointer-events: none; }
.tl-head::before { content: ''; position: absolute; left: -.5px; top: -14px; width: 1px; height: 28px; background: #ff5a36; }
.tl-head::after { content: ''; position: absolute; left: -4px; top: -16px; width: 9px; height: 7px; background: #ff5a36; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.tl-right { display: flex; align-items: center; gap: 4px; }
.tl-link { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 8px; text-decoration: none; font-weight: 500; font-size: 14.5px; color: #9a9aa0; transition: color .15s; }
.tl-link:hover, .tl-link.on { color: #f4f4f2; }
.tl-ico { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; color: #9a9aa0; transition: color .15s; }
.tl-ico:hover { color: #f4f4f2; }
.tl-ico svg { width: 17px; height: 17px; }
.tl-ca { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; font-family: var(--f-mono); font-size: 11.5px; color: #c9c9c6; text-decoration: none; background: transparent; }
.tl-ca:hover { border-color: #f4f4f2; }
.tl-ca b { color: #f4f4f2; font-weight: 500; }
.tl .btn--acid { --bg-b: #f4f4f2; --fg: #09090b; --bd: #f4f4f2; min-height: 36px; padding: 0 16px; font-size: 14px; border-radius: 8px; margin-left: 8px; }
.tl-menu { display: none; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 8px; background: transparent; color: #f4f4f2; place-items: center; }
.tl-menu svg { width: 20px; height: 20px; }
.tl-sheet { position: fixed; inset: var(--hdr) 0 0 0; z-index: 89; background: rgba(9, 9, 11, .98); color: #f4f4f2; padding: 20px clamp(18px, 4vw, 32px) 40px; display: none; flex-direction: column; gap: 2px; overflow: auto; }
.tl-sheet.open { display: flex; }
.tl-sheet a { display: flex; justify-content: space-between; align-items: center; padding: 18px 2px; border-bottom: 1px solid rgba(255, 255, 255, .08); text-decoration: none; font-family: var(--f-display); font-weight: 500; font-size: 24px; letter-spacing: -.025em; }
.tl-sheet a .tc { font-size: 13px; color: #8d8d93; }
.tl-bar { display: none; position: absolute; left: 0; bottom: -1px; height: 1px; width: 0; background: #ff5a36; }
body { padding-top: var(--hdr); }
body.hero-under { padding-top: 0; }
@media (max-width: 960px) {
  .tl { grid-template-columns: 1fr auto; }
  .tl-track, .tl-link, .tl-ca { display: none; }
  .tl-menu { display: grid; }
  .tl-bar { display: block; }
}

/* ---------- code, tables */
pre, code { font-family: var(--f-mono); }
code { font-size: .86em; padding: .14em .42em; border-radius: 5px; background: var(--bg-3); }
pre { margin: 0; padding: 22px 24px; background: #0c0c0e; color: #e4e4e1; border-radius: var(--r); overflow-x: auto; font-size: 13.5px; line-height: 1.65; border: 1px solid rgba(255, 255, 255, .08); position: relative; tab-size: 2; }
pre code { padding: 0; background: none; font-size: inherit; color: inherit; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-2); }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { text-align: left; padding: 15px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .02em; color: var(--mute); font-weight: 500; background: transparent; }
.tbl tr:last-child td { border-bottom: 0; }

/* ---------- footer (always dark) */
.foot { background: #09090b; color: #f4f4f2; padding: 88px 0 40px; border-top: 1px solid rgba(255, 255, 255, .08); }
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; }
.foot h4 { margin: 0 0 16px; font-family: var(--f-mono); font-weight: 500; font-size: 11.5px; letter-spacing: .02em; color: #8d8d93; }
.foot a { display: block; padding: 5px 0; text-decoration: none; color: #c9c9c6; font-size: 15px; transition: color .15s; }
.foot a:hover { color: #fff; }
.foot-brand a.tl-brand { padding: 0; color: #f4f4f2; }
.foot-brand p { color: #8d8d93; max-width: 34ch; margin: 16px 0 0; font-size: 15px; }
.foot-word { display: none; }
.foot-legal { margin-top: 64px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; color: #77777d; font-size: 13px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* ---------- reveal */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .rv { opacity: 1; transform: none; }
}
