/* Good Vibes website mockup. Colours and type from the Good Vibes style guide (design G). */
@font-face { font-family: "AvenirHeavy"; src: url("AvenirNext-Heavy.ttf"); font-display: swap; }
@font-face { font-family: "Nunito"; src: url("Nunito-latin.woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --blue: #2418C2;
  --deep: #18108F;
  --glow: #2A1ECC;
  --yellow: #FFC01F;
  --lilac: #6F66F2;
  --ink: #120C5C;        /* body text on white: 15.9:1 */
  --paper: #FFFFFF;
  --mist: #F3F2FF;       /* pale lilac panel, blue text on it is 9.6:1 */
  --focus: #FFFFFF;
  --radius: 18px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3, .display { font-family: "AvenirHeavy", "Avenir Next", system-ui, sans-serif; font-weight: 800; line-height: 1.1; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 0 0 1.2rem; color: var(--blue); }
h3 { font-size: 1.4rem; margin: 0 0 .4rem; }
p { margin: 0 0 1rem; }
a { color: var(--blue); text-underline-offset: .18em; text-decoration-thickness: 2px; }
a:hover { text-decoration-thickness: 4px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

/* Focus: 3px ring, white on blue areas, blue on white areas */
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.on-blue :focus-visible, .site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--focus); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--yellow); color: var(--blue); font-weight: 800;
  padding: .8rem 1.2rem; border-radius: 10px; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header with the "double tap presents" page fold */
.site-header {
  position: relative;
  background: var(--deep);
  color: #fff;
  min-height: 96px;
}
.site-header .wrap { display: flex; align-items: center; justify-content: flex-end; min-height: 96px; gap: 2rem; }
.fold {
  position: absolute; left: 0; top: 0; width: 190px; height: 190px; z-index: 5;
  display: block;
}
.fold svg { width: 100%; height: 100%; display: block; overflow: visible; }
.fold:focus-visible { outline: none; }
.fold:focus-visible .fold-corner { stroke: #fff; stroke-width: 6; }
.site-name {
  margin-right: auto; margin-left: 170px;
  font-family: "AvenirHeavy", sans-serif; font-size: 1.5rem; letter-spacing: .02em;
  color: #fff; text-decoration: none;
}
.site-name span { color: var(--yellow); }
.site-nav ul { list-style: none; display: flex; gap: .4rem; margin: 0; padding: 0; }
.site-nav a {
  display: inline-block; padding: .6rem 1rem; min-height: 44px;
  color: #fff; text-decoration: none; font-weight: 800; border-radius: 999px;
}
.site-nav a:hover { background: rgba(255,255,255,.12); }
.site-nav a[aria-current="page"] { background: var(--yellow); color: var(--blue); }

/* Blue hero with the sunburst and the retro title */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  color: #fff;
  background: radial-gradient(circle at 50% 46%, var(--glow) 0%, var(--blue) 55%, var(--deep) 100%);
  text-align: center;
  padding: 5.5rem 0 4.5rem;
}
.rays { position: absolute; inset: -40% -10%; z-index: -1; width: 120%; height: 180%; }
.kicker, .tagline {
  font-family: "AvenirHeavy", sans-serif; color: var(--yellow);
  font-size: clamp(1.25rem, 2.6vw, 2rem); line-height: 1.2; margin: 0;
}
.retro {
  font-family: "AvenirHeavy", sans-serif; text-transform: uppercase; color: #fff;
  font-size: clamp(4.5rem, 15vw, 11.5rem); line-height: .86; margin: 2.2rem 0 2.6rem;
  text-shadow: .016em .016em 0 var(--yellow), .033em .033em 0 var(--deep);
}
.retro span { display: block; }

/* Small page hero (inner pages) */
.hero.small { padding: 4rem 0 3.2rem; text-align: left; }
.hero.small .retro { font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1; margin: .6rem 0 1rem; text-transform: none; }
.hero.small .kicker { font-size: 1.15rem; }

/* Sections */
section { padding: 4.5rem 0; }
.section-mist { background: var(--mist); }
.section-blue { background: var(--deep); color: #fff; }
.section-blue h2 { color: #fff; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-head a { font-weight: 800; }

/* Latest episode feature */
.feature {
  display: grid; grid-template-columns: 300px 1fr; gap: 2.4rem; align-items: center;
  background: var(--blue); color: #fff; border-radius: 28px; padding: 2.2rem;
  box-shadow: 14px 14px 0 var(--yellow);
}
.feature img { width: 100%; border-radius: var(--radius); display: block; }
.feature h3 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: .4rem 0 .8rem; }
.feature h3 a { color: #fff; text-decoration: none; }
.feature h3 a:hover { text-decoration: underline; }
.feature p { color: #fff; }

.badge {
  display: inline-block; background: var(--yellow); color: var(--blue);
  font-family: "AvenirHeavy", sans-serif; font-size: .95rem; letter-spacing: .04em;
  padding: .25rem .8rem; border-radius: 999px; text-transform: uppercase;
}
.meta { font-weight: 700; font-size: 1rem; opacity: .95; }
.meta-sep { padding: 0 .5rem; }

/* Episode list */
.episode-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.8rem; }
.ep-card {
  position: relative; background: #fff; border: 3px solid var(--blue); border-radius: 22px;
  padding: 1.6rem 1.6rem 1.4rem; display: flex; flex-direction: column; gap: .6rem;
  box-shadow: 8px 8px 0 var(--blue);
  transition: transform .15s, box-shadow .15s;
}
.ep-card:hover, .ep-card:focus-within { transform: translate(-3px, -3px); box-shadow: 11px 11px 0 var(--yellow), 14px 14px 0 var(--blue); }
.ep-card h3 { color: var(--ink); }
.ep-card h3 a { color: inherit; text-decoration: none; }
.ep-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 22px; }  /* whole card clickable, one link */
.ep-card h3 a:focus-visible { outline: none; }
.ep-card:focus-within { outline: 3px solid var(--blue); outline-offset: 4px; }
.ep-card .meta { color: #3A3480; }
.ep-num {
  font-family: "AvenirHeavy", sans-serif; font-size: 3.2rem; line-height: .9; color: var(--blue);
  text-shadow: 3px 3px 0 var(--yellow);
}

/* Subscribe band */
.subscribe { text-align: center; }
.subscribe p { max-width: 40rem; margin: 0 auto 1.8rem; }
.pill-row { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; padding: 0; margin: 0; }
.pill {
  display: inline-flex; align-items: center; min-height: 48px; padding: .7rem 1.4rem;
  border-radius: 999px; background: #fff; color: var(--blue); font-weight: 800; text-decoration: none;
  border: 3px solid #fff;
}
.pill:hover { background: var(--yellow); border-color: var(--yellow); }
.pill.outline { background: transparent; color: #fff; }
.pill.outline:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }

/* Footer */
.site-footer { background: #0D0866; color: #fff; padding: 2.6rem 0; font-size: 1rem; }
.site-footer a { color: #fff; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.site-footer .tag { font-family: "AvenirHeavy", sans-serif; color: var(--yellow); font-size: 1.15rem; margin: 0 0 .4rem; }

/* Episode article page */
.ep-hero-grid { display: grid; grid-template-columns: 1fr 260px; gap: 2.5rem; align-items: center; }
.ep-hero-grid img { width: 100%; border-radius: var(--radius); box-shadow: 10px 10px 0 var(--yellow); }
.listen-panel {
  margin-top: -2.4rem; position: relative; z-index: 2;
  background: #fff; border: 3px solid var(--blue); border-radius: 24px; padding: 1.6rem;
  box-shadow: 10px 10px 0 var(--blue);
}
.listen-panel h2 { font-size: 1.4rem; margin-bottom: .8rem; }
.download-row { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.2rem; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 48px; padding: .7rem 1.4rem;
  border-radius: 999px; font-weight: 800; text-decoration: none; border: 3px solid var(--blue);
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--deep); }
.btn-secondary { background: #fff; color: var(--blue); }
.btn-secondary:hover { background: var(--mist); }
.btn svg { width: 1.2em; height: 1.2em; }
.file-note { font-size: .95rem; color: #3A3480; }

.article { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3.5rem; padding-top: 3.5rem; }
.article-body h2 { font-size: 1.75rem; margin-top: 2.4rem; }
.article-body h2:first-child { margin-top: 0; }
.article-body ul { padding-left: 1.3rem; }
.article-body li { margin-bottom: .4rem; }
.chapters { list-style: none; padding: 0 !important; margin: 0; border-top: 2px solid #DAD8FA; }
.chapters li { border-bottom: 2px solid #DAD8FA; margin: 0 !important; }
.chapters button {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 1rem; width: 100%;
  padding: .75rem .4rem; min-height: 44px; font: inherit; color: var(--ink);
}
.chapters button:hover { background: var(--mist); }
.chapters button:focus-visible { outline: 3px solid var(--blue); outline-offset: 0; }
.chapters time { font-weight: 800; color: var(--blue); min-width: 4.2rem; font-variant-numeric: tabular-nums; }

details.transcript { border: 3px solid var(--blue); border-radius: 18px; padding: 0 1.2rem; margin-top: 1rem; }
details.transcript summary { cursor: pointer; font-weight: 800; color: var(--blue); padding: 1rem 0; min-height: 44px; }
details.transcript[open] summary { border-bottom: 2px solid #DAD8FA; margin-bottom: 1rem; }
.transcript p strong { color: var(--blue); }

.aside-card { background: var(--mist); border-radius: 22px; padding: 1.5rem; margin-bottom: 1.5rem; }
.aside-card h2 { font-size: 1.25rem; margin-bottom: .8rem; }
.aside-card ul { list-style: none; padding: 0; margin: 0; }
.aside-card li { margin-bottom: .6rem; }
.aside-card a { font-weight: 800; }

.ep-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.ep-pager a {
  display: block; padding: 1.3rem 1.5rem; border-radius: 20px; background: #fff; color: var(--blue);
  text-decoration: none; border: 3px solid #fff; min-height: 44px;
}
.ep-pager a:hover { background: var(--yellow); border-color: var(--yellow); }
.ep-pager .dir { display: block; font-size: .95rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.ep-pager .t { font-family: "AvenirHeavy", sans-serif; font-size: 1.2rem; }
.ep-pager .next { text-align: right; }

/* About page */
.hosts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.host { background: #fff; border: 3px solid var(--blue); border-radius: 22px; padding: 1.8rem; box-shadow: 8px 8px 0 var(--yellow); }

/* The Good Vibes audio player (skins every <audio>; native controls stay if the script fails) */
.gv-player { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin: 1rem 0 0; }
.gv-player button {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.14); color: #fff; font: 800 .95rem "Nunito", sans-serif; padding: 0 .8rem;
}
.gv-player button svg { width: 22px; height: 22px; fill: currentColor; }
.gv-player .gv-play { width: 64px; height: 64px; background: var(--yellow); color: var(--blue); box-shadow: 4px 4px 0 var(--deep); }
.gv-player .gv-play svg { width: 30px; height: 30px; }
.gv-player button:hover { background: rgba(255,255,255,.26); }
.gv-player .gv-play:hover { background: #fff; }
.gv-player .gv-time { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 1rem; min-width: 8.5rem; }
.gv-player .gv-seek { flex: 1 1 220px; accent-color: var(--yellow); height: 44px; cursor: pointer; }
/* light version, used on white panels */
.light .gv-player button { background: var(--mist); color: var(--blue); }
.light .gv-player button:hover { background: #E2E0FD; }
.light .gv-player .gv-play { background: var(--blue); color: #fff; box-shadow: 4px 4px 0 var(--yellow); }
.light .gv-player .gv-seek { accent-color: var(--blue); }
.light .gv-player .gv-time { color: var(--ink); }
.dt-skinned { display: none; }

@media (forced-colors: active) {
  .gv-player button, .pill, .btn, .ep-card { border: 2px solid ButtonText; }
  .retro { text-shadow: none; }
}

@media (max-width: 860px) {
  .feature, .ep-hero-grid, .article, .hosts-grid { grid-template-columns: 1fr; }
  .feature img { max-width: 260px; }
  .ep-hero-grid img { max-width: 220px; order: -1; }
  .site-header .wrap { justify-content: flex-end; }
  .site-name { margin-left: 120px; font-size: 1.2rem; }
  .fold { width: 130px; height: 130px; }
  .site-nav a { padding: .6rem .7rem; }
  .ep-pager { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .site-header .wrap { flex-direction: column; align-items: flex-end; padding: .8rem 0; gap: .4rem; }
  .site-name { margin: 0; }
}

/* Inner-page heroes: centre the sunburst inside the band so the rays radiate from within it */
.hero.small .rays { inset: auto; left: -10%; top: -100%; width: 120%; height: 300%; }
.gv-player .gv-seek { flex-basis: 140px; min-width: 120px; }
.gv-player .gv-time { min-width: 0; }

/* Dark mode: follows the system setting. Not black: a midnight version of the Good Vibes blue.
   Measured contrast: body text #E9E7FF on #0B0840 15.4:1, yellow headings 11.4:1,
   lilac links #C9C4FF 11.4:1 (9.6:1 on cards), lilac borders 4.3:1 (non-text, needs 3:1). */
:root { color-scheme: light dark; }
@media (prefers-color-scheme: dark) {
  :root { --night: #0B0840; --night-2: #120D58; --card: #17116B; --line: #6F66F2; --soft: #E9E7FF; --link: #C9C4FF; }
  body { background: var(--night); color: var(--soft); }
  h2 { color: var(--yellow); }
  a { color: var(--link); }
  :focus-visible { outline-color: #fff; }
  .site-header { background: #100B5E; }
  .section-mist { background: var(--night-2); }
  .section-blue { background: #1A1290; }
  .section-blue h2 { color: #fff; }
  .site-footer { background: #06042A; }

  .ep-card { background: var(--card); border-color: var(--line); box-shadow: 8px 8px 0 var(--line); }
  .ep-card:hover, .ep-card:focus-within { box-shadow: 11px 11px 0 var(--yellow), 14px 14px 0 var(--line); }
  .ep-card:focus-within { outline-color: #fff; }
  .ep-card h3 { color: #fff; }
  .ep-card .meta { color: var(--link); }
  .ep-num { color: #fff; text-shadow: 3px 3px 0 var(--yellow); }

  .listen-panel { background: var(--card); border-color: var(--line); box-shadow: 10px 10px 0 var(--line); }
  .light .gv-player button { background: #2A2390; color: #fff; }
  .light .gv-player button:hover { background: #3A32B0; }
  .light .gv-player .gv-play { background: var(--yellow); color: var(--blue); box-shadow: 4px 4px 0 #06042A; }
  .light .gv-player .gv-seek { accent-color: var(--yellow); }
  .light .gv-player .gv-time { color: #fff; }
  .btn-primary { background: var(--yellow); border-color: var(--yellow); color: var(--blue); }
  .btn-primary:hover { background: #fff; border-color: #fff; }
  .btn-secondary { background: transparent; border-color: var(--line); color: #fff; }
  .btn-secondary:hover { background: #2A2390; }
  .file-note { color: var(--link); }

  .chapters, .chapters li { border-color: #2E287F; }
  .chapters button { color: var(--soft); }
  .chapters button:hover { background: var(--night-2); }
  .chapters button:focus-visible { outline-color: #fff; }
  .chapters time { color: var(--yellow); }
  details.transcript { border-color: var(--line); }
  details.transcript summary { color: #fff; }
  details.transcript[open] summary { border-color: #2E287F; }
  .transcript p strong { color: var(--yellow); }
  .aside-card { background: var(--card); }
  .ep-pager a { background: var(--night); color: #fff; border-color: var(--line); }
  .ep-pager a:hover { background: var(--yellow); border-color: var(--yellow); color: var(--blue); }
  .host { background: var(--card); border-color: var(--line); }
  .host h3 { color: #fff; }
}
