/* Light and dark themes share one set of tokens via light-dark().
   The theme follows the visitor's system setting unless they pick one with the header toggle. */
:root {
  color-scheme: light dark;

  --bg: light-dark(#f8f6ff, #121212);
  --surface: light-dark(#ffffff, #1e1e1e);
  --line: light-dark(#e6e0fa, #303030);
  --hover: light-dark(#efeaff, rgba(255, 255, 255, .08));
  --text: light-dark(#1b1650, #f1f1f1);
  --muted: light-dark(#5d5690, #aaaaaa);
  --accent: light-dark(#6d3fd6, #ffc72c);
  --on-accent: light-dark(#ffffff, #1a1a1a);
  --gold: #ffc72c;
  --orange: #ff7a2f;
  --title-a: light-dark(#6d3fd6, #ffd23f);
  --title-b: light-dark(#e8590c, #ff8a3d);
  --glow-a: light-dark(rgba(109, 63, 214, .18), transparent);
  --glow-b: light-dark(rgba(255, 199, 44, .12), transparent);
  --shadow: light-dark(0 6px 24px rgba(58, 34, 140, .10), 0 6px 24px rgba(0, 0, 0, .35));
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 40px);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  line-height: 1.5;
  background:
    radial-gradient(900px 480px at 88% -8%, var(--glow-a), transparent 70%),
    radial-gradient(700px 420px at -8% 28%, var(--glow-b), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
}
img { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(var(--gutter), env(safe-area-inset-right)) 10px max(var(--gutter), env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.brand img { border-radius: 8px; }
nav { display: flex; align-items: center; gap: 4px; overflow-x: auto; }
nav a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; }
nav a:hover { color: var(--text); background: var(--hover); }
.theme {
  flex: none; width: 36px; height: 36px; margin-left: 4px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 16px; line-height: 1;
}
.theme:hover { background: var(--hover); }

main { max-width: 1100px; margin: 0 auto; padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left)); }
section { padding: 44px 0 8px; }
h2 { margin: 0 0 16px; font-size: clamp(1.4rem, 3vw, 1.9rem); }

.hero { display: flex; align-items: center; gap: clamp(20px, 5vw, 56px); padding-top: 40px; }
.hero img { width: clamp(140px, 24vw, 240px); height: auto; border-radius: 28px; box-shadow: var(--shadow); }
.hero h1 { margin: 0 0 8px; font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.1; }
.hero h1 span { background: linear-gradient(90deg, var(--title-a), var(--title-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 0 0 20px; color: var(--muted); font-size: 1.1rem; max-width: 34ch; }

.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(90deg, var(--gold), var(--orange)); color: #1a0f5c;
  font: inherit; font-weight: 800; text-decoration: none; box-shadow: var(--shadow);
}
.btn:hover { filter: brightness(1.06); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 12px; }
.chip {
  flex: none; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); font: inherit; font-weight: 600;
}
.chip:hover { background: var(--hover); }
.chip[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* Tall video cards: at most 4 per row, stepping down to 3, 2 and 1 as the screen narrows. */
.picker { position: relative; max-width: 420px; margin-bottom: 14px; }
.picker-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 12px 16px; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-align: left;
}
.picker-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-caret { color: var(--muted); }
.picker-panel {
  position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; right: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.picker-panel input {
  display: block; width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: var(--text); font: inherit; font-size: 16px; /* 16px stops iOS zooming on focus */
}
.picker-panel input:focus { outline: none; }
.picker-panel ul { list-style: none; margin: 0; padding: 6px; max-height: min(320px, 50vh); overflow-y: auto; }
.picker-panel li { padding: 10px 12px; border-radius: 10px; cursor: pointer; overflow-wrap: anywhere; }
.picker-panel li.active { background: var(--hover); }
.picker-panel li[aria-selected="true"] { color: var(--accent); font-weight: 700; }
.picker-panel li.picker-empty { color: var(--muted); cursor: default; }
@media (max-width: 700px) { .picker { max-width: none; } }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile {
  display: block; width: 100%; padding: 0; text-align: left; color: inherit; font: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .15s;
}
.tile:hover { transform: translateY(-3px); }
.tile.playing:hover { transform: none; }
.tile .media { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.tile .media::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  background: rgba(0, 0, 0, .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 6.5v11l9-5.5z'/%3E%3C/svg%3E") center / 60% no-repeat;
  opacity: 0; transition: opacity .15s;
}
.tile .media:hover::after, .tile .media:focus-visible::after { opacity: 1; }
.tile .inline-player { position: relative; aspect-ratio: 9 / 16; background: #000; }
.tile .inline-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tile .unmute {
  position: absolute; z-index: 2; top: 48px; left: 10px; padding: 8px 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--gold); color: #1a0f5c; font: inherit; font-size: .85rem; font-weight: 800; box-shadow: var(--shadow);
}
.tile .thumb { aspect-ratio: 9 / 16; width: 100%; object-fit: cover; display: block; background: #000; }
.tile .title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  padding: 10px 12px 12px; font-weight: 600; font-size: .95rem; overflow-wrap: anywhere;
}
.more { display: block; margin: 20px auto 0; }

.embed { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.card-note {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; color: var(--muted);
}
.card-note p { margin: 0 0 14px; }
.card-note p:last-child { margin: 0; }
.about { margin: 0; max-width: 68ch; color: var(--muted); font-size: 1.05rem; }
.posts-card {
  padding: clamp(22px, 4vw, 40px); border-radius: var(--radius); border: 1px solid var(--line);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow);
}
.posts-card .eyebrow { margin: 0 0 6px; color: var(--accent); font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.posts-card h3 { margin: 0 0 10px; font-size: clamp(1.25rem, 3vw, 1.7rem); line-height: 1.25; max-width: 24ch; }
.posts-card .lead { margin: 0 0 22px; color: var(--muted); font-size: 1.05rem; max-width: 56ch; }
.error { color: light-dark(#b3261e, #ffb4a2); }

.follow-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.social-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 18px;
  border-radius: 999px; border: 1px solid transparent; color: #fff; background: var(--brand, #444);
  font-weight: 700; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, filter .15s;
}
.social-btn:hover { filter: brightness(1.1); transform: translateY(-2px); }
.social-btn .icon { display: flex; }
.social-btn[data-platform="youtube"] { --brand: #e62117; }
.social-btn[data-platform="facebook"] { --brand: #1877f2; }
.social-btn[data-platform="instagram"] { background: linear-gradient(45deg, #f9a03f, #dd2a7b 55%, #8134af); }
.social-btn[data-platform="tiktok"] { --brand: #111; border-color: rgba(255, 255, 255, .28); }

.socials { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.socials .social-btn { display: flex; padding: 16px; border-radius: var(--radius); }

footer {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 56px; padding: 24px var(--gutter); color: var(--muted); border-top: 1px solid var(--line);
}
footer img { border-radius: 6px; }

dialog { width: min(920px, 94vw); padding: 0; border: 0; border-radius: var(--radius); background: #000; color: #fff; overflow: visible; }
dialog::backdrop { background: rgba(0, 0, 0, .82); }
dialog .frame { position: relative; aspect-ratio: 16 / 9; }
dialog iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius); }
dialog .close {
  position: absolute; top: -14px; right: -14px; z-index: 1; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: var(--gold); color: #1a0f5c; font-size: 22px; line-height: 1; cursor: pointer;
}

@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  /* A playing Short takes a full row on phones so the vertical player is big enough. */
  .tile.playing { grid-column: 1 / -1; justify-self: center; width: min(100%, 380px); }
  section { padding-top: 32px; }
  .hero { flex-direction: column; text-align: center; padding-top: 28px; }
  .hero p { margin-inline: auto; }
  .follow-btns { justify-content: center; }
  .site-header { flex-direction: column; align-items: stretch; gap: 4px; }
  nav { justify-content: space-between; }
  html { scroll-padding-top: 110px; }
  dialog .close { top: 6px; right: 6px; }
}

@media (max-width: 420px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  nav a { padding: 8px 8px; }
  .btn { width: 100%; text-align: center; }
  .follow-btns .social-btn { flex: 1 1 calc(50% - 10px); padding-inline: 12px; }
  .social-btn .verb { display: none; }
  .more { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile, .social-btn { transition: none; }
}
