/* ── Reset & Tokens ────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:      #fafafa;
  --fg:      #18181b;
  --muted:   #71717a;
  --border:  #e4e4e7;
  --surface: #f4f4f5;
  --accent:  #f97316;
  --accent2: #7c3aed;
  --code-bg: #27272a;
  --code-fg: #e4e4e7;
  --card:    #ffffff;
  --radius:  12px;
  --glow:    rgba(249, 115, 22, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #09090b;
    --fg:      #fafafa;
    --muted:   #a1a1aa;
    --border:  #27272a;
    --surface: #18181b;
    --accent:  #fb923c;
    --accent2: #a78bfa;
    --code-bg: #18181b;
    --code-fg: #d4d4d8;
    --card:    #111113;
    --glow:    rgba(251, 146, 60, 0.06);
  }
}

/* ── Base ──────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ── Layout ────────────────────────────────────────────── */
.wrap {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  padding: 5rem 0 3rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  background: var(--glow);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero h1 .gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 2.5rem;
}

/* ── Architecture diagram ─────────────────────────────── */
.arch {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  margin: 0 auto 3rem;
  overflow-x: auto;
}

.arch-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  min-width: 560px;
}

.arch-box {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.arch-box h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.arch-box ul {
  list-style: none;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.8;
}

.arch-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.arch-arrow .line {
  width: 60px;
  height: 2px;
  background: var(--border);
  position: relative;
}

.arch-arrow .line::after {
  content: '';
  position: absolute;
  right: -1px;
  top: -4px;
  border: 5px solid transparent;
  border-left-color: var(--border);
}

.arch-bottom {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border);
}

.arch-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  background: var(--surface);
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.arch-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.arch-pill .dot.purple { background: var(--accent2); }

/* ── How it works overview ────────────────────────────── */
.overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 3rem;
}

.overview-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.overview-card .number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--glow);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.overview-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.overview-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

.overview-card .time {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

/* ── Section headings ─────────────────────────────────── */
.part-header {
  padding: 3rem 0 1rem;
  border-top: 1px solid var(--border);
}

.part-label {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.part-label.you { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.part-label.auto { background: color-mix(in srgb, var(--accent2) 15%, transparent); color: var(--accent2); }

.part-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.part-header p {
  color: var(--muted);
  margin-top: 0.35rem;
}

/* ── Steps ─────────────────────────────────────────────── */
.step {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.step-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.step h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.step h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

.step p {
  margin-bottom: 0.75rem;
}

.step ul, .step ol {
  margin: 0.5rem 0 1rem 1.25rem;
}

.step li {
  margin-bottom: 0.35rem;
}

.step li::marker {
  color: var(--muted);
}

/* ── Inline signals ────────────────────────────────────── */
strong { font-weight: 650; }
em { font-style: italic; color: var(--muted); }

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

a:hover { text-decoration: underline; }

/* ── Callout ───────────────────────────────────────────── */
.callout {
  border-left: 3px solid var(--accent);
  background: var(--glow);
  padding: 0.85rem 1.15rem;
  margin: 1rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.92rem;
}

.callout.info {
  border-left-color: var(--accent2);
  background: color-mix(in srgb, var(--accent2) 6%, transparent);
}

.callout strong {
  display: block;
  margin-bottom: 0.15rem;
}

/* ── Code ──────────────────────────────────────────────── */
code {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 0.87em;
  background: var(--surface);
  padding: 0.15em 0.4em;
  border-radius: 5px;
}

pre {
  background: var(--code-bg);
  color: var(--code-fg);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  overflow-x: auto;
  margin: 0.75rem 0 1.25rem;
  font-size: 0.85rem;
  line-height: 1.6;
  border: 1px solid var(--border);
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.code-comment { color: #6b7280; }
.code-note {
  display: block;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #3f3f46;
  color: #a1a1aa;
  font-size: 0.8rem;
  font-style: italic;
}

/* ── Table ─────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0 1.25rem;
  font-size: 0.9rem;
}

th, td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 650;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

td:first-child { font-weight: 500; }

tr:last-child td { border-bottom: none; }

.table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0.75rem 0 1.25rem;
}

.table-wrap table {
  margin: 0;
}

.table-wrap th {
  background: var(--surface);
}

/* ── Checklist (Part B) ────────────────────────────────── */
.checklist {
  list-style: none;
  margin: 0.75rem 0 1.25rem;
}

.checklist li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.4rem;
  line-height: 1.6;
}

.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 2px solid var(--border);
  background: var(--surface);
}

.checklist.done li::before {
  background: color-mix(in srgb, var(--accent2) 15%, transparent);
  border-color: var(--accent2);
}

.checklist.done li::after {
  content: '';
  position: absolute;
  left: 4px;
  top: calc(0.45em + 3px);
  width: 8px;
  height: 5px;
  border-left: 2px solid var(--accent2);
  border-bottom: 2px solid var(--accent2);
  transform: rotate(-45deg);
}

/* ── Cost summary ──────────────────────────────────────── */
.cost-total {
  font-weight: 800;
  font-size: 1.1em;
}

.cost-total td {
  border-top: 2px solid var(--border);
  padding-top: 0.85rem;
}

/* ── Addon card ────────────────────────────────────────── */
.addon-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.addon-card:hover {
  border-color: var(--accent);
}

.addon-card h4 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.addon-card h4 a {
  color: var(--fg);
  text-decoration: none;
}

.addon-card h4 a:hover {
  color: var(--accent);
}

.addon-card p {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.addon-card p:last-child {
  margin-bottom: 0;
}

.addon-card p:last-child a {
  font-weight: 600;
}

/* ── Copy button ───────────────────────────────────────── */
.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid #3f3f46;
  border-radius: 6px;
  background: #27272a;
  color: #a1a1aa;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  z-index: 2;
}

.copy-btn:hover {
  background: #3f3f46;
  color: #e4e4e7;
  border-color: #52525b;
}

.copy-btn.copied {
  background: color-mix(in srgb, var(--accent2) 20%, #27272a);
  border-color: var(--accent2);
  color: var(--accent2);
}

/* ── Signup blocks ─────────────────────────────────────── */
.signup-block {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.signup-block h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
}

.signup-block p {
  margin-bottom: 0.6rem;
}

.signup-block ol {
  margin: 0.5rem 0 0.75rem 1.25rem;
}

.signup-block li {
  margin-bottom: 0.3rem;
}

.signup-block .callout {
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/* ── Prompt block ──────────────────────────────────────── */
.prompt-block {
  position: relative;
}

.prompt-block pre {
  border: 2px solid var(--accent);
  background: var(--code-bg);
  padding-top: 1.5rem;
}

/* ── Interaction list ──────────────────────────────────── */
.interaction-list {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0;
}

.interaction {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.interaction-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent2) 12%, transparent);
  color: var(--accent2);
  font-weight: 800;
  font-size: 0.85rem;
}

.interaction-body h4 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 650;
}

.interaction-body p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Footer ────────────────────────────────────────────── */
footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

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

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 640px) {
  .wrap { padding: 0 1rem; }
  .hero { padding: 3rem 0 2rem; }
  .overview { grid-template-columns: 1fr; }
  .arch-grid { min-width: 0; grid-template-columns: 1fr; gap: 0.5rem; }
  .arch-arrow { flex-direction: row; }
  .arch-arrow .line { width: 2px; height: 30px; }
  .arch-arrow .line::after {
    right: -4px; top: auto; bottom: -1px;
    border: 5px solid transparent;
    border-top-color: var(--border);
    border-left-color: transparent;
  }
  .arch-bottom { flex-direction: column; align-items: center; gap: 0.5rem; }
  table { font-size: 0.82rem; }
  th, td { padding: 0.5rem 0.6rem; }
}
