/* ════════════════════════════════════════════════════════════════
   FilmMerge Platform Theme — Light Mode Contrast Refinement
   r43.1 — Comprehensive audit pass
   
   Strategy:
   - Hero sections are ALWAYS dark regardless of colour mode.
     All elements inside hero sections must use light/cream values.
   - All other page sections use the warm-parchment light palette.
   - Token values confirmed against live page via computed styles.
   - Every rule targets BOTH [data-theme="light"] and
     @media (prefers-color-scheme: light).
   - WCAG AA minimum: 4.5:1 for body text, 3:1 for UI/large.
   
   Confirmed failures fixed (from live audit 2026-04-27):
   1. .fm-hero .btn-outline — dark text on dark hero bg
   2. .cat-filter-btn — gold text 3.4:1 on beige (fails AA)
   3. .cat-hero stats — gold numbers borderline on beige
   4. .fm-nav__btn--gold — dark text on gold (borderline)
   5. Ghost borders (rgba cream values) invisible on light bg
   6. Various token-derived values that resolve incorrectly
   ════════════════════════════════════════════════════════════════ */

/* ── GLOBAL TOKEN REFINEMENTS ──────────────────────────────────── */
/* Apply tighter token values than tokens.css defaults.
   These override the base [data-theme="light"] token block. */

:is([data-theme="light"]) {
  /* Gold: pushed darker to reach 4.5:1 on #f0ece4 parchment.
     Tested: #6b4711 on #f0ece4 = 7.2:1 ✓
     Used for: eyebrows, kickers, filter chips, stat labels */
  --gold:    #6b4711;
  --gold-lt: #7c5412;
  --gold-dk: #4f3008;

  /* Muted: slightly darker than previous #4f4a45 for better AA */
  --muted: #4a4540;
}

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) {
    --gold:    #6b4711;
    --gold-lt: #7c5412;
    --gold-dk: #4f3008;
    --muted:   #4a4540;
  }
}


/* ════════════════════════════════════════════════════════════════
   NAV — Light mode overrides
   ════════════════════════════════════════════════════════════════ */

/* Shared selector helper */
:is([data-theme="light"]) .fm-nav,
@media (prefers-color-scheme: light) { html:not([data-theme="dark"]) .fm-nav }

:is([data-theme="light"]) .fm-nav {
  background: rgba(248, 246, 242, 0.97);
  border-bottom: 1px solid rgba(28, 26, 23, 0.1);
}

/* Nav links: warm dark brown, strong contrast on parchment */
:is([data-theme="light"]) .fm-nav__links a {
  color: #2d2721;
}
:is([data-theme="light"]) .fm-nav__links a:hover,
:is([data-theme="light"]) .fm-nav__links .current-menu-item > a {
  color: #6b4711;
}

/* FILMMAKERS ACCOUNT outline button — dark text, visible border */
:is([data-theme="light"]) .fm-nav__btn--outline {
  color: #1c1a17;
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(28, 26, 23, 0.18);
}
:is([data-theme="light"]) .fm-nav__btn--outline:hover {
  background: #fff;
  border-color: rgba(28, 26, 23, 0.3);
}

/* SUBMIT FILM gold button — ensure text contrast passes AA.
   Deep navy on gold: #1c1a17 on #b98d3c = ~4.8:1. Boosted bg. */
:is([data-theme="light"]) .fm-nav__btn--gold {
  background: #9a6e1a;
  color: #fff;
  border-color: #7a5410;
}
:is([data-theme="light"]) .fm-nav__btn--gold:hover {
  background: #7a5410;
}

/* Mobile panel */
:is([data-theme="light"]) .fm-nav__mobile-panel {
  background: #f5f2ec;
  border-top-color: rgba(28, 26, 23, 0.08);
}
:is([data-theme="light"]) .fm-nav__mobile-links a {
  color: #2d2721;
  border-bottom-color: rgba(28, 26, 23, 0.07);
}

/* Mirror for system preference */
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .fm-nav { background: rgba(248,246,242,.97); border-bottom-color: rgba(28,26,23,.1); }
  html:not([data-theme="dark"]) .fm-nav__links a { color: #2d2721; }
  html:not([data-theme="dark"]) .fm-nav__links a:hover { color: #6b4711; }
  html:not([data-theme="dark"]) .fm-nav__btn--outline { color: #1c1a17; background: rgba(255,255,255,.85); border-color: rgba(28,26,23,.18); }
  html:not([data-theme="dark"]) .fm-nav__btn--gold { background: #9a6e1a; color: #fff; border-color: #7a5410; }
  html:not([data-theme="dark"]) .fm-nav__mobile-panel { background: #f5f2ec; }
  html:not([data-theme="dark"]) .fm-nav__mobile-links a { color: #2d2721; }
}


/* ════════════════════════════════════════════════════════════════
   HERO — Always-dark: force cream values for ALL children
   The hero NEVER flips to light bg regardless of colour mode.
   ════════════════════════════════════════════════════════════════ */

:is([data-theme="light"]) .fm-hero { background-color: #050709; }
:is([data-theme="light"]) .fm-hero,
:is([data-theme="light"]) .fm-hero * {
  /* Block the light-mode token remapping for cream/muted inside the hero */
  --cream: #f2ead8;
  --muted: #8a92a0;
}

/* Hero headings */
:is([data-theme="light"]) .fm-hero h1 { color: #f2ead8; }
:is([data-theme="light"]) .fm-hero .eyebrow { color: #c8973a; }
:is([data-theme="light"]) .fm-hero .eyebrow::before { background: #c8973a; }
:is([data-theme="light"]) .fm-hero__sub { color: rgba(242, 234, 216, 0.82); }

/* Hero stats */
:is([data-theme="light"]) .fm-hero__stat strong { color: #f2ead8; }
:is([data-theme="light"]) .fm-hero__stat span { color: rgba(242, 234, 216, 0.72); }
:is([data-theme="light"]) .fm-hero__stats { border-top-color: rgba(242, 234, 216, 0.12); }
:is([data-theme="light"]) .fm-hero__stat { border-right-color: rgba(242, 234, 216, 0.12); }

/* ── BROWSE CATALOG button (btn-outline inside hero) ─────────── */
/* CONFIRMED FAILURE: resolves to dark text on dark background.
   Force cream text + visible cream border since hero is always dark. */
:is([data-theme="light"]) .fm-hero .btn-outline,
:is([data-theme="light"]) .fm-hero .btn.btn-outline {
  color: rgba(242, 234, 216, 0.92) !important;
  border-color: rgba(242, 234, 216, 0.35) !important;
  background: transparent !important;
}
:is([data-theme="light"]) .fm-hero .btn-outline:hover {
  color: #fff !important;
  border-color: rgba(242, 234, 216, 0.6) !important;
  background: rgba(255, 255, 255, 0.07) !important;
}

/* I'M A BUYER ghost button (already cream, but reinforce) */
:is([data-theme="light"]) .fm-hero .btn-ghost {
  color: rgba(242, 234, 216, 0.85) !important;
  border-color: rgba(242, 234, 216, 0.28) !important;
  background: transparent !important;
}
:is([data-theme="light"]) .fm-hero .btn-ghost:hover {
  color: #f2ead8 !important;
  border-color: rgba(242, 234, 216, 0.5) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

/* Mirror for system preference */
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .fm-hero { background-color: #050709; --cream: #f2ead8; --muted: #8a92a0; }
  html:not([data-theme="dark"]) .fm-hero h1 { color: #f2ead8; }
  html:not([data-theme="dark"]) .fm-hero .eyebrow { color: #c8973a; }
  html:not([data-theme="dark"]) .fm-hero__sub { color: rgba(242,234,216,.82); }
  html:not([data-theme="dark"]) .fm-hero__stat strong { color: #f2ead8; }
  html:not([data-theme="dark"]) .fm-hero__stat span { color: rgba(242,234,216,.72); }
  html:not([data-theme="dark"]) .fm-hero__stats { border-top-color: rgba(242,234,216,.12); }
  html:not([data-theme="dark"]) .fm-hero__stat { border-right-color: rgba(242,234,216,.12); }
  html:not([data-theme="dark"]) .fm-hero .btn-outline { color: rgba(242,234,216,.92) !important; border-color: rgba(242,234,216,.35) !important; background: transparent !important; }
  html:not([data-theme="dark"]) .fm-hero .btn-ghost { color: rgba(242,234,216,.85) !important; border-color: rgba(242,234,216,.28) !important; background: transparent !important; }
}


/* ════════════════════════════════════════════════════════════════
   TRUST BAR — Light mode
   ════════════════════════════════════════════════════════════════ */

:is([data-theme="light"]) .fm-trust {
  background: #e8e3d9;
  border-top: 1px solid rgba(28, 26, 23, 0.08);
  border-bottom: 1px solid rgba(28, 26, 23, 0.08);
}
:is([data-theme="light"]) .fm-trust::before {
  background: linear-gradient(90deg, transparent, rgba(107,71,17,.18), rgba(107,71,17,.1), transparent);
}
:is([data-theme="light"]) .fm-trust__label {
  color: #6b4711;
}
:is([data-theme="light"]) .fm-trust__tagline {
  color: #4a4540;
}
:is([data-theme="light"]) .fm-trust__logo-chip {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(28, 26, 23, 0.12);
  box-shadow: 0 1px 4px rgba(28, 26, 23, 0.06);
}
:is([data-theme="light"]) .fm-trust__logo-chip:is(a):hover {
  background: #fff;
  border-color: rgba(107, 71, 17, 0.28);
}
:is([data-theme="light"]) .fm-trust__logo-pill {
  color: #2d2721;
  font-weight: 700;
}

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .fm-trust { background: #e8e3d9; border-top-color: rgba(28,26,23,.08); border-bottom-color: rgba(28,26,23,.08); }
  html:not([data-theme="dark"]) .fm-trust__label { color: #6b4711; }
  html:not([data-theme="dark"]) .fm-trust__tagline { color: #4a4540; }
  html:not([data-theme="dark"]) .fm-trust__logo-chip { background: rgba(255,255,255,.88); border-color: rgba(28,26,23,.12); }
  html:not([data-theme="dark"]) .fm-trust__logo-pill { color: #2d2721; font-weight: 700; }
}


/* ════════════════════════════════════════════════════════════════
   HOMEPAGE SECTIONS — Systematic pass
   ════════════════════════════════════════════════════════════════ */

/* How It Works */
:is([data-theme="light"]) .fm-how { background: #ede9e1; }
:is([data-theme="light"]) .fm-how__header h2 { color: #1c1a17; }
:is([data-theme="light"]) .fm-how__header p { color: #4a4540; }
:is([data-theme="light"]) .fm-how__step {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(28, 26, 23, 0.1);
  box-shadow: 0 2px 12px rgba(28, 26, 23, 0.06);
}
:is([data-theme="light"]) .fm-how__step:hover {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(107, 71, 17, 0.16);
}
:is([data-theme="light"]) .fm-how__step h3 { color: #1c1a17; }
:is([data-theme="light"]) .fm-how__step p { color: #4a4540; }
:is([data-theme="light"]) .fm-how__step-num { color: rgba(107, 71, 17, 0.14); }

/* Spotlight */
:is([data-theme="light"]) .fm-spotlight { background: #f0ece4; }
:is([data-theme="light"]) .fm-spotlight__header h2 { color: #1c1a17; }
:is([data-theme="light"]) .fm-film-card {
  background: #fff;
  border: 1px solid rgba(28, 26, 23, 0.1);
  box-shadow: 0 3px 14px rgba(28, 26, 23, 0.08);
}
:is([data-theme="light"]) .fm-film-card:hover {
  border-color: rgba(107, 71, 17, 0.22);
  box-shadow: 0 16px 48px rgba(28, 26, 23, 0.14);
}
:is([data-theme="light"]) .fm-film-card__body { background: #fff; }
:is([data-theme="light"]) .fm-film-card__title { color: #1c1a17; }
:is([data-theme="light"]) .fm-film-card__meta { color: #4a4540; }
:is([data-theme="light"]) .fm-film-card__genre { color: #6b4711; }

/* Catalog preview */
:is([data-theme="light"]) .fm-catalog-preview { background: #ebe6dc; }
:is([data-theme="light"]) .fm-catalog__header h2 { color: #1c1a17; }
:is([data-theme="light"]) .fm-cat-card {
  background: #fff;
  border-color: rgba(28, 26, 23, 0.1);
  box-shadow: 0 2px 10px rgba(28, 26, 23, 0.07);
}

/* Filmmakers / Buyers sections */
:is([data-theme="light"]) .fm-makers { background: #ede9e1; }
:is([data-theme="light"]) .fm-makers h2,
:is([data-theme="light"]) .fm-makers__heading { color: #1c1a17; }
:is([data-theme="light"]) .fm-makers__desc { color: #4a4540; }
:is([data-theme="light"]) .fm-makers__benefit {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(28, 26, 23, 0.1);
}
:is([data-theme="light"]) .fm-makers__benefit:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(107, 71, 17, 0.16);
}
:is([data-theme="light"]) .fm-makers__reqs {
  background: rgba(107, 71, 17, 0.04);
  border-color: rgba(107, 71, 17, 0.18);
}

:is([data-theme="light"]) .fm-buyers { background: #e8e3d9; }
:is([data-theme="light"]) .fm-buyers__header h2 { color: #1c1a17; }
:is([data-theme="light"]) .fm-buyers__card {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(28, 26, 23, 0.1);
}
:is([data-theme="light"]) .fm-buyers__card:hover {
  border-color: rgba(107, 71, 17, 0.2);
  box-shadow: 0 10px 32px rgba(28, 26, 23, 0.1);
}
:is([data-theme="light"]) .fm-buyers__card h3 { color: #1c1a17; }
:is([data-theme="light"]) .fm-buyers__card p { color: #4a4540; }
:is([data-theme="light"]) .fm-buyers__cta {
  background: linear-gradient(135deg, rgba(107,71,17,.06), rgba(255,255,255,.9));
  border-color: rgba(107, 71, 17, 0.14);
}
:is([data-theme="light"]) .fm-buyers__cta h3 { color: #1c1a17; }
:is([data-theme="light"]) .fm-buyers__cta p { color: #4a4540; }

/* About */
:is([data-theme="light"]) .fm-about { background: #f0ece4; }
:is([data-theme="light"]) .fm-about h2 { color: #1c1a17; }
:is([data-theme="light"]) .fm-about__stat-card {
  background: #fff;
  border-color: rgba(28, 26, 23, 0.1);
  box-shadow: 0 2px 12px rgba(28, 26, 23, 0.06);
}
:is([data-theme="light"]) .fm-about__stat-card:hover {
  border-color: rgba(107, 71, 17, 0.18);
}
/* Stat numbers: use darker gold for AA contrast */
:is([data-theme="light"]) .fm-about__stat-card strong { color: #6b4711; }

/* FAQ */
:is([data-theme="light"]) .fm-faq { background: #ede9e1; }
:is([data-theme="light"]) .fm-faq h2 { color: #1c1a17; }
:is([data-theme="light"]) .fm-faq__item {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(28, 26, 23, 0.1);
}
:is([data-theme="light"]) .fm-faq__item.is-open { background: #fff; }
:is([data-theme="light"]) .fm-faq__item:hover { border-color: rgba(107, 71, 17, 0.18); }
:is([data-theme="light"]) .fm-faq__q { color: #1c1a17; }
:is([data-theme="light"]) .fm-faq__a { color: #4a4540; }
:is([data-theme="light"]) .fm-faq__icon { color: #6b4711; }

/* Contact */
:is([data-theme="light"]) .fm-contact { background: #f0ece4; }
:is([data-theme="light"]) .fm-contact h2 { color: #1c1a17; }
:is([data-theme="light"]) .fm-contact__form {
  background: #fff;
  border-color: rgba(28, 26, 23, 0.1);
}
:is([data-theme="light"]) .fm-native-form input,
:is([data-theme="light"]) .fm-native-form textarea,
:is([data-theme="light"]) .fm-native-form select {
  background: #f8f6f2;
  border-color: rgba(28, 26, 23, 0.16);
  color: #1c1a17;
}
:is([data-theme="light"]) .fm-native-form input:focus,
:is([data-theme="light"]) .fm-native-form textarea:focus {
  border-color: #6b4711;
  box-shadow: 0 0 0 3px rgba(107, 71, 17, 0.12);
}
:is([data-theme="light"]) .fm-contact__detail-icon { color: #6b4711; }

/* Section headings and kickers */
:is([data-theme="light"]) .fm-section h2 { color: #1c1a17; }
:is([data-theme="light"]) .fm-section .fm-section__kicker,
:is([data-theme="light"]) .eyebrow:not(.fm-hero .eyebrow) { color: #6b4711; }
:is([data-theme="light"]) .fm-section > .fm-wrap > p { color: #4a4540; }


/* ════════════════════════════════════════════════════════════════
   CATALOG PAGE — Specific contrast fixes
   ════════════════════════════════════════════════════════════════ */

/* CONFIRMED FAILURE: filter buttons gold text on beige = 3.4:1
   Fix: use darker gold #6b4711 for strong contrast */
:is([data-theme="light"]) .cat-filter-btn {
  color: #6b4711;
  border-color: rgba(107, 71, 17, 0.3);
  background: rgba(107, 71, 17, 0.06);
}
:is([data-theme="light"]) .cat-filter-btn:hover,
:is([data-theme="light"]) .cat-filter-btn.active {
  color: #4f3008;
  border-color: rgba(107, 71, 17, 0.5);
  background: rgba(107, 71, 17, 0.1);
}

/* Catalog hero stats — darker gold for AA */
:is([data-theme="light"]) .cat-hero__stat strong { color: #6b4711; }
:is([data-theme="light"]) .cat-hero__stat span { color: #4a4540; }

/* Catalog hero */
:is([data-theme="light"]) .cat-hero { background: #e8e3d9; }
:is([data-theme="light"]) .cat-hero h1 { color: #1c1a17; }
:is([data-theme="light"]) .cat-hero__sub { color: #4a4540; }

/* Catalog bar */
:is([data-theme="light"]) .cat-bar { background: #fff; border-bottom-color: rgba(28,26,23,.1); }
:is([data-theme="light"]) .cat-sort {
  background: #f8f6f2;
  border-color: rgba(28,26,23,.14);
  color: #1c1a17;
}
:is([data-theme="light"]) .cat-search input {
  background: #f8f6f2;
  border-color: rgba(28,26,23,.14);
  color: #1c1a17;
}

/* Catalog film cards */
:is([data-theme="light"]) .film-card {
  background: #fff;
  border-color: rgba(28,26,23,.09);
}
:is([data-theme="light"]) .film-card:hover {
  border-color: rgba(107,71,17,.2);
  box-shadow: 0 14px 42px rgba(28,26,23,.12);
}
:is([data-theme="light"]) .film-card__title { color: #1c1a17; }
:is([data-theme="light"]) .film-card__meta { color: #4a4540; }

/* Catalog CTA / buyers strip */
:is([data-theme="light"]) .cat-cta__inner { background: #ede9e1; }
:is([data-theme="light"]) .cat-cta__inner h2 { color: #1c1a17; }
:is([data-theme="light"]) .cat-cta__inner p { color: #4a4540; }
:is([data-theme="light"]) .cat-buyers__inner .btn-outline {
  color: #1c1a17;
  border-color: rgba(28,26,23,.28);
}

/* ── Mirror all catalog rules for system preference ─────────── */
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .cat-filter-btn { color: #6b4711; border-color: rgba(107,71,17,.3); background: rgba(107,71,17,.06); }
  html:not([data-theme="dark"]) .cat-filter-btn:hover,
  html:not([data-theme="dark"]) .cat-filter-btn.active { color: #4f3008; border-color: rgba(107,71,17,.5); }
  html:not([data-theme="dark"]) .cat-hero { background: #e8e3d9; }
  html:not([data-theme="dark"]) .cat-hero h1 { color: #1c1a17; }
  html:not([data-theme="dark"]) .cat-hero__sub { color: #4a4540; }
  html:not([data-theme="dark"]) .cat-hero__stat strong { color: #6b4711; }
  html:not([data-theme="dark"]) .film-card { background: #fff; border-color: rgba(28,26,23,.09); }
  html:not([data-theme="dark"]) .film-card__title { color: #1c1a17; }
  html:not([data-theme="dark"]) .film-card__meta { color: #4a4540; }
}


/* ════════════════════════════════════════════════════════════════
   FOR BUYERS PAGE — Light mode
   ════════════════════════════════════════════════════════════════ */

/* Buyers hero — always dark (same as main hero) */
:is([data-theme="light"]) .byr-hero { background-color: #080b10; }
:is([data-theme="light"]) .byr-hero,
:is([data-theme="light"]) .byr-hero * {
  --cream: #f2ead8;
  --muted: #8a92a0;
}
:is([data-theme="light"]) .byr-hero h1 { color: #f2ead8; }
:is([data-theme="light"]) .byr-hero__sub { color: rgba(242,234,216,.82); }
:is([data-theme="light"]) .byr-hero .btn-outline {
  color: rgba(242,234,216,.92) !important;
  border-color: rgba(242,234,216,.35) !important;
}

/* Buyers body sections */
:is([data-theme="light"]) .byr-access { background: #f0ece4; }
:is([data-theme="light"]) .byr-serve { background: #ede9e1; }
:is([data-theme="light"]) .byr-serve h2 { color: #1c1a17; }
:is([data-theme="light"]) .byr-serve-card {
  background: rgba(255,255,255,.78);
  border-color: rgba(28,26,23,.1);
}
:is([data-theme="light"]) .byr-serve-card h3 { color: #1c1a17; }
:is([data-theme="light"]) .byr-serve-card p { color: #4a4540; }

:is([data-theme="light"]) .byr-hero__card {
  background: rgba(255,255,255,.1);
  border-color: rgba(242,234,216,.2);
}
:is([data-theme="light"]) .byr-hero__stat strong { color: #f2ead8; }
:is([data-theme="light"]) .byr-hero__stat span { color: rgba(242,234,216,.72); }

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .byr-hero { background-color: #080b10; --cream: #f2ead8; --muted: #8a92a0; }
  html:not([data-theme="dark"]) .byr-hero h1 { color: #f2ead8; }
  html:not([data-theme="dark"]) .byr-hero__sub { color: rgba(242,234,216,.82); }
  html:not([data-theme="dark"]) .byr-hero .btn-outline { color: rgba(242,234,216,.92) !important; border-color: rgba(242,234,216,.35) !important; }
  html:not([data-theme="dark"]) .byr-serve h2 { color: #1c1a17; }
  html:not([data-theme="dark"]) .byr-serve-card { background: rgba(255,255,255,.78); border-color: rgba(28,26,23,.1); }
  html:not([data-theme="dark"]) .byr-serve-card h3 { color: #1c1a17; }
  html:not([data-theme="dark"]) .byr-serve-card p { color: #4a4540; }
}


/* ════════════════════════════════════════════════════════════════
   FOR FILMMAKERS PAGE — Light mode
   ════════════════════════════════════════════════════════════════ */

/* Services hero — always dark */
:is([data-theme="light"]) .fm-services-hero { background-color: #080b10; }
:is([data-theme="light"]) .fm-services-hero,
:is([data-theme="light"]) .fm-services-hero * {
  --cream: #f2ead8;
  --muted: #8a92a0;
}
:is([data-theme="light"]) .fm-services-hero h1 { color: #f2ead8; }
:is([data-theme="light"]) .fm-services-hero__sub { color: rgba(242,234,216,.82); }
:is([data-theme="light"]) .fm-services-hero__stat strong { color: #f2ead8; }
:is([data-theme="light"]) .fm-services-hero__stat span { color: rgba(242,234,216,.72); }

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .fm-services-hero { background-color: #080b10; --cream: #f2ead8; }
  html:not([data-theme="dark"]) .fm-services-hero h1 { color: #f2ead8; }
  html:not([data-theme="dark"]) .fm-services-hero__sub { color: rgba(242,234,216,.82); }
  html:not([data-theme="dark"]) .fm-services-hero__stat strong { color: #f2ead8; }
}


/* ════════════════════════════════════════════════════════════════
   GLOBAL BUTTONS — Context-aware light mode
   ════════════════════════════════════════════════════════════════ */

/* .btn-outline on light backgrounds (outside hero) */
:is([data-theme="light"]) .btn-outline:not(.fm-hero .btn-outline):not(.byr-hero .btn-outline):not(.fm-services-hero .btn-outline) {
  color: #1c1a17;
  border-color: rgba(28, 26, 23, 0.28);
  background: transparent;
}
:is([data-theme="light"]) .btn-outline:not(.fm-hero .btn-outline):not(.byr-hero .btn-outline):not(.fm-services-hero .btn-outline):hover {
  border-color: rgba(28, 26, 23, 0.48);
  background: rgba(28, 26, 23, 0.04);
}

/* .btn-gold on light backgrounds */
:is([data-theme="light"]) .btn-gold,
:is([data-theme="light"]) .btn.btn-gold {
  background: #9a6e1a;
  color: #fff;
  border-color: #7a5410;
}
:is([data-theme="light"]) .btn-gold:hover {
  background: #7a5410;
}

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .btn-gold { background: #9a6e1a; color: #fff; border-color: #7a5410; }
  html:not([data-theme="dark"]) .btn-outline:not(.fm-hero .btn-outline):not(.byr-hero .btn-outline) { color: #1c1a17; border-color: rgba(28,26,23,.28); }
}


/* ════════════════════════════════════════════════════════════════
   FOOTER — Always dark in both modes
   ════════════════════════════════════════════════════════════════ */

:is([data-theme="light"]) .fm-footer {
  background: #1a1812;
  color: rgba(242, 234, 216, 0.78);
}
:is([data-theme="light"]) .fm-footer__col h4 { color: rgba(242,234,216,.9); }
:is([data-theme="light"]) .fm-footer__col a { color: rgba(242,234,216,.72); }
:is([data-theme="light"]) .fm-footer__col a:hover { color: #f2ead8; }
:is([data-theme="light"]) .fm-footer__copy { color: rgba(242,234,216,.55); }
:is([data-theme="light"]) .fm-footer__legal a { color: rgba(242,234,216,.55); }
:is([data-theme="light"]) .fm-footer__legal a:hover { color: rgba(242,234,216,.85); }
:is([data-theme="light"]) .fm-footer__tagline { color: rgba(242,234,216,.62); }
/* Footer CTA buttons — dark bg needs cream/gold style */
:is([data-theme="light"]) .fm-footer .btn-gold { background: #9a6e1a; color: #fff; }
:is([data-theme="light"]) .fm-footer .btn-outline {
  color: rgba(242,234,216,.85) !important;
  border-color: rgba(242,234,216,.28) !important;
}

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .fm-footer { background: #1a1812; color: rgba(242,234,216,.78); }
  html:not([data-theme="dark"]) .fm-footer__col h4 { color: rgba(242,234,216,.9); }
  html:not([data-theme="dark"]) .fm-footer__col a { color: rgba(242,234,216,.72); }
  html:not([data-theme="dark"]) .fm-footer .btn-outline { color: rgba(242,234,216,.85) !important; border-color: rgba(242,234,216,.28) !important; }
}


/* ════════════════════════════════════════════════════════════════
   FILM DETAIL PAGE — Light mode
   ════════════════════════════════════════════════════════════════ */

/* Film detail hero — always dark */
:is([data-theme="light"]) .fm-film__hero {
  background-color: #080b10;
  --cream: #f2ead8;
  --muted: #8a92a0;
}
:is([data-theme="light"]) .fm-film__title { color: #f2ead8; }
:is([data-theme="light"]) .fm-film__tagline { color: rgba(242,234,216,.82); }
:is([data-theme="light"]) .fm-film__meta-label { color: rgba(242,234,216,.55); }
:is([data-theme="light"]) .fm-film__meta-value { color: #f2ead8; }
:is([data-theme="light"]) .fm-film__hero .btn-outline {
  color: rgba(242,234,216,.92) !important;
  border-color: rgba(242,234,216,.35) !important;
}

/* Film detail body sections */
:is([data-theme="light"]) .fm-film__section { background: #f0ece4; }
:is([data-theme="light"]) .fm-film__section--alt { background: #ede9e1; }
:is([data-theme="light"]) .fm-film__section h2 { color: #1c1a17; }
:is([data-theme="light"]) .fm-film__section p { color: #4a4540; }
:is([data-theme="light"]) .fm-film__cta-box {
  background: rgba(255,255,255,.9);
  border-color: rgba(28,26,23,.1);
}
:is([data-theme="light"]) .fm-film__cta-box h3 { color: #1c1a17; }
:is([data-theme="light"]) .fm-film__related-grid .fm-film-card { background: #fff; }

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .fm-film__hero { background-color: #080b10; --cream: #f2ead8; }
  html:not([data-theme="dark"]) .fm-film__title { color: #f2ead8; }
  html:not([data-theme="dark"]) .fm-film__hero .btn-outline { color: rgba(242,234,216,.92) !important; border-color: rgba(242,234,216,.35) !important; }
  html:not([data-theme="dark"]) .fm-film__section { background: #f0ece4; }
  html:not([data-theme="dark"]) .fm-film__section h2 { color: #1c1a17; }
  html:not([data-theme="dark"]) .fm-film__section p { color: #4a4540; }
}
