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

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  background: #050505;
  color-scheme: dark;
}

::selection {
  background: #ff3b1f;
  color: #fff;
}

body {
  margin: 0;
  background: #050505;
  color: #f4f4f5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.progress {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: #ff3b1f;
  transform: scaleX(0);
  transform-origin: left center;
}

.top {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
  padding:
    max(1rem, env(safe-area-inset-top))
    max(1.15rem, env(safe-area-inset-right))
    1rem
    max(1.15rem, env(safe-area-inset-left));
  color: #f4f4f5;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  mix-blend-mode: difference;
}

.top a,
.top span {
  min-width: 0;
}

.top a {
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}

.top span {
  flex: none;
}

.grain {
  position: fixed;
  z-index: 25;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  mix-blend-mode: overlay;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.7) 0.45px, transparent 0.5px),
    radial-gradient(rgba(255, 255, 255, 0.35) 0.45px, transparent 0.5px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
}

.page {
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100svh;
  padding:
    max(5.5rem, calc(env(safe-area-inset-top) + 4.5rem))
    max(1.15rem, 6vw)
    0;
  overflow: hidden;
  contain: layout paint;
}

#trace {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero .lang,
.hero h1,
.hero .lede,
.hero .place,
.marquee,
.stats {
  position: relative;
  z-index: 1;
}

.lang {
  margin: 0 0 0.8rem;
  color: #ff3b1f;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 100%;
  font-size: min(11rem, 11.4vw);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.84;
}

h1 span {
  display: block;
}

.lede {
  max-width: 38rem;
  margin-top: 1.4rem;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.place {
  margin-top: 0.7rem;
  color: #9a9aa0;
}

.marquee {
  margin-top: auto;
  margin-left: calc(-1 * max(1.15rem, 6vw));
  margin-right: calc(-1 * max(1.15rem, 6vw));
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  contain: strict;
  height: 2.7rem;
}

.marquee-track {
  display: flex;
  width: max-content;
  padding: 0.85rem 0;
  will-change: transform;
  color: #f4f4f5;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.marquee-track span {
  padding-right: 2rem;
  white-space: nowrap;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.stats li {
  padding: 1.4rem 1.25rem 1.5rem;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.stats li:last-child {
  border-right: 0;
}

.stats strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stats span {
  color: #9a9aa0;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sheet {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

section {
  padding-top: 4.5rem;
}

h2 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

h3 {
  margin-top: 2rem;
  color: #ff3b1f;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.when {
  display: block;
  margin-top: 0.55rem;
  color: #9a9aa0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

p + p,
h3 + p,
h2 + p,
.levels + p,
.videos + p {
  margin-top: 1rem;
}

h2 + p {
  margin-top: 1.25rem;
  font-size: 1.125rem;
}

a {
  color: inherit;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 0.18em;
}

a:hover {
  color: #ff3b1f;
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 2px solid #ff3b1f;
  outline-offset: 3px;
}

.levels,
.videos {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: item;
}

.levels li,
.videos li {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 0.35rem 1rem;
  margin-top: 0;
  padding: 0.95rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  counter-increment: item;
}

.levels li:last-child,
.videos li:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.levels li::before,
.videos li::before {
  content: counter(item, decimal-leading-zero);
  color: #ff3b1f;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.7;
}

.videos li::before {
  grid-row: 1 / span 2;
}

.videos li a,
.videos li span {
  grid-column: 2;
}

.videos li span {
  display: block;
  margin-top: 0.15rem;
  color: #9a9aa0;
}

footer {
  margin-top: 4.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.closer {
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.onpage {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin-top: 1.35rem;
  color: #9a9aa0;
}

.onpage + p,
footer p + p {
  margin-top: 1rem;
  color: #9a9aa0;
}

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  content-visibility: auto;
  contain-intrinsic-size: auto 32rem;
}

.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 900px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .stats li:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 0.14);
  }

  .stats li:nth-child(1),
  .stats li:nth-child(2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }
}

@media (max-width: 720px) {
  .top {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
  }

  .hero {
    padding-top: max(4.6rem, calc(env(safe-area-inset-top) + 3.6rem));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-left: max(1rem, env(safe-area-inset-left));
  }

  h1 {
    font-size: calc((100vw - 2.4rem) / 7.7);
    letter-spacing: -0.048em;
  }

  .lede {
    font-size: 1.05rem;
  }

  .marquee {
    height: 2.4rem;
    margin-left: calc(-1 * max(1rem, env(safe-area-inset-left)));
    margin-right: calc(-1 * max(1rem, env(safe-area-inset-right)));
  }

  .sheet {
    padding: 0 max(1rem, env(safe-area-inset-right)) 3.5rem max(1rem, env(safe-area-inset-left));
  }

  section {
    padding-top: 3.25rem;
  }

  .levels li,
  .videos li {
    grid-template-columns: 2.4rem 1fr;
    gap: 0.3rem 0.75rem;
  }
}

@media (max-width: 380px) {
  .stats {
    grid-template-columns: 1fr;
  }

  .stats li,
  .stats li:nth-child(odd),
  .stats li:nth-child(1),
  .stats li:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .stats li:last-child {
    border-bottom: 0;
  }
}

@media (min-width: 1400px) {
  .sheet {
    max-width: 50rem;
  }

  .lede {
    max-width: 42rem;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .hero {
    min-height: 100svh;
    padding-top: 3.4rem;
  }

  h1 {
    font-size: min(2.7rem, 11vh);
  }

  .lede {
    max-width: 36rem;
    margin-top: 0.55rem;
    font-size: 0.98rem;
  }

  .place {
    margin-top: 0.3rem;
  }

  .marquee {
    height: 2rem;
  }

  .marquee-track {
    padding: 0.45rem 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .marquee-track {
    animation: ticker 28s linear infinite;
  }

  .hero .lang,
  .hero h1,
  .hero .lede,
  .hero .place {
    animation: rise 1.05s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero h1 { animation-delay: 0.06s; }
  .hero .lede { animation-delay: 0.14s; }
  .hero .place { animation-delay: 0.2s; }
}

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

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
