/* Nomi landing page
   Tokens kept in :root so dark/light parity stays trivial.
   Fonts: system stacks only — no FOUC, no third-party request.
*/

:root {
  --bg: #0b0d10;
  --bg-elev: #12161b;
  --bg-card: #161b21;
  --fg: #e6e9ef;
  --fg-muted: #8a93a3;
  --fg-dim: #5a6473;
  --accent: #7aa2f7;
  --accent-soft: rgba(122, 162, 247, 0.15);
  --accent-2: #9ece6a;
  --border: #1f2530;
  --border-strong: #2a3140;
  --code-bg: #0f1318;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 24px rgba(0, 0, 0, 0.4);
  --radius: 10px;
  --radius-sm: 6px;
  --max: 1100px;
  --gap: 24px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafbfc;
    --bg-elev: #ffffff;
    --bg-card: #ffffff;
    --fg: #1a1f29;
    --fg-muted: #5b6373;
    --fg-dim: #8b94a3;
    --accent: #3b6dd6;
    --accent-soft: rgba(59, 109, 214, 0.1);
    --accent-2: #2c8035;
    --border: #e6e9ef;
    --border-strong: #d1d6df;
    --code-bg: #f1f3f6;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  overflow-x: auto;
  margin: 12px 0;
}

pre code { background: transparent; padding: 0; }

code:not(pre code) {
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(11, 13, 16, 0.7);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
@media (prefers-color-scheme: light) {
  .nav { background: rgba(250, 251, 252, 0.75); }
}

.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: -0.01em;
  font-size: 17px; color: var(--fg);
}
.brand:hover { text-decoration: none; }

.brand-mark {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700;
}

.mark {
  display: inline-block;
  border-radius: 5px;
  vertical-align: text-bottom;
  /* Tauri icon is 512x512 with built-in transparent corners; sized to
     match the brand text x-height. */
}

.nav nav {
  display: flex; gap: 26px; font-size: 14px;
}
.nav nav a { color: var(--fg-muted); }
.nav nav a:hover { color: var(--fg); text-decoration: none; }

@media (max-width: 700px) {
  .nav nav a:not(:last-child) { display: none; }
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}
section:last-of-type { border-bottom: 0; }

h1, h2, h3, h4 {
  letter-spacing: -0.02em;
  margin: 0 0 16px 0;
  line-height: 1.15;
}

h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 800; }
h2 { font-size: clamp(28px, 3.5vw, 40px); font-weight: 700; margin-bottom: 12px; }
h3 { font-size: 18px; font-weight: 600; }

.section-lede {
  color: var(--fg-muted);
  font-size: 17px;
  max-width: 640px;
  margin-bottom: 40px;
}

/* hero */
.hero {
  text-align: center;
  padding: 90px 0 56px;
  border-bottom: 0;
}
.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.04em;
  color: var(--fg-muted);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 14px;
}

.category {
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 18px 0;
}

/* audit log strip — earns the "audit" claim visibly. */
.audit-strip {
  margin: 48px auto 0;
  max-width: 720px;
  text-align: left;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.audit-strip-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  padding: 8px 14px;
}
.audit-strip pre {
  margin: 0; border: 0; border-radius: 0;
  font-size: 12.5px;
  background: transparent;
  padding: 12px 14px;
}
.audit-strip .ev-ok { color: var(--accent-2); }
.audit-strip .ev-warn { color: #e0af68; }

/* mid-page soft CTA after diff-grid. Re-engagement for skimmers. */
.cta-soft {
  margin-top: 48px;
  text-align: center;
  padding: 28px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.cta-soft p {
  margin: 0 0 14px 0;
  color: var(--fg-muted);
  font-size: 14px;
}
.cta-soft button.copy { font-size: 13px; }

/* first-five — onboarding bridge under the install grid */
.first-five {
  margin-top: 56px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.first-five h3 {
  margin: 0 0 8px 0;
  font-size: 22px;
}
.terminal-block {
  background: var(--bg-card, #0e1117);
  color: var(--fg-mono, #d4d4d8);
  border: 1px solid var(--border-strong, #30363d);
  border-radius: var(--radius, 12px);
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
  margin: 18px 0;
}
.terminal-block code {
  color: inherit;
  background: none;
  padding: 0;
}
.next-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 12px 0 0 0;
}
.next-link {
  color: var(--accent);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px dashed var(--accent);
  padding-bottom: 1px;
}
.next-link:hover { border-bottom-style: solid; }

/* compared-to section — narrative take on alternatives */
.compared {
  padding: 64px 24px;
  max-width: 1080px;
  margin: 0 auto;
}
.compared h2 { margin: 0 0 12px 0; }
.compare-list {
  margin: 32px 0 16px 0;
  display: grid;
  gap: 18px;
}
.compare-list dt {
  font-weight: 600;
  font-size: 15px;
  color: var(--fg);
}
.compare-list dd {
  margin: 6px 0 0 0;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.55;
}
.compared .muted { font-size: 14px; }

/* diff-card primary tier — visually weighted vs supporting cards */
.diff-card.primary {
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--bg-card) 60%);
  border-color: var(--border-strong);
}
.diff-card.primary h3 { color: var(--fg); }
.diff-card.primary strong { color: var(--accent); }

/* built-on lead-card weighting */
.lib-lead {
  position: relative;
}
.lib-lead h3 { font-size: 22px; }
.lib-lead p { font-size: 15px; }
.lib-tag {
  position: absolute; top: 18px; right: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 3px 9px;
  letter-spacing: 0.04em;
}
.hero h1 .accent { color: var(--accent); }
.lede {
  max-width: 680px;
  margin: 18px auto 32px;
  color: var(--fg-muted);
  font-size: 19px;
  line-height: 1.55;
}
.cta-row {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 24px;
}

button.copy {
  display: inline-flex; align-items: center; gap: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  color: var(--fg);
  padding: 12px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 14px;
  transition: border-color 0.15s, background 0.15s;
}
button.copy:hover { border-color: var(--accent); }
button.copy.copied { border-color: var(--accent-2); }
button.copy code { background: transparent; border: 0; padding: 0; }
.copy-icon { color: var(--fg-muted); font-size: 16px; }

.btn-secondary {
  display: inline-flex; align-items: center;
  padding: 12px 18px;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--fg);
  font-weight: 500;
  font-size: 14px;
  transition: border-color 0.15s;
}
.btn-secondary:hover { border-color: var(--accent); text-decoration: none; }

.badges {
  display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
  font-size: 13px; color: var(--fg-dim);
  margin-top: 8px;
}

/* hero screenshot */
.screenshot {
  text-align: center;
  border-bottom: 1px solid var(--border);
  padding: 0 0 80px;
}
.screenshot img,
.screenshot video.hero-video {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: block;
  margin: 0 auto;
}
.hero-video-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}
.video-toggle {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 120ms ease, transform 120ms ease;
}
.video-toggle:hover { background: rgba(0, 0, 0, 0.75); }
.video-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.video-toggle[aria-pressed="false"] .video-toggle-icon::before { content: "▶"; }
.video-toggle[aria-pressed="true"] .video-toggle-icon::before { content: "❚❚"; }
.video-toggle .video-toggle-icon { display: inline-block; }
.video-toggle .video-toggle-icon::before { display: inline-block; }
/* Hide the literal text; the ::before pseudo-element supplies the glyph
   so we can swap on aria-pressed without rewriting innerText. */
.video-toggle-icon { font-size: 0; }
.video-toggle-icon::before { font-size: 13px; }
.caption {
  color: var(--fg-muted);
  font-size: 14px;
  margin-top: 14px;
  font-style: italic;
}
.video-cues {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.video-cues span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--bg-elev);
}
.video-fallback {
  margin-top: 10px;
  font-size: 13px;
}

/* problem */
.problem h2 { max-width: 720px; }
.problem p { color: var(--fg-muted); max-width: 720px; font-size: 17px; }
.problem strong { color: var(--fg); }

/* how it works */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
}
.step .num {
  position: absolute; top: 18px; right: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 3px 9px;
}
.step h3 { margin-top: 0; }
.step p { color: var(--fg-muted); font-size: 15px; }
.step img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-top: 16px;
}

/* diff grid */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-top: 30px;
}
@media (max-width: 900px) { .diff-grid { grid-template-columns: 1fr; } }
.diff-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.diff-card h3 { color: var(--accent); }
.diff-card p { color: var(--fg-muted); font-size: 15px; margin: 0; }

/* screenshot grid */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 900px) { .screenshot-grid { grid-template-columns: 1fr; } }
.screenshot-grid figure {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.screenshot-grid img {
  width: 100%; height: auto;
  display: block;
  border-bottom: 1px solid var(--border);
}
.screenshot-grid figcaption {
  padding: 12px 16px;
  color: var(--fg-muted);
  font-size: 13px;
}

/* install */
.install-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-top: 30px;
}
@media (max-width: 900px) { .install-grid { grid-template-columns: 1fr; } }
.install-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.install-card h3 { color: var(--accent); }
.install-card p { color: var(--fg-muted); font-size: 15px; }
.install-card pre { font-size: 13px; }
.install-card .alt { font-size: 13px; color: var(--fg-dim); margin-top: 8px; }

/* built on */
.lib-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  margin-top: 30px;
}
@media (max-width: 700px) { .lib-grid { grid-template-columns: 1fr; } }
.lib {
  display: block;
  padding: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  transition: border-color 0.15s;
}
.lib:hover { border-color: var(--accent); text-decoration: none; }
.lib h3 { color: var(--accent); margin: 0 0 6px 0; }
.lib p { color: var(--fg-muted); font-size: 14px; margin: 0; }

/* final cta */
.cta-final {
  text-align: center;
  padding: 96px 0;
  border-bottom: 0;
}
.cta-final h2 { max-width: 720px; margin: 0 auto 14px; }
.cta-final p {
  color: var(--fg-muted);
  max-width: 600px;
  margin: 0 auto 28px;
  font-size: 17px;
}

/* footer */
footer {
  border-top: 1px solid var(--border);
  padding: 56px 28px 28px;
  background: var(--bg-elev);
}
.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
footer h4 {
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-dim);
  margin: 0 0 12px;
}
footer a {
  display: block;
  color: var(--fg-muted);
  font-size: 14px;
  padding: 4px 0;
}
footer a:hover { color: var(--fg); text-decoration: none; }
.muted { color: var(--fg-muted); }
.small { font-size: 12px; max-width: var(--max); margin: 20px auto 0; }
