/* ---------------------------------------------------------------------------
   Quarterly — marketing + auth pages. Shares the app's design tokens
   (src/styles.css): ledger green + receipt paper, Archivo display, quiet
   everywhere except the stamp.
--------------------------------------------------------------------------- */
:root {
  --ink: #16241f;
  --ink-soft: #3d4f48;
  --paper: #f4f5f2;
  --card: #ffffff;
  --line: #dfe3dd;
  --green: #1e6b4e;
  --green-deep: #144c37;
  --gold: #e8b93c;
  --amber: #d9930d;
  --red: #c0392b;
  --radius: 14px;
  --font-display: 'Archivo', system-ui, sans-serif;
  --font-body: 'Public Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }
/* scroll-padding keeps anchor targets clear of the sticky header */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  max-width: 1020px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: rgba(244, 245, 242, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  display: inline-grid; grid-template-columns: 1fr 1fr; gap: 2px;
  width: 22px; height: 22px; background: var(--green); border-radius: 5px; padding: 3px;
}
.brand-mark i { background: var(--paper); border-radius: 2px; }
.brand-mark i.lit { background: var(--gold); }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; font-stretch: 90%; }

.site-nav { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 15px; }
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-signin { color: var(--green); }

.btn-gold {
  background: var(--gold); color: var(--ink) !important; border: none; border-radius: 10px;
  font: 700 15px var(--font-body); padding: 11px 18px; text-decoration: none;
  display: inline-block; cursor: pointer;
}
.btn-gold:hover { filter: brightness(1.04); }
.btn-gold.big { padding: 14px 26px; font-size: 16px; }
.btn-gold:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-quiet {
  background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 10px;
  font: 600 15px var(--font-body); padding: 11px 18px; text-decoration: none;
  display: inline-block; cursor: pointer;
}
.btn-quiet:hover { border-color: var(--ink-soft); }

/* ---- hero ---- */
.hero {
  max-width: 1020px; margin: 0 auto; padding: 48px 20px 26px;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center;
}
.eyebrow {
  margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--green);
}
.hero h1 {
  font-family: var(--font-display); font-weight: 900; letter-spacing: -0.02em;
  font-size: clamp(32px, 5.4vw, 52px); line-height: 1.06; margin: 0 0 16px;
}
.lede { font-size: 18px; color: var(--ink-soft); margin: 0 0 22px; max-width: 34em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-note { margin: 18px 0 0; font-size: 13px; color: var(--ink-soft); max-width: 32em; }

/* the one loud element — same stamp as the app dashboard */
.hero-visual { display: flex; justify-content: center; }
.stamp-demo {
  display: flex; gap: 20px; align-items: center;
  background: var(--green-deep); color: #fff;
  border-radius: var(--radius); padding: 26px; max-width: 380px;
  box-shadow: 0 18px 40px rgba(22, 36, 31, 0.18);
  transform: rotate(1.5deg);
}
.stamp-ring {
  flex-shrink: 0; width: 104px; height: 104px; border-radius: 50%;
  border: 3px dashed var(--gold);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transform: rotate(-6deg);
}
.stamp-days { font-family: var(--font-display); font-size: 36px; font-weight: 900; line-height: 1; }
.stamp-unit { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); }
.stamp-eyebrow {
  margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gold);
}
.stamp-title { font-family: var(--font-display); font-weight: 800; font-size: 17px; margin: 4px 0 2px; }
.stamp-sub { margin: 0; font-size: 13px; color: #cfe0d7; }

/* ---- features ---- */
.features {
  max-width: 1020px; margin: 0 auto; padding: 30px 20px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
.feature h2 { font-family: var(--font-display); font-weight: 800; font-size: 18px; margin: 0 0 8px; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ---- how it works ---- */
.section-title {
  font-family: var(--font-display); font-weight: 900; letter-spacing: -0.01em;
  font-size: clamp(24px, 3.6vw, 34px); text-align: center; margin: 0 0 26px;
}
.how { max-width: 1020px; margin: 0 auto; padding: 44px 20px 18px; }
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: step;
}
.steps li {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; position: relative;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--green); color: #fff;
  font: 800 16px var(--font-display); margin-bottom: 10px;
}
.steps h3 { font-family: var(--font-display); font-weight: 800; font-size: 17px; margin: 0 0 6px; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ---- pricing ---- */
.pricing { max-width: 1020px; margin: 0 auto; padding: 44px 20px 18px; }
.price-card {
  max-width: 420px; margin: 0 auto; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px;
}
.price { margin: 0 0 14px; color: var(--ink-soft); font-size: 17px; }
.price-amount {
  font-family: var(--font-display); font-weight: 900; font-size: 52px; color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em; margin-right: 4px;
}
.price-list { list-style: none; margin: 0 0 20px; padding: 0; color: var(--ink-soft); font-size: 15px; }
.price-list li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.price-list li:last-child { border-bottom: none; }
.price-note { margin: 12px 0 0; font-size: 13px; color: var(--green); font-weight: 600; }

/* ---- FAQ ---- */
.faq { max-width: 720px; margin: 0 auto; padding: 44px 20px 18px; }
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 0 18px; margin-bottom: 10px;
}
.faq summary {
  cursor: pointer; font-weight: 700; font-size: 15px; padding: 15px 0;
  list-style-position: outside;
}
.faq details p { margin: 0 0 16px; color: var(--ink-soft); font-size: 15px; }

/* ---- CTA band ---- */
.cta-band {
  max-width: 1020px; margin: 40px auto 0; padding: 44px 24px; text-align: center;
  background: var(--green-deep); border-radius: var(--radius) var(--radius) 0 0; color: #fff;
}
.cta-band h2 {
  font-family: var(--font-display); font-weight: 900; letter-spacing: -0.01em;
  font-size: clamp(22px, 3.4vw, 30px); margin: 0 0 18px;
}

/* ---- footer ---- */
.site-foot { max-width: 1020px; margin: 0 auto; padding: 22px 20px 40px; }
.site-foot p { font-size: 12px; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 14px; margin: 0 0 8px; }
.site-foot .foot-meta { border-top: none; padding-top: 0; }
.site-foot a { color: var(--green); }

/* ---- auth pages ---- */
.auth-main { max-width: 430px; margin: 6vh auto 0; padding: 0 20px; }
.auth-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px;
}
.auth-card h1 { font-family: var(--font-display); font-weight: 800; font-size: 24px; margin: 0 0 6px; }
.auth-sub { margin: 0 0 18px; color: var(--ink-soft); }
.auth-card form { display: flex; flex-direction: column; gap: 8px; }
.auth-card label { font-weight: 600; font-size: 14px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.forgot { font-size: 13px; color: var(--green); }
.auth-card input {
  font: 500 15px var(--font-body); padding: 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); width: 100%;
}
.auth-card input[aria-invalid='true'] { border-color: var(--red); }
.password-field { display: flex; flex-direction: column; gap: 8px; }
.password-field[hidden] { display: none; }
.field-error { margin: 0; color: var(--red); font-size: 13px; font-weight: 600; }
.auth-card .btn-gold.big { margin-top: 8px; width: 100%; }

/* First / last name side by side */
.name-row { display: flex; gap: 10px; }
.name-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }

/* Native <select> restyled to match the inputs, with a custom chevron */
.auth-card select {
  font: 500 15px var(--font-body); padding: 12px 40px 12px 12px; border-radius: 10px;
  border: 1px solid var(--line); background-color: var(--card); color: var(--ink); width: 100%;
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23708090' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.auth-card select:focus-visible { border-color: var(--green); }

/* Custom dropdown (select-enhance.js) — fully-styled, consistently aligned
   popup replacing the native option list. Native select is kept but hidden. */
.select-enh { position: relative; }
.select-enh-native { display: none; }
.select-enh-btn {
  width: 100%; font: 500 15px var(--font-body); padding: 12px 40px 12px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink);
  text-align: left; cursor: pointer; display: flex; align-items: center;
}
.select-enh-btn:focus-visible { border-color: var(--green); }
.select-enh-label { flex: 1; }
.select-enh-chevron {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: #708090; transition: transform 0.15s ease; pointer-events: none;
}
.select-enh.open .select-enh-chevron { transform: translateY(-50%) rotate(180deg); }
.select-enh-list {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0;
  margin: 0; padding: 6px; list-style: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20, 36, 31, 0.16);
}
.select-enh-list[hidden] { display: none; }
.select-enh-opt {
  display: flex; align-items: center; min-height: 40px; padding: 8px 12px;
  border-radius: 8px; font: 500 15px var(--font-body); color: var(--ink); cursor: pointer;
}
.select-enh-opt:hover { background: #eef3f0; }
.select-enh-opt[aria-selected='true'] { background: #e6f0ea; font-weight: 600; }

/* VAT checkbox row. The generic ".auth-card input" makes inputs full-width;
   reset that for the checkbox and lay the row out neatly. */
.auth-card .auth-check {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-weight: 500; margin-top: 4px;
}
.auth-card input[type="checkbox"] {
  width: 18px; height: 18px; flex: 0 0 auto; margin: 0; padding: 0;
  accent-color: var(--green); cursor: pointer;
}

/* Show / hide password eye button (injected by password-toggle.js) */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle {
  position: absolute; top: 0; right: 0; height: 100%; width: 44px;
  display: grid; place-items: center; background: none; border: none; padding: 0;
  color: var(--ink-soft); cursor: pointer;
}
.pw-toggle:hover { color: var(--ink); }
.magic-toggle { border: none; color: var(--green); font-size: 14px; padding: 8px 0 0; background: none; }
.auth-notice {
  margin: 14px 0 0; padding: 10px 12px; border-radius: 10px;
  background: #fbf0d9; color: var(--amber); font-size: 13px; font-weight: 600;
}
.auth-fineprint { margin: 16px 0 0; font-size: 12px; color: var(--ink-soft); }
.auth-switch { margin: 14px 0 0; font-size: 14px; color: var(--ink-soft); }
.auth-switch a { color: var(--green); }
.auth-page .site-foot { max-width: 470px; }

/* ---- responsive ---- */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 30px; }
  .hero-visual { order: -1; }
  .stamp-demo { transform: rotate(0deg); }
  .features, .steps { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  /* Mobile header: brand on its own row; nav below it full-width with the
     section links on the left and Sign in / Sign up pushed to the right.
     Tighter gap + font here so the row fits a 375px screen. */
  .site-nav--fill { flex-basis: 100%; margin-left: 0; gap: 10px; flex-wrap: nowrap; }
  .site-nav--fill a { font-size: 14px; }
  .site-nav--fill .nav-signin { margin-left: auto; }
  .site-nav--fill .btn-gold { padding: 9px 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
