/* Meridian — camo landing. Palette: warm stone light theme, forest accent. */

:root {
  --bg: #faf9f5;
  --surface: #ffffff;
  --text: #191919;
  --muted: #5f5b54;
  --border: #e5e4df;
  --accent: #165f49;
  --accent-strong: #0f4a38;
  --dark: #141413;
  --dark-text: #faf9f5;
  --dark-muted: #95959f;
  --radius: 6px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 245, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 150ms ease;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; gap: 32px; height: 64px; }

.logo {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: 18px;
  color: var(--text); text-decoration: none; letter-spacing: 0.01em;
}
.logo svg { color: var(--accent); }

.main-nav { display: flex; gap: 26px; margin-left: 8px; }
.main-nav a {
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500;
  border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: color 150ms ease, border-color 150ms ease;
}
.main-nav a:hover { color: var(--text); border-bottom-color: var(--text); }

.header-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.nav-toggle {
  display: none; margin-left: auto; background: none; border: 0;
  width: 36px; height: 36px; cursor: pointer; position: relative;
}
.nav-toggle span {
  display: block; width: 20px; height: 1.6px; background: var(--text);
  margin: 5px auto; transition: transform 180ms ease;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; font-weight: 500; font-size: 14px;
  padding: 8px 18px; text-decoration: none; cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease, transform 100ms ease;
}
.btn:active { transform: scale(0.98); }
.btn-lg { padding: 12px 26px; font-size: 15px; }
.btn-primary { background: #262625; color: #fff; border: 1px solid #262625; }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { color: var(--accent); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--text); }

/* ---------- shared ---------- */
.eyebrow {
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #2f9e6e; display: inline-block;
  box-shadow: 0 0 0 3px rgba(47, 158, 110, 0.18);
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; }
h1 { font-size: clamp(38px, 5vw, 58px); letter-spacing: -0.015em; }
h1 em { font-style: italic; color: var(--accent); }
h2 { font-size: clamp(28px, 3.4vw, 38px); letter-spacing: -0.01em; }
h3 { font-size: 20px; margin-bottom: 10px; }
.section-head { max-width: 560px; margin-bottom: 52px; }
.section-sub { color: var(--muted); margin-top: 14px; }

/* ---------- hero ---------- */
.hero { padding: 96px 0 80px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 56px; align-items: center;
}
.lede { font-size: 17px; color: var(--muted); margin: 22px 0 30px; max-width: 46ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* ---------- terminal ---------- */
.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(25, 25, 25, 0.08);
}
.terminal-dark {
  background: var(--dark); border-color: #2a2a28; color: var(--dark-text);
  box-shadow: 0 18px 44px rgba(20, 20, 19, 0.28);
}
.terminal-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 11px 14px; border-bottom: 1px solid var(--border);
}
.terminal-dark .terminal-bar { border-bottom-color: #2a2a28; }
.t-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.terminal-dark .t-dot { background: #3a3a37; }
.terminal-title {
  margin-left: 10px; font-family: var(--font-mono);
  font-size: 11.5px; color: var(--muted);
}
.terminal-dark .terminal-title { color: var(--dark-muted); }
.terminal-body {
  font-family: var(--font-mono); font-size: 12.8px; line-height: 1.75;
  padding: 18px 20px; overflow-x: auto; white-space: pre; min-height: 240px;
}
.terminal-out {
  font-family: var(--font-mono); font-size: 12.5px;
  border-top: 1px solid #2a2a28; padding: 14px 20px;
  color: #8fd6b4; min-height: 46px; display: none;
}
.terminal-out.visible { display: block; }

/* token colors */
.tk-kw { color: #c678dd; } .tk-fn { color: #61afef; } .tk-str { color: #98c379; }
.tk-num { color: #d19a66; } .tk-cm { color: #7a7f8a; font-style: italic; }
.tk-pl { color: #e5e5e2; }
.terminal:not(.terminal-dark) .tk-kw { color: #8a4fb3; }
.terminal:not(.terminal-dark) .tk-fn { color: #2c6fbb; }
.terminal:not(.terminal-dark) .tk-str { color: #4a7c2f; }
.terminal:not(.terminal-dark) .tk-pl { color: #333; }
.terminal:not(.terminal-dark) .tk-num { color: #a8651e; }

/* ---------- trust ---------- */
.trust { padding: 26px 0 70px; }
.trust-label { font-size: 12.5px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px; }
.trust-row {
  display: flex; flex-wrap: wrap; gap: 14px 44px;
  font-family: var(--font-display); font-size: 17px; color: #9b978d;
  align-items: baseline;
}

/* ---------- pillars ---------- */
.pillars { padding: 72px 0; border-top: 1px solid var(--border); }
.pillar-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.pillar {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 24px 22px;
  display: flex; flex-direction: column; min-height: 220px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.pillar:hover { border-color: #d4d2ca; box-shadow: 0 10px 30px rgba(25,25,25,0.06); }
.pillar p { color: var(--muted); font-size: 14px; flex: 1; }
.pillar-tag {
  margin-top: 18px; align-self: flex-start;
  font-family: var(--font-mono); font-size: 11px; color: var(--accent);
  border: 1px solid rgba(22, 95, 73, 0.35); border-radius: 999px; padding: 3px 10px;
}

/* ---------- demo ---------- */
.demo { padding: 84px 0; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.demo-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 60px; align-items: center; }
.demo-copy p { color: var(--muted); margin-top: 16px; max-width: 44ch; }
.check-list { list-style: none; margin-top: 24px; }
.check-list li {
  position: relative; padding-left: 26px; margin-bottom: 12px;
  font-size: 14.5px; font-weight: 500;
}
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 13px; height: 7px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------- api ---------- */
.api { padding: 84px 0; }
.api-table {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
}
.api-row {
  display: grid; grid-template-columns: 110px 1.1fr 1.4fr; gap: 16px;
  padding: 15px 22px; border-top: 1px solid var(--border);
  font-size: 14px; align-items: center;
}
.api-row:first-child { border-top: 0; }
.api-row-head {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); background: #f3f2ed;
}
.api-row code { font-family: var(--font-mono); font-size: 12.8px; }
.method { font-weight: 600; padding: 2.5px 9px; border-radius: 4px; }
.method.post { color: #0f4a38; background: rgba(22, 95, 73, 0.12); }
.method.get { color: #1d4f8f; background: rgba(29, 79, 143, 0.1); }
.method.ws { color: #7a4a12; background: rgba(160, 105, 20, 0.12); }
.api-row span:last-child { color: var(--muted); }
.api-cta { margin-top: 30px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.api-note { font-size: 13.5px; color: var(--muted); }

/* ---------- company ---------- */
.company { padding: 84px 0 96px; border-top: 1px solid var(--border); }
.company-grid { display: grid; grid-template-columns: 0.4fr 0.6fr; gap: 48px; }
.company-body p { color: var(--muted); margin-top: 16px; max-width: 52ch; }
.company-meta { display: flex; gap: 56px; margin-top: 40px; flex-wrap: wrap; }
.meta-num { display: block; font-family: var(--font-display); font-size: 30px; color: var(--text); }
.meta-label { font-size: 12.5px; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.footer-left { display: flex; align-items: center; gap: 18px; }
.footer-logo { font-size: 15px; }
.footer-copy { font-size: 13px; color: var(--muted); }
.footer-status { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.footer-nav { margin-left: auto; display: flex; gap: 22px; }
.footer-nav a { font-size: 13.5px; color: var(--muted); text-decoration: none; transition: color 150ms ease; }
.footer-nav a:hover { color: var(--text); }

/* ---------- reveal motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 500ms ease, transform 500ms ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .demo-grid { grid-template-columns: 1fr; gap: 40px; }
  .pillar-grid { grid-template-columns: 1fr 1fr; }
  .company-grid { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 640px) {
  .main-nav, .header-actions { display: none; }
  .nav-toggle { display: block; }
  .site-header.nav-open .main-nav {
    display: flex; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg);
    border-bottom: 1px solid var(--border); padding: 8px 24px 16px;
  }
  .site-header.nav-open .main-nav a { padding: 10px 0; }
  .pillar-grid { grid-template-columns: 1fr; }
  .api-row { grid-template-columns: 74px 1fr; }
  .api-row span:last-child { grid-column: 2; }
  .hero { padding: 64px 0 56px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}
