/* STAMNR site design system.
   Tokens mirror src/theme/theme.js (the single source of truth). Dark only.
   Elevation = layered surfaces + hairlines, never shadows (one exception: lifting the
   device mock and the CTA off the ground). No em dashes anywhere in this file. */

/* ---------- Fonts (self-hosted, no third-party request) ---------- */
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 300; font-display: swap; src: url('/assets/fonts/outfit-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/outfit-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/outfit-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/outfit-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/outfit-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --ink: #090C0A;
  --charcoal: #0B0F0D;
  --surface: #0E1311;
  --surface-alt: #131A17;
  --surface-high: #17201B;
  --hairline: #1B221E;
  --hairline-strong: #2A342F;
  --text: #ECF0ED;
  --text-strong: #D7DEDA;
  --muted: #9AA59E;
  --faint: #5E6B64;
  --disabled: #3F4A44;
  --steel: #6E8CA0;
  --amber: #E0A33A;
  --jade: #22B488;
  --jade-mid: #1FC096;
  --jade-bright: #2FD8A4;
  --gold: #F2B441;
  --danger: #E5664E;
  --on-accent: #08130E;
  --jade-soft: rgba(34,180,136,0.16);
  --jade-dim: rgba(34,180,136,0.38);
  --sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 32px);
  --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 24px; --r-xxl: 28px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 64px;
  --accent: var(--jade);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; }
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--jade-bright); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--jade-dim); color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--jade); color: var(--on-accent); font-weight: 600; padding: 10px 16px; border-radius: 12px; }
.skip:focus { top: 12px; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(60px, 10vw, 128px) 0; position: relative; }
.section.tight { padding-top: clamp(40px, 6vw, 72px); }
.section-head { max-width: 720px; }
.section-head.center { margin: 0 auto; text-align: center; }
.section-head.center .lede { margin-left: auto; margin-right: auto; }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--mono); font-weight: 500;
  font-size: 11.5px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--jade);
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--jade); opacity: 0.7; flex: 0 0 auto; }
.eyebrow.plain::before { display: none; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .eyebrow::before { display: none; }
h1.display {
  font-weight: 300; font-size: clamp(42px, 7.2vw, 78px);
  line-height: 1.02; letter-spacing: -0.03em; color: var(--text-strong);
  margin: 22px 0 20px; text-wrap: balance;
}
h2.title {
  font-weight: 300; font-size: clamp(30px, 4.6vw, 50px);
  line-height: 1.08; letter-spacing: -0.025em; color: var(--text-strong);
  margin: 18px 0 16px; text-wrap: balance;
}
h1.display b, h2.title b { font-weight: 600; color: #fff; }
.lede { color: var(--muted); font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; max-width: 640px; }
.lede b { color: var(--text-strong); font-weight: 500; }
.mono { font-family: var(--mono); }
.readout {
  font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--faint); font-variant-numeric: tabular-nums;
}
.cite { color: var(--faint); font-size: 14px; }
.cite i { font-style: italic; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border-radius: var(--r-md);
  background: var(--jade); color: var(--on-accent);
  font-weight: 600; font-size: 16.5px; letter-spacing: 0.01em;
  transition: background-color 0.18s ease, transform 0.18s var(--ease-out), box-shadow 0.25s ease;
  box-shadow: 0 0 0 0 rgba(34,180,136,0);
  cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--jade-mid); box-shadow: 0 10px 40px -10px rgba(47,216,164,0.45); }
.btn:active { transform: scale(0.98); }
.btn.ghost {
  background: transparent; color: var(--text); border: 1px solid var(--hairline-strong);
  box-shadow: none;
}
.btn.ghost:hover { background: var(--surface-alt); border-color: var(--faint); }
.btn.sm { min-height: 40px; padding: 0 18px; font-size: 14.5px; border-radius: 12px; }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }

/* App Store badge (inline SVG, links to the listing) */
.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 0 20px 0 16px; border-radius: 14px;
  background: #000; color: #fff; border: 1px solid #2A342F;
  transition: border-color 0.18s ease, transform 0.18s var(--ease-out), background-color 0.18s ease;
  white-space: nowrap;
}
.store-badge:hover { border-color: var(--faint); background: #050706; }
.store-badge:active { transform: scale(0.98); }
.store-badge svg { width: 26px; height: 26px; flex: 0 0 auto; }
.store-badge .t { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.store-badge .t small { font-size: 11px; font-weight: 400; letter-spacing: 0.02em; opacity: 0.85; }
.store-badge .t span { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9,12,10,0.72);
  -webkit-backdrop-filter: saturate(140%) blur(16px); backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 20px; }
.wordmark {
  font-family: var(--sans); font-weight: 500; font-size: 20px; letter-spacing: -0.07em; color: #fff;
  display: inline-flex; align-items: center; gap: 10px;
}
.wordmark .mark { width: 22px; height: 22px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { color: var(--muted); font-size: 15px; font-weight: 400; padding: 8px 12px; border-radius: 10px; transition: color 0.15s ease, background-color 0.15s ease; }
.nav-links a:hover, .nav-links a.on { color: var(--text); }
.nav-links a.on { background: var(--surface-alt); }
.nav-cta { margin-left: 8px; }
/* .nav-links a and .nav-sheet a (specificity 0,1,1) both beat plain .btn (0,1,0), so the
   filled CTA silently inherited the muted nav-link color and lost its own padding/size -
   the "Get the app" pill read as pale text blending into the green fill. Force it back. */
.nav-links a.nav-cta,
.nav-sheet a.btn {
  color: var(--on-accent); font-weight: 600; font-size: 16.5px; letter-spacing: 0.01em;
  padding: 0 28px; border-bottom: none;
}
.nav-links a.nav-cta:hover { color: var(--on-accent); }
.nav-burger {
  display: none; width: 44px; height: 44px; border-radius: 12px; align-items: center; justify-content: center;
  color: var(--text); border: 1px solid var(--hairline);
}
.nav-burger svg { width: 20px; height: 20px; }
.nav-burger .x { display: none; }
.menu-open .nav-burger .x { display: block; }
.menu-open .nav-burger .h { display: none; }
.nav-sheet {
  display: none; position: fixed; inset: var(--nav-h) 0 0 0; z-index: 49;
  background: rgba(9,12,10,0.96);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  padding: 28px var(--gutter) 40px; flex-direction: column; gap: 6px;
}
.nav-sheet a { font-size: 26px; font-weight: 300; color: var(--text-strong); padding: 14px 6px; border-bottom: 1px solid var(--hairline); letter-spacing: -0.01em; }
.nav-sheet a b { font-weight: 500; color: #fff; }
.nav-sheet .btn { margin-top: 22px; align-self: flex-start; }
.nav-sheet .foot { margin-top: auto; }
.menu-open .nav-sheet { display: flex; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.menu-open .nav-sheet > a { animation: sheetIn 0.35s var(--ease-out) both; }
.menu-open .nav-sheet > a:nth-child(2) { animation-delay: 0.04s; } .menu-open .nav-sheet > a:nth-child(3) { animation-delay: 0.08s; } .menu-open .nav-sheet > a:nth-child(4) { animation-delay: 0.12s; } .menu-open .nav-sheet > a:nth-child(5) { animation-delay: 0.16s; } .menu-open .nav-sheet > a:nth-child(6) { animation-delay: 0.2s; } .menu-open .nav-sheet > a:nth-child(7) { animation-delay: 0.24s; } .menu-open .nav-sheet > a:nth-child(8) { animation-delay: 0.28s; }
.menu-open { overflow: hidden; }
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 22px;
  padding: 28px;
  overflow: hidden;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.card::before {
  /* pointer spotlight (set by site.js via --mx/--my); invisible until hover */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(47,216,164,0.09), transparent 60%);
  border-radius: inherit;
  transition: opacity 0.35s ease;
}
.card:hover { border-color: var(--hairline-strong); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; }
.card .k {
  font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--jade); margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
}
.card h3 { font-weight: 600; font-size: 20px; line-height: 1.25; color: var(--text); margin-bottom: 10px; letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 16px; line-height: 1.6; }
.card p + p { margin-top: 10px; }
.card.raised { background: var(--surface-alt); }
.card.accent { border-color: rgba(34,180,136,0.35); }
.icon-tile {
  width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--jade-soft); color: var(--jade-bright); margin-bottom: 18px;
}
.icon-tile svg { width: 22px; height: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; } }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Reveal (progressive: only hides when JS is present) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); transition-delay: var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- Pills / chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--hairline-strong); background: var(--surface);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--jade); }
.chip.jade { color: var(--jade-bright); border-color: rgba(34,180,136,0.35); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--hairline); padding: 56px 0 64px; background: var(--charcoal); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.foot-grid p { color: var(--faint); font-size: 14px; line-height: 1.6; max-width: 460px; margin-top: 14px; }
.foot-col .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.foot-col a { display: block; color: var(--muted); font-size: 15px; padding: 5px 0; transition: color 0.15s ease; }
.foot-col a:hover { color: var(--text); }
.foot-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--hairline); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-bottom .readout { color: var(--faint); }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- Sky (the onboarding starfield, ported 1:1 from OnboardingBackground.js) ----------
   A fixed, pointer-blind layer under every page: two star layers that pan upward (120s and
   70s per viewport height, layer two twinkles 0.35 to 0.75 over 4s), two jade orbs drifting
   on 22s and 27s loops, three shooting stars, and the edge vignette. Every loop animates
   transform or opacity only. z-index -1 keeps it above the ink canvas and below all content. */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.sky-layer { position: absolute; left: 0; right: 0; top: 0; height: 200vh; will-change: transform; }
.sky-layer.l1 { animation: skyPan 120s linear infinite; }
.sky-layer.l2 { animation: skyPan 70s linear infinite; }
.sky-layer.l2 .sky-tile { animation: skyTwinkle 4s ease-in-out infinite alternate; }
.sky-tile { position: absolute; left: 0; right: 0; height: 100vh; }
.sky-tile.b { top: 100vh; }
.sky-star { position: absolute; border-radius: 50%; background: #fff; }
.sky-star.jade { background: var(--jade); }
.sky-orb { position: absolute; border-radius: 50%; opacity: 0.7; will-change: transform; }
.sky-orb.a { top: -70px; left: -60px; width: 260px; height: 260px; background: radial-gradient(circle, rgba(34,180,136,0.18) 0%, rgba(34,180,136,0) 68%); animation: skyOrbA 22s ease-in-out infinite alternate; }
.sky-orb.b { bottom: -70px; right: -60px; width: 220px; height: 220px; background: radial-gradient(circle, rgba(34,180,136,0.12) 0%, rgba(34,180,136,0) 68%); animation: skyOrbB 27s ease-in-out infinite alternate; }
.sky-shot { position: absolute; left: -140px; width: 130px; height: 1.6px; opacity: 0; background: linear-gradient(90deg, transparent, #fff, transparent); transform: rotate(20deg); will-change: transform, opacity; animation: skyShot linear infinite; }
.sky-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse 75% 75% at 50% 28%, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 50%, rgba(0,0,0,0.35) 100%); }
@keyframes skyPan { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -100vh, 0); } }
@keyframes skyTwinkle { from { opacity: 0.35; } to { opacity: 0.75; } }
@keyframes skyOrbA { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(50px, 40px, 0) scale(1.18); } }
@keyframes skyOrbB { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-50px, -40px, 0) scale(1.18); } }
/* Opacity flares to 0.9 in the first 6% and dies by 20%; the remaining 80% is the reset glide. */
@keyframes skyShot {
  0%   { transform: translate3d(0, 0, 0) rotate(20deg); opacity: 0; }
  6%   { opacity: 0.9; }
  20%  { transform: translate3d(92px, 34px, 0) rotate(20deg); opacity: 0; }
  100% { transform: translate3d(460px, 168px, 0) rotate(20deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sky-layer.l1, .sky-layer.l2, .sky-layer.l2 .sky-tile, .sky-orb.a, .sky-orb.b, .sky-shot { animation: none; }
  .sky-shot { display: none; }
  .sky-layer.l2 { opacity: 0.55; }
}

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-lg { margin-top: 44px; }
.hide-sm { }
@media (max-width: 640px) { .hide-sm { display: none !important; } }
.glow {
  position: absolute; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, rgba(34,180,136,0.16) 0%, rgba(34,180,136,0.05) 42%, transparent 68%);
}
