/* Janas Musicalmasterclass – stand-alone site, deliberately not Shoal-styled. */
@font-face {
  font-family: "Bebas Neue";
  src: url("fonts/bebas-neue.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --pink: #e6007e;
  --pink-hi: #ff4fa8;
  --pink-soft: #ffd1e8;
  --plum: #1a0a15;
  --plum-2: #2a1022;
  --plum-3: #3b1730;
  --curtain: #5c0b2e;
  --cream: #fff4f9;
  --muted: #c9a9bb;
  --gold: #ffcf6b;
  --radius: 18px;
  --display: "Bebas Neue", "Impact", "Arial Narrow", sans-serif;
  --body: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  font: 16px/1.5 var(--body);
  background:
    radial-gradient(ellipse 70% 45% at 50% -5%, rgba(230, 0, 126, .38), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 105%, rgba(255, 207, 107, .08), transparent 70%),
    var(--plum);
  overflow-x: hidden;
}
body.has-player { padding-bottom: 110px; }
a { color: var(--pink-hi); }
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 1em; height: 1em; fill: currentColor; flex: none; }

/* ── Stage curtains (decoration at the viewport edges) ── */
.curtain {
  position: fixed; top: 0; bottom: 0; width: max(18px, calc((100vw - 640px) / 2 - 20px));
  z-index: 0; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.35) 0 6px, transparent 6px 26px, rgba(255,255,255,.06) 26px 30px, transparent 30px 44px),
    linear-gradient(180deg, #7a1040, var(--curtain) 40%, #2b0515);
  box-shadow: inset 0 0 40px rgba(0,0,0,.6);
}
.curtain-l { left: 0; border-bottom-right-radius: 60% 12%; }
.curtain-r { right: 0; border-bottom-left-radius: 60% 12%; }
@media (max-width: 700px) { .curtain { width: 10px; } }

.stage {
  position: relative; z-index: 1;
  max-width: 580px; margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 18px 40px;
}

/* ── Hero ── */
.hero { position: relative; text-align: center; padding-top: 12px; }
.spotlight {
  position: absolute; left: 50%; top: -60px; width: 420px; height: 420px; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 244, 249, .16), transparent 62%);
  pointer-events: none;
}
.avatar {
  position: relative;
  width: 148px; height: 148px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--pink);
  box-shadow: 0 0 0 6px rgba(230, 0, 126, .18), 0 0 60px rgba(230, 0, 126, .55);
  animation: glow 4s ease-in-out infinite alternate;
}
@keyframes glow { to { box-shadow: 0 0 0 10px rgba(230, 0, 126, .12), 0 0 90px rgba(230, 0, 126, .75); } }

/* Marquee sign: a slow light travels around the border, a soft sweep crosses the title */
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.marquee {
  position: relative; margin: 22px auto 14px; padding: 16px 22px 14px; max-width: 440px;
  border-radius: 16px; overflow: hidden;
  border: 1.5px solid transparent;
  background:
    linear-gradient(180deg, var(--plum-3), var(--plum-2)) padding-box,
    conic-gradient(from var(--angle), rgba(255, 207, 107, .18), rgba(255, 207, 107, .18) 55%, var(--pink-hi) 75%, var(--gold) 85%, rgba(255, 207, 107, .18)) border-box;
  box-shadow: 0 0 40px rgba(230, 0, 126, .18);
  animation: orbit 9s linear infinite;
}
@keyframes orbit { to { --angle: 360deg; } }
.marquee::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 244, 249, .10) 50%, transparent 65%) -150% 0 / 250% 100% no-repeat;
  animation: sweep 7s ease-in-out infinite;
}
@keyframes sweep { 0%, 55% { background-position: 150% 0; } 100% { background-position: -150% 0; } }
.marquee-kicker, .marquee-sub {
  margin: 0; font-family: var(--display); letter-spacing: .14em; font-size: 20px; color: var(--cream);
}
.marquee h1 {
  margin: 0; font-family: var(--display); font-weight: 400; line-height: .92;
  font-size: clamp(44px, 12vw, 68px); letter-spacing: .04em; color: var(--pink-hi);
  text-shadow: 0 0 18px rgba(230, 0, 126, .7), 0 2px 0 #7a0043;
  overflow-wrap: anywhere;
}
.marquee-sub { color: var(--gold); font-size: 17px; margin-top: 4px; }
.bio { margin: 0; font-size: 18px; }
.stats { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.socials { display: flex; justify-content: center; gap: 10px; margin: 18px 0 8px; }
.socials a {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  color: var(--cream); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12);
  transition: transform .15s, background .15s, color .15s;
}
.socials a svg { width: 21px; height: 21px; }
.socials a:hover, .socials a:focus-visible { background: var(--pink); transform: translateY(-2px) rotate(-4deg); }

/* ── Cards ── */
.card {
  margin-top: 26px; padding: 18px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.section-h {
  margin: 0 0 12px; font-family: var(--display); font-weight: 400;
  font-size: 30px; letter-spacing: .06em; color: var(--cream);
}

/* Featured episode: styled like a theatre ticket */
.featured { position: relative; overflow: hidden; border: 1px solid rgba(230, 0, 126, .55); }
.featured::after {               /* ticket punch holes */
  content: ""; position: absolute; top: 50%; left: -14px; right: -14px; height: 28px; transform: translateY(-50%);
  background: radial-gradient(circle at 14px 50%, var(--plum) 13px, transparent 14px),
              radial-gradient(circle at calc(100% - 14px) 50%, var(--plum) 13px, transparent 14px);
  pointer-events: none;
}
.ticket-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); letter-spacing: .14em; font-size: 18px; color: var(--gold);
  margin-bottom: 12px;
}
.ticket-label .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pink-hi); box-shadow: 0 0 10px var(--pink-hi); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 79, 168, .6); } 100% { box-shadow: 0 0 0 10px rgba(255, 79, 168, 0); } }
.featured-body { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: start; }
.featured-cover { width: 150px; height: 150px; border-radius: 12px; object-fit: cover; box-shadow: 0 10px 28px rgba(0,0,0,.5); }
.featured-text h2 { margin: 2px 0 6px; font-size: 20px; line-height: 1.25; }
.meta { margin: 0; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.desc {
  margin: 0 0 12px; color: #ead6e1; font-size: 14.5px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.featured-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.resume { color: var(--muted); font-size: 13px; }
@media (max-width: 480px) {
  .featured-body { grid-template-columns: 1fr; }
  .featured-cover { width: 100%; height: auto; aspect-ratio: 1; }
  .featured::after { display: none; }
}

.btn-play {
  display: inline-grid; place-items: center; border: 0; border-radius: 999px;
  background: var(--pink); color: #fff; width: 44px; height: 44px;
  box-shadow: 0 6px 18px rgba(230, 0, 126, .45);
  transition: transform .12s, background .15s;
}
.btn-play svg { width: 20px; height: 20px; }
.btn-play:hover { background: var(--pink-hi); }
.btn-play:active { transform: scale(.95); }
.btn-play.big { display: inline-flex; gap: 10px; width: auto; height: 48px; padding: 0 22px 0 18px; font-weight: 700; }
.btn-play:disabled { opacity: .5; cursor: default; }

/* ── Link buttons (the Linktree part, just nicer) ── */
.links { margin-top: 30px; display: grid; gap: 10px; }
.links .section-h { margin-bottom: 2px; }
.link-btn {
  position: relative; display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; column-gap: 14px;
  align-items: center; text-align: left; text-decoration: none; color: var(--cream);
  padding: 13px 18px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  transition: transform .15s, border-color .15s, background .15s;
}
.link-btn > svg, .link-btn > .emoji { grid-row: 1 / 3; width: 28px; height: 28px; font-size: 24px; line-height: 28px; text-align: center; }
.link-btn span:not(.emoji) { font-weight: 700; }
.link-btn small { grid-column: 2; color: var(--muted); font-size: 13px; }
.link-btn:hover, .link-btn:focus-visible { transform: translateY(-2px); border-color: var(--pink); background: rgba(230, 0, 126, .14); }
.link-btn.spotify > svg { color: #1ed760; }
.link-btn.apple > svg { color: #b150e2; }
.link-btn.overcast > svg { color: #fc7e0f; }
.link-btn.rss > svg { color: #ffa94d; }
.link-btn.mail > svg, .link-btn.instagram > svg, .link-btn.tiktok > svg { color: var(--pink-hi); }

.spotify-embed { margin-top: 4px; text-align: center; }
.spotify-embed iframe { width: 100%; height: 232px; border: 0; border-radius: 14px; }
.ghost {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  background: transparent; border: 1px dashed rgba(255, 255, 255, .3); color: var(--muted); font-size: 14px;
}
.ghost:hover { color: var(--cream); border-color: #1ed760; }
.fineprint { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

/* ── Episode list ── */
.episodes-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.episodes-head .section-h { margin: 0; }
#search {
  flex: 1 1 200px; max-width: 280px; padding: 9px 14px; border-radius: 999px; font: inherit; font-size: 14px;
  color: var(--cream); background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .15); outline: none;
}
#search:focus { border-color: var(--pink); }
.ep-list { list-style: none; margin: 0; padding: 0; }
.ep {
  display: grid; grid-template-columns: 56px 1fr 44px; gap: 12px; align-items: center;
  padding: 12px 6px; border-top: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px; transition: background .15s;
}
.ep:first-child { border-top: 0; }
.ep:hover { background: rgba(255, 255, 255, .04); }
.ep.playing { background: rgba(230, 0, 126, .14); }
.ep.flash { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: rgba(255, 207, 107, .35); } }
.ep img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.ep-title { margin: 0; font-weight: 700; font-size: 15px; line-height: 1.3; }
.ep-meta { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.ep-meta .done { color: var(--gold); }
.ep details { margin-top: 4px; font-size: 13.5px; color: #ead6e1; }
.ep summary { cursor: pointer; color: var(--pink-hi); font-size: 12.5px; list-style: none; }
.ep summary::-webkit-details-marker { display: none; }
.ep details p { margin: 6px 0 0; white-space: pre-line; }
.ep .btn-play { width: 40px; height: 40px; }
.ep .btn-play svg { width: 16px; height: 16px; }
.empty { color: var(--muted); text-align: center; margin: 14px 0 4px; }
.skeleton-row { height: 80px; border-radius: 10px; margin: 6px 0; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Archive ── */
.archive summary { display: flex; gap: 14px; align-items: center; cursor: pointer; list-style: none; }
.archive summary::-webkit-details-marker { display: none; }
.archive summary img { width: 64px; height: 64px; border-radius: 10px; filter: grayscale(.6) sepia(.25); }
.archive summary > span { display: grid; }
.archive-kicker { font-family: var(--display); letter-spacing: .14em; color: var(--gold); }
.archive summary small { color: var(--muted); }
.archive[open] summary { margin-bottom: 10px; }
.archive-links { margin: 10px 0 0; font-size: 14px; text-align: center; }

/* ── Footer ── */
.foot { margin-top: 40px; text-align: center; color: var(--muted); font-size: 14px; }
.foot a { color: var(--muted); }
.curtain-call { font-family: var(--display); font-size: 26px; letter-spacing: .1em; color: var(--cream); margin: 0 0 6px; }

/* ── Sticky player ── */
.player {
  position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 10;
  width: min(600px, calc(100% - 20px)); transform: translateX(-50%);
  background: rgba(42, 16, 34, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(230, 0, 126, .5); border-radius: 18px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6);
  animation: rise .35s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes rise { from { transform: translate(-50%, 120%); } }
.player-progress input {
  display: block; width: 100%; height: 14px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer;
}
.player-progress input::-webkit-slider-runnable-track { height: 4px; background: linear-gradient(90deg, var(--pink-hi) var(--p, 0%), rgba(255,255,255,.15) var(--p, 0%)); }
.player-progress input::-moz-range-track { height: 4px; background: linear-gradient(90deg, var(--pink-hi) var(--p, 0%), rgba(255,255,255,.15) var(--p, 0%)); }
.player-progress input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: #fff; border: 0; }
.player-progress input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; }
.player-row { display: flex; align-items: center; gap: 12px; padding: 6px 12px 10px; }
.player-row img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.player-info { flex: 1; min-width: 0; display: grid; }
.player-info strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-info span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.player-controls { display: flex; align-items: center; gap: 2px; }
.player-controls button:not(.btn-play) {
  display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--cream);
}
.player-controls button:not(.btn-play):hover { background: rgba(255, 255, 255, .1); }
.player-controls svg { width: 22px; height: 22px; }
.player-controls .speed { font-size: 12px; font-weight: 700; width: 40px !important; }
@media (max-width: 480px) {
  .player-row img, #p-share { display: none !important; }
  .player-controls button:not(.btn-play) { width: 32px; }
}

.toast {
  position: fixed; left: 50%; top: 18px; z-index: 20; transform: translate(-50%, -150%);
  padding: 10px 18px; border-radius: 999px; background: var(--cream); color: var(--plum); font-weight: 700; font-size: 14px;
  visibility: hidden; transition: transform .3s, visibility .3s; box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ── Legal pages ── */
.legal { max-width: 680px; margin: 0 auto; padding: 40px 22px 60px; position: relative; z-index: 1; }
.legal h1 { font-family: var(--display); font-weight: 400; font-size: 46px; letter-spacing: .05em; color: var(--pink-hi); margin: 10px 0 18px; }
.legal h2 { font-size: 18px; margin: 28px 0 6px; }
.legal p, .legal li { color: #ead6e1; }
.legal .back { font-size: 14px; }

/* ── Featured backdrop: blurred episode art (set as --art by app.js) ── */
.featured { isolation: isolate; }
.featured::before {
  content: ""; position: absolute; inset: -40px; z-index: -1;
  background: linear-gradient(rgba(26, 10, 21, .78), rgba(26, 10, 21, .92)), var(--art, none) center / cover;
  filter: blur(30px) saturate(1.4);
}

/* ══ Layout ══
   Mobile/tablet: one column. .side/.content wrappers dissolve, `order` restores the reading order
   (profile → newest episode → listen links → episodes → contact → archive). */
.stage { display: flex; flex-direction: column; }
.side, .content { display: contents; }
.hero { order: 1; }
.featured { order: 2; }
.listen { order: 3; }
.episodes { order: 4; }
.contact { order: 5; }
.archive { order: 6; }
.foot { order: 7; }

/* Wide screens: sticky profile sidebar + roomy content column */
@media (min-width: 1080px) {
  body {
    background:
      radial-gradient(ellipse 45% 55% at 22% -8%, rgba(230, 0, 126, .38), transparent 70%),
      radial-gradient(ellipse 50% 40% at 70% 0%, rgba(230, 0, 126, .12), transparent 70%),
      radial-gradient(ellipse 60% 40% at 50% 105%, rgba(255, 207, 107, .08), transparent 70%),
      var(--plum);
  }
  .curtain { width: max(14px, calc((100vw - 1340px) / 2 - 10px)); }

  .stage {
    display: grid; grid-template-columns: 400px minmax(0, 1fr); column-gap: 56px; align-items: start;
    max-width: 1340px; padding: 44px 44px 40px;
  }
  .side, .content { display: block; }
  /* overflow-y clips at the padding edge, so the avatar's glow needs room above it: 80px of padding,
     cancelled by the negative margin and the sticky offset, keeps the content where it was. */
  .side {
    position: sticky; top: -56px; margin-top: -80px; padding: 80px 4px 8px;
    max-height: calc(100vh + 32px); overflow-y: auto; scrollbar-width: none;
  }
  .side::-webkit-scrollbar { display: none; }
  .hero { padding-top: 0; }
  .avatar { width: 168px; height: 168px; }
  .marquee h1 { font-size: 64px; }
  .side .links { margin-top: 26px; gap: 8px; }
  .side .link-btn { padding: 11px 16px; }
  .side .spotify-embed iframe { height: 352px; }
  .foot { grid-column: 1 / -1; margin-top: 56px; }

  .content > .card:first-child { margin-top: 0; }

  /* Newest episode as a big feature */
  .featured { padding: 30px; }
  .featured .ticket-label { font-size: 22px; margin-bottom: 18px; }
  .featured-body { grid-template-columns: 300px 1fr; gap: 30px; align-items: center; }
  .featured-cover { width: 300px; height: 300px; border-radius: 16px; }
  .featured-text h2 { font-size: 32px; line-height: 1.15; margin: 6px 0 12px; }
  .featured .meta { font-size: 14px; }
  .featured .desc { font-size: 16px; -webkit-line-clamp: 6; margin-bottom: 20px; }
  .btn-play.big { height: 54px; padding: 0 28px 0 22px; font-size: 17px; }

  /* Episodes as a card grid */
  .episodes, .archive { padding: 24px; }
  .episodes-head { margin-bottom: 16px; }
  .section-h { font-size: 34px; }
  #search { max-width: 340px; padding: 11px 16px; font-size: 15px; }
  .ep-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; align-items: start; }
  .ep {
    grid-template-columns: 76px 1fr 44px; padding: 12px; border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .035); border-radius: 14px;
  }
  .ep:first-child { border-top: 1px solid rgba(255, 255, 255, .08); }
  .ep:hover { background: rgba(255, 255, 255, .07); border-color: rgba(230, 0, 126, .4); }
  .ep.playing { border-color: var(--pink); }
  .ep img { width: 76px; height: 76px; border-radius: 10px; }
  .ep-list .empty { grid-column: 1 / -1; }
  .archive summary img { width: 80px; height: 80px; }
  .archive summary strong { font-size: 18px; }

  /* Wider player bar */
  .player { width: min(980px, calc(100% - 48px)); bottom: 18px; }
  .player-row { padding: 8px 18px 12px; gap: 16px; }
  .player-row img { width: 56px; height: 56px; }
  .player-info strong { font-size: 15px; }
  .player-controls { gap: 6px; }
}

/* Mid-size (tablets, small laptops): a bit more breathing room than phones */
@media (min-width: 700px) and (max-width: 1079px) {
  .stage { max-width: 680px; }
  .curtain { width: max(14px, calc((100vw - 740px) / 2)); }
}
