/* Home only (Showpiece tier): the player hero, the two doors, the episode wall, the graph, the course card.
   Ambient motion lives under prefers-reduced-motion: no-preference; .motion (set by home.js) only marks what
   starts hidden until the script reveals it, so the page is complete with scripting off. */

/* Hero: the featured episode as a player */
.hero { position: relative; min-height: min(100svh, var(--hero-max)); display: grid; align-items: center; isolation: isolate; overflow: hidden; }
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 100% 40%; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgb(var(--ink-rgb) / .9) 0%, rgb(var(--ink-rgb) / .45) 34%, rgb(var(--ink-rgb) / 0) 50%),
              linear-gradient(0deg, var(--ink) 0%, rgb(var(--ink-rgb) / 0) 24%); }
.hero .wrap { padding-block: var(--s9); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); justify-items: start; }
.hero h1 { font-size: var(--fs-7); max-width: var(--title-measure); }
.hero .episode { max-width: var(--measure-s); font-size: var(--fs-3); color: var(--text); text-wrap: balance; }
.hero .what { color: var(--text); }
.hero .actions { margin-top: var(--s3); display: flex; align-items: center; gap: var(--s3) var(--s5); flex-wrap: wrap; }

/* The free check as a search: business and city side by side, then the button, with the channel link beside it where
   the row has room and under it on phones. Tablets put the button at the end of the fields' row; the narrowest screens
   and large text stack the fields. On wide screens the form is no wider than the title above it, which keeps it left
   of the zero. */
.check { margin-top: var(--s3); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); align-items: end; width: min(100%, var(--measure)); }
.check .field { display: grid; gap: var(--s1); min-width: 0; }
.check label { color: var(--text); }
.check input { min-height: var(--tap-l); width: 100%; padding: 0 var(--s4); border: 0; border-radius: var(--r-md); background: var(--scrim); box-shadow: 0 0 0 var(--rule) var(--muted) inset;
  color: var(--white); font: 400 var(--fs-2) / 1.2 var(--body); }
.check input:focus-visible { outline-offset: var(--rule); }
.check .go { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s3) var(--s5); flex-wrap: wrap; }
@media (max-width: 21em) { .check { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 47.5em) and (max-width: 75em) {
  .check { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; width: min(100%, var(--check-max)); }
  .check .go { display: contents; }
  .check .watch { grid-column: 1 / -1; }
}
/* Wide screens: with the search, the hero keeps its height (tighter padding instead of a taller box), so the art keeps
   its size and the orbs stay clear of the title; the top padding still clears the header. The form stays left of
   the zero. */
@media not all and (max-width: 75em) {
  .hero:has(.check) .wrap { padding-block: calc(var(--header-h) + var(--s3)) var(--s4); }
  .check { width: min(100%, var(--fs-7) * var(--title-ems)); }
  .hero:has(.check) .disc { width: var(--disc-s); height: var(--disc-s); }
  /* The channel link now ends far to the right, so the doors no longer pull up under it. */
  .hero:has(.check) + .doors { margin-top: 0; padding-top: var(--s5); }
}

.watch { gap: var(--s4); flex-wrap: wrap; }
.disc { position: relative; display: grid; place-items: center; width: var(--disc); height: var(--disc); border-radius: var(--r-pill); flex: none;
  background: radial-gradient(circle at 32% 22%, rgb(var(--white-rgb) / .85), rgb(var(--white-rgb) / 0) 42%), linear-gradient(160deg, rgb(var(--violet-rgb) / .75), rgb(var(--violet-rgb) / .35) 60%, rgb(var(--white-rgb) / .3));
  box-shadow: 0 0 0 var(--rule-bold) rgb(var(--white-rgb) / .5) inset, var(--e3); transition: transform var(--t-fast) ease; }
.disc svg { width: 38%; height: 38%; margin-left: 6%; }

/* Two doors, pulled up into the hero's lower edge */
.doors { position: relative; z-index: 2; margin-top: calc(var(--s8) * -1); padding-bottom: var(--s9); overflow-x: clip; }
.doors-head { display: grid; justify-items: center; gap: var(--s3); text-align: center; margin-bottom: var(--s6); }
.doors-head p { max-width: var(--measure); color: var(--text); }
.doors-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-gap); }

.door { position: relative; isolation: isolate; display: flex; padding: var(--rim); perspective: var(--depth); perspective-origin: 50% 40%; }
.door.right { --swing: -17deg; }
.door::before { content: ""; position: absolute; inset: calc(var(--s7) * -1); z-index: -3; border-radius: var(--arch);
  background: radial-gradient(62% 56% at 50% 58%, var(--glow), transparent 72%); filter: blur(var(--blur-glow)); opacity: .75; transition: opacity var(--t-mid) ease; }
.door::after { content: ""; position: absolute; left: 6%; right: 6%; bottom: calc(var(--s6) * -1); height: var(--s8); z-index: -3; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(var(--violet-glow-rgb) / .8), transparent); filter: blur(var(--blur-soft)); opacity: .7; transition: opacity var(--t-mid) ease, transform var(--t-mid) ease; }

.portal { position: absolute; inset: 0; z-index: -1; overflow: hidden; border-radius: var(--arch) var(--arch) var(--r-lg) var(--r-lg);
  background: radial-gradient(75% 65% at 50% 72%, var(--white) 0%, var(--violet-glow) 16%, var(--violet) 42%, var(--violet-deep) 74%, var(--panel-2) 100%);
  box-shadow: var(--glow-portal); transition: filter var(--t-mid) ease; }
.portal::before { content: ""; position: absolute; inset: -30%; opacity: .5;
  background: repeating-conic-gradient(from 0deg at 50% 78%, rgb(var(--white-rgb) / .3) 0 2.5deg, transparent 2.5deg 11deg);
  -webkit-mask: radial-gradient(circle at 50% 78%, var(--ink) 0%, transparent 70%); mask: radial-gradient(circle at 50% 78%, var(--ink) 0%, transparent 70%); }

.leaf { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s3);
  padding: calc(var(--arch) * .3) var(--s-pad) var(--s6);
  border-radius: calc(var(--arch) - var(--rim)) calc(var(--arch) - var(--rim)) var(--r-md) var(--r-md);
  background: linear-gradient(172deg, rgb(var(--violet-deep-rgb) / .95) 0%, rgb(var(--panel-2-rgb) / .92) 34%, rgb(var(--ink-rgb) / .94) 100%);
  box-shadow: var(--ring-hi), var(--e2); transform-origin: left center; transition: transform var(--t-mid) var(--ease); }
.door.right .leaf { transform-origin: right center; justify-content: center; }
.leaf > * { max-width: 100%; }
.door:hover::before, .door:focus-within::before, .door.open::before { opacity: 1; }
.door:hover::after, .door:focus-within::after, .door.open::after { opacity: 1; }
.door:hover .portal, .door:focus-within .portal, .door.open .portal { filter: brightness(1.25) saturate(1.1); }

.medal { flex: none; width: var(--medal); aspect-ratio: 1; border-radius: var(--r-pill); overflow: hidden; box-shadow: 0 0 0 var(--rule-bold) rgb(var(--white-rgb) / .4), var(--e3); }
.medal img { width: 100%; height: 100%; object-fit: cover; }

.door h3 { font-size: var(--fs-5); }
.door .who { max-width: var(--measure-s); color: var(--text); font-size: var(--fs-3); }
.door .who strong { color: var(--white); }
.door .price { max-width: var(--measure-s); padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--glass); box-shadow: var(--ring); color: var(--text); }
.door .go { display: grid; justify-items: center; gap: var(--s2); }
.door .go .note { text-align: center; }
.door ul, .card .outcomes { display: grid; gap: var(--s2); text-align: left; color: var(--text); }
.door li::before, .card .outcomes li::before { content: ""; display: inline-block; width: var(--s2); height: var(--s2); margin-right: var(--s3); border-radius: var(--r-pill);
  background: var(--violet); box-shadow: var(--glow-dot); vertical-align: .1em; }

/* Section heads */
.head { display: flex; justify-content: space-between; align-items: end; gap: var(--s5); flex-wrap: wrap; margin-bottom: var(--s7); }
.head h2 { font-size: var(--fs-6); margin-top: var(--s3); }
.head p { max-width: var(--measure-s); color: var(--text); }

/* Episode wall */
.wall { position: relative; padding-bottom: var(--s9); }
.wall::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 50% at 50% 30%, rgb(var(--violet-rgb) / .22), transparent 70%); }
.reel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-gap); align-items: start; }
.reel > li { position: relative; padding-top: var(--s9); }
.reel > li:nth-child(2) { margin-top: calc(var(--s5) * -1); }
.num { position: absolute; z-index: 0; left: calc(var(--s1) * -1); top: 0; font-family: var(--display); font-size: var(--fs-7); line-height: 1;
  color: transparent; -webkit-text-stroke: var(--rule-bold) var(--violet); pointer-events: none; }
.ep { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr); text-decoration: none; border-radius: var(--r-md); overflow: hidden; background: var(--panel-2); box-shadow: var(--e2);
  transform: rotate(var(--tilt, 0deg)); transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) ease; }
.reel > li:nth-child(1) .ep { --tilt: -2deg; }
.reel > li:nth-child(3) .ep { --tilt: 2deg; }
.ep:hover, .ep:focus-visible { box-shadow: 0 0 0 var(--rule-bold) var(--violet), var(--e3); }
.ep .shot { position: relative; overflow: hidden; }
.ep .shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.ep .cap { padding: var(--s4) var(--s4) var(--s5); display: grid; gap: var(--s3); }
.ep h3 { font: 700 var(--fs-2) / 1.35 var(--body); color: var(--white); text-wrap: balance; }
.ep .out { padding: var(--s2) var(--s3); border-radius: var(--r-md); background: var(--tint); box-shadow: 0 0 0 var(--rule) rgb(var(--violet-rgb) / .45) inset; color: var(--white); }
.ep .out small { display: block; color: var(--text); }
.ep .soon { color: var(--muted); }
.ep .cap > .eyebrow:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); }
.now { padding: 0 var(--s2); border-radius: var(--r-pill); background: var(--violet); color: var(--white); }

/* Your number: the graph */
.measure { padding-bottom: var(--s9); }
.stagebox { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: var(--s-pad);
  background: radial-gradient(90% 120% at 100% 100%, rgb(var(--violet-rgb) / .28) 0%, var(--panel-2) 50%, var(--ink) 100%); box-shadow: var(--e1);
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: var(--s-gap); align-items: center; }
.stagebox h2 { font-size: var(--fs-6); margin-top: var(--s3); }
.stagebox .lead { margin-top: var(--s5); }
.stagebox .numbered { margin-top: var(--s6); }
.lit .numbered { --row-bg: rgb(var(--violet-rgb) / .12); --row-line: rgb(var(--violet-rgb) / .5); }
.stagebox .actions { margin-top: var(--s6); }

.chartbox { padding: var(--box-pad); border-radius: var(--r-lg); background: rgb(var(--ink-rgb) / .55); box-shadow: var(--ring), var(--e3); }
.chartbar { display: flex; justify-content: space-between; align-items: center; gap: var(--s2) var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.chartbar > * { min-width: 0; max-width: 100%; }
.chartbar .tag { border-radius: var(--r-md); }
.chart { position: relative; aspect-ratio: var(--chart-ratio); margin-left: var(--s5); margin-bottom: var(--s6); }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .area { fill: url(#fillV); opacity: .9; }
.chart .fill-top { stop-color: var(--violet); stop-opacity: .45; }
.chart .fill-bottom { stop-color: var(--violet); stop-opacity: 0; }
.chart .curve { fill: none; stroke: var(--violet); stroke-width: 6; stroke-linecap: round; filter: drop-shadow(0 0 var(--blur-line) var(--violet)); }
.chart .start { fill: var(--yellow); filter: drop-shadow(0 0 var(--blur-point) var(--yellow)); }
.chart .start-ring { fill: none; stroke: var(--yellow); stroke-width: 2; opacity: .55; }
.chart .end { fill: var(--white); stroke: var(--violet); stroke-width: 5; filter: drop-shadow(0 0 var(--blur-point) var(--violet)); }
.chart .lbl { position: absolute; padding: var(--s1) var(--s3); border-radius: var(--r-pill); background: var(--scrim); box-shadow: var(--ring-hi);
  font: 700 var(--fs-1) / 1.4 var(--body); color: var(--white); max-width: 60%; }
.chart .lbl.a { left: 16%; top: 86%; }
.chart .lbl.b { right: 6%; top: 1%; }
.chart .axis { position: absolute; font-size: var(--fs-1); color: var(--muted); white-space: nowrap; }
.chart .axis.y { left: 0; top: 50%; transform: translate(-60%, -50%) rotate(-90deg); }
.chart .axis.x { right: 0; bottom: calc(var(--s6) * -1); }

/* Course */
.bridge { padding-bottom: var(--s9); }
.bridge h2 { font-size: var(--fs-5); }
.bridge h2 span { display: block; }
.bridge .lead { margin-top: var(--s5); }

.card { border-radius: var(--r-lg); padding: var(--s-pad); margin-top: var(--s7);
  background: radial-gradient(120% 140% at 85% 0%, var(--violet-deep) 0%, var(--panel-2) 55%, var(--ink) 100%); box-shadow: var(--e1);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--s-gap); align-items: center; }
.card h3 { font-size: var(--fs-5); margin-top: var(--s3); }
.card .outcomes { margin-top: var(--s5); }
.card .facts { margin-top: var(--s5); }
.buy { margin-top: var(--s6); display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; }
.figure { font-family: var(--display); font-size: var(--fs-6); line-height: 1; color: var(--white); text-shadow: var(--text-lift); }
.buy p { flex: 1 1 var(--buy-text-min); color: var(--text); }
.card .actions { margin-top: var(--s5); display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; }

.stage { position: relative; padding: 0 0 var(--s8) var(--s6); }
.browser { border-radius: var(--r-md); overflow: hidden; background: var(--ink); box-shadow: var(--e3); }
.chrome { display: flex; gap: var(--s2); padding: var(--s3); background: var(--panel-2); border-bottom: var(--rule) solid var(--line); }
.chrome i { width: var(--s3); height: var(--s3); border-radius: var(--r-pill); background: var(--line-hi); }
.browser img { width: 100%; aspect-ratio: 1280 / 900; object-fit: cover; }
.orb { position: absolute; left: 0; bottom: 0; display: flex; align-items: center; gap: var(--s4); }
.orb figure { width: var(--figure); aspect-ratio: 1; border-radius: var(--r-pill); overflow: hidden; flex: none;
  box-shadow: 0 0 0 var(--s1) var(--ink), 0 0 0 calc(var(--s1) + var(--focus)) var(--violet), var(--e3); }
.orb figure img { width: 100%; height: 100%; object-fit: cover; }
.bubble { max-width: var(--measure-s); padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--white); color: var(--ink); box-shadow: var(--e2); }
.bubble b { display: block; color: var(--violet); }

/* Revealed by home.js: hidden only while scripting runs and motion is allowed */
.motion .rv { opacity: 0; transform: translateY(var(--s5)); transition: opacity var(--t-mid) ease, transform var(--t-mid) ease; }
.motion .rv.in { opacity: 1; transform: none; }
.motion .chart .curve { stroke-dasharray: 1; stroke-dashoffset: 1; }
.motion .chart .area, .motion .chart .end, .motion .chart .lbl.b { opacity: 0; }
.motion .lit .chart .curve { stroke-dashoffset: 0; transition: stroke-dashoffset var(--t-draw) var(--ease-draw); }
.motion .lit .chart .area { opacity: .9; transition: opacity var(--t-mid) ease var(--t-draw); }
.motion .lit .chart .end, .motion .lit .chart .lbl.b { opacity: 1; transition: opacity var(--t-mid) ease var(--t-draw); }

/* Ambient motion and every hover movement, only for readers who have not asked for less */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero picture img { animation: drift var(--loop-drift) ease-in-out infinite alternate; transform-origin: 70% 45%; }
  .disc::before { content: ""; position: absolute; inset: calc(var(--rule-bold) * -1); border-radius: var(--r-pill); border: var(--rule-bold) solid var(--violet-glow); opacity: 0; animation: pulse var(--loop-pulse) ease-out var(--loop-pulse-count); }
  /* The rays turn only while a door is open, so resting doors draw no frames. */
  .portal::before { animation: rays var(--loop-rays) linear infinite paused; }
  .door:hover .portal::before, .door:focus-within .portal::before, .door.open .portal::before { animation-play-state: running; }
  .door:hover .leaf, .door:focus-within .leaf, .door.open .leaf { transform: rotateY(var(--swing)); }
  .door:hover::after, .door:focus-within::after, .door.open::after { transform: scaleX(1.12); }
  .watch:hover .disc { transform: scale(1.06); }
  .ep:hover, .ep:focus-visible { transform: rotate(0) translateY(calc(var(--s3) * -1)) scale(1.04); }
}
@keyframes drift { from { transform: scale(1.02) translateY(0); } to { transform: scale(1.07) translateY(-1.5%); } }
@keyframes pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes rays { to { transform: rotate(360deg); } }

/* Tablets and near square screens: the wide art cannot keep the zero clear of the title, so the art becomes a band
   above the text and the text sits on ink. */
@media (max-width: 75em) {
  .hero { min-height: auto; display: block; padding-top: var(--header-h); }
  .hero picture { position: relative; display: block; }
  /* The whole scene, right aligned: its left edge is the render's own dark haze, so it meets the ink without a seam. */
  .hero picture img { position: relative; height: var(--hero-band); object-fit: contain; object-position: 100% 50%;
    --art: min(100%, var(--hero-band) * var(--hero-ratio));
    mask-image: linear-gradient(90deg, transparent, var(--ink) 30%), linear-gradient(0deg, transparent, var(--ink) 14%, var(--ink) 86%, transparent);
    mask-size: var(--art) 100%; mask-position: right center; mask-repeat: no-repeat; mask-composite: intersect;
    -webkit-mask-image: linear-gradient(90deg, transparent, var(--ink) 30%), linear-gradient(0deg, transparent, var(--ink) 14%, var(--ink) 86%, transparent);
    -webkit-mask-size: var(--art) 100%; -webkit-mask-position: right center; -webkit-mask-repeat: no-repeat; -webkit-mask-composite: source-in; }
  .hero::after { background: linear-gradient(0deg, var(--ink) 0%, rgb(var(--ink-rgb) / 0) 30%); }
  .hero .wrap { padding-block: var(--s5) var(--s6); }
  .hero h1 { max-width: none; font-size: var(--fs-6); }
  .doors { margin-top: 0; }
}
/* Wide text or a narrow screen: one column */
@media (max-width: 53.75em) {
  .card, .stagebox { grid-template-columns: minmax(0, 1fr); }
}
/* Phones held upright: the tall art with the title over its foot. Held sideways they keep the tablet band above. */
@media (max-width: 47.5em) and (orientation: portrait) {
  /* Anthony, 2026-10-20: on phones the search replaces the "what" line, and on short phones the episode tag, so the
     button stays on the first screen. */
  .hero .what:has(+ .check) { display: none; }
  .check { margin-top: 0; }
  /* On phones the header takes its own row on ink, so it never sits on the zero, at any text size. */
  .top { position: relative; background: var(--ink); }
  .hero { padding-top: 0; }
  .hero picture { position: absolute; inset: 0 0 auto; height: auto; }
  .hero picture img { height: var(--hero-phone-art); object-fit: cover; object-position: 50% 0;
    mask-image: linear-gradient(180deg, var(--ink) 72%, transparent); -webkit-mask-image: linear-gradient(180deg, var(--ink) 72%, transparent);
    mask-size: 100% 100%; -webkit-mask-size: 100% 100%; }
  .hero::after { background: linear-gradient(0deg, var(--ink) 30%, rgb(var(--ink-rgb) / .2) 56%, rgb(var(--ink-rgb) / 0) 70%); }
  .hero .wrap { padding-block: var(--hero-phone-overlap) var(--s5); }
  .hero picture img { animation: none; }
}
@media (max-width: 47.5em) {
  .disc { width: var(--disc-s); height: var(--disc-s); }
  .doors-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s8); }
  .door { --swing: 11deg; }
  .door.right { --swing: -11deg; }
  .reel { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .reel > li { padding-top: var(--s8); }
  .reel > li:nth-child(2) { margin-top: 0; }
  .reel > li:nth-child(1) .ep { --tilt: -1.2deg; }
  .reel > li:nth-child(3) .ep { --tilt: 1.2deg; }
  /* The labels become a legend under the chart, where large text cannot spill out of the plot: the start label at
     the left under the yellow dot, the end label at the right under the end dot, and the y axis words as a caption. */
  .chart { margin: 0; aspect-ratio: auto; display: flex; flex-direction: column; }
  .chart svg { position: relative; height: auto; aspect-ratio: var(--chart-ratio); }
  .chart .lbl { position: static; max-width: 100%; margin-top: var(--s3); }
  .chart .lbl.a { align-self: flex-start; }
  .chart .lbl.b { align-self: flex-end; }
  .chart .axis.x { display: none; }
  .chart .axis.y { position: static; order: -1; transform: none; white-space: normal; margin-bottom: var(--s2); }
  .stage { padding: 0 0 calc(var(--figure) + var(--s5)) 0; }
  .orb { flex-direction: column; align-items: flex-start; left: var(--s1); }
  .bubble { margin-left: var(--s7); }
}
/* Very narrow, or large text on a phone: Orb and its bubble sit under the course screen instead of over it. */
@media (max-width: 30em) {
  .stage { padding: 0; }
  .orb { position: static; margin-top: var(--s4); }
  .bubble { margin-left: 0; }
}
/* A phone held sideways: the hero band shrinks so the whole title is on the first screen, and the chart keeps its
   shape but fits the screen's height, so the line's start and its end label are in view together while it draws. */
@media (orientation: landscape) and (max-height: 32em) {
  :root { --hero-band: var(--hero-band-short); }
  .chart { width: min(100% - 2 * var(--s5), var(--chart-fit) * var(--chart-ratio)); margin-inline: auto; }
}
@media (max-width: 47.5em) and (orientation: portrait) and (max-height: 39em) {
  .hero:has(.check) .tag { display: none; }
  /* The title then sits on the foot of the zero: the glow alone, so the hard drop shadow does not double the letters
     on the yellow. */
  .hero:has(.check) h1 { text-shadow: var(--text-glow); }
}
