/* Wardbloom — premium editorial design system
   Palette: deep forest green, warm ivory, bronze accent. Fraunces + Inter. */

:root {
  --ivory: #F7F2E8;
  --ivory-2: #EFE8D9;
  --paper: #FFFDF8;
  --ink: #1A201A;
  --ink-soft: #4A5245;
  --green: #1C3527;
  --green-deep: #122118;
  --green-mid: #2A4A36;
  --bronze: #B0803E;
  --bronze-soft: #C9A063;
  --line: #DDD3BE;
  --line-dark: rgba(247, 242, 232, 0.16);
  --error: #9C3A2E;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(18, 33, 24, 0.14);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }

/* ---------- Type ---------- */
.kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze);
}
.kicker.on-dark { color: var(--bronze-soft); }

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

.display {
  font-size: clamp(2.7rem, 6vw, 4.4rem);
  line-height: 1.06;
}
.h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.14; }
.h3 { font-size: 1.35rem; line-height: 1.3; }

.lede { font-size: 1.14rem; color: var(--ink-soft); max-width: 56ch; }
.lede.on-dark { color: rgba(247, 242, 232, 0.78); }

/* ---------- Layout ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 2.5rem); }
section { padding-block: clamp(4.2rem, 9vw, 7.2rem); }
.rule { border: none; border-top: 1px solid var(--line); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  padding: 0.95rem 1.7rem;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}
.btn-primary { background: var(--green); color: var(--ivory); }
.btn-primary:hover { background: var(--green-deep); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn-ghost.on-dark { color: var(--ivory); border-color: rgba(247,242,232,0.4); }
.btn-ghost.on-dark:hover { border-color: var(--ivory); }
.btn-bronze { background: var(--bronze); color: #FFFDF8; }
.btn-bronze:hover { background: #9C6F33; transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 1.1rem 2.1rem; font-size: 1.05rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(18, 33, 24, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-dark);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 0.9rem; }
.wordmark { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ivory); text-decoration: none; }
.wordmark svg { width: 26px; height: 26px; }
.wordmark span { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: 0.01em; }
.nav-links { display: flex; gap: 1.8rem; align-items: center; }
.nav-links a { color: rgba(247,242,232,0.75); text-decoration: none; font-size: 0.92rem; }
.nav-links a:hover { color: var(--ivory); }
.nav .btn { padding: 0.6rem 1.15rem; font-size: 0.88rem; }
@media (max-width: 720px) { .nav-links a.nav-hide { display: none; } }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 500px at 50% -80px, rgba(201, 160, 99, 0.14), transparent 65%),
    var(--green-deep);
  color: var(--ivory);
  text-align: center;
  padding-block: clamp(5.5rem, 11vw, 8.5rem) clamp(4rem, 8vw, 6rem);
}
.hero .display { max-width: 17ch; margin: 1.4rem auto 1.5rem; }
.hero .lede { margin: 0 auto 2.6rem; }
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.trust-strip {
  margin: 3.2rem auto 0;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: rgba(247,242,232,0.55);
  max-width: 62ch;
}
.trust-strip strong { color: rgba(247,242,232,0.8); font-weight: 600; }

/* ---------- Sections ---------- */
.section-head { max-width: 640px; margin-bottom: clamp(2.4rem, 5vw, 3.6rem); }
.section-head .kicker { display: block; margin-bottom: 1rem; }
.center { text-align: center; margin-inline: auto; }

/* Question cards */
.q-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 900px) { .q-grid { grid-template-columns: 1fr; } }
.q-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
}
.q-card blockquote {
  font-family: var(--font-display);
  font-size: 1.28rem;
  line-height: 1.35;
  margin-bottom: 1rem;
  color: var(--green);
}
.q-card p { color: var(--ink-soft); font-size: 0.97rem; }

/* Feature band (dark) */
.band {
  background: var(--green);
  color: var(--ivory);
  text-align: center;
}
.band .h2 { max-width: 20ch; margin: 1.2rem auto 1.4rem; }
.band .lede { margin: 0 auto 2.4rem; }

/* Capability cards */
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 900px) { .cap-grid { grid-template-columns: 1fr; } }
.cap-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.cap-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.cap-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--ivory-2);
  display: grid; place-items: center;
  margin-bottom: 1.2rem;
  color: var(--green);
}
.cap-icon svg { width: 22px; height: 22px; }
.cap-card h3 { margin-bottom: 0.7rem; }
.cap-card p { color: var(--ink-soft); font-size: 0.97rem; }

/* Steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 0.6rem; }
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--bronze);
  display: block;
  margin-bottom: 0.6rem;
}
.step h3 { margin-bottom: 0.6rem; }
.step p { color: var(--ink-soft); font-size: 0.97rem; }

/* Pricing */
.pricing {
  background: var(--green-deep);
  color: var(--ivory);
}
.pricing-card {
  max-width: 620px;
  margin: 0 auto;
  background: rgba(247, 242, 232, 0.04);
  border: 1px solid var(--line-dark);
  border-radius: 18px;
  padding: clamp(2.2rem, 5vw, 3.4rem);
  text-align: center;
}
.price { font-family: var(--font-display); font-size: clamp(3.2rem, 7vw, 4.6rem); line-height: 1; margin: 1.4rem 0 0.4rem; }
.price small { font-size: 1.1rem; font-family: var(--font-body); color: rgba(247,242,232,0.6); }
.includes { list-style: none; text-align: left; margin: 2.2rem 0; display: grid; gap: 0.85rem; }
.includes li { display: flex; gap: 0.75rem; align-items: baseline; color: rgba(247,242,232,0.85); font-size: 0.98rem; }
.includes li::before { content: "—"; color: var(--bronze-soft); flex: none; }
.fineprint { font-size: 0.85rem; color: rgba(247,242,232,0.55); margin-top: 1.2rem; }

/* FAQ */
.faq-list { max-width: 760px; margin: 0 auto; }
details {
  border-bottom: 1px solid var(--line);
  padding: 1.4rem 0;
}
details summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.18rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--bronze); font-size: 1.4rem; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin-top: 0.9rem; color: var(--ink-soft); font-size: 0.98rem; max-width: 64ch; }

/* Footer */
.footer {
  background: var(--green-deep);
  color: rgba(247,242,232,0.6);
  padding-block: 3.2rem;
  border-top: 1px solid var(--line-dark);
  font-size: 0.9rem;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.footer-links { display: flex; gap: 1.6rem; }
.footer a { color: rgba(247,242,232,0.6); text-decoration: none; }
.footer a:hover { color: var(--ivory); }

/* ---------- Checkout modal ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(12, 22, 16, 0.6);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center; justify-content: center;
  padding: 1.2rem;
}
.overlay.open { display: flex; }
.modal {
  background: var(--paper);
  border-radius: 18px;
  width: 100%;
  max-width: 540px;
  max-height: min(92vh, 860px);
  overflow-y: auto;
  padding: clamp(1.6rem, 4vw, 2.4rem);
  position: relative;
}
@media (max-width: 560px) {
  .overlay { padding: 0; align-items: stretch; }
  .modal { max-width: none; max-height: none; border-radius: 0; min-height: 100dvh; }
}
.modal-close {
  position: absolute; top: 1.1rem; right: 1.1rem;
  background: none; border: none; cursor: pointer;
  font-size: 1.5rem; line-height: 1; color: var(--ink-soft);
  padding: 0.3rem;
}
.modal h2 { font-size: 1.6rem; margin-bottom: 0.4rem; }
.modal-sub { color: var(--ink-soft); font-size: 0.93rem; margin-bottom: 1.6rem; }

.dots { display: flex; gap: 0.5rem; margin-bottom: 1.8rem; }
.dot { width: 100%; height: 3px; border-radius: 2px; background: var(--line); }
.dot.active { background: var(--bronze); }

.step-pane { display: none; }
.step-pane.active { display: block; animation: fadein 0.25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.field { margin-bottom: 0.9rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.45rem; color: var(--ink); }
.field input[type="email"], .field input[type="text"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--font-body);
  background: #FFFEFA;
  color: var(--ink);
}
.field input:focus {
  outline: 2px solid var(--bronze-soft);
  outline-offset: 1px;
  border-color: var(--bronze);
}
.hint { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.4rem; }

/* Brand selector */
.brand-search { position: relative; margin-bottom: 1rem; }
.brand-chips {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  max-height: 190px; overflow-y: auto;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #FFFEFA;
  margin-bottom: 0.6rem;
}
.chip {
  border: 1px solid var(--line);
  background: var(--ivory);
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--ink);
  transition: all 0.12s ease;
}
.chip:hover { border-color: var(--green); }
.chip.selected { background: var(--green); color: var(--ivory); border-color: var(--green); }
.chip-note { font-size: 0.78rem; color: var(--ink-soft); padding: 0.3rem 0.4rem; }

.eco-label { font-size: 0.85rem; font-weight: 600; margin: 1.2rem 0 0.6rem; }
.eco-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Summary + payment */
.summary {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--ivory);
  padding: 0.85rem 1.05rem;
  margin-bottom: 1.1rem;
  font-size: 0.9rem;
}
.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; }
.summary-row .k { color: var(--ink-soft); flex: none; }
.summary-row .v { text-align: right; font-weight: 500; word-break: break-word; }
.summary-total { border-top: 1px solid var(--line); margin-top: 0.5rem; padding-top: 0.7rem; font-weight: 600; }

.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.9rem; }
.card-grid .span2 { grid-column: span 2; }
@media (max-width: 480px) { .card-grid { grid-template-columns: 1fr; } .card-grid .span2 { grid-column: span 1; } }

.assurance {
  display: flex; gap: 0.6rem; align-items: flex-start;
  font-size: 0.82rem; color: var(--ink-soft);
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  margin: 0.9rem 0;
}
.assurance svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--green); }

.form-error { color: var(--error); font-size: 0.85rem; margin-top: 0.7rem; display: none; }
.form-error.show { display: block; }
.modal.shake { animation: shake 0.35s ease; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(247,242,232,0.35);
  border-top-color: var(--ivory);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Beta page */
.beta-wrap {
  min-height: 100dvh;
  background:
    radial-gradient(900px 420px at 50% -60px, rgba(201,160,99,0.16), transparent 65%),
    var(--green-deep);
  color: var(--ivory);
  display: flex; align-items: center;
  padding: 3rem 1.2rem;
}
.beta-card { max-width: 640px; margin: 0 auto; text-align: center; }
.beta-card .display { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 1.3rem 0 1.2rem; }
.beta-summary {
  text-align: left;
  background: rgba(247,242,232,0.05);
  border: 1px solid var(--line-dark);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  margin: 2.2rem 0;
  font-size: 0.95rem;
}
.beta-summary .summary-row { padding: 0.35rem 0; }
.beta-summary .k { color: rgba(247,242,232,0.55); flex: none; }
.beta-fine { font-size: 0.84rem; color: rgba(247,242,232,0.5); margin-top: 1.6rem; }
.beta-check {
  width: 64px; height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  border: 1px solid var(--bronze-soft);
  display: grid; place-items: center;
  color: var(--bronze-soft);
}
.beta-check svg { width: 28px; height: 28px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

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