/* ============================================================
   site.css — shared design system for the checkout pages.

   Lines 1-<extracted> are lifted verbatim from index.html so the
   tokens, card, and button styles cannot drift from the live page.
   Regenerate with the sed range in DEPLOY.md if index.html changes.
   ============================================================ */

:root {
    --bg: #FBF6EF;
    --bg-soft: #F4ECDF;
    --surface: #FFFDF9;
    --surface-alt: #F3EADB;
    --ink: #241C15;
    --ink-soft: #6C6053;
    --ink-faint: #8F8474;
    --accent: #E2622E;
    --accent-soft: #F8DFCC;
    --accent-deep: #B8481E;
    --accent-ink: #FBF1E4;
    --contrast-bg: #241C15;
    --contrast-ink: #F7EEDF;
    --rule: rgba(36,28,21,0.12);
    --rule-soft: rgba(36,28,21,0.07);
    --success: #4C7A57;
    --shadow-sm: 0 1px 2px rgba(36,28,21,0.06);
    --shadow-md: 0 10px 28px rgba(36,28,21,0.09);
    --shadow-lg: 0 24px 56px rgba(36,28,21,0.14);
    --font-display: 'Fraunces', ui-serif, Georgia, 'Times New Roman', serif;
    --font-body: 'Karla', ui-sans-serif, system-ui, -apple-system, sans-serif;
    --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #1B1611;
      --bg-soft: #211A14;
      --surface: #241D16;
      --surface-alt: #2B2319;
      --ink: #F4ECDD;
      --ink-soft: #BBAD99;
      --ink-faint: #8C8071;
      --accent: #F0855A;
      --accent-soft: rgba(240,133,90,0.16);
      --accent-deep: #F5A17C;
      --accent-ink: #241205;
      --contrast-bg: #F4ECDD;
      --contrast-ink: #201A12;
      --rule: rgba(244,236,221,0.14);
      --rule-soft: rgba(244,236,221,0.08);
      --success: #86C296;
      --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
      --shadow-md: 0 10px 28px rgba(0,0,0,0.38);
      --shadow-lg: 0 24px 56px rgba(0,0,0,0.5);
    }
  }
  :root[data-theme="dark"] {
    --bg: #1B1611;
    --bg-soft: #211A14;
    --surface: #241D16;
    --surface-alt: #2B2319;
    --ink: #F4ECDD;
    --ink-soft: #BBAD99;
    --ink-faint: #8C8071;
    --accent: #F0855A;
    --accent-soft: rgba(240,133,90,0.16);
    --accent-deep: #F5A17C;
    --accent-ink: #241205;
    --contrast-bg: #F4ECDD;
    --contrast-ink: #201A12;
    --rule: rgba(244,236,221,0.14);
    --rule-soft: rgba(244,236,221,0.08);
    --success: #86C296;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 10px 28px rgba(0,0,0,0.38);
    --shadow-lg: 0 24px 56px rgba(0,0,0,0.5);
  }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  [id] { scroll-margin-top: 92px; }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
  }
  a { color: inherit; }
  h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; color: var(--ink); }
  p { margin: 0; }
  ul { margin: 0; padding: 0; list-style: none; }
  button { font-family: inherit; }
  svg.icon { display: block; flex-shrink: 0; }

  .container { max-width: 1120px; margin: 0 auto; padding-left: clamp(1.1rem, 4vw, 2.25rem); padding-right: clamp(1.1rem, 4vw, 2.25rem); }

  .eyebrow { font-family: var(--font-body); font-size: 0.76rem; letter-spacing: 0.11em; text-transform: uppercase; color: var(--accent-deep); font-weight: 700; }

  .panel { padding-top: clamp(3rem, 5.5vw, 5rem); padding-bottom: clamp(3rem, 5.5vw, 5rem); }
  .panel--tight { padding-top: clamp(2.25rem, 4vw, 3.25rem); padding-bottom: clamp(2.25rem, 4vw, 3.25rem); }

  .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s cubic-bezier(.2,.7,.3,1), transform 0.6s cubic-bezier(.2,.7,.3,1); }
  .reveal.is-visible { opacity: 1; transform: translateY(0); }
  @media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

  /* ---------- Card ---------- */
  .card {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
  }

  /* ---------- Buttons ---------- */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.85rem 1.55rem; border-radius: 12px;
    font-family: var(--font-body); font-weight: 700; font-size: 0.94rem;
    text-decoration: none; border: 1px solid transparent; cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  }
  .btn:active { transform: translateY(1px); }
  .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  .btn--primary { background: var(--accent-deep); color: var(--accent-ink); }
  .btn--primary:hover { background: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-1px); }
  .btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--rule); }
  .btn--ghost:hover { background: var(--surface-alt); transform: translateY(-1px); }
  .btn--on-dark { background: var(--accent); color: var(--accent-ink); }
  .btn--on-dark:hover { background: var(--accent-deep); transform: translateY(-1px); }
  .btn--sm { padding: 0.62rem 1.15rem; font-size: 0.86rem; border-radius: 10px; }
  .btn--block { width: 100%; }
  .pill--placeholder { cursor: default; }
  .btn-note { font-size: 0.78rem; color: var(--ink-faint); margin-top: 0.7rem; }



/* ============================================================
   Checkout-specific styles (new — not in index.html)
   ============================================================ */

.checkout-page { min-height: 100vh; display: flex; flex-direction: column; }
.checkout-main { flex: 1; }

/* ---------- Test-mode banner ---------- */
.testbar {
  background: #8A5A00; color: #FFF6E5; text-align: center;
  padding: 0.6rem 1rem; font-size: 0.84rem; font-weight: 700;
  letter-spacing: 0.02em;
}
.testbar code {
  font-family: var(--font-mono); background: rgba(255,255,255,0.18);
  padding: 0.1rem 0.35rem; border-radius: 4px; font-weight: 600;
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--rule); background: var(--surface);
  color: var(--ink-soft); display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer; flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.theme-toggle:hover { background: var(--surface-alt); color: var(--ink); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { display: block; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

/* ---------- Header ---------- */
.co-header {
  border-bottom: 1px solid var(--rule); background: var(--surface);
  padding: 1rem 0;
}
.co-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.co-header__actions { display: flex; align-items: center; gap: 0.85rem; }
@media (max-width: 480px) { .co-back { display: none; } }
.co-brand {
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  text-decoration: none; color: var(--ink);
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.co-brand img { display: block; flex-shrink: 0; height: 36px; width: 36px; border-radius: 8px; }
.co-brand span { white-space: nowrap; }
@media (max-width: 480px) {
  .co-brand { font-size: 0.95rem; }
  .co-brand img { height: 30px; width: 30px; border-radius: 7px; }
}
.co-back { font-size: 0.88rem; color: var(--ink-soft); text-decoration: none; }
.co-back:hover { color: var(--accent-deep); }

/* ---------- Layout ---------- */
.co-grid {
  display: grid; gap: clamp(1.25rem, 3vw, 2.25rem);
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: start; padding: clamp(1.75rem, 4vw, 3rem) 0;
}
@media (max-width: 880px) { .co-grid { grid-template-columns: minmax(0, 1fr); } }

.co-panel { padding: clamp(1.4rem, 3vw, 2.1rem); }
.co-panel:hover { transform: none; box-shadow: var(--shadow-md); }

.co-title { font-size: clamp(1.6rem, 3.6vw, 2.15rem); margin-bottom: 0.4rem; }
.co-lede { color: var(--ink-soft); margin-bottom: 1.6rem; font-size: 0.98rem; }

/* ---------- Steps ---------- */
.steps-rail { display: flex; gap: 0.6rem; align-items: center; margin-bottom: 1.5rem; }
.steps-rail__item {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.82rem; font-weight: 700; color: var(--ink-faint);
}
.steps-rail__item.is-active { color: var(--accent-deep); }
.steps-rail__item.is-done { color: var(--success); }
.steps-rail__dot {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid currentColor; font-size: 0.7rem; flex-shrink: 0;
}
.steps-rail__line { flex: 1; height: 2px; background: var(--rule); border-radius: 2px; }

/* ---------- Form ---------- */
.field-grid { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .field-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; font-weight: 700; color: var(--ink); }
.field .opt { font-weight: 400; color: var(--ink-faint); }

.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 0.95rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--rule);
  border-radius: 10px; padding: 0.7rem 0.85rem; width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; min-height: 92px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input[aria-invalid="true"], .field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #C0392B; }
.field__error { font-size: 0.79rem; color: #C0392B; min-height: 1em; }
:root[data-theme="dark"] .field__error,
:root:not([data-theme="light"]) .field__error { color: #F08A7C; }

/* Honeypot — hidden from humans, visible to bots. Not display:none,
   which some bots detect and skip. */
.hp-field {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; opacity: 0;
}

/* ---------- Consent ---------- */
.consent { display: flex; gap: 0.65rem; align-items: flex-start; margin-top: 0.35rem; }
.consent input[type="checkbox"] {
  width: 18px; height: 18px; margin: 0.2rem 0 0; flex-shrink: 0;
  accent-color: var(--accent-deep); cursor: pointer;
}
.consent label { font-size: 0.87rem; color: var(--ink-soft); line-height: 1.5; cursor: pointer; }
.consent a { color: var(--accent-deep); font-weight: 600; }

/* ---------- Summary rail ---------- */
.summary { padding: 1.4rem; position: sticky; top: 1.5rem; }
.summary:hover { transform: none; box-shadow: var(--shadow-md); }
@media (max-width: 880px) { .summary { position: static; } }
.summary__row {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.5rem 0; font-size: 0.92rem;
}
.summary__row--total {
  border-top: 1px solid var(--rule); margin-top: 0.5rem; padding-top: 0.85rem;
  font-weight: 800; font-size: 1.12rem;
}
.summary__note {
  font-size: 0.82rem; color: var(--ink-soft); background: var(--surface-alt);
  border-radius: 10px; padding: 0.75rem 0.85rem; margin-top: 1rem; line-height: 1.55;
}
.summary__list { margin-top: 1rem; display: grid; gap: 0.5rem; }
.summary__list li {
  font-size: 0.86rem; color: var(--ink-soft);
  display: flex; gap: 0.5rem; align-items: flex-start;
}
.summary__list svg { color: var(--success); flex-shrink: 0; margin-top: 0.25rem; }

/* ---------- Payment step ---------- */
.pay-step[hidden] { display: none; }
#payment-element { margin-bottom: 1.1rem; min-height: 220px; }

.form-alert {
  border-radius: 10px; padding: 0.8rem 1rem; font-size: 0.88rem;
  margin-bottom: 1rem; border: 1px solid;
}
.form-alert--error {
  background: rgba(192,57,43,0.09); border-color: rgba(192,57,43,0.4); color: #A5281B;
}
:root[data-theme="dark"] .form-alert--error,
:root:not([data-theme="light"]) .form-alert--error { color: #F5A197; }
.form-alert[hidden] { display: none; }

.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

.spinner {
  width: 15px; height: 15px; border: 2px solid currentColor;
  border-right-color: transparent; border-radius: 50%;
  display: inline-block; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }

.secure-note {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  font-size: 0.79rem; color: var(--ink-faint); margin-top: 0.9rem;
}

/* ---------- Thank-you / prose ---------- */
.prose { max-width: 720px; margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) 0; }
.prose h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 1rem; }
.prose h2 { font-size: 1.22rem; margin: 2rem 0 0.6rem; }
.prose p, .prose li { color: var(--ink-soft); margin-bottom: 0.85rem; line-height: 1.7; }
.prose ul { list-style: disc; padding-left: 1.3rem; margin-bottom: 1rem; }
.prose li { margin-bottom: 0.4rem; }
.prose a { color: var(--accent-deep); font-weight: 600; }
.prose strong { color: var(--ink); }
.prose__updated { font-size: 0.85rem; color: var(--ink-faint); margin-bottom: 2rem; }

.success-badge {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--success); color: var(--surface); margin-bottom: 1.2rem;
}

.receipt-box {
  background: var(--surface-alt); border-radius: 12px;
  padding: 1.1rem 1.25rem; margin: 1.25rem 0;
}
.receipt-box__row {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.3rem 0; font-size: 0.92rem; color: var(--ink-soft);
}
.receipt-box__row strong { color: var(--ink); font-family: var(--font-mono); font-size: 0.88rem; }

/* ---------- Footer ---------- */
.co-footer {
  border-top: 1px solid var(--rule); padding: 1.6rem 0;
  font-size: 0.83rem; color: var(--ink-faint);
  display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap;
}
.co-footer a { color: var(--ink-soft); text-decoration: none; }
.co-footer a:hover { color: var(--accent-deep); }
