:root {
  --font-serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', Palatino, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --bg: #fcf9f6;
  --surface: #f6eee7;
  --border: #e4cdb7;
  --accent: #815e46;
  --accent-ink: #5c4634;
  --text: #3e332e;
  --radius: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 48px;
  --sp-6: 64px;
  --sp-7: 96px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.05;
  margin: 0;
  color: var(--text);
}

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

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--sp-4);
}

/* Header */
header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) 0;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: 0.01em;
}

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover { background: var(--accent-ink); }
.btn:active { transform: scale(0.98); }

.eyebrow {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: var(--sp-2);
  display: block;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: var(--sp-6);
  align-items: center;
  padding: var(--sp-7) 0 var(--sp-6);
}

.hero h1 {
  font-size: 4rem;
  letter-spacing: -0.02em;
}

.hero .sub {
  margin-top: var(--sp-3);
  font-size: 1.2rem;
  max-width: 46ch;
  color: var(--text);
  opacity: 0.85;
}

.hero .cta-row {
  margin-top: var(--sp-4);
  display: flex;
  gap: var(--sp-3);
  align-items: center;
}

.hero .cta-note {
  font-size: 0.85rem;
  opacity: 0.65;
}

.hero-visual {
  position: relative;
}

.qr-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-5);
  transform: rotate(-2deg);
  box-shadow: 0 24px 48px -24px rgba(62, 51, 46, 0.25);
}

.qr-card .qr {
  width: 140px;
  height: 140px;
  margin: 0 auto var(--sp-3);
  background-image:
    linear-gradient(var(--text) 40%, transparent 0),
    linear-gradient(90deg, var(--text) 40%, transparent 0);
  background-size: 20px 20px;
  background-color: #fff;
  border: 10px solid #fff;
  border-radius: 4px;
  position: relative;
}

.qr-card .caption {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-ink);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.qr-card .window-label {
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  margin-top: var(--sp-2);
  opacity: 0.75;
}

/* Section shell */
section {
  padding: var(--sp-6) 0;
}

section.tinted {
  background: var(--surface);
}

.section-head {
  max-width: 60ch;
  margin-bottom: var(--sp-5);
}

.section-head h2 {
  font-size: 2.5rem;
  letter-spacing: -0.01em;
}

.section-head .sub {
  margin-top: var(--sp-2);
  opacity: 0.8;
}

/* Flow visualization */
.flow {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.flow-step {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
}

.flow-step:last-child { border-bottom: none; }

.flow-step:nth-child(even) {
  grid-template-columns: 1fr 96px;
}

.flow-step:nth-child(even) .flow-icon { order: 2; }
.flow-step:nth-child(even) .flow-text { order: 1; text-align: right; }

.flow-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--accent-ink);
  flex-shrink: 0;
}

.flow-text h3 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.flow-text p {
  margin: 0;
  opacity: 0.8;
  font-size: 0.98rem;
}

/* How it would work */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-4);
}

.step-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-4);
}

.step-card .num {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--accent);
  display: block;
  margin-bottom: var(--sp-2);
}

.step-card p {
  margin: 0;
  font-weight: 500;
}

/* Market context */
.stat-block {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: var(--sp-5);
  align-items: center;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 4.5rem;
  line-height: 1;
  color: var(--accent-ink);
}

.stat-block .sub {
  opacity: 0.8;
}

.stat-source {
  display: block;
  margin-top: var(--sp-2);
  font-size: 0.78rem;
  opacity: 0.6;
}

/* Final CTA */
.final-cta {
  text-align: left;
  max-width: 60ch;
}

.final-cta h2 {
  font-size: 2.75rem;
  margin-bottom: var(--sp-3);
}

.final-cta .sub {
  margin-bottom: var(--sp-4);
}

/* Footer */
footer.site {
  border-top: 1px solid var(--border);
  padding: var(--sp-5) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3);
  font-size: 0.88rem;
  opacity: 0.8;
}

footer.site nav a {
  margin-left: var(--sp-3);
  text-decoration: none;
}

footer.site nav a:hover { text-decoration: underline; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(62, 51, 46, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-3);
  z-index: 100;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg);
  border-radius: var(--radius);
  padding: var(--sp-5);
  max-width: 440px;
  width: 100%;
  position: relative;
  box-shadow: 0 32px 64px -24px rgba(62, 51, 46, 0.35);
}

.modal h3 {
  font-size: 1.9rem;
  margin-bottom: var(--sp-2);
}

.modal .sub {
  opacity: 0.8;
  font-size: 0.95rem;
  margin-bottom: var(--sp-4);
}

.modal label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.modal input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  margin-bottom: var(--sp-3);
  background: #fff;
}

.modal input[type="email"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.consent-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: var(--sp-4);
  font-size: 0.85rem;
  opacity: 0.85;
}

.consent-row input { margin-top: 4px; }
.consent-row label { margin: 0; font-weight: 400; }

.modal .close {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text);
  opacity: 0.6;
  line-height: 1;
}

.modal .close:hover { opacity: 1; }

.modal .status {
  margin-top: var(--sp-3);
  font-size: 0.9rem;
  display: none;
}

.modal .status.show { display: block; }

.modal .status.error { color: #a3341f; }
.modal .status.success { color: #2f6b4f; }

.modal button[type="submit"] {
  width: 100%;
}

.modal button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: var(--sp-6); }
  .hero h1 { font-size: 2.75rem; }
  .stat-block { grid-template-columns: 1fr; }
  .flow-step, .flow-step:nth-child(even) {
    grid-template-columns: 64px 1fr;
  }
  .flow-step:nth-child(even) .flow-icon { order: 0; }
  .flow-step:nth-child(even) .flow-text { order: 0; text-align: left; }
}

/* Legal pages */
.legal { max-width: 68ch; margin: 0 auto; padding: var(--sp-6) var(--sp-4); }
.legal h1 { font-size: 2.5rem; margin-bottom: var(--sp-4); }
.legal h2 { font-size: 1.4rem; margin-top: var(--sp-5); margin-bottom: var(--sp-2); }
.legal p, .legal li { opacity: 0.85; }
.legal a.back { display: inline-block; margin-bottom: var(--sp-4); text-decoration: none; }
