/* ── Reset & Base ──────────────────────────────── */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #ffffff;
  --color-surface: #f8f9fa;
  --color-text: #1a1a2e;
  --color-text-secondary: #555;
  --color-accent: #6366f1;
  --color-accent-hover: #4f46e5;
  --color-accent-light: #eef2ff;
  --color-border: #e5e7eb;
  --color-code-bg: #f6f8fa;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;
  --max-width: 1040px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

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

/* ── Header ───────────────────────────────────── */

.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.logo:hover {
  color: var(--color-text);
}

.logo-dot,
.logo-accent {
  color: var(--color-accent);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.nav-link:hover {
  color: var(--color-accent);
}

/* ── Notice Banner ────────────────────────────── */

.notice-wrap {
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
}

.notice {
  margin: 0;
  padding: 0.7rem 0;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #78350f;
}

.notice-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #92400e;
  background: #fcd34d;
  padding: 0.12rem 0.5rem;
  border-radius: 3px;
  margin-right: 0.65rem;
  vertical-align: 0.08em;
}

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

.hero {
  text-align: center;
  padding: 4rem 1.5rem 4rem;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.hero h1 .dot,
.hero h1 .dot-accent {
  color: var(--color-accent);
}

.hero .tagline {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-border);
  color: var(--color-text);
}

/* ── Sections ─────────────────────────────────── */

.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--color-surface);
}

.section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section p {
  color: var(--color-text-secondary);
  max-width: 680px;
}

.section p + p {
  margin-top: 0.75rem;
}

/* ── Section Headers (fancy) ──────────────────── */

.section-head {
  position: relative;
  margin: 0 0 2.75rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px dashed var(--color-border);
}

.section-head::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 72px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-accent) 0%, #818cf8 100%);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  color: var(--color-accent);
  margin-bottom: 0.85rem;
}

.section-eyebrow::before {
  content: '//';
  opacity: 0.55;
  font-weight: 700;
}

.section-head h2 {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}

.section-head p {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text-secondary);
  max-width: 680px;
  margin: 0;
}

@media (max-width: 768px) {
  .section-head h2 {
    font-size: 1.9rem;
  }
  .section-head {
    margin-bottom: 2rem;
  }
}

/* ── Feature Grid ─────────────────────────────── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.5rem 1.6rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.feature-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1);
}

.feature-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--color-accent-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  color: var(--color-accent);
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: none;
}

/* ── Performance Cards ────────────────────────── */

.perf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
  counter-reset: perf;
}

.perf-card {
  position: relative;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 1.9rem 1.75rem 1.6rem;
  overflow: hidden;
  counter-increment: perf;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.perf-card::before {
  content: counter(perf, decimal-leading-zero);
  position: absolute;
  top: 0.4rem;
  right: 0.55rem;
  font-family: var(--font-mono);
  font-size: 4.25rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(99, 102, 241, 0.18);
  pointer-events: none;
}

.perf-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -16px rgba(99, 102, 241, 0.35);
}

.perf-metric {
  position: relative;
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: lowercase;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 0.22rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.85rem;
  letter-spacing: -0.005em;
}

.perf-card h3 {
  position: relative;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.perf-card h3 .perf-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.perf-card p {
  position: relative;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: none;
}

/* ── Spotlight (side-by-side code + text) ──────── */

.spotlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.spotlight-reverse {
  direction: rtl;
}

.spotlight-reverse > * {
  direction: ltr;
}

.spotlight-center {
  align-items: center;
}

.spotlight-text h2 {
  margin-bottom: 0.75rem;
}

.spotlight-text p {
  margin-bottom: 1rem;
}

.spotlight-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.spotlight-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.spotlight-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.spotlight-code pre {
  margin-top: 0;
}

/* ── UI Screenshot ────────────────────────────── */

.ui-screenshot {
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: 0 20px 40px -24px rgba(15, 23, 42, 0.35);
}

.ui-screenshot img,
.ui-screenshot video {
  display: block;
  width: 100%;
  height: auto;
  background: var(--color-surface);
}

.ui-screenshot figcaption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-secondary);
  padding: 0.6rem 0.9rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  text-align: center;
}

/* ── Usage Blocks (How to use) ────────────────── */

.usage-block {
  margin-top: 3.5rem;
}

.usage-block:first-of-type {
  margin-top: 2.5rem;
}

.usage-intro {
  margin-bottom: 2rem;
  max-width: 720px;
}

.usage-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 0.22rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.7rem;
}

.usage-intro h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
  letter-spacing: -0.015em;
}

.usage-intro p {
  color: var(--color-text-secondary);
  margin: 0;
  max-width: none;
}

.usage-block .spotlight + .spotlight {
  margin-top: 2.5rem;
}

.usage-block .spotlight-text h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
}

.usage-screenshot {
  margin-top: 2.5rem;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Feature Detail (More on features) ────────── */

.feature-detail {
  margin-top: 3.5rem;
}

.feature-detail:first-of-type {
  margin-top: 2.5rem;
}

.feature-detail .spotlight-text h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  letter-spacing: -0.015em;
}

/* ── Facts Card (About section) ───────────────── */

.facts-card {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 1.6rem 1.7rem;
  box-shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.25);
}

.facts-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(150deg, rgba(99, 102, 241, 0.35) 0%, rgba(99, 102, 241, 0) 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.facts-phase {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.facts-phase-num {
  font-family: var(--font-mono);
  font-size: 2.9rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--color-accent);
}

.facts-phase-num span {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-left: 0.05rem;
}

.facts-phase-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.facts-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-secondary);
}

.facts-phase-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.facts-bar {
  height: 6px;
  background: rgba(99, 102, 241, 0.12);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.35rem;
}

.facts-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent) 0%, #818cf8 100%);
  border-radius: inherit;
}

.facts-meta {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.55rem 1.1rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.facts-meta dt {
  font-weight: 600;
  color: var(--color-text);
}

.facts-meta dd {
  margin: 0;
  color: var(--color-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Badges ───────────────────────────────────── */

.badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 0.5rem;
  line-height: 1.2;
}

.badge-planned {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.badge-shipped {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

/* ── Checklist (supported models/features) ────── */

.checklist-legend {
  display: inline-flex;
  gap: 0.75rem;
  margin-left: 0.35rem;
  font-size: 0.82rem;
}

.checklist-legend .legend-done {
  color: #166534;
  font-weight: 600;
}

.checklist-legend .legend-planned {
  color: #92400e;
  font-weight: 600;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 3rem;
  margin-top: 2rem;
}

.checklist-col h3 {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
  color: var(--color-text);
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checklist li {
  position: relative;
  padding-left: 1.85rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.checklist li::before {
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.2rem;
  height: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px;
  border: 1px solid transparent;
}

.checklist li.done::before {
  content: "\2713"; /* ✓ */
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.checklist li.planned::before {
  content: "\25F7"; /* ◷ */
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

.checklist li.planned {
  color: #92400e;
}

/* ── Code Blocks (Prism overrides) ────────────── */

pre,
code {
  font-family: var(--font-mono) !important;
}

code {
  background: var(--color-code-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.85em;
}

pre[class*="language-"],
pre {
  background: var(--color-code-bg) !important;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem !important;
  overflow-x: auto;
  line-height: 1.65 !important;
  margin-top: 1.5rem;
  font-size: 0.82rem !important;
}

pre code,
pre[class*="language-"] code {
  background: none !important;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  text-shadow: none !important;
}

/* Prism token color tweaks for our light theme */
.token.comment,
.token.prolog,
.token.doctype { color: #6b7280; }
.token.keyword { color: #7c3aed; }
.token.string { color: #059669; }
.token.function { color: #2563eb; }
.token.class-name { color: #0891b2; }
.token.number { color: #d97706; }
.token.operator { color: #6366f1; }
.token.punctuation { color: #6b7280; }
.token.property { color: #2563eb; }
.token.builtin { color: #0891b2; }

/* ── Architecture Diagram ─────────────────────── */

.arch {
  margin: 2rem auto 0;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feature-detail .arch {
  margin: 0;
  max-width: 100%;
}

.arch-row {
  display: flex;
  gap: 2px;
}

.arch-block {
  background: var(--color-accent-light);
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  padding: 0.85rem 1rem;
  flex: 1;
  min-width: 0;
}

.arch-block strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.15rem;
}

.arch-block span {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

.arch-block.arch-core {
  background: var(--color-accent);
  border-color: var(--color-accent-hover);
}

.arch-block.arch-core strong,
.arch-block.arch-core span {
  color: #fff;
}

.arch-block.arch-backend {
  background: #fef3c7;
  border-color: #fcd34d;
}

.arch-block.arch-backend strong {
  color: #92400e;
}

.arch-block.arch-backend span {
  color: #a16207;
}

.arch-connector {
  display: flex;
  justify-content: center;
  padding: 0.15rem 0;
  color: #c7d2fe;
  font-size: 0.8rem;
  letter-spacing: 2px;
}

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

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.site-footer p + p {
  margin-top: 0.25rem;
}

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

@media (max-width: 1024px) {
  .perf-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .spotlight {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .spotlight-reverse {
    direction: ltr;
  }

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

  .checklist-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .arch {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .tagline {
    font-size: 1.1rem;
  }

  .section {
    padding: 3rem 0;
  }
}

@media (max-width: 540px) {
  .hero {
    padding: 3rem 1rem 2.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

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

  .arch-row {
    flex-direction: column;
  }
}
