/* Metanarium website — tokens follow the app's own palette (frontend/src/style.css). */
:root {
  --bg: #f7f8f4;
  --bg-alt: #f0f3ed;
  --surface: #ffffff;
  --text: #263d35;
  --muted: #66746b;
  --line: #e0e6dd;
  --accent: #347559;
  --accent-ink: #ffffff;
  --tint: #ecf2e9;
  --eyebrow: #537844;
  --code-bg: #1d2b23;
  --code-text: #e1e9df;
  --code-key: #99c9a6;
  --code-str: #e3c27d;
  --shadow: 0 24px 60px -28px rgba(35, 62, 41, 0.35), 0 2px 8px rgba(35, 62, 41, 0.06);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141e19;
    --bg-alt: #18261e;
    --surface: #1d2b23;
    --text: #e1e9df;
    --muted: #a1afa3;
    --line: #34453a;
    --accent: #99c9a6;
    --accent-ink: #12201a;
    --tint: #2c3f31;
    --eyebrow: #99c9a6;
    --code-bg: #0f1713;
    --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141e19;
  --bg-alt: #18261e;
  --surface: #1d2b23;
  --text: #e1e9df;
  --muted: #a1afa3;
  --line: #34453a;
  --accent: #99c9a6;
  --accent-ink: #12201a;
  --tint: #2c3f31;
  --eyebrow: #99c9a6;
  --code-bg: #0f1713;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* Screenshots follow the active theme */
.shot-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot-light { display: none; }
  :root:not([data-theme="light"]) .shot-dark { display: block; }
}
:root[data-theme="dark"] .shot-light { display: none; }
:root[data-theme="dark"] .shot-dark { display: block; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--tint); padding: 0.1em 0.35em; border-radius: 5px; }
abbr { text-decoration: none; border-bottom: 1px dotted var(--muted); }
:focus-visible { outline: 3px solid #88aa64; outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip-link:focus { left: 16px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--serif); font-weight: bold; font-size: 24px; letter-spacing: -1px;
  color: var(--text); text-decoration: none;
}
.brand-mark {
  display: inline-grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 10px 10px 10px 2px;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--serif); font-size: 28px; font-style: italic; font-weight: bold; line-height: 1;
  padding-bottom: 3px;
}
.site-nav { display: flex; gap: 26px; margin-left: auto; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.site-nav a:hover { color: var(--text); }
.theme-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 9px; padding: 7px 13px; font: 500 14px var(--sans); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); }

/* Shared */
.eyebrow {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  color: var(--eyebrow); font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  margin-bottom: 18px;
}
.pill {
  letter-spacing: 0.06em; background: var(--tint); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 3px 11px; border-radius: 999px; font-size: 12px;
}
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 10px;
  font-weight: 600; font-size: 16px; text-decoration: none; transition: transform 0.15s ease, background 0.15s ease;
}
.button-primary { background: var(--accent); color: var(--accent-ink); }
.button-primary:hover { transform: translateY(-1px); }
.button-quiet { color: var(--accent); padding-inline: 8px; }
.button-quiet:hover { text-decoration: underline; }

.section { padding: 112px 0; }
.section-head { max-width: 720px; margin-bottom: 52px; }
.section h2 { font-size: clamp(32px, 4.4vw, 48px); margin-bottom: 20px; }
.section-lede { font-size: 19px; color: var(--muted); }

/* Hero */
.hero { padding: 92px 0 0; overflow: hidden; }
.hero-copy { max-width: 860px; text-align: center; }
.hero .eyebrow { justify-content: center; }
.hero h1 { font-size: clamp(46px, 8vw, 92px); margin-bottom: 26px; letter-spacing: -0.025em; }
.hero h1 em { color: var(--accent); }
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 680px; margin: 0 auto 34px; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 64px; }

/* Screenshot frames */
.frame {
  margin: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
}
.frame-hero { border-radius: 16px 16px 0 0; border-bottom: 0; }
.frame-bar {
  display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px;
  background: var(--bg-alt); border-bottom: 1px solid var(--line);
}
.frame-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.frame-bar em {
  margin: 0 auto; font-style: normal; font-size: 12px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 2px 40px;
}

/* Motto band */
.motto { background: var(--accent); color: var(--accent-ink); }
.motto-inner { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 12px 40px; padding: 30px 0; }
.motto p { margin: 0; font-family: var(--serif); font-size: clamp(20px, 2.6vw, 28px); font-style: italic; }
.motto strong { font-weight: 400; }

/* Cards */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 30px;
}
.card-icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 11px;
  background: var(--tint); color: var(--accent); font-size: 21px; margin-bottom: 20px;
}
.card h3 { font-size: 24px; margin-bottom: 12px; }
.card p { color: var(--muted); margin: 0; }

/* Feature rows */
.feature { padding: 72px 0; }
.feature:nth-of-type(even) { background: var(--bg-alt); }
.feature-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
.feature-flip .feature-grid { grid-template-columns: 7fr 5fr; }
.feature-flip .feature-copy { order: 2; }
.feature-copy p { color: var(--muted); font-size: 18px; }
.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 11px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 2px;
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px;
  background: var(--tint); color: var(--accent); font-size: 12px; font-weight: 700;
}
.feature-grid-phone { grid-template-columns: 7fr 5fr; }
.phone {
  margin: 0 auto; width: min(320px, 80%);
  border: 10px solid #22332a; border-radius: 42px; overflow: hidden;
  box-shadow: var(--shadow); background: #22332a;
}
.phone img { border-radius: 30px; }

/* AI */
.ai { background: var(--bg-alt); }
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.ai p { color: var(--muted); font-size: 18px; }
.code-card {
  margin: 0; background: var(--code-bg); color: var(--code-text);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
}
.code-card figcaption {
  padding: 12px 18px; font: 500 13px var(--mono); color: #a1afa3; border-bottom: 1px solid #2c3f31;
}
.code-card pre { margin: 0; padding: 22px; overflow-x: auto; font: 14px/1.7 var(--mono); }
.code-card code { background: none; padding: 0; font-size: inherit; }
.code-card .k { color: var(--code-key); }
.code-card .s { color: var(--code-str); }

/* Trust grid */
.grid-6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.mini { background: var(--surface); padding: 30px; }
.mini h3 { font-size: 21px; margin-bottom: 10px; }
.mini p { color: var(--muted); margin: 0; font-size: 16px; }

/* Self-hosted */
.self-hosted { background: var(--bg-alt); }
.self-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: center; }
.self-hosted p { color: var(--muted); font-size: 18px; }
.specs { margin: 0; display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 18px 24px; border-top: 1px solid var(--line); }
.specs div:first-child { border-top: 0; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; text-align: right; }

/* Coming soon */
.soon { padding: 120px 0; text-align: center; }
.soon-inner { max-width: 620px; }
.brand-mark-lg { width: 64px; height: 64px; font-size: 56px; border-radius: 18px 18px 18px 4px; margin-bottom: 28px; padding-bottom: 6px; }
.soon h2 { font-size: clamp(40px, 6vw, 64px); margin-bottom: 18px; }
.soon p { color: var(--muted); font-size: 19px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand-small { font-size: 19px; }
.brand-small .brand-mark { width: 26px; height: 26px; font-size: 22px; border-radius: 8px 8px 8px 2px; }

/* Responsive */
@media (max-width: 960px) {
  .site-nav { display: none; }
  .theme-toggle { margin-left: auto; }
  .section { padding: 80px 0; }
  .feature { padding: 60px 0; }
  .feature-grid, .feature-grid-phone, .feature-flip .feature-grid, .ai-grid, .self-grid { grid-template-columns: 1fr; gap: 36px; }
  .feature-flip .feature-copy { order: 0; }
  .trio, .grid-6 { grid-template-columns: 1fr; }
  .hero { padding-top: 64px; }
  .hero-actions { margin-bottom: 44px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .frame-bar em { padding: 2px 14px; }
  .motto-inner { flex-direction: column; align-items: center; text-align: center; }
  .card, .mini { padding: 24px; }
  .specs div { padding: 16px 18px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
