/* The home page, on top of zwip.css: big numbers, real runs, the challenge between friends,
   the store. The game's own font (Space Grotesk, its licence inside the files) is served
   by this site: nothing is fetched from anywhere else. */

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

.landing {
  --gold-hi: #fff4b8;
  --gold: #ffc83d;
  --gold-lo: #ff7a1a;
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(120% 55% at 50% -12%, rgba(255, 61, 203, 0.3), transparent 62%),
    radial-gradient(90% 45% at 100% 38%, rgba(46, 230, 255, 0.14), transparent 70%),
    radial-gradient(90% 45% at 0% 72%, rgba(255, 79, 168, 0.13), transparent 70%),
    linear-gradient(180deg, #170c3e, #07061a 72%);
  background-color: #07061a;
  overflow-x: hidden;
}

.landing main {
  max-width: 1080px;
  padding: 10px 16px calc(96px + env(safe-area-inset-bottom));
  gap: 0;
}

.landing #invalid,
.landing #duel {
  width: 100%;
  max-width: 440px;
  margin: 8px auto 20px;
}

/* the brand row */
.top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 16px;
}

.top img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 0 18px rgba(255, 61, 203, 0.45);
}

.top .logo {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

/* headline words: a white line, then the coloured punch */
.shout {
  margin: 0;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: -0.01em;
  font-size: clamp(36px, 11vw, 68px);
}

.shout span {
  display: block;
}

.glow-gold,
.glow-pink,
.glow-cyan {
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glow-gold {
  background-image: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 50%, var(--gold-lo) 100%);
  filter: drop-shadow(0 0 16px rgba(255, 170, 40, 0.55));
}

.glow-pink {
  background-image: linear-gradient(90deg, #ff7ad9, var(--magenta) 55%, #b45cff);
  filter: drop-shadow(0 0 16px rgba(255, 61, 203, 0.5));
}

.glow-cyan {
  background-image: linear-gradient(90deg, #9af7ff, var(--cyan) 50%, #5a8cff);
  filter: drop-shadow(0 0 16px rgba(46, 230, 255, 0.45));
}

.sub {
  margin: 14px auto 0;
  max-width: 26em;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.4;
  color: var(--text-dim);
}

/* the hero: the dare, the run that sets it, the way to take it */
.hero {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.hero .shout {
  font-size: clamp(24px, 7.2vw, 46px);
  line-height: 1.05;
}

.hero .score {
  margin-top: 2px;
  font-size: clamp(52px, 15.5vw, 118px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.clip {
  position: relative;
  aspect-ratio: 9 / 16;
  height: clamp(260px, 46svh, 600px);
  max-width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: #0b0a24 center / cover no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.04),
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 70px var(--clip-glow, rgba(255, 170, 40, 0.3));
}

.clip video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.stores a {
  display: block;
  line-height: 0;
  border-radius: 10px;
  transition: transform 0.15s ease;
}

.stores a:active {
  transform: scale(0.97);
}

.stores a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.stores img {
  height: clamp(56px, 16vw, 64px);
  width: auto;
}

/* the combo climbing */
.ladder {
  padding: 76px 0 0;
  text-align: center;
}

.steps {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(6px, 2.2vw, 22px);
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.steps li {
  transform-origin: 50% 100%;
}

.steps li:nth-child(1) { font-size: clamp(24px, 6.4vw, 56px); opacity: 0.7; }
.steps li:nth-child(2) { font-size: clamp(34px, 9vw, 80px); opacity: 0.85; }
.steps li:nth-child(3) { font-size: clamp(46px, 12.4vw, 108px); }
.steps li:nth-child(4) { font-size: clamp(62px, 16.8vw, 144px); }

.ladder.reveal .steps li {
  animation: step-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.ladder.reveal .steps li:nth-child(2) { animation-delay: 0.16s; }
.ladder.reveal .steps li:nth-child(3) { animation-delay: 0.32s; }
.ladder.reveal .steps li:nth-child(4) { animation-delay: 0.48s; }

@keyframes step-pop {
  from {
    transform: scale(0.3);
    opacity: 0;
  }
}

/* a feature: big words, one line, a real clip of the app */
.feature {
  display: grid;
  gap: 22px;
  justify-items: center;
  text-align: center;
  padding: 80px 0 0;
}

.feature .clip {
  height: clamp(300px, 66svh, 640px);
}

.feature.challenge .clip {
  --clip-glow: rgba(255, 61, 203, 0.34);
}

.feature.share .clip {
  --clip-glow: rgba(46, 230, 255, 0.3);
}

/* the daily: one board for the whole world, live */
.daily-block {
  display: grid;
  gap: 22px;
  justify-items: center;
  text-align: center;
  padding: 80px 0 0;
}

.landing #daily {
  width: 100%;
  max-width: 440px;
  padding: 26px 20px;
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 54px color-mix(in srgb, var(--accent) 24%, transparent);
}

.landing #daily .format {
  font-size: clamp(42px, 12.5vw, 64px);
  letter-spacing: 0.05em;
}

.landing #daily .countdown {
  font-size: clamp(17px, 4.9vw, 22px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* the last word */
.final {
  display: grid;
  gap: 24px;
  justify-items: center;
  text-align: center;
  padding: 88px 0 0;
}

.final .shout {
  font-size: clamp(40px, 12.5vw, 80px);
}

.footer {
  padding: 44px 0 8px;
  text-align: center;
  font-size: 13px;
}

.footer a {
  color: var(--text-dim);
}

.sticky {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  width: auto;
  max-width: 408px;
  margin: 0 auto;
  z-index: 10;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

/* wide screens: the words beside the clip */
@media (min-width: 860px) {
  .hero,
  .feature {
    grid-template-columns: 1fr auto;
    align-items: center;
    justify-items: start;
    text-align: left;
    column-gap: 64px;
  }

  .hero {
    grid-template-areas: "words clip" "stores clip";
  }

  .hero .words {
    grid-area: words;
    align-self: end;
  }

  .hero .clip {
    grid-area: clip;
    height: min(80vh, 640px);
  }

  .hero .stores {
    grid-area: stores;
    align-self: start;
    justify-content: flex-start;
  }

  .feature.share {
    grid-template-columns: auto 1fr;
  }

  .feature.share .clip {
    order: -1;
  }

  .feature .sub {
    margin-left: 0;
  }

  .stores img {
    height: 66px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ladder.reveal .steps li {
    animation: none;
  }
}
