.hero {
  position: relative;
  min-height: 100dvh;
  background: var(--orangish);
  color: var(--creamish);
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 24px) 0 64px;
}

.hero > .wrap {
  position: relative;
  z-index: 1;
}

/* Arcs echoing the logo mark, radiating out from the lower left */
.hero-arcs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hero-arcs > svg {
  position: absolute;
  left: 4%;
  top: 74%;
  width: 165vmax;
  height: 165vmax;
  overflow: visible;
  transform: translate(-50%, -50%);
}

.hero-arc {
  fill: none;
  stroke: var(--creamish);
  stroke-width: 2.8;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: hero-arc-echo 19s linear infinite;
}

/* Staggered so one arc is always mid-flight */
.hero-arcs > svg .hero-arc:nth-child(2) {
  animation-delay: -3.8s;
}

.hero-arcs > svg .hero-arc:nth-child(3) {
  animation-delay: -7.6s;
}

.hero-arcs > svg .hero-arc:nth-child(4) {
  animation-delay: -11.4s;
}

.hero-arcs > svg .hero-arc:nth-child(5) {
  animation-delay: -15.2s;
}

@keyframes hero-arc-echo {
  0% {
    opacity: 0;
    transform: scale(0.06) rotate(-42deg);
  }
  14% {
    opacity: 0.13;
  }
  74% {
    opacity: 0.068;
  }
  100% {
    opacity: 0;
    transform: scale(1.55) rotate(-22deg);
  }
}

/* One arc rippling out from a click or tap */
.hero-arc-ripple {
  position: absolute;
  width: 0;
  height: 0;
  overflow: visible;
}

.hero-arc-ripple svg {
  position: absolute;
  left: -32vmax;
  top: -32vmax;
  width: 64vmax;
  height: 64vmax;
  overflow: visible;
}

.hero-arc-ripple .hero-arc {
  animation: hero-arc-ripple 1900ms cubic-bezier(0.18, 0.72, 0.28, 1) forwards;
}

@keyframes hero-arc-ripple {
  0% {
    opacity: 0.39;
    transform: scale(0.04) rotate(-40deg);
  }
  100% {
    opacity: 0;
    transform: scale(1) rotate(-14deg);
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.9fr);
  gap: 64px;
  align-items: center;
}

.hero-wordmark {
  display: block;
  height: clamp(56px, 7.2vw, 76px);
  width: auto;
  max-width: none;
  margin-bottom: clamp(16px, 2.2vw, 24px);
}

/* Masthead rule: a change of rhythm between the wordmark and the headline */
.hero-rule {
  display: block;
  width: 56px;
  height: 2px;
  border-radius: 1px;
  background: rgba(42, 35, 32, 0.3);
  margin-bottom: clamp(18px, 2.6vw, 28px);
}

.hero h1 {
  color: var(--creamish);
  font-size: clamp(2.6rem, 6.4vw, 5.1rem);
  line-height: 1.05;
  letter-spacing: -0.028em;
  max-width: 13ch;
  margin-bottom: clamp(18px, 2.2vw, 26px);
}

.hero-sub {
  max-width: 34ch;
  font-size: 1.12rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--ink-warm);
  margin-bottom: 32px;
}

/* Hero entrance: the rest of the page reveals on scroll, so the hero reveals on load */
@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hero-rule-in {
  from {
    opacity: 0;
    transform: scaleX(0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-copy > *,
.hero-visual {
  animation: hero-rise 0.72s var(--ease) both;
}

.hero-wordmark {
  animation-delay: 60ms;
}

.hero-rule {
  transform-origin: left center;
  animation: hero-rule-in 0.56s var(--ease) 150ms both;
}

.hero h1 {
  animation-delay: 190ms;
}

.hero-sub {
  animation-delay: 290ms;
}

.hero-copy .store-row,
.hero-copy .waitlist-row {
  animation-delay: 380ms;
}

.hero-visual {
  animation-delay: 300ms;
}

.card-stage {
  position: relative;
  width: min(100%, 380px);
  margin-inline: auto;
  user-select: none;
  touch-action: none;
}

.card-stage.is-empty {
  min-height: 340px;
}

.stack-card {
  position: relative;
  width: 100%;
  will-change: transform, opacity;
}

.stack-card--front {
  position: relative;
  z-index: 3;
  transform: translate(0, 0) scale(1);
  opacity: 1;
}

.stack-card--next {
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  width: auto;
  height: calc(100% - 8px);
  z-index: 2;
  opacity: 0.42;
  pointer-events: none;
  transform: none;
}

.stack-card--third {
  position: absolute;
  top: 28px;
  left: 28px;
  right: 28px;
  width: auto;
  height: calc(100% - 12px);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transform: none;
}

.stack-card--third.is-in {
  top: 18px;
  left: 20px;
  right: 20px;
  height: calc(100% - 8px);
  opacity: 0.34;
  transition:
    top 0.32s cubic-bezier(0.22, 0.7, 0.3, 1),
    left 0.32s cubic-bezier(0.22, 0.7, 0.3, 1),
    right 0.32s cubic-bezier(0.22, 0.7, 0.3, 1),
    height 0.32s cubic-bezier(0.22, 0.7, 0.3, 1),
    opacity 0.32s ease;
}

.stack-card--next.is-rising {
  top: 0;
  left: 0;
  right: 0;
  width: auto;
  height: 100%;
  opacity: 1;
}

.card-stage.is-returning .stack-card--front,
.card-stage.is-returning .stack-card--next {
  transition:
    transform 0.28s cubic-bezier(0.22, 0.7, 0.3, 1),
    top 0.28s cubic-bezier(0.22, 0.7, 0.3, 1),
    left 0.28s cubic-bezier(0.22, 0.7, 0.3, 1),
    right 0.28s cubic-bezier(0.22, 0.7, 0.3, 1),
    height 0.28s cubic-bezier(0.22, 0.7, 0.3, 1),
    opacity 0.28s ease;
}

.card-stage.is-dragging .stack-card--front,
.card-stage.is-dragging .stack-card--next {
  transition: none;
}

.card-stage.is-committing .stack-card--next {
  transition:
    top 0.32s cubic-bezier(0.22, 0.7, 0.3, 1),
    left 0.32s cubic-bezier(0.22, 0.7, 0.3, 1),
    right 0.32s cubic-bezier(0.22, 0.7, 0.3, 1),
    height 0.32s cubic-bezier(0.22, 0.7, 0.3, 1),
    opacity 0.32s ease;
}

.card-stage.is-auto-swiping .stack-card--front {
  transition:
    transform 0.22s cubic-bezier(0.4, 0, 1, 1),
    opacity 0.18s ease;
}

.card-stage.is-auto-swiping .stack-card--next {
  transition:
    top 0.42s cubic-bezier(0.22, 0.7, 0.3, 1),
    left 0.42s cubic-bezier(0.22, 0.7, 0.3, 1),
    right 0.42s cubic-bezier(0.22, 0.7, 0.3, 1),
    height 0.42s cubic-bezier(0.22, 0.7, 0.3, 1),
    opacity 0.42s ease;
}

.stack-card .episode-card {
  width: 100%;
}

.stack-card--next .episode-card,
.stack-card--third .episode-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.stack-card--next .episode-cover,
.stack-card--third .episode-cover {
  aspect-ratio: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.episode-card {
  position: relative;
  background: var(--surface);
  color: var(--grayish);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(17, 19, 24, 0.08);
  overflow: hidden;
}

.episode-cover {
  position: relative;
  margin: 12px;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  height: auto;
  background: var(--onboarding);
}

.episode-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.category-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--orangish);
  color: var(--surface);
  border-radius: 12px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.play-disc {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--orangish);
  display: grid;
  place-items: center;
}

.play-disc svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.duration-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(62, 57, 53, 0.5);
  color: var(--surface);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 500;
}

.duration-badge svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.episode-body {
  padding: 4px 16px 18px;
}

.episode-title {
  font-family: var(--episode);
  font-weight: 700;
  font-size: 1.28rem;
  line-height: 1.2;
  color: var(--grayish);
}

.episode-sub {
  margin-top: 6px;
  font-size: 0.88rem;
  color: rgba(62, 57, 53, 0.6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.progress-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-track {
  flex: 1;
  height: 4px;
  border-radius: 3px;
  background: rgba(224, 224, 224, 0.9);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--orangish);
  border-radius: 3px;
}

.progress-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--orangish);
  min-width: 2.2em;
}

.hero-stack .stack-card--front .episode-card {
  cursor: grab;
}

.hero-stack .stack-card--front .episode-card.is-dragging {
  cursor: grabbing;
}

.hero-stack .stack-card--next .episode-card,
.category-stage .stack-card--next .episode-card {
  box-shadow: 0 8px 28px rgba(17, 19, 24, 0.12);
}

.section {
  padding: 108px 0;
}

.section-worldview {
  background: var(--creamish);
  color: var(--grayish);
}

.worldview-visual {
  max-width: 920px;
}

.worldview-boxes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 56px;
}

.worldview-box {
  background: var(--grayish);
  color: var(--creamish);
  border-radius: 20px;
  padding: 28px 26px 30px;
  font-family: var(--wordmark);
  font-weight: 700;
  font-size: 1.08rem;
  text-align: justify;
}

.worldview-box--accent {
  background: var(--orangish);
  color: var(--grayish);
}

.worldview-box em {
  font-style: italic;
}

.section h2 {
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  max-width: 16ch;
  margin-bottom: 22px;
}

.worldview-head h2 {
  max-width: none;
  margin-bottom: 44px;
  text-align: center;
}

.category-scene {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 280px) minmax(0, 1fr);
  grid-template-areas: "left card right";
  column-gap: 28px;
  align-items: stretch;
  width: 100%;
}

.category-stage {
  grid-area: card;
  width: 100%;
  margin-inline: 0;
  touch-action: auto;
}

/* Pills sit one per row, rows evenly spaced down the card's height,
   staggered horizontally so the columns read as loose drifts. */
.pill-field--right .category-pill:nth-child(6n + 1) { margin-left: 8%; }
.pill-field--right .category-pill:nth-child(6n + 2) { margin-left: 30%; }
.pill-field--right .category-pill:nth-child(6n + 3) { margin-left: 14%; }
.pill-field--right .category-pill:nth-child(6n + 4) { margin-left: 36%; }
.pill-field--right .category-pill:nth-child(6n + 5) { margin-left: 2%; }
.pill-field--right .category-pill:nth-child(6n) { margin-left: 24%; }

.pill-field--left .category-pill:nth-child(6n + 1) { margin-right: 22%; }
.pill-field--left .category-pill:nth-child(6n + 2) { margin-right: 4%; }
.pill-field--left .category-pill:nth-child(6n + 3) { margin-right: 32%; }
.pill-field--left .category-pill:nth-child(6n + 4) { margin-right: 12%; }
.pill-field--left .category-pill:nth-child(6n + 5) { margin-right: 28%; }
.pill-field--left .category-pill:nth-child(6n) { margin-right: 0; }

.category-stage .stack-card--next {
  opacity: 0.36;
}

.category-stage .episode-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.6em;
}

.category-stage .episode-sub {
  min-height: 2.9em;
}

.pill-field {
  display: grid;
  grid-template-rows: repeat(var(--pill-rows, 6), minmax(0, 1fr));
  align-items: center;
  pointer-events: none;
}

.pill-field--left {
  grid-area: left;
  justify-items: end;
}

.pill-field--right {
  grid-area: right;
  justify-items: start;
}

.pill-field .category-pill {
  position: relative;
  inset: auto;
  z-index: 6;
  box-shadow: 0 6px 16px rgba(17, 19, 24, 0.14);
  transition:
    transform 0.46s cubic-bezier(0.22, 0.7, 0.3, 1),
    opacity 0.3s ease;
}

.pill-field .category-pill.is-leaving {
  opacity: 0;
  transition: opacity 0.24s ease;
}

@media (max-width: 900px) {
  .category-scene {
    grid-template-columns: minmax(0, 280px);
    grid-template-areas: "card";
    justify-content: center;
  }

  .pill-field {
    display: none;
  }
}

.section-pricing {
  background: var(--grayish);
  color: var(--creamish);
}

.section-pricing h2 {
  max-width: none;
  color: var(--creamish);
}

.pricing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 56px;
  align-items: start;
  margin-top: 48px;
}

.plan-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.plan {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  row-gap: 0;
  align-content: start;
  background: rgba(240, 238, 225, 0.06);
  border-radius: 20px;
  padding: 28px 26px 30px;
}

.plan h3 {
  font-family: var(--wordmark);
  font-weight: 500;
  font-size: 1.7rem;
  color: var(--creamish);
  letter-spacing: -0.03em;
}

.plan h3 em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--orangish);
  font-weight: 700;
}

.plan-price {
  margin: 10px 0 22px;
  font-size: 1.02rem;
  color: rgba(240, 238, 225, 0.72);
}

.plan-price strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--creamish);
  font-weight: 700;
  margin-bottom: 4px;
}

.plan ul {
  list-style: none;
  display: grid;
  align-content: start;
  gap: 12px;
}

.plan li {
  position: relative;
  padding-left: 20px;
  font-size: 0.98rem;
}

.plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orangish);
}

.plan li.plan-includes {
  padding-left: 0;
}

.plan li.plan-includes::before {
  content: none;
}

.plan li span {
  color: var(--orangish);
}

.count-panel {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 8px;
}

.count-kicker {
  font-size: 1.05rem;
  max-width: 18ch;
}

.count-number {
  font-family: var(--serif);
  font-size: clamp(5rem, 12vw, 8.5rem);
  line-height: 0.86;
  letter-spacing: -0.04em;
  color: var(--orangish);
  margin: 10px 0 8px;
}

.count-caption {
  font-size: 1.05rem;
  color: rgba(240, 238, 225, 0.72);
}

.section-cta {
  background: var(--creamish);
  padding: 120px 0;
}

.cta-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  grid-template-areas:
    "tagline figure"
    "action figure";
  column-gap: 64px;
  row-gap: 40px;
  align-items: center;
}

.cta-tagline {
  grid-area: tagline;
  align-self: end;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  line-height: 1.05;
  max-width: 10ch;
}

.cta-kicker {
  display: block;
  font-size: 0.36em;
  font-weight: 400;
  color: var(--mute);
  margin-bottom: 0.5em;
}

.cta-tagline em {
  font-style: italic;
  color: var(--orangish);
}

.cta-action {
  grid-area: action;
  align-self: start;
}

.cta-heading {
  font-family: var(--sans);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.compound-figure {
  grid-area: figure;
  position: relative;
  overflow: hidden;
  background: var(--grayish);
  color: var(--creamish);
  border-radius: 28px;
  padding: clamp(28px, 4vw, 48px);
  box-shadow: 0 24px 56px -24px rgba(17, 19, 24, 0.45);
}

/* Echoes the arcs in the logo */
.compound-figure::before {
  content: "";
  position: absolute;
  top: -150px;
  right: -150px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    transparent 0 90px,
    rgba(233, 137, 80, 0.1) 90px 97px,
    transparent 97px 115px,
    rgba(233, 137, 80, 0.16) 115px 127px,
    transparent 127px 145px,
    rgba(233, 137, 80, 0.22) 145px 162px,
    transparent 162px
  );
  pointer-events: none;
}

.compound-eq {
  position: relative;
  font-family: var(--sans);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

#eq-exp .digit,
#eq-result .digit,
#eq-day .digit {
  display: inline-block;
  width: 0.62em;
  text-align: center;
}

.compound-eq .eq-base {
  display: block;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  color: rgba(240, 238, 225, 0.72);
  margin-bottom: 8px;
}

.compound-eq .pow {
  font-size: 0.55em;
  vertical-align: super;
}

.compound-eq .result {
  display: block;
  font-size: clamp(4.2rem, 11vw, 7.5rem);
  color: var(--orangish);
}

.compound-eq .times {
  font-size: 0.5em;
  margin-left: 4px;
  opacity: 0.8;
}

.compound-track {
  position: relative;
  height: 6px;
  margin-top: 32px;
  border-radius: 3px;
  background: rgba(240, 238, 225, 0.14);
  overflow: hidden;
}

.compound-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: var(--orangish);
}

.compound-day {
  position: relative;
  margin-top: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(240, 238, 225, 0.62);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .hero-grid,
  .pricing-grid,
  .cta-row {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-copy {
    order: 0;
  }

  .hero h1 {
    max-width: none;
  }

  .hero-visual {
    order: 1;
  }

  .worldview-boxes {
    grid-template-columns: 1fr;
    margin-top: 40px;
  }

  .cta-row {
    grid-template-areas:
      "tagline"
      "figure"
      "action";
    align-items: start;
  }
}

@media (max-width: 640px) {
  .plan-table {
    grid-template-columns: 1fr;
  }

  .plan-spacer {
    display: none;
  }

  .section {
    padding: 84px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy > *,
  .hero-visual,
  .hero-rule {
    animation: none;
  }

  .hero-arc {
    animation: none;
    opacity: 0.091;
    transform: scale(1);
  }
}
