/* Lap Down // An F1 Chat
   Mobile first. Desktop layout from 960px. */

@font-face { font-family: "Syne"; font-weight: 700; font-display: swap; src: url("../fonts/syne-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Syne"; font-weight: 800; font-display: swap; src: url("../fonts/syne-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 400; font-display: swap; src: url("../fonts/space-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url("../fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 600; font-display: swap; src: url("../fonts/space-grotesk-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url("../fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }

:root {
  --cream: #F3EEE2;
  --paper: #FFFDF8;
  --ink: #141716;
  --ink-2: #1E2220;
  --ink-3: #262A28;
  --stage: #0B0D0C;
  --teal: #2B806C;        /* listen panel */
  --teal-logo: #40A48C;   /* matches the plate */
  --teal-text: #1A6E63;   /* teal text on cream */
  --yellow: #F4C430;
  --line: #D9D2C1;
  --line-2: #E4DDCC;
  --body: #3D403C;
  --sub: #4A4D49;
  --grey: #5A5D58;
  --muted: #ABA594;
  --sand: #E4DFD2;
  --sand-2: #CFC9BA;
  --display: "Syne", "Arial Black", sans-serif;
  --text: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--text); font-size: 16px; line-height: 1.5; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); }
a:hover { color: var(--teal-text); }
button { font: inherit; cursor: pointer; }
/* Every hover fades rather than snaps */
a, button, .ep, input { transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, opacity 0.25s ease; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
button:disabled { cursor: not-allowed; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--teal-text); outline-offset: 2px; }

.sr-only { 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: 12px; top: -60px; z-index: 10; background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 999px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; color: var(--cream); }

.label { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }

/* ---------- Layout: one column on phones, reordered ---------- */

.layout { display: flex; flex-direction: column; max-width: 720px; margin: 0 auto; padding: 0 16px; }
.col-side, .col-main { display: contents; }
.desk-only { display: none !important; }

.m-top { order: 1; }
.m-intro { order: 2; }
.m-hero { order: 3; }
.player { order: 4; }
.m-sub { order: 5; }
.radio { order: 6; }
.episodes { order: 7; }
.hosts { order: 8; }
.follow { order: 9; }

/* ---------- Phone-only blocks ---------- */

.m-top { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; }
.m-top-logo { height: 48px; width: auto; }
.m-top-radio { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-weight: 700; font-size: 13px; text-decoration: none; }
.m-top-radio:hover { color: var(--ink); background: #FFD54A; }

.m-intro { display: flex; flex-direction: column; gap: 6px; padding-top: 18px; }
.m-intro .label { color: var(--teal-text); }
.m-intro-text { font-size: 16px; line-height: 1.5; color: var(--body); }

/* Hosts standing on a teal plate, tucked behind the player */
.m-hero { position: relative; width: min(290px + 10vw, 360px); margin: 12px auto 0; }
.m-hero::before { content: ""; position: absolute; left: 0; right: 0; top: 15%; bottom: 0; border-radius: 26px; background: var(--teal-logo); border: 2px solid var(--ink); }
.m-hero img { position: relative; width: 100%; height: auto; }
.m-hero + .player { margin-top: -23px; position: relative; }

.m-sub { display: flex; flex-direction: column; gap: 8px; padding-top: 22px; }
.m-sub .label { color: var(--teal-text); }
.m-sub-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.m-sub-btn { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 6px 4px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; font-weight: 700; font-size: 12px; text-decoration: none; color: var(--ink); }
.m-sub-btn:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- Player ---------- */

.player { background: var(--ink); color: var(--cream); border-radius: 18px; overflow: hidden; }

/* Both stages share one 16:9 box and cross-fade, so the page never jumps */
.stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--stage); }
.stage-watch, .stage-listen { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.35s ease, visibility 0s linear 0.35s; }
.player[data-mode="watch"] .stage-watch,
.player[data-mode="listen"] .stage-listen { opacity: 1; visibility: visible; transition: opacity 0.35s ease, visibility 0s; }

.poster { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--stage) repeating-linear-gradient(135deg, #171A19 0 22px, #111312 22px 44px); color: var(--ink); overflow: hidden; }
.poster-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poster-play { position: relative; display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: var(--yellow); box-shadow: 0 6px 24px rgba(0,0,0,0.35); transition: transform 0.25s ease, background-color 0.25s ease; }
.poster-img { transition: transform 0.4s ease; }
.poster:hover .poster-img { transform: scale(1.02); }
.poster:hover .poster-play { transform: scale(1.08); background: #FFD54A; }
.poster-play svg { margin-left: 4px; }
.stage-watch iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.stage-listen { display: flex; align-items: center; gap: 5%; padding: 0 6%; background: var(--teal); }
.listen-art { flex-shrink: 0; height: 66%; width: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); background: var(--teal-logo); }
.listen-controls { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.listen-row { display: flex; align-items: center; gap: 12px; }
.audio-toggle { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border-radius: 50%; border: none; background: var(--cream); color: var(--ink); transition: transform 0.2s ease, background-color 0.2s ease; }
.audio-toggle:hover { transform: scale(1.06); background: var(--yellow); }
.audio-toggle > span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.audio-toggle svg { width: 42%; height: 42%; }
.audio-toggle .i-play svg { transform: translateX(7%); }
.audio-toggle .i-pause { display: none; }
.player.is-playing .audio-toggle .i-play { display: none; }
.player.is-playing .audio-toggle .i-pause { display: flex; }
.wave { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; gap: 1px; height: 40px; cursor: pointer; border-radius: 6px; }
.wave span { flex: 1; min-width: 0; height: 50%; border-radius: 2px; background: rgba(243, 238, 226, 0.45); transition: background-color 0.2s ease; }
.wave span.on { background: var(--yellow); }
.times { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

.player-info { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.info-top { display: flex; flex-direction: column; gap: 12px; }
.info-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.player-label { color: var(--yellow); font-size: 11px; }
.player-title { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 6vw, 40px); line-height: 1; overflow-wrap: anywhere; }
.player-meta { font-size: 13px; color: var(--muted); }
.format { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 4px; border-radius: 999px; background: var(--ink-3); }
.format button { min-height: 44px; padding: 10px 18px; border: none; border-radius: 999px; background: transparent; color: var(--cream); font-weight: 700; font-size: 14px; transition: background-color 0.25s ease, color 0.25s ease; }
.format button:not([aria-pressed="true"]):not(:disabled):hover { background: rgba(243, 238, 226, 0.12); }
.format button[aria-pressed="true"] { background: var(--cream); color: var(--ink); }
.format button:disabled { opacity: 0.4; }
.desc-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.player-desc { font-size: 14px; line-height: 1.55; color: var(--sand); white-space: pre-line; max-width: 680px; }
.player-desc.is-clamped { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.desc-more { min-height: 32px; padding: 0; border: none; background: none; color: var(--cream); font-weight: 700; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; transition: color 0.2s ease; }
.desc-more:hover { color: var(--yellow); }
.player-empty { display: flex; flex-direction: column; gap: 10px; padding: 28px 22px; }
.player-empty .label { color: var(--yellow); }

/* Option A: framed. The video sits inset in the dark card with its own rounded corners */
.style-framed .stage { margin: 10px 10px 0; border-radius: 12px; }

/* Option B: split. The video is its own outlined card, like the logo plate */
.player.style-split { background: transparent; overflow: visible; border-radius: 0; }
.style-split .stage { border-radius: 18px; border: 2px solid var(--ink); }
.style-split .player-info { margin-top: 10px; border-radius: 18px; background: var(--ink); }

/* ---------- Team Radio ---------- */

.radio { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px; margin-top: 28px; padding: 22px; border-radius: 18px; background: var(--yellow); color: var(--ink); }
.radio > * { position: relative; }
.radio .label { font-size: 11px; }
.radio-motif { display: none; }
.radio-title { font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.02; }
.radio-body { font-size: 14px; line-height: 1.5; }
.radio-btn { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 14px 16px; border-radius: 12px; background: var(--ink); color: var(--cream); font-weight: 700; font-size: 15px; text-decoration: none; }
.radio-btn:hover { color: var(--yellow); }
.radio-btn-label { display: flex; align-items: center; gap: 10px; text-transform: uppercase; }

/* ---------- Episodes ---------- */

.episodes { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.ep-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.ep-head h2 { font-family: var(--display); font-weight: 800; font-size: 20px; white-space: nowrap; }
.ep-search { display: flex; align-items: center; gap: 8px; }
.search-toggle:hover { border-color: var(--ink); }
.search-toggle { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); }
.search-field { display: none; align-items: center; gap: 10px; min-height: 46px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); color: var(--grey); }
.search-field input { flex: 1; min-width: 0; border: none; background: transparent; font: inherit; font-size: 16px; color: var(--ink); outline: none; }
.search-field:focus-within { border-color: var(--ink); }
.episodes.is-searching .ep-head { flex-direction: column; align-items: stretch; }
.episodes.is-searching .ep-search { width: 100%; }
.episodes.is-searching .search-toggle { display: none; }
.episodes.is-searching .search-field { display: flex; flex: 1; }

.ep-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ep { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--paper); border: 1.5px solid var(--line-2); }
.ep.is-current { border-color: var(--ink); }
.ep-art { flex-shrink: 0; width: 60px; height: 60px; border-radius: 10px; object-fit: cover; background: var(--teal); }
.ep-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ep-title { font-size: 16px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.ep-meta { font-size: 12px; color: var(--sub); }
.ep-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ep-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }
.ep-btn:hover { transform: scale(1.06); }
.ep-btn svg { width: 18px; height: 18px; }
.ep-watch { border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); }
.ep-listen { border: none; background: var(--ink); color: var(--cream); }
.ep-listen svg { margin-left: 2px; }
.ep-watch:hover { background: var(--teal); border-color: var(--teal); color: var(--cream); }
.ep-listen:hover { background: var(--teal); color: var(--cream); }
.ep:hover { border-color: var(--line); }
.ep.is-current:hover { border-color: var(--ink); }
.ep.is-current[data-mode="watch"] .ep-watch,
.ep.is-current[data-mode="listen"] .ep-listen { background: var(--yellow); color: var(--ink); }
.ep-empty { padding: 16px; text-align: center; color: var(--sub); }
.load-more { min-height: 48px; padding: 12px 28px; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font-weight: 700; font-size: 14px; }
.load-more:hover { background: var(--ink); color: var(--cream); }

/* ---------- Hosts + follow (one dark card on phones) ---------- */

.hosts { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; padding: 20px 20px 14px; border-radius: 18px 18px 0 0; background: var(--ink); color: var(--cream); }
.hosts .label { color: var(--yellow); font-size: 11px; }
.hosts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.host { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px; border-radius: 14px; background: var(--ink-2); }
.host-photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; }
.host-name { font-family: var(--display); font-weight: 800; font-size: 20px; }
.host-title { margin: -4px 0 2px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--yellow); }
.host-bio { font-size: 13px; line-height: 1.45; color: var(--sand-2); }
.host-links { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 6px; margin-top: auto; }
.host-link { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--cream); color: var(--ink); }
.host-link:hover { background: var(--yellow); color: var(--ink); }

.follow { display: flex; flex-direction: column; gap: 10px; padding: 6px 20px 20px; border-radius: 0 0 18px 18px; background: var(--ink); color: var(--cream); }
.follow .label { color: var(--yellow); font-size: 11px; }
.follow-handle { display: none; }
.follow-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.follow-link { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 1.5px solid var(--grey); border-radius: 999px; color: var(--cream); font-size: 13px; font-weight: 600; text-decoration: none; }
.follow-link:hover { border-color: var(--yellow); color: var(--yellow); }

/* ---------- Footer ---------- */

.site-footer { margin-top: 24px; background: var(--ink); color: var(--sand-2); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; max-width: 1240px; margin: 0 auto; padding: 18px 16px; font-size: 13px; }
.footer-logo { height: 34px; width: auto; }
.checker { height: 6px; background-image: repeating-linear-gradient(90deg, var(--cream) 0 6px, var(--ink) 6px 12px); }

/* ---------- Tablet tweaks ---------- */

@media (min-width: 600px) {
  .m-top-logo { height: 56px; }
  .ep-art { width: 72px; height: 72px; }
  .ep-head h2 { font-size: 26px; }
  .info-top { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .format { display: flex; flex-shrink: 0; }
  .player-desc { font-size: 15px; }
  .audio-toggle { width: 60px; height: 60px; }
  .wave { height: 52px; gap: 2px; }
  .player-info { padding: 22px 26px 26px; }
  .episodes:not(.is-searching) .search-toggle { display: none; }
  .search-field { display: flex; width: 280px; }
  .footer-inner { padding: 22px 24px; }
}

/* ---------- Desktop: sidebar + main column ---------- */

@media (min-width: 960px) {
  .layout { display: grid; grid-template-columns: minmax(320px, 360px) minmax(0, 1fr); align-items: start; gap: 28px; max-width: 1240px; padding: 32px 24px 56px; }
  .col-side, .col-main { display: flex; flex-direction: column; min-width: 0; }
  .col-side { gap: 20px; }
  .col-side > *, .col-main > * { order: 0; }
  .col-main { gap: 28px; }
  .mob-only { display: none !important; }
  .desk-only { display: flex !important; }

  .ident { flex-direction: column; gap: 18px; padding: 24px; border-radius: 20px; background: var(--ink); color: var(--cream); }
  .ident-hero { display: flex; flex-direction: column; align-items: center; padding-top: 4px; }
  .ident-heads { width: 92%; height: auto; }
  .ident-plate { position: relative; width: 100%; height: auto; margin-top: -2%; }
  .ident-text { font-size: 16px; line-height: 1.55; color: var(--sand); }
  .ident-sub { display: flex; flex-direction: column; gap: 8px; }
  .ident-sub .label { color: var(--muted); }
  .ident-sub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sub-pill { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 14px; border-radius: 999px; background: var(--cream); color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; }
  .sub-pill:hover { background: var(--yellow); color: var(--ink); }
  .sub-pill.is-rss { background: transparent; border: 2px solid var(--grey); color: var(--cream); padding: 8px 14px; }
  .sub-pill.is-rss:hover { border-color: var(--yellow); color: var(--yellow); }

  .radio { margin-top: 0; border-radius: 20px; }
  .radio .label { font-size: 12px; }
  .radio-motif { display: block; position: absolute; top: -4%; right: -8%; height: 60%; width: auto; color: var(--ink); opacity: 0.06; transform: rotate(-12deg); pointer-events: none; }
  .radio-body { font-size: 15px; }
  .radio-btn { min-height: 52px; padding: 16px 18px; border-radius: 14px; font-size: 16px; }

  .follow { align-items: flex-start; gap: 14px; padding: 22px; border-radius: 20px; background: var(--paper); border: 1.5px solid var(--line); color: var(--ink); }
  .follow .label { color: var(--grey); font-size: 12px; }
  .follow-head { display: flex; flex-direction: column; gap: 2px; }
  .follow-handle { display: block; font-family: var(--display); font-weight: 800; font-size: 22px; white-space: nowrap; }
  .follow-links { display: flex; gap: 8px; }
  .follow-link { width: 44px; height: 44px; min-height: 0; border: none; border-radius: 50%; background: var(--ink); color: var(--cream); }
  .follow-link:hover { background: var(--yellow); color: var(--ink); }
  .follow-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  .hosts { margin-top: 0; gap: 16px; padding: 22px; border-radius: 20px; background: var(--paper); border: 1.5px solid var(--line); color: var(--ink); }
  .hosts .label { color: var(--grey); font-size: 12px; }
  .hosts-grid { gap: 0; }
  .host { padding: 4px 0; background: transparent; border-radius: 0; }
  .host:nth-child(odd) { padding-right: 14px; border-right: 1.5px solid var(--line-2); }
  .host:nth-child(even) { padding-left: 14px; }
  .host-title { color: var(--teal-text); letter-spacing: 0.12em; }
  .host-bio { color: var(--body); }
  .host-link { background: var(--ink); color: var(--cream); }

  .player { border-radius: 20px; }
  .m-hero + .player { margin-top: 0; }
  .poster-play { width: 84px; height: 84px; }
  .style-framed .stage { margin: 14px 14px 0; border-radius: 14px; }
  .style-split .stage, .style-split .player-info { border-radius: 20px; }
  .audio-toggle { width: 72px; height: 72px; }
  .listen-row { gap: 18px; }
  .wave { height: 64px; gap: 3px; }
  .times { font-size: 13px; }
  .player-info { padding: 24px 28px 28px; gap: 16px; }
  .player-label { font-size: 12px; }
  .player-meta { font-size: 14px; }
  .player-desc { font-size: 16px; line-height: 1.6; }

  .episodes { margin-top: 0; gap: 16px; }
  .ep-head { align-items: flex-end; }
  .ep-head h2 { font-size: 32px; }
  .search-field { width: 300px; }
  .episodes.is-searching .ep-head { flex-direction: row; align-items: flex-end; }
  .episodes.is-searching .ep-search { width: auto; }
  .ep-list { gap: 10px; }
  .ep { gap: 18px; padding: 12px 16px 12px 12px; border-radius: 16px; background: transparent; }
  .ep.is-current { background: var(--paper); }
  .ep-art { width: 76px; height: 76px; }
  .ep-text { gap: 6px; }
  .ep-title { font-size: 19px; }
  .ep-meta { font-size: 13px; }
  .ep-actions { gap: 8px; }
  .ep-btn { width: 48px; height: 48px; }
  .ep-btn svg { width: 20px; height: 20px; }
  .load-more { align-self: center; font-size: 15px; margin-top: 8px; }

  .site-footer { margin-top: 0; }
  .footer-inner { padding: 28px 24px; font-size: 14px; }
  .footer-logo { height: 40px; }
  .checker { height: 8px; background-image: repeating-linear-gradient(90deg, var(--cream) 0 8px, var(--ink) 8px 16px); }
}
