/* Cari-Bill marketing site — semantic theme tokens (aligned with app tokens.css) */

html {
  color-scheme: light dark;
}

@media (prefers-reduced-motion: no-preference) {
  body {
    transition: background-color 160ms ease, color 160ms ease;
  }
}

/* ── Dark theme — Caribbean Current navy ── */
html[data-theme="dark"] {
  color-scheme: dark;

  --bg-page: #06152f;
  --bg-surface: #0b2348;
  --bg-surface-muted: #0a1e3d;
  --bg-elevated: #102a52;

  --text-primary: #f6faff;
  --text-secondary: #c3d0e2;
  --text-muted: #8fa1b9;
  --text-muted-2: #8fa1b9;

  --border-default: rgba(160, 190, 225, 0.16);
  --border-subtle: rgba(160, 190, 225, 0.1);
  --border-accent: rgba(80, 227, 210, 0.35);

  --brand-primary: #4f76ff;
  --link-color: #50e3d2;
  --link-hover: #f6faff;
  --eyebrow-color: #50e3d2;
  --accent-hero: #50e3d2;
  --focus-ring: #50e3d2;

  --header-bg: transparent;
  --header-bg-scrolled: rgba(6, 21, 47, 0.96);
  --header-border: rgba(160, 190, 225, 0.12);
  --header-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);

  --nav-capsule-bg: rgba(11, 35, 72, 0.92);
  --nav-link: #c3d0e2;
  --nav-link-hover: #f6faff;
  --nav-link-hover-bg: rgba(255, 255, 255, 0.06);
  --nav-current-bg: rgba(255, 255, 255, 0.1);
  --nav-current-text: #f6faff;

  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.14);

  --shadow-card: 0 24px 64px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 48px rgba(79, 118, 255, 0.25);
  --browser-frame-glow: 0 0 64px rgba(79, 118, 255, 0.15);

  --footer-bg: #041126;
  --footer-text: rgba(246, 250, 255, 0.72);
  --footer-heading: rgba(246, 250, 255, 0.52);

  --btn-glass-bg: rgba(255, 255, 255, 0.1);
  --btn-glass-text: #f6faff;
  --btn-glass-border: rgba(255, 255, 255, 0.14);
  --btn-glass-hover-bg: rgba(255, 255, 255, 0.14);

  --mobile-panel-bg: #0b2348;
  --mobile-backdrop: rgba(6, 21, 47, 0.65);

  --nav-toggle-bg: rgba(255, 255, 255, 0.06);
  --nav-toggle-icon: #f6faff;

  --pricing-billing-bg: rgba(6, 21, 47, 0.65);
  --pricing-billing-border: rgba(160, 190, 225, 0.16);
  --pricing-billing-inset: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --pricing-billing-active-bg: rgba(255, 255, 255, 0.12);
  --pricing-select-bg: rgba(255, 255, 255, 0.06);
  --pricing-select-text: #f6faff;

  --browser-frame-bg: rgba(11, 35, 72, 0.85);
  --browser-bar-bg: rgba(0, 0, 0, 0.35);
  --float-note-bg: rgba(11, 35, 72, 0.94);
  --value-strip-bg: rgba(6, 21, 47, 0.55);
  --value-strip-item-bg: rgba(255, 255, 255, 0.04);
  --caribbean-section-bg: rgba(11, 35, 72, 0.45);

  --screenshot-frame: #0a0e14;
  --input-bg: rgba(6, 21, 47, 0.55);
  --input-text: #f6faff;

  --caribbean-bg: linear-gradient(135deg, rgba(79, 118, 255, 0.14), rgba(8, 184, 168, 0.12));

  /* Legacy aliases */
  --off-white: var(--text-primary);
  --border-light: var(--border-default);
}

html[data-theme="dark"] .page-bg {
  background:
    radial-gradient(ellipse 85% 55% at 8% 18%, rgba(79, 118, 255, 0.28) 0%, transparent 58%),
    radial-gradient(ellipse 70% 50% at 92% 72%, rgba(8, 184, 168, 0.22) 0%, transparent 58%),
    radial-gradient(ellipse 50% 40% at 70% 15%, rgba(255, 122, 89, 0.1) 0%, transparent 55%),
    linear-gradient(145deg, #06152f 0%, #071a3a 38%, #0a2a5c 68%, #0b2348 100%);
}

/* ── Light theme — Caribbean Current marketing ── */
html[data-theme="light"] {
  color-scheme: light;

  --bg-page: #f4f7fb;
  --bg-surface: #ffffff;
  --bg-surface-muted: #eef3f9;
  --bg-elevated: #ffffff;

  --text-primary: #10213d;
  --text-secondary: #52627a;
  --text-muted: #758399;
  --text-muted-2: #758399;

  --border-default: #dde5ef;
  --border-subtle: rgba(16, 33, 61, 0.08);
  --border-accent: rgba(8, 184, 168, 0.35);

  --brand-primary: #2457f5;
  --link-color: #2457f5;
  --link-hover: #10213d;
  --eyebrow-color: #08b8a8;
  --accent-hero: #2457f5;
  --focus-ring: #08b8a8;

  --header-bg: rgba(255, 255, 255, 0.92);
  --header-bg-scrolled: rgba(255, 255, 255, 0.98);
  --header-border: #dde5ef;
  --header-shadow: 0 4px 24px rgba(16, 33, 61, 0.06);

  --nav-capsule-bg: #eef3f9;
  --nav-link: #52627a;
  --nav-link-hover: #10213d;
  --nav-link-hover-bg: rgba(16, 33, 61, 0.04);
  --nav-current-bg: rgba(36, 87, 245, 0.1);
  --nav-current-text: #10213d;

  --glass-bg: #ffffff;
  --glass-border: #dde5ef;

  --shadow-card: 0 4px 16px rgba(16, 33, 61, 0.08);
  --shadow-glow: 0 12px 40px rgba(36, 87, 245, 0.12);
  --browser-frame-glow: 0 8px 32px rgba(36, 87, 245, 0.1);

  --footer-bg: #10213d;
  --footer-text: rgba(246, 250, 255, 0.78);
  --footer-heading: #f6faff;

  --btn-glass-bg: #ffffff;
  --btn-glass-text: #10213d;
  --btn-glass-border: #dde5ef;
  --btn-glass-hover-bg: #eef3f9;

  --mobile-panel-bg: #ffffff;
  --mobile-backdrop: rgba(16, 33, 61, 0.35);

  --nav-toggle-bg: #eef3f9;
  --nav-toggle-icon: #10213d;

  --pricing-billing-bg: #ffffff;
  --pricing-billing-border: #dde5ef;
  --pricing-billing-inset: inset 0 1px 0 rgba(16, 33, 61, 0.04);
  --pricing-billing-active-bg: #eef3f9;
  --pricing-select-bg: #ffffff;
  --pricing-select-text: #10213d;

  --browser-frame-bg: #ffffff;
  --browser-bar-bg: #eef3f9;
  --float-note-bg: #ffffff;
  --value-strip-bg: transparent;
  --value-strip-item-bg: #ffffff;
  --caribbean-section-bg: linear-gradient(135deg, rgba(36, 87, 245, 0.06), rgba(8, 184, 168, 0.06));

  --screenshot-frame: #0a0e14;
  --input-bg: #ffffff;
  --input-text: #10213d;

  --caribbean-bg: linear-gradient(135deg, rgba(36, 87, 245, 0.06), rgba(8, 184, 168, 0.06));

  --off-white: var(--text-primary);
  --border-light: var(--border-default);
}

html[data-theme="light"] .page-bg {
  background:
    radial-gradient(ellipse 70% 50% at 10% 0%, rgba(36, 87, 245, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 60% 45% at 90% 10%, rgba(8, 184, 168, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #eef3f9 0%, #f4f7fb 45%, #eef3f9 100%);
}

/* ── Base ── */
body {
  color: var(--text-primary);
  background: var(--bg-page);
}

.section-lead,
.hero-lead,
.why-lead {
  color: var(--text-secondary);
}

/* ── Header (light always has visible bar) ── */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
}

html[data-theme="light"] .site-header {
  backdrop-filter: blur(12px);
  border-bottom-color: var(--header-border);
}

.site-header.is-scrolled {
  background: var(--header-bg-scrolled);
  border-bottom-color: var(--header-border);
  box-shadow: var(--header-shadow);
}

.legal-header .nav-capsule a.is-current,
.nav-capsule a.is-current {
  color: var(--nav-current-text);
  background: var(--nav-current-bg);
}

/* ── Pricing controls ── */
.pricing-select {
  color: var(--pricing-select-text);
  background-color: var(--pricing-select-bg);
  border-color: var(--border-default);
  color-scheme: light dark;
}

html[data-theme="dark"] .pricing-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238fa1b9' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

html[data-theme="light"] .pricing-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2352627a' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.pricing-select option {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.pricing-billing-wrap.is-yearly-active .pricing-billing {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow), var(--pricing-billing-inset);
}

.pricing-billing-wrap.is-yearly-active .pricing-billing-btn[data-billing="yearly"].is-active {
  color: var(--navy-deep);
  background: linear-gradient(135deg, var(--teal), var(--aqua));
  border-color: rgba(80, 227, 210, 0.65);
  box-shadow: 0 6px 24px rgba(8, 184, 168, 0.45);
  font-weight: 700;
}

.pricing-country-label,
.pricing-reference-note,
.pricing-note {
  color: var(--text-muted-2);
}

/* ── Cards & pricing ── */
.price-card {
  background: var(--glass-bg);
  border-color: var(--border-subtle);
}

.price-card-featured {
  border-color: var(--border-accent);
  background: linear-gradient(180deg, rgba(36, 87, 245, 0.08), var(--glass-bg));
}

html[data-theme="light"] .price-card-featured {
  background: var(--bg-surface);
  box-shadow: var(--shadow-glow);
}

.price-name,
.price-amount {
  color: var(--text-primary);
}

.price-currency,
.price-period,
.price-desc,
.price-features li {
  color: var(--text-secondary);
}

.price-features li {
  border-bottom-color: var(--border-subtle);
}

.price-savings {
  color: var(--teal);
}

.price-card.is-yearly-billing .price-savings {
  color: var(--teal);
}

/* ── Footer ── */
html[data-theme="light"] .site-footer {
  border-top: none;
}

.footer-brand p,
.footer-col a,
.footer-location,
.footer-bottom {
  color: var(--footer-text);
}

.footer-col h4 {
  color: var(--footer-heading);
}

.footer-col a:hover {
  color: var(--link-color);
}

/* ── Homepage sections ── */
.section-surface {
  background: var(--bg-surface);
}

.section-muted,
.pricing,
.faq {
  background: var(--bg-surface-muted);
}

.page-home .value-strip {
  background: transparent;
  border: none;
}

.value-strip-grid {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-card);
}

.value-strip-item {
  border-color: var(--border-default);
}

.value-strip-item strong {
  color: var(--text-primary);
}

.value-strip-item span {
  color: var(--text-muted-2);
}

.clarity-steps li {
  background: var(--bg-surface-muted);
  border: 1px solid var(--border-default);
}

.clarity-steps strong {
  color: var(--text-primary);
}

.clarity-steps span {
  color: var(--text-secondary);
}

.feature-card-light {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-card);
}

.feature-card-light:hover {
  box-shadow: var(--shadow-glow);
}

.feature-card-light .feature-card-shot {
  border: 1px solid var(--border-default);
  background: var(--screenshot-frame);
}

.feature-card-light h3 {
  color: var(--text-primary);
}

.feature-card-light p {
  color: var(--text-secondary);
}

.feature-card-light ul {
  color: var(--text-muted-2);
}

.feature-learn {
  color: var(--link-color);
}

.feature-learn:hover {
  color: var(--teal);
}

.caribbean {
  background: var(--caribbean-bg);
}

.caribbean-markets {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-card);
}

.caribbean-chips li {
  background: var(--bg-surface-muted);
  border-color: var(--border-default);
  color: var(--text-secondary);
}

.country-currency-list li {
  color: var(--text-secondary);
}

.country-currency-list strong {
  color: var(--text-primary);
}

.trust-strip {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}

.trust-strip-card {
  background: var(--bg-surface-muted);
  border: 1px solid var(--border-default);
}

.trust-strip-card h3 {
  color: var(--text-primary);
}

.trust-strip-card p {
  color: var(--text-secondary);
}

.trust-card h3 {
  color: var(--text-primary);
}

.trust-card p {
  color: var(--text-secondary);
}

.float-note.hero-callout {
  background: var(--bg-surface);
  border-color: var(--border-default);
  color: var(--text-primary);
  box-shadow: var(--shadow-glow);
}

.float-note span {
  color: var(--text-muted-2);
}

.finale .btn-glass {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.finale .btn-glass:hover {
  background: rgba(255, 255, 255, 0.22);
}

.chip {
  color: var(--text-secondary);
  background: var(--nav-link-hover-bg);
  border-color: var(--border-subtle);
}

.chip:hover {
  border-color: var(--eyebrow-color);
  color: var(--text-primary);
}

.trust-pills li {
  background: var(--nav-link-hover-bg);
  border-color: var(--border-subtle);
  color: var(--text-muted-2);
}

/* ── Theme switcher ── */
.theme-switcher {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.theme-select {
  min-height: 36px;
  padding: 6px 28px 6px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--btn-glass-bg);
  border: 1px solid var(--btn-glass-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  appearance: none;
  color-scheme: light dark;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2352627a' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  max-width: 100%;
}

html[data-theme="dark"] .theme-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238fa1b9' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.theme-select:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.theme-select option {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.mobile-theme-row {
  padding: 12px 0 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}

.mobile-theme-row label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted-2);
  margin-bottom: 8px;
}

.mobile-theme-row .theme-select {
  width: 100%;
}

@media (max-width: 900px) {
  .header-actions .theme-switcher {
    display: none;
  }
}

@media (min-width: 901px) {
  .mobile-theme-row {
    display: none;
  }
}

@media (max-width: 480px) {
  .theme-select {
    font-size: 0.72rem;
    padding: 6px 24px 6px 8px;
  }
}
