/* Spike Piledriver: brand blue #4169E2 and gold #E4BB01 on near-black (from the channel art). */
:root {
  --blue: #4169e2; --gold: #e4bb01; --ink: #111318;
  --bg: #f4f6fb; --panel: #ffffff; --alt: #eaeef7; --text: #141a2b; --muted: #5e6678; --line: #dfe4ee;
  --link: #2a4fc2; --shadow: 0 10px 30px rgba(17, 19, 24, 0.10);
  --display: "Montserrat", "Arial Black", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115; --panel: #181b22; --alt: #13161c; --text: #e9ecf2; --muted: #98a0b0; --line: #2a2f3a;
    --link: #8fb0ff; --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1115; --panel: #181b22; --alt: #13161c; --text: #e9ecf2; --muted: #98a0b0; --line: #2a2f3a;
  --link: #8fb0ff; --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
img { max-width: 100%; display: block; }
a { color: var(--link); }
h1, h2, h3 { font-family: var(--display); font-style: italic; font-weight: 900; text-transform: uppercase; letter-spacing: -0.01em; line-height: 1.05; margin: 0; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.15rem; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.small { font-size: 0.85rem; }
.kicker { margin: 0 0 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; color: var(--gold); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 11px 20px; border-radius: 10px; font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18); }
.btn-sm { padding: 7px 14px; font-size: 0.9rem; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn.is-disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--ink); color: #f1f3f8; border-bottom: 3px solid var(--blue); }
.header-inner { display: flex; align-items: center; gap: 22px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand img { border-radius: 8px; }
.brand span { font-family: var(--display); font-style: italic; font-weight: 900; text-transform: uppercase; color: var(--gold); font-size: 1.15rem; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a { color: #d6dbe6; text-decoration: none; padding: 6px 10px; border-radius: 8px; font-weight: 600; }
.site-nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle { background: transparent; border: 1px solid #3a4152; color: #f1f3f8; border-radius: 8px; padding: 5px 10px; font: inherit; font-size: 0.85rem; cursor: pointer; }

/* Hero: echoes the channel banner (blue slab and gold disc on near-black) */
.hero { position: relative; overflow: hidden; background: var(--ink); color: #f4f6fb; }
.hero-art::before { content: ""; position: absolute; right: -6%; top: -30%; width: 46vw; height: 160%; background: var(--blue); transform: skewX(-14deg); opacity: 0.9; }
.hero-art::after { content: ""; position: absolute; right: 22%; bottom: -38%; width: 34vw; max-width: 460px; aspect-ratio: 1; border-radius: 50%; background: var(--gold); opacity: 0.92; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 80px; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); text-shadow: 0 4px 22px rgba(0, 0, 0, 0.35); }
.lead { font-size: 1.12rem; color: #c9cfdb; max-width: 54ch; margin: 18px 0 26px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn-ghost { color: #f4f6fb; }
.hero-video { background: rgba(17, 19, 24, 0.82); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; padding: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); backdrop-filter: blur(4px); }
.label { margin: 0 0 8px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); font-weight: 700; }
.hero-video-title { margin: 10px 2px 0; font-weight: 700; }

/* Click-to-play YouTube player (loads the real player only when clicked) */
.player { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.player button { all: unset; cursor: pointer; position: absolute; inset: 0; }
.player img { width: 100%; height: 100%; object-fit: cover; }
.player .play { position: absolute; left: 50%; top: 50%; width: 72px; height: 50px; transform: translate(-50%, -50%); border-radius: 14px; background: var(--gold); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
.player .play::after { content: ""; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent var(--ink); margin-left: 4px; }
.player button:hover .play { transform: translate(-50%, -50%) scale(1.06); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: var(--alt); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.more { font-weight: 700; text-decoration: none; }
.intro { max-width: 70ch; color: var(--muted); margin: -8px 0 26px; }

/* The Alliance */
.alliance { display: grid; grid-template-columns: 1fr 1.2fr; gap: 36px; align-items: start; }
.alliance-copy p { margin-top: 0; font-size: 1.05rem; }
.feds { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.feds li { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--gold); padding: 4px 10px; border-radius: 6px; font-size: 0.88rem; font-weight: 600; }
.episodes { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.episodes li + li { border-top: 1px solid var(--line); }
.episodes a { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; padding: 10px 14px; color: inherit; text-decoration: none; }
.episodes a:hover { background: var(--alt); }
.episodes img { width: 120px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; }
.ep-num { font-family: var(--display); font-style: italic; font-weight: 900; color: var(--blue); font-size: 0.85rem; }
.ep-title { display: block; font-weight: 700; line-height: 1.3; }
.ep-date { color: var(--muted); font-size: 0.82rem; }

/* Latest videos grid */
.video-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.video-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform 0.12s ease; }
.video-card:hover { transform: translateY(-3px); }
.video-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.video-card div { padding: 10px 12px 14px; }
.video-card strong { display: block; line-height: 1.3; }
.video-card span { color: var(--muted); font-size: 0.82rem; }

/* Patreon tiers */
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tier { position: relative; background: var(--panel); border: 1px solid var(--line); border-top: 5px solid var(--blue); border-radius: 14px; padding: 22px 20px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.tier p { margin: 0; color: var(--muted); flex: 1; }
.tier .price { flex: 0; font-family: var(--display); font-style: italic; font-weight: 900; font-size: 2rem; color: var(--text); }
.tier .price span { font-size: 0.9rem; color: var(--muted); font-style: normal; font-weight: 600; }
.tier .btn { justify-content: center; margin-top: 8px; }
.tier-featured { border-top-color: var(--gold); transform: translateY(-6px); }
.badge { position: absolute; top: -12px; right: 16px; background: var(--gold); color: var(--ink); font-weight: 800; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; padding: 3px 9px; border-radius: 999px; }
.badge-soft { position: static; display: inline-block; margin-bottom: 10px; }

/* Merch */
.merch-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.product { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform 0.12s ease; }
.product:hover { transform: translateY(-3px); }
.product img { aspect-ratio: 1; object-fit: cover; background: #f2f2f2; }
.product-name { padding: 12px 14px 0; font-weight: 700; }
.product-price { padding: 2px 14px 14px; color: var(--muted); }

/* Tools */
.tool { display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; align-items: center; }
.tool-shot { border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.tool-copy p { margin-top: 0; font-size: 1.05rem; }
.ticks { padding: 0; list-style: none; margin: 0 0 22px; }
.ticks li { padding-left: 28px; position: relative; margin: 6px 0; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); color: var(--ink); font-weight: 900; font-size: 0.75rem; display: grid; place-items: center; margin-top: 3px; }

/* Footer */
.site-footer { background: var(--ink); color: #c9cfdb; padding: 32px 0; border-top: 3px solid var(--blue); }
.footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-inner nav { display: flex; gap: 16px; }
.footer-inner nav a { color: #f1f3f8; text-decoration: none; font-weight: 600; }
.footer-inner p { margin: 0 0 0 auto; }

/* Responsive */
@media (max-width: 1000px) {
  .video-grid, .tiers, .merch-grid { grid-template-columns: repeat(2, 1fr); }
  .tier-featured { transform: none; }
}
@media (max-width: 860px) {
  .site-nav { display: none; }
  .header-actions { margin-left: auto; }
  .hero-inner, .alliance, .tool { grid-template-columns: 1fr; }
  .hero-inner { padding-top: 48px; padding-bottom: 56px; gap: 32px; }
  .hero-art::before { width: 70vw; right: -30%; opacity: 0.55; }
  .hero-art::after { width: 60vw; right: -10%; bottom: -20%; opacity: 0.5; }
  .footer-inner p { margin-left: 0; }
}
@media (max-width: 520px) {
  .tiers { grid-template-columns: 1fr; }
  .merch-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  /* Latest videos become a swipeable row instead of eight stacked cards. */
  .video-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .video-card { scroll-snap-align: start; }
  /* The logo already reads "Spike Piledriver"; keep the header to one line. */
  .brand span { display: none; }
  .theme-toggle { white-space: nowrap; }
  .episodes a { grid-template-columns: 96px 1fr; }
  .episodes img { width: 96px; }
}

/* Current series meta + series shelf */
.series-meta { font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.alliance .cta-row { margin-top: 4px; }
.shelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.series-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.series-cover { position: relative; display: block; }
.series-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.2s ease; }
.series-cover:hover img { transform: scale(1.04); }
.series-count { position: absolute; right: 8px; bottom: 8px; background: rgba(17, 19, 24, 0.85); color: #fff; font-weight: 700; font-size: 0.78rem; padding: 3px 8px; border-radius: 6px; }
.series-body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.series-game { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.series-body .ep-date { margin: 0 0 8px; }
.series-links { display: flex; gap: 14px; margin-top: auto; font-weight: 700; font-size: 0.9rem; }
.series-links a { text-decoration: none; }
@media (max-width: 1000px) { .shelf { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) {
  .shelf { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .series-card { scroll-snap-align: start; }
}
