/* Navigation */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-nav);
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}

.nav.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(4, 7, 14, 0.74);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 100%;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.nav__links {
  display: none;
  gap: 28px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.nav__links a:hover {
  color: var(--text);
}

@media (min-width: 1024px) {
  .nav__links {
    display: flex;
  }
}

/* Hero */
.hero {
  --grid-x: 68%;
  --grid-y: 48%;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(100dvh, var(--screen-max));
  padding-top: calc(var(--nav-h) + 16px);
  padding-bottom: 40px;
  overflow: clip;
}

/* Soft light that follows the cursor over the hero (desktop with a mouse only). */
.hero__spot {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 560px;
  aspect-ratio: 1;
  margin: -280px 0 0 -280px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 152, 234, 0.2), transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease-out);
}

@media (pointer: fine) {
  .motion .hero:hover .hero__spot {
    opacity: 1;
  }
}

.nav-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 40px;
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-areas: "ring" "copy";
  gap: 20px;
}

.hero__copy {
  grid-area: copy;
  display: grid;
  gap: 16px;
  max-width: 680px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-hero);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero__lead {
  max-width: 46ch;
  color: var(--text-muted);
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 4px;
}

.hero__ring {
  grid-area: ring;
  position: relative;
  height: 180px;
}

.hero__ring::before {
  content: '';
  position: absolute;
  inset: -10%;
  background: radial-gradient(closest-side, var(--ton-soft), transparent);
  pointer-events: none;
}

.ring__item {
  --size: var(--ring-size, 96px);
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--size);
  aspect-ratio: 1;
  translate: -50% -50%;
  overflow: hidden;
  border-radius: 22%;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  will-change: transform, opacity;
}

.ring__item--static {
  --size: min(50%, 160px);
}

.ring__item img,
.ring__anim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ring__anim {
  opacity: 0;
  transition: opacity 0.4s;
}

.ring__item.is-animated .ring__anim {
  opacity: 1;
}

@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: 7fr 5fr;
    grid-template-areas: "copy ring";
    align-items: center;
    gap: 48px;
  }

  .hero__ring {
    height: min(560px, 70vh);
  }

  .ring__item--static {
    --size: 50%;
  }
}

/* Proof */
.proof__grid {
  display: grid;
  gap: 40px;
  margin-top: 48px;
}

.proof__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-big);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ton);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.proof__label {
  margin-top: 12px;
  color: var(--text-muted);
}

.proof__sub {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-muted);
}

.proof__list {
  display: grid;
  gap: 28px;
}

.proof__num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-num);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.proof__note {
  margin-top: 4px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.proof__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin-top: 48px;
}

.proof__date {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

@media (min-width: 1024px) {
  .proof__grid {
    grid-template-columns: 2fr 1fr;
    align-items: center;
  }
}

/* How it works: 3D sale scene */
.how {
  position: relative;
  padding-block: var(--section-y);
}

.how__inner {
  display: grid;
  grid-template-areas: "title" "stage" "steps" "replay";
  gap: 28px;
}

.how__title {
  grid-area: title;
}

.how__stage {
  grid-area: stage;
  position: relative;
  height: 62vh;
  min-height: 380px;
  max-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: radial-gradient(60% 55% at 72% 72%, var(--ton-soft), transparent 70%), var(--surface);
}

.how__canvas {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
}

.how.is-live .how__canvas {
  display: block;
}

.how.is-live .how__fallback {
  display: none;
}

.how__fallback {
  position: absolute;
  left: 8%;
  top: 9%;
  width: 46%;
  max-width: 300px;
}

.how__fallback img {
  width: 100%;
  height: auto;
  border-radius: 18%;
  rotate: -6deg;
  box-shadow: 0 30px 80px rgba(0, 152, 234, 0.25);
}

.how__tag-anchor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  display: none;
  pointer-events: none;
}

.how.is-live .how__tag-anchor {
  display: block;
}

.how__tag {
  translate: -50% calc(-100% - 12px);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--ton);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  white-space: nowrap;
  box-shadow: 0 12px 32px rgba(0, 152, 234, 0.35);
}

.how__balance {
  position: absolute;
  right: 5%;
  bottom: 6%;
  z-index: 2;
  display: grid;
  gap: 4px;
  min-width: 210px;
  padding: 18px 20px;
  border: 1px solid rgba(0, 152, 234, 0.45);
  border-radius: var(--radius-card);
  background: rgba(10, 17, 32, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.how__balance-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.how__balance-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 1.2rem + 1.5vw, 2.5rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.how__balance-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.how__payouts {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  color: var(--ton-bright);
}

.how__payouts .icon {
  width: 22px;
  height: 22px;
}

.how__steps {
  grid-area: steps;
  display: grid;
  gap: 18px;
}

.how__step {
  padding-left: 18px;
  border-left: 2px solid var(--line);
  transition: border-color 0.3s;
}

.how__step-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  transition: color 0.3s;
}

/* Inactive steps are dimmed by colour, not opacity, so every caption keeps at least 7.9:1 contrast. */
.how.is-live .how__step-title {
  color: var(--text-muted);
}

.how.is-live .how__step.is-active {
  border-left-color: var(--ton);
}

.how.is-live .how__step.is-active .how__step-title {
  color: var(--text);
}

.how__step-text {
  max-width: 42ch;
  margin-top: 6px;
  color: var(--text-muted);
}

.how__replay {
  grid-area: replay;
  justify-self: start;
}

@media (min-width: 1024px) {
  .how {
    display: flex;
    align-items: center;
    min-height: min(100vh, var(--screen-max));
    padding-block: calc(var(--nav-h) + 24px) 32px;
  }

  .how__inner {
    grid-template-columns: 5fr 7fr;
    grid-template-rows: auto auto 1fr;
    grid-template-areas: "title stage" "steps stage" "replay stage";
    align-items: start;
    column-gap: 48px;
    row-gap: 28px;
  }

  .how__stage {
    height: min(76vh, 680px);
    max-height: none;
  }
}

/* Payouts bento: exactly five cells */
.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 40px;
}

.bento__cell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 170px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-2);
}

.bento__cell .icon {
  width: 34px;
  height: 34px;
  color: var(--ton-bright);
}

.bento__title {
  position: relative;
  margin-top: auto;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.2;
}

.bento__note {
  position: relative;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.bento__cell--ton {
  min-height: 250px;
  background: radial-gradient(120% 90% at 100% 100%, rgba(0, 152, 234, 0.34), transparent 60%), var(--surface-2);
}

.bento__cell--ton .bento__title {
  font-size: 1.5rem;
}

.bento__cell--ton .bento__note {
  max-width: 55%;
}

.bento__title,
.bento__note {
  z-index: 1;
}

.bento__cell--lolz {
  background: linear-gradient(160deg, rgba(0, 152, 234, 0.16), transparent 55%), var(--surface-2);
}

.bento__gift {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 46%;
  max-width: 150px;
  height: auto;
  border-radius: 18%;
  rotate: -8deg;
}

@media (min-width: 360px) {
  .bento {
    grid-template-columns: 1fr 1fr;
  }

  .bento__cell--ton {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1023px) {
  .bento__cell:not(.bento__cell--ton) {
    min-height: 150px;
    padding: 16px;
  }

  .bento__cell:not(.bento__cell--ton) .bento__title {
    font-size: 1rem;
  }

  .bento__cell:not(.bento__cell--ton) .bento__note {
    font-size: 0.875rem;
  }
}

@media (min-width: 1024px) {
  .bento {
    grid-template-columns: 1.3fr 1fr 1fr;
    grid-template-rows: repeat(2, minmax(220px, auto));
    gap: 16px;
  }

  .bento__cell {
    padding: 28px;
  }

  .bento__cell--ton {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .bento__title {
    font-size: 1.375rem;
  }

  .bento__cell--ton .bento__title {
    font-size: 2rem;
  }

  .bento__gift {
    max-width: 240px;
  }
}

/* Reviews: the only marquee on the page */
.reviews__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
}

.marquee {
  display: grid;
  gap: 16px;
  margin-top: 40px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.marquee__row {
  display: flex;
  width: max-content;
  animation: marquee 70s linear infinite;
}

.marquee__row--reverse {
  animation-direction: reverse;
}

@media (max-width: 1023px) {
  .marquee__row {
    animation-duration: 100s;
  }
}

.marquee:hover .marquee__row,
.marquee:focus .marquee__row,
.marquee:focus-within .marquee__row {
  animation-play-state: paused;
}

.marquee__track {
  display: flex;
  gap: 16px;
  padding-right: 16px;
}

.review {
  flex: none;
  width: min(320px, 78vw);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-2);
}

.review__text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.review__note {
  margin-top: 12px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ton-bright);
}

@keyframes marquee {
  to {
    translate: -50% 0;
  }
}

/* Without motion the reviews stand still: a swipeable strip on phones, full rows from 640px.
   So do the static reviews from index.html until the script builds the marquee (and forever without JS). */
.reduced .marquee,
.marquee:not(.is-built) {
  grid-auto-flow: column;
  grid-auto-columns: min(300px, 82%);
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.reduced .marquee__row,
.reduced .marquee__track,
.marquee:not(.is-built) .marquee__row,
.marquee:not(.is-built) .marquee__track {
  display: contents;
}

.reduced .review,
.marquee:not(.is-built) .review {
  width: auto;
  scroll-snap-align: start;
}

@media (min-width: 640px) {
  .reduced .marquee,
  .marquee:not(.is-built) {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, 1fr);
    overflow: visible;
  }
}

@media (min-width: 1280px) {
  .reduced .marquee,
  .marquee:not(.is-built) {
    grid-template-columns: repeat(5, 1fr);
  }
}

.reduced .marquee__track[aria-hidden='true'],
.reduced .review[aria-hidden='true'] {
  display: none;
}

/* FAQ */
.faq__inner {
  display: grid;
  gap: 32px;
}

.faq__item {
  border-bottom: 1px solid var(--line);
}

.faq__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 64px;
  padding: 18px 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.3;
  text-align: left;
}

.faq__icon {
  position: relative;
  flex: none;
  width: 18px;
  height: 18px;
}

.faq__icon::before,
.faq__icon::after {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ton-bright);
  transition: rotate 0.3s var(--ease-out);
}

.faq__icon::after {
  rotate: 90deg;
}

.faq__button[aria-expanded='true'] .faq__icon::after {
  rotate: 0deg;
}

.faq__answer {
  max-width: 60ch;
  padding-bottom: 20px;
  color: var(--text-muted);
}

@media (min-width: 1024px) {
  .faq__inner {
    grid-template-columns: 5fr 7fr;
    align-items: start;
  }

  .faq__button {
    font-size: 1.1875rem;
  }
}

/* Final CTA: centered manifesto */
.final {
  --grid-y: 55%;
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(80vh, var(--screen-max) * 0.8);
  overflow: hidden;
  text-align: center;
}

.final::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle closest-side at 50% 55%, rgba(0, 152, 234, 0.2), transparent);
  pointer-events: none;
}

.final__gifts {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.final__gift {
  position: absolute;
  left: calc(50% + var(--dx));
  top: calc(50% + var(--dy));
  width: clamp(56px, 9vw, 120px);
  height: auto;
  border-radius: 22%;
  translate: -50% -50%;
  rotate: var(--r);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@media (max-width: 767px) {
  .final__gift {
    width: 52px;
    top: calc(50% + var(--dy) * 1.3);
  }

  .final__gift:nth-child(2),
  .final__gift:nth-child(5) {
    display: none;
  }
}

.final__inner {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 20px;
}

.final__title {
  max-width: 15ch;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-final);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.final__lead {
  color: var(--text-muted);
}

/* Footer */
.footer {
  padding-block: 48px;
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: grid;
  gap: 16px;
}

.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  color: var(--text-muted);
}

.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.footer__links a:hover {
  color: var(--text);
}

.footer__copy,
.footer__note,
.footer__legal {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer__legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline;
  text-decoration-color: rgba(154, 163, 174, 0.4);
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease-out);
}

.footer__legal a:hover {
  color: var(--text);
}

@media (min-width: 1024px) {
  .footer__inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }

  .footer__note {
    grid-column: 1 / 3;
  }

  .footer__legal {
    grid-column: 3;
    justify-self: end;
  }
}
