:root {
  --paper: #F2ECD9;
  --paper-2: #EAE2C9;
  --ink: #201D14;
  --ink-soft: #4A4636;
  --ledger: #0F3C2E;
  --ledger-light: #1B5A42;
  --ledger-lighter: #24704F;
  --gold: #C0913A;
  --gold-light: #DDB35F;
  --stamp: #A23B2C;
  --muted: #8B8368;
  --line: #D8CDA9;
  --radius: 4px;

  --font-display: 'Zilla Slab', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; margin-bottom: 0.5rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.eyebrow.on-dark { color: var(--gold-light); }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.section-lede {
  color: var(--ink-soft);
  max-width: 560px;
  font-size: 1.02rem;
  margin-top: 0.6rem;
  margin-bottom: 2.2rem;
}
.section-lede.on-dark { color: #D9E6DD; }

.section-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}
.section-inner.narrow { max-width: 780px; }

.section { padding: 84px 0; }

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(242, 236, 217, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  font-family: var(--font-mono);
  font-weight: 600;
  background: var(--ledger);
  color: var(--gold-light);
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  font-size: 0.85rem;
}
.brand-mark.light { background: var(--gold); color: var(--ledger); }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}
.brand-name.light { color: var(--paper); }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-weight: 500;
}
.nav-links a:hover { color: var(--ledger); }

.nav-cta {
  background: var(--ledger);
  color: var(--paper);
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--ledger-light); }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.96rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--gold-light); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-dark { background: var(--ledger); color: var(--paper); }
.btn-dark:hover { background: var(--ledger-light); }
.btn.full { width: 100%; }

/* HERO */
.hero {
  padding: 72px 0 60px;
  background:
    repeating-linear-gradient(180deg, transparent, transparent 34px, rgba(32,29,20,0.035) 35px);
}
.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1.05fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero .hl { color: var(--ledger); }
.lede {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 520px;
  margin: 22px 0 30px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.trust-row {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  border-top: 1px dashed var(--line);
  padding-top: 22px;
}
.trust-item { display: flex; flex-direction: column; gap: 2px; }
.trust-item strong {
  font-family: var(--font-mono);
  color: var(--ledger);
  font-size: 1rem;
}
.trust-item span { font-size: 0.8rem; color: var(--muted); }

/* HERO RECEIPT VISUAL */
.hero-visual { position: relative; height: 460px; max-width: 100%; }
.receipt-card {
  position: absolute;
  top: 10px;
  left: 20px;
  width: clamp(230px, 78vw, 300px);
  background: #FFFDF6;
  border-radius: 3px;
  box-shadow: 0 24px 50px -18px rgba(15, 60, 46, 0.45), 0 2px 8px rgba(0,0,0,0.08);
  padding: clamp(18px, 4vw, 26px) clamp(16px, 4vw, 24px) clamp(26px, 5vw, 34px);
  transform: rotate(-4deg);
  z-index: 2;
}
.receipt-card-back {
  position: absolute;
  top: 42px;
  left: clamp(40px, 12vw, 60px);
  width: clamp(230px, 78vw, 300px);
  height: 420px;
  background: #EFE7CE;
  border-radius: 3px;
  transform: rotate(5deg);
  z-index: 1;
  box-shadow: 0 14px 30px -12px rgba(15,60,46,0.3);
}
.receipt-head { text-align: center; margin-bottom: 14px; }
.receipt-shop {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ledger);
}
.receipt-sub { font-size: 0.68rem; color: var(--muted); margin-top: 2px; }
.receipt-band {
  background: var(--ledger);
  color: var(--paper);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 7px 0;
  margin: 12px 0 16px;
}
.receipt-rows { font-family: var(--font-mono); font-size: 0.78rem; }
.r-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  color: var(--ink-soft);
}
.r-row.divider { border-top: 1px dashed var(--line); margin: 4px 0; padding: 0; }
.r-row.bold { color: var(--ink); font-weight: 600; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; }
.receipt-stamp {
  position: absolute;
  right: 26px;
  bottom: 46px;
  border: 2.5px solid var(--stamp);
  color: var(--stamp);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 12px;
  transform: rotate(-14deg);
  opacity: 0.85;
  border-radius: 3px;
  letter-spacing: 0.05em;
}
.receipt-tear {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 14px;
  background:
    linear-gradient(-45deg, #FFFDF6 6px, transparent 0),
    linear-gradient(45deg, #FFFDF6 6px, transparent 0);
  background-size: 14px 14px;
  background-repeat: repeat-x;
  background-position: bottom;
}

/* PROBLEM */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.problem-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
}
.pnum {
  display: block;
  font-family: var(--font-mono);
  color: var(--gold);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.problem-card p { color: var(--ink-soft); font-size: 0.94rem; }

/* FEATURES */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 20px;
}
.feature-stub {
  background: #FFFDF6;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  position: relative;
  clip-path: polygon(
    0 0, 100% 0, 100% calc(100% - 8px),
    92% 100%, 84% calc(100% - 8px), 76% 100%, 68% calc(100% - 8px),
    60% 100%, 52% calc(100% - 8px), 44% 100%, 36% calc(100% - 8px),
    28% 100%, 20% calc(100% - 8px), 12% 100%, 4% calc(100% - 8px), 0 100%
  );
  padding-bottom: 36px;
}
.feature-icon {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ledger);
  background: var(--paper-2);
  border: 1px solid var(--line);
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 3px;
  margin-bottom: 14px;
}
.feature-stub p { color: var(--ink-soft); font-size: 0.92rem; }

/* HOW IT WORKS */
.how { background: var(--paper-2); }
.steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 34px 40px;
  margin-top: 40px;
}
.step { position: relative; padding-left: 4px; }
.step-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 2rem;
  color: var(--ledger-lighter);
  opacity: 0.35;
  font-weight: 600;
  margin-bottom: 6px;
}
.step p { color: var(--ink-soft); font-size: 0.92rem; }

/* TRIAL */
.trial-card {
  background: var(--ledger);
  border-radius: 10px;
  padding: 56px 44px;
  position: relative;
  overflow: hidden;
}
.trial-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, transparent, transparent 30px, rgba(255,255,255,0.025) 31px);
}
.trial-card h2, .trial-card p, .trial-form { position: relative; z-index: 1; }
.trial-card h2.on-dark { color: var(--paper); }

.trial-form { max-width: 500px; margin: 0 auto; }
.form-row { display: flex; gap: 12px; margin-bottom: 12px; }
.form-row input { flex: 1; }
input, textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: 0.94rem;
  background: #FFFDF6;
  color: var(--ink);
}
.trial-form textarea, .contact-form textarea { resize: vertical; }
.trial-form input:focus, .contact-form input:focus, .contact-form textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; }
.contact-form { display: flex; flex-direction: column; gap: 12px; }
.form-msg { margin-top: 12px; font-size: 0.88rem; text-align: center; min-height: 1.2em; }

/* DOWNLOAD */
.download-actions { margin: 28px 0 14px; }
.download-note { font-size: 0.82rem; color: var(--muted); font-family: var(--font-mono); }

/* CONTACT */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  margin-top: 40px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 18px; }
.contact-line {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: #FFFDF6;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.contact-line:hover { border-color: var(--gold); }
.contact-icon {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ledger);
  background: var(--paper-2);
  border: 1px solid var(--line);
  width: 34px; height: 34px;
  min-width: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 3px;
}
.contact-line strong { display: block; font-size: 0.92rem; }
.contact-line span { font-size: 0.85rem; color: var(--muted); }

/* FOOTER */
.footer { background: var(--ledger); color: #C9D6CD; padding: 36px 0; margin-top: 20px; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.footer p { font-size: 0.85rem; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { height: 340px; margin: 20px auto 0; max-width: 320px; width: 100%; }
  .problem-grid, .feature-grid, .steps { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 380px) {
  .hero-visual { height: 300px; }
}
@media (max-width: 520px) {
  .form-row { flex-direction: column; }
  .trial-card { padding: 36px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
