/* The podcast follow button with the bell and the choice of alerts: the show card of Field Notes After Dark, an invented
   podcast, alone on a black page. The pill and the bell are two elements GSAP widens and moves; the alert panel opens
   above them. */
:root {
  --page: #000000;          /* the page */
  --card: #0e0f14;          /* the show card */
  --card-edge: rgba(255, 255, 255, 0.08); /* the card's 1px edge */
  --ink: #f4f1ea;           /* the big words */
  --muted: #8b8d98;         /* the small words */
  --pill: #f3eee5;          /* the cream Follow pill */
  --pill-ink: #15131a;      /* the words on the cream pill */
  --on: #1b1c24;            /* the pill once you follow, and the bell */
  --accent: #a593ff;        /* the lilac of the bell, the tick and the mark */
}

* { box-sizing: border-box; }
html { touch-action: manipulation; }
html, body { margin: 0; overflow-x: clip; background: var(--page); }
body {
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(14px, 4vmin, 40px);
  overflow: hidden;
}

/* ---------------------------------------------------------------- the card */
.show {
  position: relative;
  width: min(380px, 92vw);
  padding: clamp(16px, 4.4vmin, 24px);
  border-radius: clamp(20px, 4.5vmin, 26px);
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(255, 255, 255, 0.05), transparent 60%),
    var(--card);
  border: 1px solid var(--card-edge);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 1px 2px rgba(0, 0, 0, 0.6),
    0 18px 50px -12px rgba(0, 0, 0, 0.9),
    0 40px 90px -30px rgba(90, 70, 220, 0.25);
}
.show__glow {
  position: absolute;
  inset: auto 10% -1px 10%;
  height: 60%;
  border-radius: 50%;
  background: radial-gradient(50% 60% at 50% 100%, rgba(165, 147, 255, 0.22), transparent 70%);
  opacity: 0;
  pointer-events: none;
}

.show__top {
  display: flex;
  gap: clamp(12px, 3.4vmin, 16px);
  align-items: center;
}
.cover {
  position: relative;
  flex: none;
  width: clamp(74px, 21vmin, 96px);
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 10px 24px -8px rgba(60, 40, 200, 0.6);
}
.cover svg { display: block; width: 100%; height: 100%; }
.cover__rings circle { stroke-width: 1.2; }
.cover__sheen {
  position: absolute;
  inset: -40% -60%;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.28) 50%, transparent 60%);
  pointer-events: none;
}
.show__info { min-width: 0; }
.show__kicker {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.show__title {
  margin: 4px 0 3px;
  font-size: clamp(17px, 4.6vmin, 21px);
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.show__meta, .show__count {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.show__count { margin-top: 2px; }
.roll {
  display: inline-flex;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-weight: 600;
  overflow: hidden;
  vertical-align: bottom;
  height: 1.25em;
  line-height: 1.25em;
}
.roll__c { display: inline-block; position: relative; }

/* ---------------------------------------------------------------- the actions */
.actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(16px, 4.4vmin, 22px);
  height: 46px;
  z-index: 2;
}
.follow {
  position: relative;
  height: 46px;
  min-width: 46px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--pill);
  color: var(--pill-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 620;
  cursor: pointer;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 18px -6px rgba(255, 240, 220, 0.35);
}
.follow:focus-visible, .bell:focus-visible, .seg__opt:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.follow__face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  padding: 0 22px;
}
.follow__face svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.follow__face--on, .follow__face--leave { color: var(--ink); opacity: 0; }
.follow__face--on svg { stroke: var(--accent); }
.follow__face--leave { color: #ff9a8a; }
.follow__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.6) 50%, transparent 70%);
  pointer-events: none;
}
.follow[aria-pressed="true"] .follow__shine { opacity: 0.25; }

.bell-wrap {
  width: 0;
  height: 46px;
  overflow: visible;
}
.bell {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--on);
  color: var(--accent);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 20px -10px rgba(0, 0, 0, 0.9);
}
.bell svg { width: 22px; height: 22px; overflow: visible; }
.bell__shape { fill: currentColor; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.bell__clapper, .bell__wave, .bell__slash {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}
.bell__slash { stroke: var(--ink); stroke-dasharray: 1; stroke-dashoffset: 1; }

/* ---------------------------------------------------------------- the alert panel */
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(300px, 100%);
  padding: 12px;
  border-radius: 18px;
  background: rgba(26, 27, 35, 0.95);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 20px 40px -12px rgba(0, 0, 0, 0.9);
  opacity: 0;
  visibility: hidden;
  transform-origin: 88% 0%;
  z-index: 3;
}
.menu__title {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2px 4px 9px;
}
.seg {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 1fr 0.62fr;
  padding: 3px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}
.seg__mark {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 0;
  border-radius: 9px;
  background: linear-gradient(180deg, #34334a, #2a2940);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 8px -2px rgba(0, 0, 0, 0.7);
}
.seg__opt {
  position: relative;
  z-index: 1;
  height: 34px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 560;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.25s;
}
.seg__opt[aria-checked="true"] { color: var(--ink); }
.menu__hint {
  margin: 9px 4px 2px;
  font-size: 12.5px;
  color: var(--muted);
  min-height: 2.6em;
  line-height: 1.3;
}

/* ---------------------------------------------------------------- the latest episode and the note */
.latest {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(14px, 4vmin, 20px);
  padding-top: clamp(12px, 3.4vmin, 16px);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 13px;
  color: var(--muted);
}
.latest__play {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.latest__play svg { width: 13px; height: 13px; fill: var(--ink); }
.latest__text b { color: var(--ink); font-weight: 600; margin-right: 6px; }
.note {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--accent);
  min-height: 1.3em;
}

/* ---------------------------------------------------------------- the drawn pointer */
.pointer {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  fill: #fff;
  stroke: #0b0b0f;
  stroke-width: 1.3;
  stroke-linejoin: round;
  pointer-events: none;
  opacity: 0;
  z-index: 10;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5));
}

@media (prefers-reduced-motion: reduce) {
  .seg__opt { transition: none; }
}
