/* bwana.tv: the whole stylesheet. Poppins + the color tokens below are the brand; tools/check.py guards them.
   Contents: 1 tokens, 2 base, 3 header, 4 sections, 5 cards, 6 shortform, 7 what I'm playing, 8 longform,
             9 live stream, 10 contact, 11 footer, 12 media kit, 13 responsive, 14 reduced motion.
   Rows inside <!-- X:START --> markers in index.html are generated by update.py; style them here. */

/* ---------- 1 tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #07070c;
  --surface: #0f1018;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f4f8;
  --muted: #9a9bb0;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --accent-3: #f472b6;
  --grad: linear-gradient(120deg, var(--accent-2), var(--accent) 50%, var(--accent-3));
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 20px;
  --gap: clamp(14px, 1.6vw, 24px);
  --section-gap: clamp(40px, 6vw, 72px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* platform colors */
  --twitch: #9146ff;
  --kick: #53fc18;
  --youtube: #ff2d46;
  --live: #ff3b57;
}

/* ---------- 2 base ---------- */
* { box-sizing: border-box; font-kerning: none; font-feature-settings: "kern" 0; letter-spacing: normal; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--font); font-size: 15px; line-height: 1.55;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before, body::after { /* ambient glow */
  content: ""; position: fixed; z-index: -1; pointer-events: none;
  width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(120px); opacity: .22;
}
body::before { top: -30vmax; left: -15vmax; background: var(--accent); }
body::after { top: 10vmax; right: -25vmax; background: var(--accent-2); opacity: .12; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
ol, ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
.wrap { width: min(1360px, 100% - clamp(32px, 6vw, 96px)); margin-inline: auto; }
.icon { width: 1.15em; height: 1.15em; flex: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; } /* the icon set at the top of index.html */

/* ---------- 3 header ---------- */
header { padding-block: clamp(28px, 5vw, 64px) clamp(24px, 4vw, 40px); }
.hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.hero-title { display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); min-width: 0; }
.avatar {
  flex: none; width: clamp(64px, 7vw, 96px); height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--line-strong);
  box-shadow: 0 0 0 5px rgba(139, 92, 246, .2), 0 12px 40px -10px rgba(139, 92, 246, .65);
}
h1 { font-weight: 800; line-height: 1.02; font-size: clamp(26px, 2.9vw, 42px); text-wrap: balance; }
h1 .beige {
  color: #f6ead2;
  text-shadow: 0 0 6px rgba(232, 208, 160, .5), 0 0 18px rgba(232, 208, 160, .32), 0 0 42px rgba(214, 184, 132, .2);
}
h1 .tv {
  color: #fff;
  text-shadow: 0 0 6px rgba(56, 150, 255, .9), 0 0 18px rgba(56, 150, 255, .75), 0 0 42px rgba(40, 120, 255, .55);
}
.button {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  font-weight: 600; font-size: 15px; color: #0a0a12; background: #fff;
  padding: 13px 24px 13px 18px; border-radius: 999px;
  transition: transform .2s, box-shadow .2s;
}
.button .icon { width: 22px; height: 22px; color: var(--accent); }
.button:hover, .button:focus-visible {
  transform: translateY(-2px); outline: none;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .35), 0 16px 40px -10px rgba(139, 92, 246, .6);
}

/* ---------- 4 sections ---------- */
main { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--section-gap); padding-bottom: var(--section-gap); } /* minmax(0,…): a wide child (the swipeable strip) must not stretch the page */
.section-title {
  margin-bottom: clamp(16px, 2.4vw, 26px); font-size: clamp(22px, 2.8vw, 30px); font-weight: 700;
  display: flex; align-items: center; gap: 18px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }

/* ---------- 5 cards (one component for every row) ---------- */
.card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.frame {
  position: relative; display: block; overflow: hidden; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); isolation: isolate;
  transition: transform .35s var(--ease), border-color .3s, box-shadow .35s;
}
.frame img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: -2;
  transition: transform .6s var(--ease);
}
.frame::after { /* darkens the bottom so the badges stay readable */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(7, 7, 12, .92) 0%, rgba(7, 7, 12, .25) 45%, rgba(7, 7, 12, 0) 70%);
}
.frame:hover, .frame:focus-visible {
  transform: translateY(-6px); outline: none; border-color: transparent;
  box-shadow: 0 0 0 1.5px var(--accent), 0 28px 60px -20px rgba(139, 92, 246, .55);
}
.frame:hover img, .frame:focus-visible img { transform: scale(1.06); }

.badges { position: absolute; top: 12px; left: 12px; display: flex; align-items: center; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.4; color: var(--text);
  background: rgba(7, 7, 12, .62); border: 1px solid var(--line-strong);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.rank { color: #fff; background: var(--grad); border-color: transparent; font-weight: 700; font-size: 13px; }
.duration { position: absolute; top: 12px; right: 12px; font-weight: 500; }
.stat { position: absolute; left: 12px; bottom: 12px; padding: 6px 14px 7px; font-size: 18px; font-weight: 700; color: #fff; }
.stat .icon { color: var(--muted); }
.platform { width: 28px; height: 28px; padding: 0; justify-content: center; }
.platform .icon { width: 15px; height: 15px; }
.platform.yt { color: var(--youtube); }
.platform.tt { color: #fff; }
.platform.tw { color: var(--twitch); }
.platform.kk { color: var(--kick); }
.play {
  position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, .95); color: #0a0a12;
  opacity: 0; transform: scale(.8); transition: opacity .25s, transform .25s;
}
.play .icon { width: 24px; height: 24px; margin-left: 3px; }
.frame:hover .play, .frame:focus-visible .play { opacity: 1; transform: scale(1); }

.card h3 { font-size: 15px; font-weight: 600; line-height: 1.35; text-wrap: balance; }
.card p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.card .game { color: #c4b5fd; font-weight: 500; }

/* ---------- 6 shortform: YouTube Shorts + TikTok, three each, side by side. ".compact" = small portrait cards, also used by the media kit ---------- */
.shortform { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 3vw, 56px); align-items: start; }
.shortform > ol { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 1vw, 14px); }
.shortform > ol + ol::before { /* hairline between the two platforms */
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(clamp(28px, 3vw, 56px) / -2); width: 1px; background: var(--line);
}
.compact .card { gap: 8px; }
.compact .frame { aspect-ratio: 9 / 16; border-radius: 14px; }
.compact .badges { top: 8px; left: 8px; gap: 4px; }
.compact .pill { padding: 2px 8px; font-size: 11px; }
.compact .platform { width: 24px; height: 24px; padding: 0; }
.compact .platform .icon { width: 13px; height: 13px; }
.compact .duration { top: 8px; right: 8px; font-size: 10px; }
.compact .stat { left: 8px; bottom: 8px; padding: 4px 10px 5px; font-size: 13px; }
.compact .play { width: 38px; height: 38px; }
.compact .play .icon { width: 15px; height: 15px; }
.compact .card h3 { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.compact .card p { font-size: 11px; margin-top: 2px; }

/* ---------- 7 what I'm playing: last 3 games on Twitch and Kick, Twitch box art ---------- */
.playing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.playing .frame { aspect-ratio: 16 / 9; }
.playing .frame img.bg { inset: -14%; width: 128%; height: 128%; filter: blur(24px) brightness(.5) saturate(1.25); }
.playing .frame img.art {
  inset: 0; margin: auto; width: auto; height: 84%; aspect-ratio: 3 / 4; object-fit: contain;
  border-radius: 10px; box-shadow: 0 14px 36px -8px rgba(0, 0, 0, .7);
}
.playing .badges { flex-direction: column; align-items: flex-start; }
.playing .stat { font-size: 16px; }

/* ---------- 8 longform: featured #1 + 2x2 ---------- */
.longform { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.longform .frame { aspect-ratio: 16 / 9; }
.longform .card:first-child { grid-column: span 2; grid-row: span 2; }
.longform .card:first-child .frame { flex: 1; aspect-ratio: auto; min-height: 0; }
.longform .card:first-child h3 { font-size: clamp(18px, 2vw, 24px); }
.longform .card:first-child .stat { font-size: 28px; }

/* ---------- 9 live stream (visible only while live; see assets/live.js) ---------- */
.live:not(.is-live) { position: absolute; left: -10000px; top: 0; width: min(1360px, 100vw); }
.live-title::before {
  content: ""; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--live);
  box-shadow: 0 0 0 5px rgba(255, 59, 87, .22), 0 0 18px var(--live); animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse { 50% { box-shadow: 0 0 0 9px rgba(255, 59, 87, 0), 0 0 18px var(--live); } }
.live-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(16px, 2vw, 28px); }
.live-grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.live-panel { display: grid; gap: 12px; min-width: 0; align-content: start; }
.live-panel[hidden] { display: none; }
.live-panel.twitch:not(.is-on) { position: absolute; left: -10000px; top: 0; width: 480px; } /* stays laid out off-screen so Twitch can report online/offline */
.live-panel .platform { text-decoration: none; justify-self: start; }
.live-video, .live-chat { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.live-video { aspect-ratio: 16 / 9; }
.live-chat { height: clamp(380px, 48vw, 520px); }
.live-video iframe, .live-chat iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- 10 contact ---------- */
.contact { display: flex; flex-wrap: wrap; gap: 12px; }
.contact a {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 22px 10px 10px; border-radius: 999px;
  text-decoration: none; font-size: 15px; font-weight: 600; overflow-wrap: anywhere;
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.contact .badge {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line-strong); transition: background .3s;
}
.contact .badge .icon { width: 18px; height: 18px; }
.contact a:hover, .contact a:focus-visible {
  transform: translateY(-3px); outline: none; border-color: transparent;
  box-shadow: 0 0 0 1.5px var(--accent), 0 18px 40px -18px rgba(139, 92, 246, .55);
}
.contact a:hover .badge, .contact a:focus-visible .badge { background: var(--grad); border-color: transparent; }

/* ---------- 11 footer ---------- */
footer { border-top: 1px solid var(--line); padding-block: 20px 40px; color: var(--muted); font-size: 13px; }

/* ---------- 12 media kit (media-kit/index.html shares everything above) ---------- */
.about { display: flex; gap: clamp(20px, 3vw, 36px); align-items: center; }
.about h1 { margin-bottom: 14px; }
.portrait {
  flex: none; width: clamp(120px, 22vw, 220px); height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 30%;
  border-radius: var(--radius); border: 2px solid var(--line-strong);
  box-shadow: 0 0 0 5px rgba(139, 92, 246, .2), 0 12px 40px -10px rgba(139, 92, 246, .65);
}
.bio {
  max-width: 62ch; padding: 20px 24px; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.65;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
}
.audience-total { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; font-size: clamp(40px, 8vw, 72px); font-weight: 800; line-height: 1; }
.audience-total .icon { width: .5em; height: .5em; color: var(--accent-2); }
.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--gap); }
.platform-card {
  --c: var(--accent); display: flex; flex-direction: column; gap: 10px; padding: 18px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.platform-card > .icon { width: 28px; height: 28px; color: var(--c); }
.platform-card strong { font-size: 34px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.platform-card .avg { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--muted); }
.platform-card .avg .icon { width: 17px; height: 17px; color: var(--c); }
.platform-card.tw { --c: var(--twitch); } .platform-card.yt { --c: var(--youtube); } .platform-card.tt { --c: #fff; }
.platform-card.kk { --c: var(--kick); } .platform-card.ig { --c: var(--accent-3); }
.platform-card:hover, .platform-card:focus-visible { transform: translateY(-4px); border-color: var(--line-strong); }
.clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--gap); }
.programs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--gap); }
.program { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.program .logo { display: flex; align-items: center; justify-content: center; height: 96px; padding: 16px; background: var(--bg); }
.program img { max-width: 100%; max-height: 100%; object-fit: contain; }
.program .logo.square img { border-radius: 12px; }
.program h3 { padding: 10px 12px; font-size: 14px; font-weight: 600; text-align: center; }
.cta { font-size: 17px; padding-right: 26px; }

/* ---------- 13 responsive ---------- */
@media (max-width: 1180px) { /* the six shorts become one swipeable strip */
  .shortform { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 12px; scrollbar-width: thin; }
  .shortform > ol { display: contents; }
  .shortform > ol + ol::before { display: none; }
  .shortform .card { flex: 0 0 clamp(140px, 38vw, 200px); scroll-snap-align: start; }
}
@media (max-width: 1000px) {
  .playing .stat { font-size: 13px; padding: 4px 10px 5px; left: 10px; bottom: 10px; }
  .playing .badges { top: 10px; left: 10px; }
  .longform { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .longform .card:first-child { grid-column: 1 / -1; grid-row: auto; }
  .longform .card:first-child .frame { flex: none; aspect-ratio: 16 / 9; }
  .live-grid[data-count="2"] { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) { .playing { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .about { flex-direction: column; align-items: flex-start; }
  .portrait { width: min(60vw, 220px); }
  .longform { grid-template-columns: minmax(0, 1fr); }
  .button { flex: 1 1 auto; justify-content: center; }
  .contact a { flex: 1 1 100%; }
}

/* ---------- 14 reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .live-title::before { animation: none; }
  .frame, .frame img, .play, .button, .contact a, .contact .badge, .platform-card { transition: none; }
  .frame:hover, .frame:focus-visible, .frame:hover img, .button:hover, .contact a:hover, .contact a:focus-visible, .platform-card:hover, .platform-card:focus-visible { transform: none; }
}
