/* Light/dark for the transactional pages (checkout, AGB/terms, waiver).
   The marketing site is dark by design; these pages follow the OS setting,
   with a manual override stored per visitor (js/theme.js → html[data-theme]).
   Light = the same gold-on-cream identity, contrast-checked for body text. */

:root[data-theme="light"] {
  --black:       #EFE9DE;
  --bg-deep:     #F4EFE6;
  --bg-base:     #FAF7F1;
  --bg-surface:  #F3EEE5;
  --bg-card:     #FFFFFF;
  --bg-navy:     #ECE5D8;
  --gold:        #8A5A0B;
  --gold-warm:   #9E6810;
  --gold-pale:   #6E4708;
  --gold-dark:   #5C3C07;
  --gold-muted:  rgba(138, 90, 11, 0.08);
  --gold-border: rgba(138, 90, 11, 0.30);
  --gold-line:   rgba(138, 90, 11, 0.55);
  --white:       #17130D;
  --cream:       #2B251C;
  --grey:        #2F2A23;
  --muted:       #5B5448;
  --dim:         #CFC6B6;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --black:       #EFE9DE;
    --bg-deep:     #F4EFE6;
    --bg-base:     #FAF7F1;
    --bg-surface:  #F3EEE5;
    --bg-card:     #FFFFFF;
    --bg-navy:     #ECE5D8;
    --gold:        #8A5A0B;
    --gold-warm:   #9E6810;
    --gold-pale:   #6E4708;
    --gold-dark:   #5C3C07;
    --gold-muted:  rgba(138, 90, 11, 0.08);
    --gold-border: rgba(138, 90, 11, 0.30);
    --gold-line:   rgba(138, 90, 11, 0.55);
    --white:       #17130D;
    --cream:       #2B251C;
    --grey:        #2F2A23;
    --muted:       #5B5448;
    --dim:         #CFC6B6;
    color-scheme: light;
  }
}
:root[data-theme="dark"] { color-scheme: dark; }

body.theme-adaptive { background: var(--bg-base); color: var(--grey); }
body.theme-adaptive .section--dark { background: var(--bg-base); }
body.theme-adaptive .page-hero { background: var(--bg-deep); }
/* The hero glow is a hard-coded navy ellipse; on cream it reads as a stain
   over the subtitle. Light gets a gold-tinted equivalent instead. */
:root[data-theme="light"] body.theme-adaptive .page-hero::before {
  background: radial-gradient(ellipse 60% 70% at 85% 30%, rgba(138, 90, 11, 0.07) 0%, transparent 60%), var(--bg-navy);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) body.theme-adaptive .page-hero::before {
    background: radial-gradient(ellipse 60% 70% at 85% 30%, rgba(138, 90, 11, 0.07) 0%, transparent 60%), var(--bg-navy);
  }
}

/* Scrolled nav + mobile menu use hard-coded near-black; with light tokens the
   logo/links (var(--white) = ink) would vanish on it. */
:root[data-theme="light"] body.theme-adaptive .nav.scrolled,
:root[data-theme="light"] body.theme-adaptive .nav__mobile { background: rgba(250, 247, 241, 0.97); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) body.theme-adaptive .nav.scrolled,
  :root:not([data-theme="dark"]) body.theme-adaptive .nav__mobile { background: rgba(250, 247, 241, 0.97); }
}

/* Theme switch — bottom-left, the chat owns bottom-right. */
.theme-toggle {
  position: fixed; left: 16px; bottom: 16px; z-index: 900;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--gold-border); background: var(--bg-card); color: var(--grey);
  font: 500 12px/1 var(--font-body); letter-spacing: .04em; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--gold-line); color: var(--white); }
.theme-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.theme-toggle svg { width: 14px; height: 14px; }

/* ------------------------------------------------------------------------- */
/* Checkout */

.co { max-width: 760px; margin: 0 auto; }
.co-card {
  background: var(--bg-card); border: 1px solid var(--gold-border);
  border-radius: 6px; padding: 28px; margin-bottom: 20px;
}
.co-card h2 {
  font-family: var(--font-display); font-size: 26px; letter-spacing: .06em;
  color: var(--white); margin: 0 0 16px; font-weight: 400;
}
.co-rows { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 10px 24px; margin: 0; }
.co-rows dt { color: var(--muted); font-size: 14px; }
.co-rows dd { margin: 0; color: var(--white); font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.co-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--gold-border); }
.co-total__label { color: var(--muted); font-size: 14px; }
.co-total__value { font-family: var(--font-display); font-size: 40px; color: var(--gold); letter-spacing: .03em; }
.co-total__vat { display: block; color: var(--muted); font-size: 12px; text-align: right; }
.co-party { margin-top: 16px; font-size: 13px; color: var(--muted); line-height: 1.6; }

.co-check { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--gold-muted); cursor: pointer; }
.co-check:last-of-type { border-bottom: 0; }
.co-check input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--gold); cursor: pointer; }
.co-check span { color: var(--grey); font-size: 14px; line-height: 1.6; }
.co-check a, .co-terms a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.co-terms { font-size: 13px; color: var(--muted); line-height: 1.65; margin: 12px 0 0; }
.co-terms li { margin: 4px 0; }

.co-pay h2 + p { margin: -6px 0 18px; color: var(--muted); font-size: 13px; }
.co-hint { font-size: 13px; color: var(--gold); margin: 0 0 14px; min-height: 1em; }
.co-stripe {
  width: 100%; min-height: 48px; border-radius: 4px; border: 1px solid var(--gold);
  background: var(--gold); color: #FFFFFF; font: 600 15px/1.2 var(--font-body);
  letter-spacing: .02em; cursor: pointer; padding: 12px 16px; margin-bottom: 14px;
}
:root:not([data-theme="light"]) .co-stripe { color: #0B0905; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .co-stripe { color: #FFFFFF; } }
.co-stripe:hover:not(:disabled) { background: var(--gold-warm); }
.co-stripe:disabled, .co-pay.is-locked .co-paypal { opacity: .45; cursor: not-allowed; }
.co-stripe small { display: block; font-weight: 400; font-size: 12px; opacity: .85; margin-top: 2px; }
.co-or { text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin: 4px 0 14px; }
.co-paypal { min-height: 48px; }
.co-paypal-wrap { background: #FFFFFF; border-radius: 4px; padding: 10px 10px 2px; }
.co-pay.is-locked .co-paypal { pointer-events: none; }

.co-status { text-align: center; padding: 40px 28px; }
.co-status h2 { font-size: 34px; }
.co-status p { color: var(--grey); line-height: 1.7; }
.co-banner { border: 1px dashed var(--gold-line); color: var(--gold); padding: 10px 14px; font-size: 13px; border-radius: 4px; margin-bottom: 20px; }
.co-error { color: #C0392B; font-size: 14px; margin: 10px 0 0; }
:root:not([data-theme="light"]) .co-error { color: #FF8A7A; }
.co-secure { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; margin-top: 14px; }

@media (max-width: 560px) {
  .co-card { padding: 20px 16px; }
  .co-rows { grid-template-columns: 1fr; gap: 2px 0; }
  .co-rows dd { margin-bottom: 10px; }
  .co-total__value { font-size: 32px; }
}
@media print {
  .theme-toggle, #nav-mount, #footer-mount { display: none !important; }
}
