:root {
  color-scheme: dark;
  font-family: Inter, system-ui, sans-serif;
  --cream: #ebe4de;
  --green: #073e29;
}

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

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--cream);
  background: #081c13;
}

.page {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  inline-size: 100%;
  min-block-size: 100vh;
  min-block-size: 100svh;
  padding: clamp(24px, 5.5vh, 56px) clamp(16px, 4vw, 56px) max(16px, env(safe-area-inset-bottom));
  overflow: hidden;
  text-align: center;
  background: radial-gradient(ellipse at 0 0, #665832, transparent 50%), var(--green);
}

.page > header,
.page > main,
.page > footer {
  min-inline-size: 0;
  max-inline-size: 100%;
}

.backdrop,
.page::after {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  pointer-events: none;
}

.backdrop {
  z-index: -2;
  object-fit: cover;
  object-position: center;
}

.page::after {
  z-index: -1;
  content: "";
  background: linear-gradient(
    180deg,
    rgb(4 17 12 / .3),
    rgb(3 16 11 / .22) 45%,
    rgb(3 13 9 / .87)
  );
}

.brand {
  display: block;
  inline-size: clamp(132px, 16vw, 196px);
  max-inline-size: 100%;
  block-size: auto;
  pointer-events: none;
}

main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  justify-items: center;
  inline-size: 100%;
  padding-block: clamp(34px, 8vh, 92px);
}

h1 {
  max-inline-size: 100%;
  margin: 0;
  font: 900 clamp(48px, 8.7vw, 128px) / .94 "Arial Black", system-ui, sans-serif;
  letter-spacing: -.068em;
  text-transform: uppercase;
  text-shadow: 0 4px 32px rgb(0 0 0 / .37);
}

h1 span {
  display: inline-block;
}

.launch-date {
  margin: clamp(24px, 5.4vh, 40px) 0 17px;
  color: #f0e6d9;
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .23em;
  text-transform: uppercase;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(5px, 2vw, 20px);
  inline-size: 100%;
  max-inline-size: 478px;
  margin: 0;
}

.countdown > div {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  min-inline-size: 0;
  gap: 9px;
}

.countdown dt {
  color: #e6decf;
  font-size: clamp(8px, 2.5vw, 11px);
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.countdown dd {
  margin: 0;
  font: 500 clamp(26px, 8.2vw, 57px) / 1.02 "Helvetica Neue", Inter, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

.score-value {
  display: flex;
  gap: .045em;
}

.score-digit {
  --digit-height: 1.13em;
  position: relative;
  display: block;
  inline-size: .666em;
  block-size: var(--digit-height);
  perspective: 2.5em;
}

.score-face {
  position: absolute;
  inset-inline: 0;
  block-size: 50%;
  overflow: hidden;
  background: #133025;
  backface-visibility: hidden;
}

.score-face span {
  position: absolute;
  inset-inline: 0;
  display: grid;
  place-items: center;
  block-size: var(--digit-height);
}

.score-top {
  inset-block-start: 0;
  border-radius: 3px 3px 0 0;
  box-shadow: inset 0 1px 0 rgb(235 228 222 / .11);
  transform-origin: center bottom;
}

.score-bottom {
  inset-block-end: 0;
  border-radius: 0 0 3px 3px;
  background: #172f24;
  transform-origin: center top;
}

.score-top span {
  inset-block-start: 0;
}

.score-bottom span {
  inset-block-end: 0;
}

.score-digit::after {
  position: absolute;
  z-index: 4;
  inset: 50% 0 auto;
  block-size: 1px;
  content: "";
  background: rgb(5 19 13 / .55);
  pointer-events: none;
}

.score-out {
  z-index: 3;
  animation: flap-out .23s ease-in both;
}

.score-in {
  z-index: 2;
  animation: flap-in .25s .23s ease-out both;
}

.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  row-gap: clamp(28px, 4.2vh, 42px);
  inline-size: 100%;
}

footer nav {
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 384px;
}

.social-window {
  inline-size: 100%;
  min-inline-size: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
}

.social-window::-webkit-scrollbar {
  display: none;
}

.social-track {
  display: flex;
  inline-size: max-content;
}

.social-list {
  display: flex;
  flex: none;
  padding: 0;
  margin: 0;
  list-style: none;
}

.social-list li {
  display: grid;
  place-items: center;
  flex: 0 0 56px;
  inline-size: 56px;
}

.social-list a {
  display: grid;
  place-items: center;
  inline-size: 46px;
  block-size: 46px;
  color: var(--cream);
  border-radius: 50%;
}

.social-list a:hover {
  background: rgb(235 228 222 / .12);
}

.social-list a:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: -3px;
}

.social-list svg {
  display: block;
  inline-size: 21px;
  block-size: 21px;
  fill: currentColor;
}

.social-copy {
  display: none;
}

.social-window:has(:focus-visible) {
  mask-image: none;
}

footer small {
  max-inline-size: 100%;
  color: #c6c3b7;
  font-size: .72rem;
}

@media (max-width: 660px) {
  .backdrop {
    object-position: 75% center;
  }

  h1 {
    font-size: clamp(43px, 13.5vw, 76px);
  }

  h1 span {
    display: block;
  }

  main {
    padding-block: 38px;
  }

  .countdown {
    max-inline-size: 370px;
    column-gap: clamp(6px, 2vw, 12px);
  }

  .countdown dt {
    letter-spacing: .1em;
  }
}

@media (max-height: 510px) and (orientation: landscape) {
  .page {
    padding-block-start: 16px;
  }

  .brand {
    inline-size: 116px;
  }

  main {
    padding-block: 22px;
  }

  h1 {
    font-size: clamp(40px, 6.6vw, 78px);
  }

  h1 span {
    display: inline-block;
  }

  .launch-date {
    margin-block-start: 16px;
  }

  .countdown dd {
    font-size: clamp(26px, 5.1vw, 44px);
  }

  footer {
    row-gap: 20px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .backdrop {
    animation: reveal-image 1.1s ease-out both;
  }

  .brand {
    animation: rise-in .62s .1s both;
  }

  h1 {
    animation: rise-in .65s .2s both;
  }

  .launch-date,
  .countdown {
    animation: rise-in .52s .38s both;
  }

  .social-window[data-loop]:not(:has(:focus-visible)) {
    overflow: hidden;
  }

  .social-window[data-loop]:not(:has(:focus-visible)) .social-copy {
    display: flex;
  }

  .social-window[data-loop]:not(:has(:focus-visible)) .social-track {
    animation: glide 38s linear infinite;
  }

  .social-window:active .social-track {
    animation-play-state: paused;
  }
}

@media (hover: hover) {
  .social-window:hover .social-track {
    animation-play-state: paused;
  }
}

@media (prefers-reduced-motion: reduce) {
  .score-out,
  .score-in {
    animation: none;
  }
}

@keyframes flap-out {
  to {
    transform: rotateX(-90deg);
    filter: brightness(.72);
  }
}

@keyframes flap-in {
  from {
    transform: rotateX(90deg);
    filter: brightness(.78);
  }
}

@keyframes glide {
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes reveal-image {
  from {
    transform: scale(1.025);
    filter: brightness(.65);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
}