/* Media Vaswani — shared styles
   Design: clean, warm, professional.
   Standing image rule: every framed image uses object-fit: contain on a matte
   background so the whole picture is always visible — never cropped,
   stretched, or overflowing, at any width including 390px phones. */

:root {
  --ink: #2b2118;
  --ink-soft: #5b4c3d;
  --paper: #fdf9f3;
  --card: #ffffff;
  --matte: #efe6d8;
  /* Base "Media Vaswani" brand palette (also the :root fallback).
     --accent: buttons, rules, labels (white text on it passes 4.5:1).
     --accent-dark: link color / hover-deepening (passes 4.5:1 on paper).
     --accent-soft: light band tint. --accent-ink: heading color (passes
     4.5:1 on paper and on --accent-soft). --gold: header highlights. */
  --accent: #0f766e;
  --accent-dark: #115e59;
  --accent-soft: #e7f4f0;
  --accent-ink: #0c4a43;
  --accent-2: #b45309;
  --gold: #c99a3c;
  --line: #e4d8c6;
  --yt-red: #cc0000;
  --yt-red-dark: #a30000;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(43, 33, 24, 0.08);
}

/* ---------- Per-page themes (Ravi, 2026-10-22) ----------
   Each page's <body> carries one theme class; the class only re-points the
   accent variables. Subscribe buttons stay YouTube red on every page. */
body.theme-home,
body.theme-sponsors,
body.theme-about {
  --accent: #0f766e;
  --accent-dark: #115e59;
  --accent-soft: #e7f4f0;
  --accent-ink: #0c4a43;
  --accent-2: #b45309;
}
body.theme-daisy {
  /* Warm coral/amber, deepened from #e0651f so white button text and
     label text keep 4.5:1 contrast. */
  --accent: #b34a0a;
  --accent-dark: #8f3a07;
  --accent-soft: #fdeede;
  --accent-ink: #7c3305;
}
body.theme-history {
  /* Sepia / parchment. */
  --accent: #8a6d3b;
  --accent-dark: #6f5627;
  --accent-soft: #f4ecd9;
  --accent-ink: #5d4820;
}
body.theme-caregiver {
  /* Soft caring blue (the channel's blue heart). */
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #e3edfd;
  --accent-ink: #1e40af;
}
body.theme-atlas {
  /* Deep navy + gold, matching the compass artwork. Gold is the accent;
     navy is its ground — see the Atlas overrides below. */
  --accent: #c9a227;
  --accent-dark: #16283f;
  --accent-soft: #e9edf3;
  --accent-ink: #16283f;
}

/* Atlas inversions: gold cannot carry white text, so on Atlas the bands go
   navy with gold headings, Follow buttons go navy, and links run navy. */
.theme-atlas .hero,
.theme-atlas .channel-head {
  background: #16283f;
  border-top-color: #c9a227;
}
.theme-atlas .channel-head h1,
.theme-atlas .hero h1 { color: #c9a227; }
.theme-atlas .channel-head .description,
.theme-atlas .hero p { color: #cfdcec; }
.theme-atlas .channel-head .schedule { color: #c9a227; }
.theme-atlas .btn-follow { background: #16283f; }
.theme-atlas .btn-follow:hover { background: #24466e; }
.theme-atlas .nav a[aria-current="page"] { background: #c9a227; color: #16283f; }
.theme-atlas main a:not(.btn-subscribe):not(.btn-follow):not(.btn-watch) { color: #16283f; }
.theme-atlas main a:not(.btn-subscribe):not(.btn-follow):not(.btn-watch):hover { color: #8a6d0f; }
.theme-atlas .site-header a, .theme-atlas .site-footer a { color: #fdf9f3; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

h1, h2, h3, .nav, .btn, .schedule, .follow-band, table, .channel-name {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent-dark); }
a:hover { color: var(--accent); }

/* Headings take the page theme's ink. (.follow-band h2 and .site-header
   keep their light colors — those rules come later and are more specific
   to their dark bands.) */
.hero h1, .channel-head h1, .section > h2, .card h2,
.callout h2, .embed-item h3, .contact-block strong {
  color: var(--accent-ink);
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--ink);
  color: #fdf9f3;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: #fdf9f3;
  text-decoration: none;
  margin-right: auto;
}
.brand span { color: var(--gold); }
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  font-size: 0.92rem;
}
.nav a {
  color: #f3e9da;
  text-decoration: none;
  padding: 6px 9px;
  border-radius: 8px;
}
.nav a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.nav a[aria-current="page"] { background: var(--accent); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 56px 20px 30px;
  margin-top: 18px;
  background: var(--accent-soft);
  border-top: 4px solid var(--accent);
  border-radius: 0 0 var(--radius) var(--radius);
}
.hero h1 {
  font-size: 2.6rem;
  margin: 0 0 14px;
  line-height: 1.15;
}
.hero p {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 720px;
  margin: 0 auto;
}

/* ---------- Framed images (contain rule) ---------- */
.frame {
  background: var(--matte);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.frame--banner { aspect-ratio: 16 / 9; }
.frame--card { aspect-ratio: 16 / 9; }
.frame--avatar {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  max-width: 180px;
  margin: 0 auto;
}
.frame--thumb { aspect-ratio: 16 / 9; }

/* ---------- Channel cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  padding: 26px 0 10px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card .frame { border: none; border-radius: 0; }
.card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.card h2 { margin: 0; font-size: 1.3rem; }
.card p { margin: 0; color: var(--ink-soft); flex: 1; }
.schedule {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid transparent;
}
.btn-subscribe { background: var(--yt-red); color: #fff; }
.btn-subscribe:hover { background: var(--yt-red-dark); color: #fff; }
.btn-watch {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-watch:hover { background: var(--ink); color: #fff; }
.btn-follow {
  background: var(--accent);
  color: #fff;
}
.btn-follow:hover { background: var(--accent-dark); color: #fff; }

/* ---------- Sections ---------- */
.section { padding: 34px 0 8px; }
.section > h2 {
  font-size: 1.7rem;
  margin: 0 0 6px;
  text-align: center;
  border-bottom: 3px solid var(--accent-2, var(--accent));
  padding-bottom: 8px;
}
.section > p.lede {
  text-align: center;
  color: var(--ink-soft);
  max-width: 680px;
  margin: 0 auto 10px;
}

/* ---------- Video embeds ---------- */
.embed-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  padding: 14px 0 6px;
}
.embed-item h3 { margin: 0 0 8px; font-size: 1.05rem; text-align: center; }
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video--single { max-width: 760px; margin: 14px auto 6px; }

/* ---------- YouTube tap-to-play facades ----------
   Lightweight stand-ins for the YouTube iframes: the real player loads
   only when a visitor taps play (script at the end of each page body). */
.yt-facade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
  display: block;
  font: inherit;
}
.yt-facade img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.yt-facade-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  border-radius: 12px;
  background: rgba(33, 33, 33, 0.85);
  transition: background 0.15s ease;
}
.yt-facade-play::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-42%, -50%);
  border-style: solid;
  border-width: 11px 0 11px 19px;
  border-color: transparent transparent transparent #fff;
}
.yt-facade:hover .yt-facade-play,
.yt-facade:focus-visible .yt-facade-play { background: var(--yt-red); }
.yt-facade:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

/* ---------- Follow band ---------- */
.follow-band {
  background: var(--ink);
  color: #f3e9da;
  border-radius: var(--radius);
  padding: 26px 28px;
  margin: 40px 0 8px;
  text-align: center;
}
.follow-band h2 { margin: 0 0 14px; color: #fff; font-size: 1.4rem; }
.follow-band ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
}
.follow-band a { color: var(--gold); text-decoration: none; font-weight: 600; }
.follow-band a:hover { text-decoration: underline; }

/* ---------- Channel page ---------- */
.channel-head {
  text-align: center;
  padding: 34px 20px 18px;
  margin-top: 18px;
  background: var(--accent-soft);
  border-top: 4px solid var(--accent);
  border-radius: 0 0 var(--radius) var(--radius);
}
.channel-head h1 { font-size: 2.1rem; margin: 16px 0 4px; }
.channel-head .schedule { display: block; margin-bottom: 6px; }
.channel-head .btn-row { justify-content: center; }
.description {
  max-width: 760px;
  margin: 14px auto 0;
  font-size: 1.08rem;
  color: var(--ink-soft);
  text-align: center;
}
.description.left { text-align: left; }
.callout {
  max-width: 760px;
  margin: 22px auto 0;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow);
}
.callout h2 { margin: 0 0 8px; font-size: 1.25rem; }
.callout p { margin: 0; color: var(--ink-soft); }
.prose { max-width: 760px; margin: 0 auto; font-size: 1.08rem; }
.prose p { margin: 0 0 16px; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; margin: 18px 0 6px; }
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.98rem;
}
th, td { padding: 12px 16px; text-align: left; vertical-align: top; }
th { background: var(--accent); color: #fff; }
tr:nth-child(even) td { background: var(--accent-soft); }
.contact-block {
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  max-width: 560px;
  margin: 22px auto 0;
  font-size: 1.1rem;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 52px;
  background: var(--ink);
  color: #f3e9da;
  text-align: center;
  padding: 24px 20px;
  font-size: 0.98rem;
}
.site-footer a { color: var(--gold); }

/* ---------- Skip link (accessibility) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Mobile ---------- */
@media (max-width: 700px) {
  .cards, .embed-grid { grid-template-columns: 1fr; }
  .hero { padding: 38px 14px 20px; }
  .channel-head { padding-left: 14px; padding-right: 14px; }
  .hero h1 { font-size: 2rem; }
  .channel-head h1 { font-size: 1.7rem; }
  .site-header .wrap { justify-content: center; }
  .brand { margin-right: 0; }
  .nav { justify-content: center; font-size: 0.85rem; }
  .follow-band { padding: 22px 16px; }
  th, td { padding: 10px 12px; }
}
