:root {
  --bg: #e9ece5;
  --bg-soft: #f3f5ef;
  --text: #1a1f1a;
  --muted: #5c6259;
  --muted-2: #8a8f87;
  --line: #c6cdbf;
  --line-strong: #a9b2a2;
  --grid: rgba(26, 31, 26, 0.035);
  --center-rule: rgba(26, 31, 26, 0.08);
  --nav-bg: rgba(233, 236, 229, 0.9);
  --nav-border: rgba(198, 205, 191, 0.72);
  --panel: rgba(243, 245, 239, 0.68);
  --panel-soft: rgba(243, 245, 239, 0.56);
  --dark-surface: #1a1f1a;
  --footer-surface: #1a1f1a;
  --accent: #7a2e1f;
  --secondary: #b8894a;
  --success: #526a3d;
  --max: 1180px;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1a1f1a;
  --bg-soft: #24291f;
  --text: #e9ece5;
  --muted: rgba(233, 236, 229, 0.66);
  --muted-2: rgba(233, 236, 229, 0.42);
  --line: rgba(233, 236, 229, 0.12);
  --line-strong: rgba(233, 236, 229, 0.28);
  --grid: rgba(233, 236, 229, 0.035);
  --center-rule: rgba(233, 236, 229, 0.08);
  --nav-bg: rgba(26, 31, 26, 0.9);
  --nav-border: rgba(233, 236, 229, 0.12);
  --panel: rgba(233, 236, 229, 0.045);
  --panel-soft: rgba(233, 236, 229, 0.035);
  --footer-surface: #151a15;
  --accent: #b8894a;
  --secondary: #b8894a;
  --success: #b7d68e;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--bg);
  background-size: 64px 64px, 64px 64px, 100% 100%;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(50% - .5px), var(--center-rule) 50%, transparent calc(50% + .5px)),
    radial-gradient(circle at 18% 10%, rgba(122,46,31,.08), transparent 28%),
    radial-gradient(circle at 78% 18%, rgba(184,137,74,.09), transparent 30%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.78), transparent 76%);
  z-index: -2;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

body,
.nav,
.panel,
.included-card,
.step,
.field input,
.field textarea,
.field select,
footer {
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease);
}

.container {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
}

.nav {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px max(20px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid var(--nav-border);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease), background 0.25s var(--ease);
}

.theme-toggle {
  width: 42px;
  height: 42px;
}

.theme-toggle:hover,
.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.theme-icon,
.btn {
  font-family: var(--font-mono);
}

.theme-icon {
  font-size: 16px;
  line-height: 1;
}

.btn {
  min-height: 52px;
  padding: 0 22px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.btn-primary {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

.hero {
  min-height: 82vh;
  display: flex;
  align-items: center;
  padding: 138px 0 82px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.7fr);
  gap: clamp(42px, 7vw, 92px);
  align-items: end;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0 10px;
  border: 1px solid var(--line);
  border-width: 1px 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "§";
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 17px;
  font-style: italic;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.025em;
}

h1 {
  max-width: 880px;
  margin: 24px 0;
  font-size: clamp(54px, 8vw, 108px);
  line-height: 0.92;
}

.hero-copy {
  max-width: 690px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 23px);
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.ledger {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 24px;
}

.ledger-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ledger-row {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.ledger-row span:first-child {
  color: var(--muted);
}

.ledger-row strong {
  text-align: right;
  font-weight: 600;
}

.section {
  padding: 96px 0;
}

.section-header {
  max-width: 720px;
  margin-bottom: 42px;
}

.section-header h2 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  margin: 14px 0 16px;
}

.section-header p {
  color: var(--muted);
  font-size: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.panel,
.included-card,
.step {
  border: 1px solid var(--line);
  background: var(--panel);
}

.panel {
  padding: 32px;
}

.panel h3,
.included-card h3,
.step h3 {
  font-size: 25px;
  margin-bottom: 10px;
}

.panel p,
.included-card p,
.step p {
  color: var(--muted);
}

.included-card,
.step {
  padding: 26px;
}

.included-card ul {
  list-style: none;
  display: grid;
  gap: 11px;
  color: var(--text);
  font-weight: 500;
}

.included-card li::before {
  content: "+";
  color: var(--accent);
  margin-right: 10px;
  font-family: var(--font-mono);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  counter-reset: steps;
}

.step::before {
  counter-increment: steps;
  content: "0" counter(steps);
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
}

.cta-band {
  background: var(--dark-surface);
  color: #e9ece5;
  border-top: 1px solid rgba(233,236,229,0.12);
  border-bottom: 1px solid rgba(233,236,229,0.12);
}

.cta-band .section-header p {
  color: rgba(233,236,229,0.62);
}

.cta-band .btn-primary {
  border-color: #e9ece5;
  background: #e9ece5;
  color: #1a1f1a;
}

.cta-band .btn-primary:hover {
  border-color: var(--secondary);
  background: var(--secondary);
}

footer {
  padding: 34px 0;
  background: var(--footer-surface);
  color: rgba(233,236,229,0.62);
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

footer .logo,
footer a {
  color: #e9ece5;
}

footer .logo-mark {
  border-color: rgba(233,236,229,0.24);
  color: var(--secondary);
}

@media (max-width: 920px) {
  .nav-links {
    display: none;
  }

  .hero-grid,
  .grid,
  .steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 28px, var(--max));
  }

  .nav {
    gap: 12px;
  }

  .nav-actions .btn {
    display: none;
  }

  h1 {
    font-size: clamp(44px, 14vw, 62px);
  }

  .hero {
    min-height: auto;
    padding-top: 122px;
  }
}
