/* Ballpark Figures — site styles. Brand tokens mirror bpkfigures/style.py. */
:root {
  --brand:   #02A4D3; /* BG_COLOR   */
  --deep:    #0000AF; /* ACCENT_FILL */
  --gold:    #E8A33D; /* ACCENT_GOLD */
  --cream:   #F7F2E7; /* CARD_FILL   */
  --bg:      #FBF9F3;
  --ink:     #1c2333;
  --muted:   #5c6472;
  --card:    #ffffff;
  --maxw:    1040px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--deep); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 249, 243, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.07);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 0.65rem; }
.brand img { width: 34px; height: 34px; display: block; border-radius: 50%; }
.brand span { font-weight: 800; font-size: 1.15rem; color: var(--deep); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 1.4rem; align-items: center; }
.nav a { font-weight: 600; color: var(--ink); font-size: 0.98rem; }
.nav a:hover { color: var(--deep); text-decoration: none; }

/* Topics dropdown */
.dropdown { position: relative; }
.dropbtn .caret { font-size: 0.7em; vertical-align: middle; }
.dropdown-menu {
  position: absolute; right: 0; top: 100%;
  min-width: 170px;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
  padding: 0.4rem 0;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown-menu a {
  display: block; padding: 0.55rem 1.1rem;
  font-weight: 600; font-size: 0.95rem; color: var(--ink); white-space: nowrap;
}
.dropdown-menu a:hover { background: var(--bg); color: var(--deep); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  background: var(--deep);
  color: var(--cream);
  text-align: center;
  padding: 4.5rem 1.5rem 4rem;
}
.hero img { width: 104px; height: 104px; margin-bottom: 1.2rem; border-radius: 50%; box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
.hero h1 { font-weight: 800; font-size: clamp(2.4rem, 6vw, 3.6rem); letter-spacing: -0.02em; line-height: 1.05; }
.hero p { font-weight: 600; font-size: clamp(1.05rem, 2.6vw, 1.3rem); opacity: 0.95; margin-top: 0.8rem; }

/* ---------- Sections ---------- */
section { padding: 3.2rem 0; }
.section-title {
  font-weight: 800; font-size: 1.7rem; color: var(--deep);
  margin-bottom: 1.4rem; letter-spacing: -0.01em;
}
.about-text { font-size: 1.08rem; color: var(--muted); max-width: 720px; }
.about-text.placeholder { font-style: italic; }

/* ---------- Video grid ---------- */
.grid {
  display: grid; gap: 1.6rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: var(--card); border-radius: 14px; overflow: hidden;
  box-shadow: 0 6px 22px rgba(0,0,0,0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.13); text-decoration: none; }
.thumb { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; display: block; background: #d8dbe2; }
.thumb.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--brand), var(--deep));
  color: var(--cream); font-weight: 700; text-align: center; padding: 1rem;
}
.card-body { padding: 1rem 1.15rem 1.25rem; }
.card-body h3 { font-size: 1.12rem; color: var(--ink); font-weight: 700; line-height: 1.3; }
.card-body .date { font-size: 0.82rem; color: var(--muted); margin-top: 0.35rem; }
.card-body p { font-size: 0.95rem; color: var(--muted); margin-top: 0.55rem; }

/* ---------- Video page ---------- */
.video-page { padding: 2.6rem 0 3.4rem; }
.back { font-size: 0.92rem; font-weight: 600; color: var(--muted); display: inline-block; margin-bottom: 1.2rem; }
.video-page h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); color: var(--deep); font-weight: 800; letter-spacing: -0.01em; }
.video-page .date { color: var(--muted); font-size: 0.95rem; margin: 0.4rem 0 1.5rem; }
.embed { position: relative; padding-top: 56.25%; border-radius: 12px; overflow: hidden; background: #000; box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--brand), var(--deep)); color: var(--cream);
  font-weight: 700; padding: 0; text-align: center;
}
.embed.placeholder span { position: absolute; }
.desc { font-size: 1.06rem; color: var(--ink); margin-top: 1.6rem; max-width: 760px; }
.btn {
  display: inline-block; margin-top: 1.7rem; padding: 0.85rem 1.7rem;
  background: var(--gold); color: #3a2a08; font-weight: 700; border-radius: 999px;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn.disabled { background: #e3e0d8; color: #9a978f; cursor: default; pointer-events: none; }

/* ---------- Per-video interactive ---------- */
.interactive { padding: 0 0 2.4rem; }
.interactive .wrap > * { max-width: 100%; }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep); color: var(--cream); padding: 2.6rem 0; margin-top: 2rem; }
.site-footer .wrap { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; text-align: center; }
.social { display: flex; gap: 1.6rem; }
.social a { display: flex; align-items: center; gap: 0.45rem; color: var(--cream); font-weight: 600; font-size: 0.95rem; opacity: 0.92; }
.social a:hover { opacity: 1; text-decoration: none; }
.social svg { width: 20px; height: 20px; fill: currentColor; }
.copyright { font-size: 0.85rem; opacity: 0.7; }

/* ---------- Misc ---------- */
.notfound { text-align: center; padding: 6rem 1.5rem; }
.notfound h1 { font-size: 4rem; color: var(--deep); }
@media (max-width: 560px) {
  .nav { gap: 1rem; }
  .brand span { font-size: 1rem; }
}
