/* RinkStream: dark-first theme on the Rink Fries palette.
 * Brand: navy #002C5F, blue #004694, red #BF1E2E (Rink Fries apps);
 * #0D1B2A / #1C2B3A surfaces and Plus Jakarta Sans (rinkfries.com).
 * Text colours are chosen for WCAG AA on the surfaces they sit on:
 * white 17:1, --text-muted 10:1, --link 8:1, white on --red 6.1:1.
 */

:root {
    --bg: #08121D;
    --surface: #0D1B2A;
    --surface-2: #1C2B3A;
    --border: rgba(255, 255, 255, 0.10);
    --navy: #002C5F;
    --blue: #004694;
    --red: #BF1E2E;
    --red-hover: #A51926;
    --red-text: #FF5A5F;
    --text: #FFFFFF;
    --text-muted: #B8C4D3;
    --link: #7FB2FF;
    --focus: #7FB2FF;
    --radius: 12px;
    --max: 1120px;
    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--text); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 6vw, 3rem); }
h2 { font-size: clamp(1.35rem, 4vw, 1.75rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }
.lead { font-size: 1.125rem; color: var(--text-muted); max-width: 60ch; }
.empty { color: var(--text-muted); padding: 2rem 0; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 1rem; top: -3rem; z-index: 10;
    background: var(--red); color: var(--text); padding: 0.5rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header__inner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 0.75rem 1.5rem; padding-top: 0.875rem; padding-bottom: 0.875rem;
}
.wordmark { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; }
.wordmark__mark { width: 28px; height: 36px; }
.wordmark__text { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
.wordmark__accent { color: var(--red-text); }

.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav__link {
    color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.95rem;
    padding: 0.5rem 0.75rem; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; gap: 0.4rem;
}
a.site-nav__link:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.site-nav__link--soon { color: var(--text-muted); cursor: default; }

.badge {
    display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--surface-2); color: var(--text-muted);
    border: 1px solid var(--border);
}
.badge--video { background: var(--blue); color: var(--text); border-color: transparent; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
    padding: 0.65rem 1.25rem; border-radius: 10px; font-weight: 700; text-decoration: none;
    border: 1px solid transparent; transition: background-color 0.15s ease;
}
.btn--primary { background: var(--red); color: var(--text); }
.btn--primary:hover { background: var(--red-hover); color: var(--text); }
.btn--secondary { background: var(--blue); color: var(--text); }
.btn--secondary:hover { background: var(--navy); color: var(--text); }
.btn--ghost { color: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.06); }

/* Layout */
.site-main { flex: 1 0 auto; }

.hero {
    background: radial-gradient(120% 120% at 0% 0%, var(--navy) 0%, var(--surface) 55%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
    padding: 3rem 0 3.25rem;
}
.eyebrow { color: var(--red-text); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; }
.hero__heading { max-width: 18ch; }
.hero__text { font-size: 1.125rem; color: var(--text-muted); max-width: 55ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.section { padding-top: 2.5rem; padding-bottom: 3rem; }
.section__heading { border-left: 4px solid var(--red); padding-left: 0.75rem; }
.page-head { padding-top: 2.5rem; }

/* Episode cards */
.episode-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.episode-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.episode-card:hover { border-color: rgba(255, 255, 255, 0.25); }
.episode-card__link { display: flex; gap: 1rem; padding: 0.875rem; color: inherit; text-decoration: none; }
.episode-card__art { flex: 0 0 88px; }
.episode-card__img, .episode-card__placeholder { width: 88px; height: 88px; border-radius: 8px; object-fit: cover; }
.episode-card__placeholder {
    display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--text);
    background: linear-gradient(135deg, var(--navy), var(--blue));
}
.episode-card__body { min-width: 0; }
.episode-card__date, .episode__date { color: var(--text-muted); font-size: 0.85rem; font-weight: 600; }
.episode-card__title { margin: 0.15rem 0 0.35rem; }
.episode-card__summary { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 0.5rem; }

.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2rem; }

/* Episode page */
.episode { padding-top: 1.5rem; padding-bottom: 3rem; max-width: 880px; }
.breadcrumb { font-size: 0.95rem; }
.episode__head { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 1.5rem; }
.episode__cover { width: 160px; height: 160px; border-radius: var(--radius); object-fit: cover; }
.episode__title { margin-top: 0.25rem; }
.episode__player { margin-bottom: 1.5rem; }

.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.embed-youtube { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-spotify { display: block; width: 100%; height: 152px; border: 0; border-radius: var(--radius); }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 1.5rem 0; font-size: 0.9rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; }
.site-footer p { margin: 0; }

@media (min-width: 640px) {
    .container { padding: 0 1.5rem; }
    .hero { padding: 4.5rem 0; }
    .episode-grid { grid-template-columns: repeat(2, 1fr); }
    .episode__head { flex-direction: row; align-items: flex-start; }
    .episode__cover { width: 200px; height: 200px; flex: 0 0 auto; }
}

@media (min-width: 1000px) {
    .episode-grid { grid-template-columns: repeat(3, 1fr); }
    .episode-card__link { flex-direction: column; }
    .episode-card__art { flex: none; }
    .episode-card__img, .episode-card__placeholder { width: 100%; height: auto; aspect-ratio: 1 / 1; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
