/* Palette mirrors the Musawrite app: Tailwind zinc (dark) + amber accents. */
:root {
  --zinc-950: #09090b;
  --zinc-900: #18181b;
  --zinc-850: #1f1f23;
  --zinc-800: #27272a;
  --zinc-700: #3f3f46;
  --zinc-600: #52525b;
  --zinc-500: #71717a;
  --zinc-400: #a1a1aa;
  --zinc-300: #d4d4d8;
  --zinc-100: #f4f4f5;

  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --amber-300: #fcd34d;

  --bg: var(--zinc-950);
  --panel: rgba(39, 39, 42, 0.5);   /* zinc-800/50, like the app's cards */
  --border: var(--zinc-700);
  --border-soft: rgba(63, 63, 70, 0.6);
  --text: var(--zinc-100);
  --text-dim: var(--zinc-400);
  --text-muted: var(--zinc-500);

  --max: 1200px;
  --radius: 0.5rem;
}

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

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--amber-400); text-decoration: none; }
a:hover { color: var(--amber-300); text-decoration: underline; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--zinc-800);
  border: 1px solid var(--border-soft);
  padding: 0.1em 0.4em;
  border-radius: 6px;
  font-size: 0.88em;
  color: var(--zinc-300);
}

/* ── Header ── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--zinc-100);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; color: var(--zinc-100); }
.brand-mark { width: 26px; height: 26px; }
.site-nav { display: flex; gap: 1.5rem; align-items: center; }
.site-nav a { color: var(--zinc-100); font-weight: 500; font-size: 0.93rem; }
.site-nav a:hover { color: var(--zinc-100); text-decoration: none; }
/* The nav's Get Musawrite button must match the hero CTA exactly —
   .site-nav a would otherwise override .btn-primary's white text. */
.site-nav a.btn-primary { color: #fff; }
.site-nav a.btn-primary:hover { color: #fff; background: var(--amber-500); }

/* ── Layout ── */
main { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
section { padding: 3.5rem 0; border-top: 1px solid var(--border-soft); }
section:first-child { border-top: none; }

h1, h2, h3, h4 { color: var(--zinc-100); line-height: 1.25; letter-spacing: -0.02em; }
h2 { font-size: 1.55rem; margin-bottom: 0.5rem; }
.section-intro { color: var(--text-dim); max-width: 62ch; margin: 0 0 2rem; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding-top: 3rem;
  padding-bottom: 4rem;
  position: relative;
}
.hero::after {
  /* soft amber glow, echoing the app's amber accents on a dark canvas */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(620px 300px at 50% 0%, rgba(217, 119, 6, 0.12), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.hero-logo { display: block; width: 132px; margin: 0 auto 2rem; }
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  margin: 0 auto 1.1rem;
  max-width: 18ch;
}
.tagline {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 58ch;
  margin: 0 auto 1.1rem;
}
.whisper {
  font-style: italic;
  color: var(--amber-400);
  margin-bottom: 2rem;
}
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-400);
  background: rgba(217, 119, 6, 0.1);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: 999px;
  padding: 0.25rem 0.85rem;
  margin-bottom: 1.5rem;
}

/* ── Buttons ── */
.cta-row { display: flex; gap: 0.85rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--amber-600); color: #fff; }
.btn-primary:hover { background: var(--amber-500); color: #fff; }
.btn-ghost { border: 1px solid var(--border); color: var(--zinc-300); }
.btn-ghost:hover { background: var(--zinc-800); color: var(--zinc-100); }
.btn-sm { padding: 0.4rem 0.95rem; font-size: 0.88rem; }

/* ── Cards ── */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 1.5rem; }
.card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 0.65rem;
  padding: 1.4rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.card:hover { border-color: var(--zinc-600); background: rgba(39, 39, 42, 0.75); }
.card h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.card h3::before { content: "✦ "; color: var(--amber-400); }
.card p { color: var(--text-dim); margin: 0; font-size: 0.95rem; }
.card strong { color: var(--zinc-300); }

/* ── Feature list ── */
.feature-list { list-style: none; padding: 0; display: grid; gap: 0.85rem; margin-top: 1.5rem; }
.feature-list li { padding-left: 1.7rem; position: relative; color: var(--text-dim); }
.feature-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--amber-400);
}
.feature-list strong { color: var(--zinc-100); }

/* ── Steps ── */
.steps { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 1.5rem; counter-reset: step; }
.step {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 0.65rem;
  padding: 1.3rem;
}
.step-num {
  display: inline-flex;
  width: 28px; height: 28px;
  align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--amber-600);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.7rem;
}
.step h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.step p { margin: 0; color: var(--text-dim); font-size: 0.92rem; }

/* ── BYOK ── */
.provider-groups {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 1.5rem;
}
.provider-card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 0.65rem;
  padding: 1.3rem;
}
.provider-card h4 { margin: 0 0 0.6rem; color: var(--zinc-100); }
.provider-card .pill-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.pill {
  font-size: 0.82rem;
  color: var(--zinc-300);
  background: var(--zinc-800);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
}

/* ── Screenshots ── */
/* A window-like frame matching the app's panels. Swap the placeholder div for
   an <img> when screenshots are ready (see the comments in the HTML). */
.screenshot-frame {
  background: var(--zinc-900);
  border: 1px solid var(--border-soft);
  border-radius: 0.65rem;
  overflow: hidden;
  margin: 2.25rem auto 0;
  max-width: 920px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.screenshot-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  background: var(--zinc-850);
  border-bottom: 1px solid var(--border-soft);
}
.screenshot-chrome span {
  width: 10px; height: 10px;
  border-radius: 999px;
  background: var(--zinc-600);
}
.screenshot-chrome span:first-child { background: rgba(217, 119, 6, 0.55); }
.screenshot-frame img { display: block; width: 100%; height: auto; }
.screenshot-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  color: var(--text-muted);
  font-size: 0.9rem;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(63, 63, 70, 0.18) 14px 15px),
    var(--zinc-900);
}
.screenshot-caption {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

/* ── Privacy callout ── */
.callout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: rgba(217, 119, 6, 0.07);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: 0.65rem;
  padding: 1.3rem 1.5rem;
  margin-top: 1.5rem;
}
.callout p { margin: 0; color: var(--text-dim); }
.callout strong { color: var(--zinc-100); }

/* ── Footer ── */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3.5rem;
  border-top: 1px solid var(--border-soft);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-links { margin-top: 0.5rem; }
.footer-links a { color: var(--text-dim); }

/* ── Docs (sidebar + rendered markdown) ── */
.docs-wrap {
  display: flex;
  gap: 2.5rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
  align-items: flex-start;
}
.docs-sidebar {
  flex: none;
  width: 220px;
  position: sticky;
  top: 1.5rem;
}
.docs-nav-group { margin-bottom: 1.5rem; }
.docs-nav-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.4rem;
}
.docs-sidebar a {
  display: block;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 0.92rem;
}
.docs-sidebar a:hover { color: var(--zinc-100); background: var(--zinc-800); text-decoration: none; }
.docs-sidebar a.active {
  color: var(--amber-400);
  background: rgba(217, 119, 6, 0.1);
  font-weight: 600;
}
.docs-content { flex: 1; min-width: 0; max-width: 82ch; }
.docs-content h1 { font-size: 2rem; margin: 0.25rem 0 0.75rem; }
.docs-content h2 {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-soft);
  font-size: 1.35rem;
}
.docs-content h3 { margin-top: 1.6rem; font-size: 1.08rem; }
.docs-content p, .docs-content li { color: var(--text-dim); }
.docs-content strong { color: var(--zinc-100); }
.docs-content blockquote {
  margin: 1rem 0;
  padding: 0.6rem 1.1rem;
  border-left: 3px solid var(--amber-600);
  background: var(--panel);
  border-radius: 0 0.5rem 0.5rem 0;
}
.docs-content blockquote p { margin: 0; }
.docs-loading { color: var(--text-muted); }

@media (max-width: 760px) {
  .docs-wrap { flex-direction: column; }
  .docs-sidebar { position: static; width: 100%; }
  .docs-nav-group { margin-bottom: 0.75rem; }
}
pre {
  background: var(--zinc-900);
  border: 1px solid var(--border-soft);
  border-radius: 0.6rem;
  padding: 1rem 1.25rem;
  overflow-x: auto;
}
pre code { background: none; border: none; padding: 0; color: var(--zinc-300); }
table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border-soft); }
th { color: var(--zinc-100); }
td { color: var(--text-dim); }

@media (max-width: 640px) {
  section { padding: 2.5rem 0; }
  .hero { padding-top: 2rem; }
}
