/* Homepage: the how-it-works video is the centre of the page. Tokens live in styles.css. */
.hv-page {
  background:
    radial-gradient(1100px 620px at 18% -8%, #f43b911c, transparent 60%),
    radial-gradient(1000px 700px at 92% 38%, #865dff1f, transparent 62%),
    var(--night);
}

.header nav .credits-nav {
  margin: -8px 0;
  padding: 8px 13px;
  border: 1px solid #f43b9170;
  border-radius: 999px;
  background: #f43b9118;
  color: var(--ink);
  font-weight: 780;
}

.hv-hero {
  text-align: center;
  padding: 40px 0 36px;
}

.hv-hero h1 {
  margin: 14px auto 12px;
  max-width: 980px;
  font-size: clamp(34px, 4.8vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hv-hero h1 span {
  background: linear-gradient(100deg, var(--coral), var(--pink) 45%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hv-lede {
  max-width: 640px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.hv-player {
  margin: 28px auto 0;
  max-width: min(1120px, calc((100svh - 110px) * 16 / 9));
}

.hv-frame {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid #34344a;
  background: #0b0b12;
  aspect-ratio: 16 / 9;
  box-shadow:
    0 50px 140px #00000099,
    0 0 0 1px #ffffff08,
    0 0 120px #865dff26;
}

.hv-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.hv-sound {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 16px 0 12px;
  border: 1px solid #ffffff2e;
  border-radius: 999px;
  background: #0d0d16cc;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.hv-sound:hover {
  transform: translateY(-1px);
  border-color: #f43b91a8;
  background: #1a1022e6;
}

.hv-sound:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.hv-sound svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.hv-sound .i-on,
.hv-sound.is-on .i-off {
  display: none;
}

.hv-sound.is-on .i-on {
  display: block;
}

.hv-sound:not(.is-on) {
  animation: hv-pulse 2.4s ease-in-out 1.5s 3;
}

@keyframes hv-pulse {
  0%, 100% { box-shadow: 0 0 0 0 #f43b9100; }
  50% { box-shadow: 0 0 0 8px #f43b9133; }
}

.hv-player figcaption {
  margin-top: 14px;
  color: #8d8ca0;
  font-size: 13px;
}

.hv-player figcaption a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: #ffffff40;
  text-underline-offset: 3px;
}

.hv-hero .hero-actions {
  margin-top: 30px;
}

.hv-req {
  max-width: 620px;
  margin: 16px auto 0;
  color: #7f7e92;
  font-size: 13px;
  line-height: 1.55;
}

.hv-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 56px 0 24px;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

.hv-points article {
  padding: 26px 26px 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, #15151f, #0d0d14);
}

.hv-points span {
  color: var(--pink);
  font: 700 12px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.hv-points h2 {
  margin: 18px 0 8px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.hv-points p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 15px;
}

.hv-points .hv-more {
  grid-column: 1 / -1;
  text-align: center;
  padding-top: 8px;
  font-size: 14px;
}

.hv-points .hv-more a {
  color: var(--cyan);
}

.hv-next {
  padding: 64px 0 80px;
}

.hv-next h2 {
  margin: 0 0 26px;
  text-align: center;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.hv-next h2 span {
  color: var(--muted);
}

.hv-next-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.hv-next-grid a {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #101018;
  transition: border-color 160ms ease, transform 160ms ease;
}

.hv-next-grid a:hover {
  border-color: #f43b9180;
  transform: translateY(-2px);
}

.hv-next-grid strong {
  font-size: 17px;
}

.hv-next-grid em {
  flex: 1;
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
  line-height: 1.55;
}

.hv-next-grid span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.hv-page .footer {
  grid-template-columns: auto 1fr;
}

.hv-page .footer-links {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 20px;
}

@media (max-width: 900px) {
  .hv-page .footer {
    grid-template-columns: 1fr;
  }
  .hv-page .footer-links {
    justify-content: flex-start;
  }
  .hv-points,
  .hv-next-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .hv-hero {
    padding-top: 40px;
  }
  .hv-player {
    margin-top: 28px;
  }
  .hv-frame {
    border-radius: 14px;
  }
  .hv-sound {
    left: 10px;
    bottom: 10px;
    min-height: 36px;
    font-size: 12px;
  }
  .hv-hero .hero-actions {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hv-sound:not(.is-on) {
    animation: none;
  }
}
