@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600&display=swap');

:root {
  color-scheme: light dark;
  --fg: #17161a;
  --muted: #6b6559;
  --subtle: #928a7c;
  --link: #1f77b4;
  --cta-bg: #17161a;
  --cta-fg: #fefcf7;
  --accent: #c56a3a;
  --accent-soft: #f0d9c6;
  --bg: #fefcf7;
  --band: #f5efe3;
  --band-strong: #efe6d3;
  --border: #e8e0d0;
  --panel: #ffffff;
  --panel-border: #ece4d3;
  --code-fg: #2a2620;
  --code-k: #a626a4;
  --code-s: #4a8f3d;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fg: #efeae0;
    --muted: #a19a8c;
    --subtle: #6b6559;
    --link: #7fb8e0;
    --cta-bg: #efeae0;
    --cta-fg: #17161a;
    --accent: #e88b5a;
    --accent-soft: #4a2f22;
    --bg: #17161a;
    --band: #1e1c20;
    --band-strong: #24222a;
    --border: #2c2a30;
    --panel: #1e1c20;
    --panel-border: #2c2a30;
    --code-fg: #efeae0;
    --code-k: #d18ad0;
    --code-s: #8fcf82;
  }
  /* Inline SVG diagrams use hardcoded fill/stroke attributes; retarget by
     value so the illustrations don't each need editing. */
  .viz svg text[fill="#222"] { fill: var(--fg); }
  .viz svg text[fill="#666"] { fill: var(--muted); }
  .viz svg line[stroke="#ddd"] { stroke: var(--panel-border); }
  .viz svg line[stroke="#999"] { stroke: var(--muted); }
  .viz svg line[stroke="#666"] { stroke: var(--muted); }
  .viz svg path[fill="#666"] { fill: var(--muted); }
  .viz svg g[stroke="#f6f6f6"] { stroke: var(--panel); }
  .viz svg rect[fill="#c9c9c9"] { fill: #4a4038; }
}

* { box-sizing: border-box; }

body {
  font: 400 18px/1.6 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--fg);
  background: var(--bg);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

header {
  padding: 1.75rem 0;
}
header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wordmark {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}
.wordmark .mark { display: block; }

header nav a { margin-left: 1.75rem; font-size: 0.95rem; color: var(--fg); }
header nav a:hover { color: var(--accent); text-decoration: none; }

.cta {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: transform 0.15s ease;
}
.cta:hover { text-decoration: none; transform: translateY(-1px); }

.cta-lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

main { flex: 1; }

/* --- Hero --- */
.hero {
  padding: clamp(4rem, 12vw, 9rem) 0 clamp(3rem, 8vw, 6rem);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 140%;
  background: radial-gradient(ellipse at center, var(--accent-soft) 0%, transparent 65%);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
}

h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(3rem, 7vw, 5.75rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 1.5rem;
  max-width: 16ch;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
}
h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}

.lede {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 2.5rem;
  max-width: 42ch;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.hero-cta .note { color: var(--muted); font-size: 0.95rem; }

/* --- Section rhythm --- */
section.pillar {
  padding: clamp(4rem, 10vw, 7rem) 0;
  border: none;
}
section.pillar + section.pillar { border-top: 1px solid var(--border); }
section.pillar.banded { background: var(--band); }

.pillar-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

section.pillar h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
  max-width: 18ch;
}
section.pillar h2 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.pillar-intro {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--muted);
  max-width: 48ch;
  margin: 0 0 4rem;
  line-height: 1.55;
}

/* Feature blocks inside a pillar */
.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}
.feature:last-child { padding-bottom: 0; }
@media (min-width: 780px) {
  .feature {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 4rem;
    align-items: start;
  }
}

.feature h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
}
.feature p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
  max-width: 34ch;
}

.viz {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(23, 22, 26, 0.03), 0 8px 24px rgba(23, 22, 26, 0.04);
}
.viz svg { display: block; width: 100%; height: auto; }

pre.code {
  font: 13.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 0;
  overflow-x: auto;
  color: var(--code-fg);
  min-width: 0;
  box-shadow: 0 1px 2px rgba(23, 22, 26, 0.03), 0 8px 24px rgba(23, 22, 26, 0.04);
}
pre.code .k { color: var(--code-k); }
pre.code .s { color: var(--code-s); }
@media (max-width: 480px) {
  pre.code { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12.5px; }
}

/* Pricing callout */
.pricing {
  background: var(--band-strong);
  border-radius: 20px;
  padding: clamp(2rem, 5vw, 3.5rem);
  margin-top: 2rem;
  display: grid;
  gap: 0.5rem;
}
.pricing .price {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--fg);
}
.pricing .price em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
.pricing .price-note {
  color: var(--muted);
  font-size: 1.05rem;
}

/* Final CTA band */
.finale {
  padding: clamp(5rem, 12vw, 9rem) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.finale::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center bottom, var(--accent-soft) 0%, transparent 60%);
  opacity: 0.6;
  z-index: 0;
}
.finale .container { position: relative; z-index: 1; }
.finale h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 auto 2rem;
  max-width: 22ch;
}
.finale h2 em { font-style: italic; color: var(--accent); font-weight: 400; }
.finale .cta-row {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
}
.finale .cta-row a:not(.cta) { color: var(--muted); }

footer {
  padding: 2.5rem 0 3rem;
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer nav a { margin-left: 1.5rem; color: var(--muted); }

/* Prose pages (terms, privacy) */
.prose { max-width: 680px; margin: 0 auto; padding: 4rem clamp(1.25rem, 4vw, 2.5rem); }
.prose h1 { font-family: 'Fraunces', serif; font-weight: 500; font-size: 2.25rem; letter-spacing: -0.02em; }
.prose h2 { font-family: 'Fraunces', serif; font-weight: 500; font-size: 1.4rem; margin-top: 2.5rem; letter-spacing: -0.01em; }
.prose p, .prose ul { font-size: 1rem; color: var(--fg); }
.prose ul { padding-left: 1.4em; }
.prose li { margin: 0.4em 0; }
.prose code { font-size: 0.9rem; background: var(--panel); padding: 1px 5px; border-radius: 3px; }
.muted { color: var(--muted); font-size: 0.85rem; }
