/* ══════════════════════════════════════════════════════════════════════
   CU29 — LIGHT / DARK THEME (loaded last on every demo page)
   Light is the approved design and stays as it is. Dark turns every light
   surface navy and its text light. Bands that are navy in both themes
   (header, hero, video, banners, footer) keep their white text.
   ══════════════════════════════════════════════════════════════════════ */

/* ── TOGGLE BUTTON ── */
.theme-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  /* Under the header (1000) and the quiz and video overlays (2000) */
  z-index: 990;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background-color: #AB6038;
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(5, 12, 22, 0.35);
  cursor: pointer;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.theme-toggle:hover {
  background-color: #8E4C2A;
  transform: scale(1.08);
}

.theme-toggle:focus-visible {
  outline: 3px solid #F3D3BF;
  outline-offset: 3px;
}

.theme-toggle .theme-icon-sun,
html[data-theme="dark"] .theme-toggle .theme-icon-moon {
  display: none;
}

html[data-theme="dark"] .theme-toggle .theme-icon-sun {
  display: block;
}

@media (max-width: 640px) {
  .theme-toggle {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
}

/* The coordinates make way for the button */
@media (min-width: 641px) {
  .hero-location-tag {
    right: 100px;
  }
}

.duo-bundle-cta-wrap .btn-primary-pill {
  text-wrap: balance;
}

/* Room at the very end of the page so the button never sits on the small print */
@media (max-width: 1500px) {
  .site-footer {
    padding-bottom: 96px;
  }
}

/* ── LEGIBILITY, BOTH THEMES: faint text on the navy bands and the photo ── */
.hero-location-tag {
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.scroll-text {
  color: rgba(255, 255, 255, 0.95);
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.footer-bottom-bar {
  color: rgba(255, 255, 255, 0.62);
}

.legal-disclaimer-text {
  color: rgba(255, 255, 255, 0.58);
}

@media (max-width: 1024px) {
  /* The photo is bright behind the badges on narrow screens */
  .hero-eyebrow-badge {
    background: rgba(5, 12, 22, 0.62);
  }
}

.curator-role {
  color: #FAF4EF;
}

.ritual-btn-step-num,
.quiz-option-btn.selected,
.timeline-nav-item.active .timeline-week-pill {
  color: var(--color-copper);
}

.marquee-diamond {
  color: #E0A073;
}

/* ── LIGHT THEME: the palest greys and blues, one step darker ── */
html:not([data-theme="dark"]) {
  --color-subtle: #4C6984;
  --color-peptide-blue: #2F6797;
  /* Small copper text only; buttons keep --color-btn */
  --color-copper: #9F5731;
}

/* ══════════════════════════════════════════════════════════════════════
   DARK THEME
   ══════════════════════════════════════════════════════════════════════ */
html[data-theme="dark"] {
  color-scheme: dark;

  /* Surfaces */
  --color-ivory: #081220;
  --color-alabaster: #13243B;
  --color-sandstone: #24405F;
  --color-sandstone-dark: #2E4B6C;
  --surface-card: #0E1D32;

  /* Text */
  --color-espresso: #F4F7FB;
  --color-charcoal: #DDE7F1;
  --color-muted: #B0C4D8;
  --color-subtle: #9DB4CA;

  /* Copper, lifted so it reads as text on navy. Button fills keep --color-btn. */
  --color-copper: #E0A073;
  --color-scarlet: #E0A073;
  --color-copper-hover: #EBB48E;
  --color-copper-light: #2E2730;
  --color-scarlet-light: #2E2730;
  --color-btn-light: #2E2730;
  --color-peptide-blue: #8FC0E6;

  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 12px 36px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.55);
}

/* ── SECTION BACKGROUNDS ── */
html[data-theme="dark"] .science-section {
  background: linear-gradient(180deg, #0B1829 0%, var(--color-ivory) 100%);
}

html[data-theme="dark"] .transformation-section {
  background: linear-gradient(180deg, var(--color-ivory) 0%, #0B1829 100%);
}

html[data-theme="dark"] .system-showcase-section {
  background: linear-gradient(180deg, #0B1829 0%, #0A1626 100%);
}

html[data-theme="dark"] .testimonials-section,
html[data-theme="dark"] .gallery-section {
  background: linear-gradient(180deg, #0B1829 0%, var(--color-ivory) 100%);
}

html[data-theme="dark"] .about-hero-section,
html[data-theme="dark"] body.contact-page {
  background-image:
    radial-gradient(circle at 50% 0%, rgba(30, 64, 110, 0.45) 0%, transparent 65%),
    radial-gradient(circle at 90% 40%, rgba(16, 52, 166, 0.16) 0%, transparent 50%);
}

html[data-theme="dark"] .about-tabs-nav-sticky {
  background: rgba(8, 18, 32, 0.95);
  border-color: rgba(143, 176, 210, 0.18);
}

/* ── CARDS: white in light, navy in dark ── */
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .science-pillar-card,
html[data-theme="dark"] .timeline-card-display,
html[data-theme="dark"] .timeline-nav-item:hover,
html[data-theme="dark"] .timeline-nav-item.active,
html[data-theme="dark"] .testimonial-card,
html[data-theme="dark"] .formula-card,
html[data-theme="dark"] .ritual-step,
html[data-theme="dark"] .quiz-drawer,
html[data-theme="dark"] .quiz-option-btn:hover,
html[data-theme="dark"] .about-tab-btn:hover,
html[data-theme="dark"] .founder-badge-item,
html[data-theme="dark"] .compare-card-cu29,
html[data-theme="dark"] .ritual-tab-btn,
html[data-theme="dark"] .ritual-display-card,
html[data-theme="dark"] .ingredient-detail-card,
html[data-theme="dark"] .without-pill,
html[data-theme="dark"] .contact-form-container,
html[data-theme="dark"] .system-select-card:hover,
html[data-theme="dark"] .system-select-card.active,
html[data-theme="dark"] .custom-radio-dot,
html[data-theme="dark"] .perk-card {
  background-color: var(--surface-card);
}

html[data-theme="dark"] .timeline-card-display {
  background: var(--surface-card);
}

html[data-theme="dark"] .product-card,
html[data-theme="dark"] .science-pillar-card,
html[data-theme="dark"] .timeline-card-display,
html[data-theme="dark"] .testimonial-card,
html[data-theme="dark"] .formula-card,
html[data-theme="dark"] .ritual-step,
html[data-theme="dark"] .founder-badge-item,
html[data-theme="dark"] .ritual-display-card,
html[data-theme="dark"] .ingredient-detail-card,
html[data-theme="dark"] .contact-form-container,
html[data-theme="dark"] .perk-card {
  border: 1px solid rgba(143, 176, 210, 0.16);
}

html[data-theme="dark"] .ingredient-item,
html[data-theme="dark"] .without-item {
  background-color: var(--color-alabaster);
}

html[data-theme="dark"] .product-bottle-stage {
  background: radial-gradient(circle at 50% 60%, rgba(70, 120, 180, 0.22) 0%, transparent 70%);
}

html[data-theme="dark"] .formula-badge-in,
html[data-theme="dark"] .product-card-2 .step-num-pill {
  background-color: rgba(120, 170, 215, 0.16);
}

/* ── SELECTED STATES ── */
html[data-theme="dark"] .timeline-nav-item.active,
html[data-theme="dark"] .ritual-tab-btn.active,
html[data-theme="dark"] .quiz-option-btn:hover,
html[data-theme="dark"] .quiz-option-btn.selected {
  border-color: var(--color-copper);
}

html[data-theme="dark"] .ritual-tab-btn.active,
html[data-theme="dark"] .quiz-option-btn.selected {
  background-color: var(--color-btn-light);
}

/* Filled with the text colour in light, so it needs its own fill in dark */
html[data-theme="dark"] .about-tab-btn.active {
  background-color: var(--color-btn);
  border-color: var(--color-btn);
  color: #FFFFFF;
}

html[data-theme="dark"] .cert-icon {
  background-color: var(--color-btn);
}

/* White discs keep their dark icon */
html[data-theme="dark"] .play-triangle-icon,
html[data-theme="dark"] .pulse-play-ring {
  color: #0D1B2E;
}

html[data-theme="dark"] .video-play-overlay-btn:hover .pulse-play-ring {
  color: #FFFFFF;
}

html[data-theme="dark"] .founder-title-tag {
  color: #D8E2ED;
}

html[data-theme="dark"] .compare-bullet-bad,
html[data-theme="dark"] .without-pill .cross-x {
  color: #F29A9A;
}

/* ── FORM FIELDS ── */
html[data-theme="dark"] .form-field-input:focus,
html[data-theme="dark"] .form-field-select:focus,
html[data-theme="dark"] .form-field-textarea:focus {
  background-color: #182C47;
}

html[data-theme="dark"] .form-field-select option {
  background-color: #13243B;
  color: #F4F7FB;
}
