/* =========================================================
   The Algorithm and The Altar — light ("bright") theme
   Active only when <html data-theme="light">. Swaps the dark
   surface/text tokens and fixes the few hard-coded dark colors.
   Text colors are chosen for at least 4.5:1 on their surfaces.
   ========================================================= */

html[data-theme="light"] {
  color-scheme: light;

  /* surfaces */
  --ink: #f6f7f9;
  --ink-2: #eceff3;
  --ink-3: #e2e6ec;
  --line: #cfd4dc;
  --line-soft: rgba(10, 14, 26, 0.07);

  /* text on light */
  --white: #0a0e1a;        /* "brightest" text = darkest ink */
  --text: #12151c;
  --silver: #2a303b;
  --muted: #464d59;
  --hint: #5a616d;

  /* accents darkened for text contrast */
  --blue: #1d5bc9;
  --amber: #945204;
  --amber-ink: #8f5005;

  /* "paper" sections become white panels */
  --paper: #ffffff;
  --paper-2: #f3f5f8;
  --paper-line: #d7dbe2;
  --paper-ink: #12151c;
  --paper-muted: #464d59;
}

html[data-theme="light"] body { background: var(--ink); color: var(--text); }
html[data-theme="light"] ::selection { background: #f5c97f; color: #0a0e1a; }

/* buttons: keep the bright brand amber as a fill, dark label */
html[data-theme="light"] .btn { --bd: rgba(10, 14, 26, 0.32); }
html[data-theme="light"] .btn--ghost { --bd: rgba(10, 14, 26, 0.32); }
html[data-theme="light"] .btn--ghost:hover { background: rgba(10, 14, 26, 0.05); border-color: var(--text); }
html[data-theme="light"] .btn--primary { --bg: #e9a23b; --bd: #e9a23b; --fg: #0b0a08; }
html[data-theme="light"] .btn--primary:hover { --bg: #f2b45a; --bd: #f2b45a; }
html[data-theme="light"] .video__btn { background: #e9a23b; }

/* header, overlays, sticky bar */
html[data-theme="light"] .site-header.is-scrolled,
html[data-theme="light"] .site-header.is-solid { background: rgba(246, 247, 249, 0.92); }
html[data-theme="light"] .mobile-menu { background: rgba(246, 247, 249, 0.99); }
html[data-theme="light"] .search { background: rgba(236, 239, 243, 0.96); }
html[data-theme="light"] .mobile-cta { background: rgba(246, 247, 249, 0.95); }
html[data-theme="light"] .icon-btn { color: var(--silver); }

/* home hero */
html[data-theme="light"] .hero__vignette {
  background:
    linear-gradient(90deg, rgba(246,247,249,.94) 0%, rgba(246,247,249,.7) 45%, rgba(246,247,249,0) 75%),
    linear-gradient(0deg, var(--ink) 0%, transparent 25%);
}
@media (max-width: 900px) {
  html[data-theme="light"] .hero__vignette { background: linear-gradient(0deg, var(--ink) 0%, rgba(246,247,249,.82) 40%, rgba(246,247,249,.65) 100%); }
}
html[data-theme="light"] .hero__mark img { filter: drop-shadow(0 24px 40px rgba(10, 14, 26, .25)); }

/* inner-page hero with photo: wash the photo so dark text stays readable */
html[data-theme="light"] .page-hero__media::after {
  background:
    linear-gradient(90deg, var(--ink) 25%, rgba(246,247,249,.88) 55%, rgba(246,247,249,.55) 100%),
    linear-gradient(0deg, var(--ink) 0%, transparent 40%);
}

/* cards and hovers */
html[data-theme="light"] .audience:hover { border-color: #aab1bc; }
html[data-theme="light"] a.card:hover,
html[data-theme="light"] .card:focus-within { border-color: #aab1bc; }
html[data-theme="light"] .section--paper { border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); }
html[data-theme="light"] .section--paper .card,
html[data-theme="light"] .format { background: var(--paper-2); }
html[data-theme="light"] .section--paper a.card:hover { background: var(--paper-2); }

/* portrait caption */
html[data-theme="light"] .portrait--photo .portrait__tag { color: var(--muted); text-shadow: none; }
html[data-theme="light"] .portrait--photo::before { content: none; }

/* forms */
html[data-theme="light"] .field input,
html[data-theme="light"] .field select,
html[data-theme="light"] .field textarea { background: #ffffff; }
html[data-theme="light"] .signup input { background: #ffffff; border-color: var(--line); }
html[data-theme="light"] .field__err { color: #b42318; }
html[data-theme="light"] .field input[aria-invalid="true"],
html[data-theme="light"] .field select[aria-invalid="true"],
html[data-theme="light"] .field textarea[aria-invalid="true"] { border-color: #b42318; }
html[data-theme="light"] .form__status--ok { color: #1d4ea8; background: rgba(29, 91, 201, .07); border-color: rgba(29, 91, 201, .4); }
html[data-theme="light"] .form__status--warn { color: #7a4504; background: rgba(233, 162, 59, .12); border-color: rgba(163, 92, 6, .4); }
html[data-theme="light"] .form__status--err { color: #b42318; background: rgba(180, 35, 24, .06); border-color: rgba(180, 35, 24, .4); }
html[data-theme="light"] .status--live { color: var(--blue); border-color: rgba(29, 91, 201, .35); }
html[data-theme="light"] .status--soon { color: var(--amber); border-color: rgba(163, 92, 6, .35); }

/* footer */
html[data-theme="light"] .site-footer { background: #e6e9ee; }

/* decorative big numerals stay subtle but visible */
html[data-theme="light"] .contention__n { color: #7c8594; }
