/* Home page sections. Reuses .wrap / .section / .eyebrow / .btn from site.css
   and every colour/font from tokens.css — no literal hex values here. */

/* ---- Hero ---- */
.home-hero__heading {
  font: 700 var(--fs-h1-home) / 1.02 var(--font-sans);
  letter-spacing: -0.045em;
  margin: 32px 0 0;
  max-width: 1080px;
}
.home-hero__muted { color: var(--ink-500); }

.home-hero__row {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px 80px;
  align-items: end;
  margin-top: 48px;
}
.home-hero__lede {
  font-size: var(--fs-lede);
  line-height: 1.6;
  color: var(--ink-700);
  max-width: 620px;
  margin: 0;
}
.home-hero__lede strong { color: var(--ink-950); }
.home-hero__ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 899px) {
  .home-hero__row { grid-template-columns: 1fr; }
  .home-hero__ctas { justify-content: flex-start; }
}
@media (max-width: 480px) {
  .home-hero__ctas .btn { flex: 1 1 100%; }
}

/* ---- Equation ----
   Light surface (section--alt) since the episodes moved above it: two dark
   bands back to back read as one. The artboard has this section dark. */
.home-equation__cards {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 40px;
}
.home-equation__card {
  flex: 1;
  background: var(--paper-50);
  border: 1px solid var(--line-300);
  border-radius: var(--radius-md);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.home-equation__num {
  font: 500 12px var(--font-mono);
  letter-spacing: 0.14em;
  color: var(--ink-500);
}
.home-equation__title {
  font: 600 23px/1.2 var(--font-sans);
  letter-spacing: -0.02em;
  color: var(--ink-950);
}
.home-equation__blurb {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-700);
}
.home-equation__link {
  font-size: 13.5px;
  font-weight: 600;
  /* Accent text on a light surface: the AA-safe token. */
  color: var(--accent-700);
  margin-top: auto;
}
.home-equation__op {
  align-self: center;
  font: 700 34px var(--font-sans);
  color: var(--accent-600);
  padding: 0 20px;
}
.home-equation__result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 56px;
  text-align: center;
}
.home-equation__eq {
  font: 700 30px var(--font-sans);
  color: var(--ink-950);
}
.home-equation__fee {
  font: 600 44px var(--font-mono);
  letter-spacing: -0.01em;
  color: var(--ink-950);
}
.home-equation__qualifiers {
  margin: 0;
  font-size: 16.5px;
  color: var(--ink-700);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.home-equation__qualifiers span[aria-hidden] { color: var(--accent-600); }

@media (max-width: 899px) {
  .home-equation__cards { flex-direction: column; }
  .home-equation__op { padding: 8px 0; }
}

/* ---- How it works ---- */
.home-how__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 40px;
  margin-bottom: 72px;
}
.home-how__heading {
  font: 700 var(--fs-h2) / 1.1 var(--font-sans);
  letter-spacing: -0.035em;
  margin: 0;
}
.home-how__stages {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-300);
  border: 1px solid var(--line-300);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.home-how__stage {
  background: var(--paper-50);
  padding: 36px 30px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.home-how__stage--accent { background: var(--accent-050); }
.home-how__price {
  font: 600 var(--fs-price) / 1 var(--font-mono);
}
.home-how__price--positive { color: var(--positive-600); }
.home-how__price--accent { color: var(--accent-600); }
.home-how__stage-eyebrow { margin-top: 8px; }
.home-how__stage-title {
  font: 600 19px/1.3 var(--font-sans);
  letter-spacing: -0.01em;
  margin: 0;
}
.home-how__stage-body {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-700);
  margin: 0;
}
.home-how__closing {
  margin: 56px 0 0;
  font: 600 22px/1.5 var(--font-sans);
  letter-spacing: -0.01em;
  color: var(--ink-950);
  max-width: 760px;
}

@media (max-width: 699px) {
  .home-how__head { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (max-width: 899px) {
  .home-how__stages {
    grid-template-columns: 1fr;
    background: none;
    border: none;
    gap: 24px;
  }
  .home-how__stage {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "eyebrow price"
      "title   title"
      "body    body";
    column-gap: 16px;
    border-left: 3px solid var(--line-300);
    border-radius: 0;
    padding: 4px 0 4px 24px;
  }
  .home-how__stage--accent { background: none; border-left-color: var(--accent-600); }
  .home-how__price { grid-area: price; justify-self: end; align-self: start; }
  .home-how__stage-eyebrow { grid-area: eyebrow; align-self: center; margin-top: 0; }
  .home-how__stage-title { grid-area: title; }
  .home-how__stage-body { grid-area: body; }
}

/* ---- Catch ---- */
.home-catch { border-top: 1px solid var(--line-300); border-bottom: 1px solid var(--line-300); }
.home-catch__grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 80px;
}
.home-catch__heading {
  font: 700 var(--fs-h2) / 1.1 var(--font-sans);
  letter-spacing: -0.03em;
  margin: 0;
}
.home-catch__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-700);
  max-width: 680px;
}
.home-catch__body p { margin: 0; }

@media (max-width: 899px) {
  .home-catch__grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---- dotconnector teaser (framework) ---- */
.home-framework__grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 80px;
  align-items: start;
}
.home-framework__heading {
  font: 700 var(--fs-h2) / 1.12 var(--font-sans);
  letter-spacing: -0.03em;
  margin: 28px 0 0;
  max-width: 640px;
}
.home-framework__body {
  font-size: 17.5px;
  line-height: 1.7;
  color: var(--ink-700);
  max-width: 640px;
  margin: 26px 0 0;
}
.home-framework__cta { margin-top: 32px; }
.diagram-teaser {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin-top: 44px;
}
.diagram-teaser__line { stroke: var(--line-300); stroke-width: 1.5; }
.diagram-teaser__line--out { stroke: var(--ink-950); }
.diagram-teaser__dot { fill: var(--line-300); }
.diagram-teaser__dot--rule { fill: var(--accent-600); }
.diagram-teaser__dot--out { fill: var(--ink-950); }
.diagram-teaser__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  fill: var(--ink-500);
}
.diagram-teaser__label--rule { fill: var(--ink-700); }
.diagram-teaser__label--out { fill: var(--ink-950); }

@media (max-width: 899px) {
  .home-framework__grid { grid-template-columns: 1fr; gap: 40px; }
  .diagram-teaser { margin-top: 0; max-width: 340px; }
}

/* ---- About ----
   Alt surface (the artboard has it on paper with a hairline on top): with the
   episodes under the hero the surfaces alternate all the way down only if this
   one is alt, and the drawn seam rule replaces the artboard's hairline. */
.home-about__heading {
  font: 700 var(--fs-h2) / 1.15 var(--font-sans);
  letter-spacing: -0.03em;
  margin: 20px 0 64px;
  max-width: 820px;
}
.home-about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px 80px;
}
.home-about__block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 2px solid var(--ink-950);
  padding-top: 24px;
}
.home-about__block-eyebrow { margin: 0; }
.home-about__block-title {
  font: 600 22px/1.3 var(--font-sans);
  letter-spacing: -0.015em;
  margin: 0;
}
.home-about__block-body {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-700);
  margin: 0;
}
.home-about__badges {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.home-about__badge {
  height: 60px;
  width: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-300);
}
.home-about__article {
  border-top: 2px solid var(--ink-950);
  margin-top: 56px;
  padding-top: 24px;
  max-width: 820px;
}
.home-about__article-intro {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-700);
  margin: 0 0 16px;
}
.home-about__article-quote {
  font: 600 22px/1.4 var(--font-sans);
  letter-spacing: -0.015em;
  margin: 0 0 20px;
  padding-left: 20px;
  border-left: 3px solid var(--accent-600);
}
.home-about__article-link {
  font-weight: 600;
  color: var(--accent-700);
  text-decoration: none;
}
.home-about__article-link:hover { text-decoration: underline; }

@media (max-width: 899px) {
  .home-about__grid { grid-template-columns: 1fr; }
}

/* ---- Episodes ---- */
/* The video frame: poster with a play overlay, native controls after first
   play (episodes.js). */
.episode__media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--ink-900);
  border: 1px solid var(--ink-800);
}
.episode__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.episode__play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  /* Poster stays readable; the scrim only darkens the edge under the button. */
  background: radial-gradient(circle at center, color-mix(in srgb, var(--ink-950) 35%, transparent), transparent 70%);
  color: var(--paper-50);
}
.episode__play[hidden] { display: none; }
.episode__play svg {
  width: 72px;
  height: 72px;
  padding: 22px;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--accent-600);
  transition: transform 200ms;
}
.episode__play:hover svg { transform: scale(1.06); }
.episode__play:focus-visible { outline-offset: -4px; }
/* AI Act Art. 50(4): the EU "AI GENERATED" icon, visible on the poster and
   during inline playback, with the "TRUE STORY" pill drawn to match it
   (white at 50%, dark text, same width). Clicks pass through to the play
   overlay. The EU icon is 1385x267, so 100px wide is 19px tall. */
.episode__labels {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
}
.episode__ai { display: block; width: 100px; height: auto; }
/* Mirrors the EU icon's type: in the icon "AI" caps are 48% of the pill
   height and "GENERATED" caps 36%, so at 19px that is roughly 13px and
   9.5px type. */
.episode__story {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  width: 100px;
  height: 19px;
  border-radius: 10px;
  background: rgb(255 255 255 / 0.5);
  color: #1d1d1b;
  font: 600 9.5px/19px var(--font-sans);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.episode__story b { font-size: 13px; font-weight: 700; letter-spacing: 0; }
.episode__eyebrow { margin-top: 8px; }
.episode__body {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-250);
  margin: 0;
}
.episode__link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-600);
  margin-top: auto;
  padding-top: 4px;
}
.episode__link:hover { color: var(--paper-50); }
@media (prefers-reduced-motion: reduce) {
  .episode__play svg { transition: none; }
}

.home-episodes__heading {
  font: 700 var(--fs-h2) / 1.1 var(--font-sans);
  letter-spacing: -0.035em;
  margin: 20px 0 0;
  max-width: 820px;
}

/* ---- player ---- */
/* Video-site layout: stage and its text on the left, "up next" list of
   thumbnails on the right. The list is taller than the stage on purpose; the
   text under the stage fills the difference. */
.home-player__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 32px;
  margin-top: 48px;
  align-items: start;
}
.home-player__main { display: flex; flex-direction: column; gap: 28px; }
.home-player__stage .episode__media { border-radius: var(--radius-md); }
.home-player__stage .episode__play svg { width: 84px; height: 84px; padding: 26px; }
.home-player__meta { display: flex; flex-direction: column; gap: 12px; }
.home-player__meta[hidden] { display: none; }
.home-player__claim {
  font: 600 clamp(22px, 1.9vw, 28px)/1.2 var(--font-sans);
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--paper-50);
}
.home-player__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.home-player__item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  width: 100%;
  padding: 6px;
  border: 0;
  border-radius: var(--radius-md);
  background: none;
  color: var(--ink-250);
  text-align: left;
  font: 500 14.5px/1.4 var(--font-sans);
  cursor: pointer;
  align-items: start;
}
.home-player__item:hover { background: var(--ink-900); color: var(--paper-50); }
.home-player__item[aria-current="true"] {
  background: var(--ink-900);
  color: var(--paper-50);
  box-shadow: inset 3px 0 0 var(--accent-600);
}
.home-player__thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--ink-850);
}
.home-player__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-player__item[aria-current="true"] .home-player__thumb img { opacity: 0.55; }
.home-player__dur {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 1px 5px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--ink-950) 85%, transparent);
  color: var(--paper-50);
  font: 600 11px var(--font-mono);
  letter-spacing: 0.02em;
}
.home-player__item-text { display: block; padding-top: 2px; }
.home-player__item-name {
  display: block;
  font: 600 11px var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin-bottom: 4px;
}
.home-player__item[aria-current="true"] .home-player__item-name { color: var(--accent-600); }

@media (max-width: 899px) {
  .home-player__grid { grid-template-columns: 1fr; gap: 32px; margin-top: 36px; }
  .home-player__main { gap: 20px; }
  .home-player__stage .episode__play svg { width: 64px; height: 64px; padding: 19px; }
  .home-player__item { grid-template-columns: 128px 1fr; gap: 12px; }
}
@media (max-width: 480px) {
  .home-player__item { grid-template-columns: 112px 1fr; font-size: 14px; }
  .home-player__item-name { letter-spacing: 0.08em; }
}
@media (max-width: 480px) {
  .episode__labels { top: 8px; right: 8px; gap: 4px; }
  .episode__ai { width: 80px; }
  .episode__story { width: 80px; height: 15px; border-radius: 8px; font-size: 7.5px; line-height: 15px; gap: 4px; }
  .episode__story b { font-size: 10.5px; }
}
