/* ── Variables ────────────────────────────────────────── */

:root {
  /* Main palette */
  --bg: #ffffff;
  --bg-dark: #080808;
  --text: #111111;
  --text-inv: #f0f0f0;
  --muted: #6b7280;
  --muted-inv: rgba(255, 255, 255, 0.45);
  --line: rgba(0, 0, 0, 0.07);
  --line-inv: rgba(255, 255, 255, 0.1);
  --accent: #e85d04;
  --accent-light: #fb8500;

  /* Doc pages compat */
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --accent-dark: #b84500;
  --accent-soft: #fde8d0;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);

  /* Syntax token colors */
  --tok-kw: #c94c00;
  --tok-type: #2d6fa8;
  --tok-fn: #4a7a9e;
  --tok-str: #3a7a4a;
  --tok-comment: #8a8080;
  --tok-param: #5a5050;
  --tok-punct: #5a5050;
}

/* ── Reset ────────────────────────────────────────────── */

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

/* ── Floating pill nav ────────────────────────────────── */

.topbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(95%, 1100px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 14px 10px 24px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.topnav {
  display: flex;
  gap: 2px;
  color: var(--muted);
  font-size: 0.9rem;
}

.topnav a {
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 140ms ease, color 140ms ease;
}

.topnav a:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

/* ── Container ────────────────────────────────────────── */

.container {
  width: min(1140px, calc(100% - 48px));
  margin: 0 auto;
}

/* ── Buttons ──────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 600;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
  cursor: pointer;
  border: none;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(to bottom, #1c1c1c, #000000);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.button-primary:hover {
  color: #ffffff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
}

.button-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 12px 24px;
}

.button-ghost:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
}

.button-nav {
  background: linear-gradient(to bottom, #1c1c1c, #000000);
  color: #ffffff;
  padding: 8px 18px;
  font-size: 0.86rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.button-nav:hover {
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

/* ── Eyebrow ──────────────────────────────────────────── */

.eyebrow {
  margin: 0 0 20px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
}

.eyebrow-inv {
  color: var(--accent-light);
}

.heading-inv {
  color: var(--text-inv);
}

/* ── Hero section ─────────────────────────────────────── */

.hero-section {
  background: var(--bg);
  border-radius: 0 0 5rem 5rem;
  padding: max(140px, 22vh) 0 100px;
  text-align: center;
  position: relative;
  z-index: 3;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-brand {
  margin: 0;
  font-size: clamp(5.5rem, 16vw, 13rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #c73e00 0%, #e85d04 28%, #fb8500 58%, #ffd166 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lede {
  max-width: 36rem;
  margin: 28px 0 0;
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 36px 0 20px;
}

.release-meta {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.checksum {
  margin: 0;
  color: rgba(0, 0, 0, 0.28);
  font-size: 0.76rem;
}

.checksum code {
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  word-break: break-all;
}

/* ── Tagline section ──────────────────────────────────── */

.tagline-section {
  background: var(--bg-dark);
  border-radius: 0 0 5rem 5rem;
  padding: 100px 0 90px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.tagline {
  margin: 0 0 52px;
  font-size: clamp(2.8rem, 7vw, 6.5rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.04em;
  color: var(--text-inv);
}

.tagline-muted {
  color: rgba(255, 255, 255, 0.3);
  font-weight: 400;
}

.tagline-gradient {
  background: linear-gradient(to right, #e85d04, #fb8500, #ffd166);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Capability strip ─────────────────────────────────── */

.capability-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 0;
  margin: 0 0 72px;
  list-style: none;
}

.capability-strip li {
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.86rem;
  font-weight: 500;
}

/* ── Preview window (dark section) ───────────────────── */

.preview-window {
  border-radius: 16px;
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

.window-chrome {
  display: flex;
  gap: 8px;
  padding: 14px 16px 10px;
  background: #1a1a1a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.window-chrome span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
}

.window-chrome span:first-child  { background: #ff5f57; }
.window-chrome span:nth-child(2) { background: #febc2e; }
.window-chrome span:nth-child(3) { background: #28c840; }

.editor-preview {
  display: grid;
  grid-template-columns: 180px 1fr;
}

.preview-sidebar {
  padding: 20px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: #161616;
}

.preview-sidebar ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.preview-sidebar li {
  padding: 8px 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.84rem;
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

.preview-sidebar li.active {
  background: rgba(232, 93, 4, 0.18);
  color: rgba(255, 255, 255, 0.85);
}

.preview-editor {
  padding: 20px 24px;
  background: #111111;
}

.preview-label {
  margin: 0 0 14px;
  color: rgba(232, 93, 4, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  font-weight: 700;
}

.preview-editor pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.75);
}

/* Syntax token colors — dark context (preview on dark bg) */
.tagline-section .tok-kw      { color: #ff7043; font-weight: 600; }
.tagline-section .tok-type    { color: #64b5f6; }
.tagline-section .tok-fn      { color: #81c9e8; }
.tagline-section .tok-str     { color: #81c784; }
.tagline-section .tok-comment { color: rgba(255,255,255,0.32); font-style: italic; }
.tagline-section .tok-param   { color: rgba(255,255,255,0.55); }
.tagline-section .tok-punct   { color: rgba(255,255,255,0.45); }

/* ── Features section ─────────────────────────────────── */

.features-section {
  background: var(--bg);
  border-radius: 0 0 5rem 5rem;
  padding: 100px 0;
  position: relative;
  z-index: 3;
}

/* ── Workflow section ─────────────────────────────────── */

.workflow-section {
  background: var(--bg-dark);
  border-radius: 0 0 5rem 5rem;
  padding: 100px 0;
  position: relative;
  z-index: 2;
}

/* ── FAQ section ──────────────────────────────────────── */

.faq-section {
  background: var(--bg);
  padding: 100px 0 80px;
  position: relative;
  z-index: 3;
}

/* ── Section headings ─────────────────────────────────── */

.section-heading {
  max-width: 780px;
  margin-bottom: 48px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--text);
}

h1, h2, h3 {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ── Feature grid ─────────────────────────────────────── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature-card {
  padding: 28px 24px;
  border-radius: 18px;
  background: #f8f8f8;
  border: 1px solid rgba(0, 0, 0, 0.055);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
  background: #ffffff;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: rgba(232, 93, 4, 0.1);
  color: var(--accent);
  font-size: 0.88rem;
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  font-size: 0.91rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Workflow grid ────────────────────────────────────── */

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.workflow-step {
  padding: 32px 26px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.step-number {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.workflow-step h3 {
  margin: 0 0 10px;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-inv);
}

.workflow-step p {
  margin: 0;
  font-size: 0.91rem;
  color: var(--muted-inv);
  line-height: 1.65;
}

/* ── FAQ list ─────────────────────────────────────────── */

.faq-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.faq-item {
  padding: 26px 22px;
  border-radius: 18px;
  background: #f8f8f8;
  border: 1px solid rgba(0, 0, 0, 0.055);
}

.faq-item h3 {
  margin: 0 0 10px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
}

.faq-item p {
  margin: 0;
  font-size: 0.91rem;
  color: var(--muted);
  line-height: 1.65;
}

.faq-item a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(232, 93, 4, 0.3);
}

.faq-item a:hover {
  text-decoration-color: var(--accent);
}

/* ── Footer ───────────────────────────────────────────── */

.site-footer {
  background: var(--bg-dark);
  padding: 44px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.88rem;
}

.site-footer nav {
  display: flex;
  gap: 20px;
}

.site-footer nav a {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.88rem;
  transition: color 140ms ease;
}

.site-footer nav a:hover {
  color: rgba(255, 255, 255, 0.75);
}

/* ── Syntax tokens (light context) ───────────────────── */

.tok-kw    { color: var(--tok-kw);      font-weight: 600; }
.tok-type  { color: var(--tok-type); }
.tok-fn    { color: var(--tok-fn); }
.tok-str   { color: var(--tok-str); }
.tok-comment { color: var(--tok-comment); font-style: italic; }
.tok-param { color: var(--tok-param); }
.tok-punct { color: var(--tok-punct); }

/* ── Doc pages ────────────────────────────────────────── */

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 90px 0 48px;
}

.doc-hero {
  padding: 34px 0 18px;
  max-width: 760px;
}

.doc-lede {
  margin: 0;
  max-width: 48rem;
  font-size: 1.06rem;
  color: var(--muted);
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 8px 0 18px;
}

.doc-card {
  padding: 24px 22px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #f8f8f8;
}

.doc-card h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.doc-card p {
  margin: 0;
  color: var(--muted);
}

.doc-card-wide {
  grid-column: 1 / -1;
}

.doc-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.doc-list li + li {
  margin-top: 10px;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
}

/* Doc page buttons (secondary style for doc pages) */
.button-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  padding: 12px 24px;
}

.button-secondary:hover {
  background: rgba(0, 0, 0, 0.03);
}

/* Error pages */
.error-shell {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
}

.error-card {
  max-width: 720px;
  padding: 42px 36px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #f8f8f8;
}

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 980px) {
  .feature-grid,
  .workflow-grid,
  .faq-list,
  .doc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editor-preview {
    grid-template-columns: 1fr;
  }

  .preview-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(100% - 18px, 1180px);
  }

  .topnav {
    display: none;
  }

  .topbar {
    padding: 10px 10px 10px 20px;
  }

  .hero-section {
    padding: max(100px, 16vh) 0 72px;
  }

  .hero-brand {
    letter-spacing: -0.03em;
  }

  .tagline {
    font-size: 2.8rem;
    letter-spacing: -0.03em;
  }

  .hero-section,
  .tagline-section,
  .features-section,
  .workflow-section {
    border-radius: 0 0 2.5rem 2.5rem;
  }

  .hero-section { padding-bottom: 72px; }
  .tagline-section,
  .features-section,
  .workflow-section,
  .faq-section { padding: 72px 0; }

  .feature-grid,
  .workflow-grid,
  .faq-list {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
  }

  .button {
    width: 100%;
    justify-content: center;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .doc-grid {
    grid-template-columns: 1fr;
  }

  .doc-actions {
    flex-direction: column;
  }

  .error-card {
    padding: 32px 24px;
  }
}
