/* ============================================================================
   SynAmp Spectrum — design system, layer 1
   Tokens · reset · typography · layout · header/footer · utilities
   Layer 2 (components) lives in synamp-ui.css
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. TOKENS
   Ground is the brand slate (#212637) from the export. Ink is the near-black
   well (#0E0E10). Signal is gold (#FFCD00). The spectrum is the mark's ramp.
   -------------------------------------------------------------------------- */
:root {
  /* Ground + surfaces (oklch derived from the brand slate) */
  --ink: #0e0e10;            /* oklch(0.165 0.004 285.9) */
  --bg: #212637;             /* oklch(0.272 0.033 271.5) brand slate */
  --bg-deep: #191d29;
  --surface: #2a3145;        /* oklch(0.316 0.037 269.3) */
  --surface-2: #343d54;      /* oklch(0.362 0.042 267.8) */
  --surface-3: #414b66;      /* oklch(0.415 0.047 268.6) */
  --well: #14161f;           /* oklch(0.202 0.018 274.9) input wells */
  --well-2: #1a1c26;

  /* Ink */
  --fg: #f1f1f1;             /* oklch(0.958 0 89.9) */
  --muted: #a4abc1;          /* 6.57:1 on slate · 5.65:1 on surface · 4.72:1 on surface-2 */
  --faint: #848ca6;          /* quiet text: 5.77:1 on ink, 4.5:1 on slate */
  --placeholder: #8b93aa;    /* 4.90:1 on slate · input placeholders */
  --on-gold: #1a1503;        /* oklch(0.197 0.034 95.3) */
  --on-coral: #1a0b0b;

  /* Signal */
  --gold: #ffcd00;           /* oklch(0.867 0.177 90.8) */
  --gold-hi: #ffdb4d;
  --gold-lo: #e0b400;
  --coral: #ff4a47;          /* oklch(0.669 0.218 26.1) */
  --coral-hi: #ff6e6b;
  --coral-lo: #e03532;
  --violet: #5216b3;
  --lavender: #ab51ff;
  --accent: var(--gold);
  --accent-ink: var(--on-gold);

  /* Semantic — *-ink variants are the AA-safe text colours */
  --success: #00e676;
  --warn: #ffb020;
  --danger: #ff5c57;
  --danger-ink: #ff8a86;   /* text · 5.69:1 on surface */
  --info: #3b6bff;
  --lavender-ink: #c9a6ff; /* text · 6.39:1 on surface */

  /* Spectrum ramp — the amp light + visualizer only */
  --sp-berry: #aa006c;
  --sp-pink: #f6004f;
  --sp-coral: #ff4a47;
  --sp-orange: #e86b14;
  --sp-gold: #ffcd00;
  --sp-lime: #defc1a;
  --sp-green: #00e676;
  --sp-cyan: #00e6e8;
  --sp-blue: #3b6bff;
  --sp-violet: #5216b3;
  --spectrum: linear-gradient(90deg, var(--sp-berry), var(--sp-pink), var(--sp-coral), var(--sp-orange), var(--sp-gold), var(--sp-lime), var(--sp-green), var(--sp-cyan), var(--sp-blue), var(--sp-violet));

  /* Hairlines + glass */
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --hair: rgba(255, 255, 255, 0.08);
  --glass: rgba(14, 14, 16, 0.66);
  --glass-solid: rgba(20, 22, 31, 0.94);
  --ghost: rgba(255, 255, 255, 0.05);
  --ghost-hi: rgba(255, 255, 255, 0.1);

  /* Type */
  --font-display: "Momo Trust Display", "Space Grotesk", system-ui, sans-serif;
  --font-sans: "Space Grotesk", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Space (4-based) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  /* Radii */
  --r-xs: 4px; --r-sm: 8px; --r-md: 12px; --r-lg: 20px; --r-pill: 999px;

  /* Elevation (dark-appropriate) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.48);
  --shadow-glow: 0 12px 40px rgba(255, 205, 0, 0.18);

  /* Motion */
  --dur-1: 120ms; --dur-2: 200ms; --dur-3: 320ms; --dur-4: 520ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --content: 1200px;
  --wide: 1360px;
  --gutter: 24px;
  --header-h: 68px;

  color-scheme: dark;
}

/* Fixed dark skin for form controls / OS chrome */
::selection { background: var(--gold); color: var(--on-gold); }
:root { accent-color: var(--gold); }

/* ---------------------------------------------------------------------------
   2. RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--border); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------------------------------------------------------------------------
   3. TYPOGRAPHY
   Momo Trust Display ships a single 400 weight — hierarchy is size + colour.
   CJK rule: display leading never below 1.3 for CJK; Latin stays tight.
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.12; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem); line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem); line-height: 1.1; }
h3, .h3 { font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.65rem); line-height: 1.2; }
h4, .h4 { font-size: 1.15rem; line-height: 1.3; }
/* Momo has no italic — emphasis is colour + a quiet underline, never a fake slant */
h1 em, h2 em, h3 em { font-style: normal; color: var(--gold); }
p { max-width: 68ch; }
.lede { font-size: clamp(1.05rem, 1rem + 0.5vw, 1.35rem); line-height: 1.55; color: #d4d8e4; max-width: 58ch; }
small { font-size: 0.8125rem; }

/* Mono eyebrow — ALL CAPS always carries positive tracking */
.eyebrow,
.kicker {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.kicker--muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.text-accent { color: var(--gold); }

/* The amp light — the brand's single decorative motif */
.amp {
  display: block;
  height: 4px;
  border-radius: var(--r-pill);
  background-image: var(--spectrum);
  background-size: 200% 100%;
  width: 100%;
}
.amp--live { animation: amp-slide 8s linear infinite; }
.amp--short { width: 56px; }
@keyframes amp-slide { to { background-position: 200% 0; } }

/* Gradient text — used once per page at most, on the hero word only */
.grad-text {
  background: linear-gradient(100deg, var(--sp-coral), var(--sp-gold) 55%, var(--sp-lime));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------------------------------------------------------------------
   4. LAYOUT
   -------------------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--content); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--wide { max-width: var(--wide); }
.section { padding-block: clamp(64px, 9vw, 128px); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.section--ink { background: var(--ink); }
.section--deep { background: var(--bg-deep); }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head .eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.section-head p { margin-top: 18px; color: var(--muted); font-size: 1.0625rem; }

.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }

.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.stack--sm { gap: var(--s-2); }
.stack--lg { gap: var(--s-6); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.center { text-align: center; }
.center p { margin-inline: auto; }

@media (max-width: 960px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
   5. HEADER — transparent over heroes, frosted glass on scroll
   -------------------------------------------------------------------------- */
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  transform: translateY(-140%);
  background: var(--gold); color: var(--on-gold);
  font: 500 0.8125rem/1 var(--font-mono);
  padding: 10px 14px; border-radius: var(--r-sm);
  transition: transform var(--dur-2) var(--ease);
}
.skip-link:focus { transform: none; }

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--dur-3) var(--ease), border-color var(--dur-3) var(--ease), backdrop-filter var(--dur-3) var(--ease);
}
.site-header[data-over="hero"] { color: var(--fg); }
.site-header.is-scrolled {
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border-bottom-color: var(--border);
}
.site-header[data-solid] { background: var(--glass-solid); border-bottom-color: var(--border); }

.nav { display: flex; align-items: center; gap: var(--s-5); width: 100%; }
.nav__brand { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.nav__brand img { height: 30px; width: auto; }
.nav__brand .nav__word { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: -0.01em; }
.nav__links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav__link {
  position: relative;
  padding: 9px 13px; border-radius: var(--r-pill);
  font-size: 0.9375rem; color: var(--muted);
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.nav__link:hover { color: var(--fg); background: var(--ghost); }
.nav__link[aria-current="page"] { color: var(--fg); }
.nav__link[aria-current="page"]::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 2px;
  height: 2px; border-radius: 2px; background: var(--gold);
}
.nav__cta { margin-left: var(--s-3); }
.nav__toggle { display: none; }

@media (max-width: 900px) {
  .nav__links {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: var(--s-4) var(--gutter) var(--s-5);
    background: var(--glass-solid);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform var(--dur-2) var(--ease), opacity var(--dur-2) var(--ease);
  }
  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__link { padding: 13px; font-size: 1rem; }
  .nav__link[aria-current="page"]::after { display: none; }
  .nav__cta { margin: 10px 0 0; }
  .nav__toggle {
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: auto; width: 44px; height: 44px; border-radius: var(--r-sm);
    border: 1px solid var(--border); color: var(--fg);
  }
  .nav__toggle:hover { background: var(--ghost); }
  .nav__toggle span { position: relative; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
  .nav__toggle span::before, .nav__toggle span::after {
    content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
    transition: transform var(--dur-2) var(--ease), top var(--dur-2) var(--ease);
  }
  .nav__toggle span::before { top: -6px; } .nav__toggle span::after { top: 6px; }
  .nav__toggle[aria-expanded="true"] span { background: transparent; }
  .nav__toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }
}

/* ---------------------------------------------------------------------------
   5b. PAGE HERO — inner pages. Nav sits transparent over the gradient band,
   the same as the homepage over its visualizer.
   -------------------------------------------------------------------------- */
.page-hero {
  position: relative; overflow: hidden;
  padding-top: calc(var(--header-h) + clamp(56px, 8vw, 104px));
  padding-bottom: clamp(48px, 6vw, 88px);
  background:
    radial-gradient(90% 120% at 12% 0%, rgba(255, 205, 0, 0.14), transparent 55%),
    radial-gradient(80% 130% at 90% 10%, rgba(82, 22, 179, 0.28), transparent 60%),
    linear-gradient(180deg, var(--bg-deep), var(--bg));
  border-bottom: 1px solid var(--border);
}
.page-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background-image: var(--spectrum); opacity: 0.85; }
.page-hero .eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.page-hero h1 { max-width: 20ch; }
.page-hero .lede { margin-top: 20px; }

/* ---------------------------------------------------------------------------
   6. FOOTER
   -------------------------------------------------------------------------- */
.site-footer { background: var(--ink); border-top: 1px solid var(--border); padding-block: clamp(48px, 6vw, 80px) 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--s-6); }
.footer-grid h4, .footer-grid .footer-h { font: 500 0.75rem/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-3); }
.footer-grid a { display: block; padding: 6px 0; color: #c9cdda; font-size: 0.9375rem; }
.footer-grid a:hover { color: var(--gold); }
.footer-brand img { height: 34px; margin-bottom: var(--s-3); }
.footer-brand p { color: var(--muted); font-size: 0.9375rem; max-width: 34ch; }
.footer-bottom {
  margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap;
  color: var(--faint); font: 400 0.8125rem var(--font-mono);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------------
   7. UTILITIES
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.divider { height: 1px; background: var(--border); border: 0; }
.pad-y { padding-block: var(--s-6); }
.mt-2 { margin-top: var(--s-4); } .mt-3 { margin-top: var(--s-5); } .mt-4 { margin-top: var(--s-6); }
.rounded { border-radius: var(--r-md); }
/* Only hidden when JavaScript is running to reveal it again (html.js is set in the head). */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-4) var(--ease-out), transform var(--dur-4) var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------------------
   8. SITE ADDITIONS (synamp.app)
   -------------------------------------------------------------------------- */
/* Logo: the mark and the wordmark are separate files, so either can change on its own. */
.nav__brand { gap: 8px; }
/* The logomark: tilted, with a thin light edge; it straightens up on hover and keyboard focus. */
.nav__brand .nav__mark, .footer-brand__logo .footer-brand__mark {
  width: auto; transform: rotate(-9deg);
  filter: drop-shadow(-1px 0px 0px rgba(255, 255, 255, 0.55));
  transition: transform var(--dur-3) var(--ease-out);
}
.nav__brand .nav__mark { height: 43px; } /* 1.2 × 36px */
.nav__brand:hover .nav__mark, .nav__brand:focus-visible .nav__mark,
.footer-brand__logo:hover .footer-brand__mark, .footer-brand__logo:focus-visible .footer-brand__mark { transform: rotate(0deg); }
.nav__brand .nav__wordmark { height: 26px; width: auto; }
.footer-brand__logo { display: inline-flex; align-items: center; gap: 10px; margin-bottom: var(--s-3); }
.footer-brand__logo img { margin: 0; }
.footer-brand__logo img:first-child { height: 48px; } /* 1.2 × 40px */
.footer-brand__logo img:last-child { height: 30px; }
.footer-grid .footer-brand__logo { display: inline-flex; padding: 0; }

/* Spam trap: a field people never see, so only bots fill it in. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Roadmap: done / being built / not started */
.phase__count { font: 500 0.75rem var(--font-mono); letter-spacing: 0.06em; color: var(--muted); margin: -8px 0 var(--s-3); }
.timeline .phase__list li[data-kind="done"], .timeline .phase__list li[data-kind="doing"] { color: #d4d8e4; }
.timeline .phase__list li[data-kind="done"]::before { content: "✓"; background: none; color: var(--success); opacity: 1; width: auto; height: auto; top: 0; left: 2px; font-weight: 700; border-radius: 0; }
.timeline .phase__list li[data-kind="doing"]::before { background: var(--gold); opacity: 1; box-shadow: 0 0 0 3px rgba(255, 205, 0, 0.22); }
.timeline .phase__list li[data-kind="todo"]::before { background: none; border: 1.5px solid var(--muted); opacity: 0.8; }
.shipped { list-style: none; padding: 0; display: grid; gap: 2px; }
.shipped li { display: grid; grid-template-columns: 5.5em 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.shipped time { font: 500 0.8125rem var(--font-mono); color: var(--gold); padding-top: 2px; }
.metric__of { font-size: 0.5em; color: var(--muted); }
.metric__note { font-size: 0.8125rem; }
.metric__value--sm { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); }
