/*
 * The countdown on www.twogamesplus.com until the app opens. The app's own
 * colours (plugins/vuetify.ts) and its own Roboto, served from this site, so
 * the page loads nothing from anyone else.
 */
@font-face {
  font-family: 'Roboto Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/roboto-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #f4f7f9;
  --surface: #ffffff;
  --ink: #1c2a33;
  --muted: #5b6b75;
  --line: #d3dde4;
  --accent: #134b70;
  --road: #98acba;
  --phone: #0b141a;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0e1a22;
    --surface: #16242e;
    --ink: #f2f6f9;
    --muted: #c3d0d9;
    --line: #2a3c48;
    --accent: #6fb4dc;
    --road: #587281;
    --phone: #03080b;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    'Roboto Variable',
    Roboto,
    system-ui,
    -apple-system,
    'Segoe UI',
    Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
  padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
  padding-block: max(24px, env(safe-area-inset-top)) max(32px, env(safe-area-inset-bottom));
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.page {
  max-width: 1080px;
  margin-inline: auto;
  display: grid;
  gap: 36px;
  padding-block: clamp(8px, 4vw, 48px);
}

@media (min-width: 880px) {
  .page {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 64px;
    align-items: center;
  }
}

.main {
  display: grid;
  gap: 22px;
  justify-items: start;
  min-width: 0;
}

.brand {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.mark {
  display: block;
  width: clamp(88px, 14vw, 116px);
  height: auto;
}

/* The road runs from the first game to the second, once, as it does on the sign-in page. */
.road-path {
  animation: drive 1.6s ease-out 0.2s 1 both;
}

@keyframes drive {
  from {
    stroke-dashoffset: 120;
  }
  to {
    stroke-dashoffset: 0;
  }
}

/* The name as the app bar draws it: the words, the plus on its orange disc, the ™ glyph. */
.word {
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-size: clamp(34px, 5vw, 46px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.word .plus {
  flex: none;
  width: 0.9em;
  height: 0.9em;
  margin-inline-start: 0.08em;
}

.tagline {
  margin: 0;
  font-size: clamp(17px, 2vw, 19px);
  color: var(--muted);
}

.rise {
  animation: rise 0.5s cubic-bezier(0.05, 0.7, 0.1, 1) 0.7s 1 both;
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 8px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

.opens {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.2;
  font-weight: 700;
  text-wrap: balance;
}

.opens .time {
  display: block;
  color: var(--accent);
  font-weight: 500;
}

.zero-sub {
  margin: 0;
  color: var(--muted);
}

.page[data-moment='zero'] .when-before,
.page:not([data-moment='zero']) .when-zero {
  display: none;
}

.count {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 560px;
}

.unit {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 14px 4px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.num {
  font-size: clamp(32px, 7vw, 60px);
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.lab {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The road to launch, drawn as the logo draws a drive: the clock card, the dashes, the pin. */
.road {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  max-width: 560px;
  padding-top: 8px;
}

.stop {
  display: grid;
  flex: none;
  gap: 4px;
  justify-items: center;
}

.stop svg {
  display: block;
}

.stop-lab {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.track {
  position: relative;
  flex: 1;
  height: 30px;
}

.line {
  position: absolute;
  inset-inline: 0;
  top: 13px;
  height: 4px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--road) 0 13px, transparent 13px 20px);
}

.now {
  position: absolute;
  top: 15px;
  left: 0;
  translate: -50% -50%;
  transition: left 0.6s cubic-bezier(0.2, 0, 0, 1);
}

.now-dot {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}

.now-lab {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  translate: -50% 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.page[data-moment='zero'] .line {
  animation: roll 1.1s linear infinite;
}

@keyframes roll {
  to {
    background-position: 20px 0;
  }
}

.pitch {
  margin: 0;
  max-width: 56ch;
  font-size: 17px;
}

.free {
  margin: 0;
  font-weight: 700;
  color: var(--accent);
}

.follow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0;
  font-size: 15px;
}

.follow span {
  color: var(--muted);
}

/* The reel: its cover until tapped, then the video itself, with sound. */
.reel {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin: 0;
}

.phone {
  position: relative;
  width: min(260px, 72vw);
  padding: 9px;
  border-radius: 38px;
  background: var(--phone);
}

.phone video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  border-radius: 30px;
  background: #0e1a22;
}

.play {
  position: absolute;
  inset: 9px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  border: 0;
  border-radius: 30px;
  background: rgba(8, 17, 23, 0.3);
  color: #ffffff;
  font:
    500 14px/1 'Roboto Variable',
    Roboto,
    system-ui,
    sans-serif;
  cursor: pointer;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #134b70;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
  transition:
    background-color 0.15s ease,
    scale 0.15s ease;
}

.play-icon svg {
  width: 34px;
  height: 34px;
  margin-inline-start: 4px;
  fill: currentColor;
}

.play:hover .play-icon {
  background: #1b5c87;
  scale: 1.04;
}

.play-lab {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(8, 17, 23, 0.72);
}

.reel figcaption {
  max-width: 260px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.foot p {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .road-path,
  .rise,
  .page[data-moment='zero'] .line {
    animation: none;
  }

  .now,
  .play-icon {
    transition: none;
  }
}
