:root {
  --soil-950: #1B140D;
  --soil-900: #241B12;
  --soil-850: #2C2117;
  --soil-800: #372A1B;
  --soil-700: #4A3826;
  --amber-500: #E0954B;
  --amber-400: #EDB077;
  --moss-400: #93A87F;
  --moss-300: #B2C39F;
  --bone-100: #F3EBDD;
  --bone-300: #CBBCA5;
  --bone-500: #9D8D77;
  --bg: var(--soil-950);
  --bg-raised: var(--soil-900);
  --line: var(--soil-800);
  --text: var(--bone-100);
  --text-muted: var(--bone-300);
  --text-faint: var(--bone-500);
  --accent: var(--amber-500);
  --accent-soft: var(--amber-400);
  --accent2: var(--moss-400);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F4EEE2;
    --bg-raised: #ECE3D2;
    --line: #DACBAE;
    --text: #241B12;
    --text-muted: #5C4C38;
    --text-faint: #8A765D;
    --accent: #B96A2C;
    --accent-soft: #C77E40;
    --accent2: #5F7A48;
  }
}
:root[data-theme="light"] {
  --bg: #F4EEE2;
  --bg-raised: #ECE3D2;
  --line: #DACBAE;
  --text: #241B12;
  --text-muted: #5C4C38;
  --text-faint: #8A765D;
  --accent: #B96A2C;
  --accent-soft: #C77E40;
  --accent2: #5F7A48;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Work Sans', -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* ---------- NAV ---------- */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 21px;
}
.brand svg { width: 26px; height: 26px; flex-shrink: 0; }
.navlinks {
  display: flex;
  gap: 26px;
  font-size: 15px;
  color: var(--text-muted);
}
.navlinks a:hover, .navlinks a.active { color: var(--text); }
.nav-cta {
  display: flex;
  align-items: center;
  gap: 18px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--soil-950); }
.btn-primary:hover { background: var(--accent-soft); }
.btn-outline {
  border-color: var(--line);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); }
.btn-ghost { color: var(--text-muted); font-size: 15px; }
.btn-ghost:hover { color: var(--text); }

@media (max-width: 900px) {
  .navlinks { display: none; }
}

/* ---------- HERO (home) ---------- */
header.hero { padding: 100px 0 60px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 0.95fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(40px, 5.2vw, 64px); line-height: 1.06; max-width: 12ch; }
.hero p.lede { margin-top: 24px; font-size: 19px; color: var(--text-muted); max-width: 42ch; }
.hero-actions { margin-top: 34px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hero-note { margin-top: 28px; font-size: 14px; color: var(--text-faint); }
.hero-art svg { width: 100%; height: auto; display: block; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  header.hero { padding-top: 40px; }
}

/* ---------- PAGE HERO (sub-pages) ---------- */
header.page-hero {
  padding: 84px 0 56px;
  border-bottom: 1px solid var(--line);
}
.page-hero .eyebrow-word {
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--accent2);
  font-size: 16px;
  margin-bottom: 14px;
}
.page-hero h1 { font-size: clamp(34px, 4.6vw, 52px); line-height: 1.1; max-width: 16ch; }
.page-hero p.lede { margin-top: 20px; font-size: 18px; color: var(--text-muted); max-width: 52ch; }

/* ---------- PILLARS ---------- */
.pillars { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 56px 0; }
.pillars .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.pillar .num { font-family: 'Fraunces', serif; font-size: 15px; color: var(--accent2); margin-bottom: 10px; }
.pillar h3 { font-size: 20px; margin-bottom: 8px; font-weight: 500; }
.pillar p { color: var(--text-muted); font-size: 15.5px; }
@media (max-width: 780px) { .pillars .wrap { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- FEATURE ROWS ---------- */
.feature { padding: 110px 0; border-bottom: 1px solid var(--line); }
.feature .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.feature.reverse .wrap { direction: rtl; }
.feature.reverse .wrap > * { direction: ltr; }
.eyebrow-word { font-family: 'Fraunces', serif; font-style: italic; color: var(--accent2); font-size: 16px; margin-bottom: 14px; }
.feature h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.15; margin-bottom: 18px; max-width: 15ch; }
.feature p { color: var(--text-muted); font-size: 17px; max-width: 46ch; }
.feature-links { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.feature-links a { color: var(--accent-soft); font-size: 15px; }
.feature-links a:hover { text-decoration: underline; }
.feature-art svg, .feature-art img { width: 100%; height: auto; display: block; border-radius: 12px; }

@media (max-width: 860px) {
  .feature .wrap, .feature.reverse .wrap { grid-template-columns: 1fr; direction: ltr; }
  .feature { padding: 64px 0; }
}

/* ---------- TEASER GRID (home -> sub-pages) ---------- */
.teasers { padding: 100px 0; }
.teasers .head { max-width: 56ch; margin-bottom: 48px; }
.teasers h2 { font-size: 34px; margin-bottom: 14px; }
.teasers p { color: var(--text-muted); }
.teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.teaser-card {
  background: var(--bg);
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background 0.15s ease;
}
.teaser-card:hover { background: var(--bg-raised); }
.teaser-card .icon svg { width: 34px; height: 34px; }
.teaser-card h3 { font-size: 19px; font-weight: 500; }
.teaser-card p { color: var(--text-muted); font-size: 14.5px; }
.teaser-card .go { color: var(--accent-soft); font-size: 14px; margin-top: auto; }
@media (max-width: 860px) { .teaser-grid { grid-template-columns: 1fr; } }

/* ---------- CONTENT BLOCK (detail pages) ---------- */
.content-block { padding: 90px 0; border-bottom: 1px solid var(--line); }
.content-block .wrap { max-width: 760px; }
.content-block h2 { font-size: 30px; margin-bottom: 18px; }
.content-block p { color: var(--text-muted); font-size: 17px; margin-bottom: 16px; }
.content-block.narrow-wide .wrap { max-width: 1180px; }

.steps-list { counter-reset: step; margin-top: 30px; display: flex; flex-direction: column; gap: 26px; }
.steps-list li { list-style: none; display: grid; grid-template-columns: 40px 1fr; gap: 18px; }
.steps-list li::before {
  counter-increment: step;
  content: counter(step);
  font-family: 'Fraunces', serif;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.steps-list h4 { font-size: 16.5px; margin-bottom: 4px; font-weight: 500; }
.steps-list span { color: var(--text-muted); font-size: 15px; }

/* ---------- PLUGIN GRID ---------- */
.plugins-strip { padding: 90px 0; background: var(--bg-raised); border-bottom: 1px solid var(--line); }
.plugins-strip .head { max-width: 52ch; margin-bottom: 44px; }
.plugins-strip h1, .plugins-strip h2 { font-size: 32px; margin-bottom: 14px; }
.plugins-strip p { color: var(--text-muted); }
.plugin-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.plugin-cell { background: var(--bg-raised); padding: 26px 28px; }
.plugin-cell h4 { font-size: 16px; font-weight: 500; margin-bottom: 6px; }
.plugin-cell span { font-size: 13.5px; color: var(--text-faint); }
.plugin-cell p { font-size: 14.5px; color: var(--text-muted); margin-top: 8px; }
@media (max-width: 780px) { .plugin-row { grid-template-columns: 1fr; } }

/* ---------- DOWNLOAD GRID ---------- */
.download-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.download-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 30px 26px;
  background: var(--bg-raised);
}
.download-card .icon { margin-bottom: 18px; }
.download-card .icon svg { width: 30px; height: 30px; color: var(--accent); }
.download-card h3 { font-size: 18px; margin-bottom: 6px; font-weight: 500; }
.download-card p { color: var(--text-muted); font-size: 14px; margin-bottom: 18px; }
@media (max-width: 780px) { .download-grid { grid-template-columns: 1fr; } }

.req-table { margin-top: 60px; border-top: 1px solid var(--line); padding-top: 30px; }
.req-table h3 { font-size: 20px; margin-bottom: 18px; }
.req-row { display: grid; grid-template-columns: 160px 1fr; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.req-row span:first-child { color: var(--text-faint); }
.req-row span:last-child { color: var(--text-muted); }

/* ---------- PRICING ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 48px; }
.price-card { border: 1px solid var(--line); border-radius: 12px; padding: 30px 26px; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--accent); background: var(--bg-raised); }
.price-card h3 { font-size: 18px; font-weight: 500; margin-bottom: 6px; }
.price-card .amount { font-family: 'Fraunces', serif; font-size: 34px; margin: 14px 0 4px; }
.price-card .amount span { font-size: 14px; color: var(--text-faint); font-family: 'Work Sans', sans-serif; }
.price-card .desc { color: var(--text-muted); font-size: 14px; margin-bottom: 22px; }
.price-card ul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; flex-grow: 1; }
.price-card li { font-size: 14px; color: var(--text-muted); padding-left: 20px; position: relative; }
.price-card li::before { content: "—"; position: absolute; left: 0; color: var(--accent2); }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pricing-grid { grid-template-columns: 1fr; } }

/* ---------- CTA BAND ---------- */
.cta-band { padding: 130px 0; text-align: center; }
.cta-band h2 { font-size: clamp(32px, 4.6vw, 50px); margin-bottom: 30px; }

/* ---------- FOOTER ---------- */
footer { border-top: 1px solid var(--line); padding: 64px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.footer-col h5 { font-size: 13px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 14px; font-weight: 500; }
.footer-col a { display: block; font-size: 14.5px; color: var(--text-muted); padding: 5px 0; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; color: var(--text-faint); font-size: 13.5px; flex-wrap: wrap; gap: 12px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
