@charset "UTF-8";
:root {
  --bg: #000000;
  --fg: #ffffff;
  --gap: var(--space-s-m);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "FraktionMono";
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  overflow-x: hidden;
}

@font-face {
  font-family: "FraktionMono";
  src: url(assets/fonts/PPFraktionMono-Regular.ttf) format("truetype");
  font-weight: 400;
}
@font-face {
  font-family: "FraktionMono";
  src: url(assets/fonts/PPFraktionMono-Bold.ttf) format("truetype");
  font-weight: 700;
}
/* Fluid Type Scale
==================================================== */
/* @link https://utopia.fyi/type/calculator?c=300,16,1.2,1500,20,1.333,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12 */
:root {
  /* Step -2: 11.1111px → 11.2556px */
  --fontsize--2: clamp(0.6944rem, 0.6922rem + 0.012vw, 0.7035rem);
  /* Step -1: 13.3333px → 15.0038px */
  --fontsize--1: clamp(0.8333rem, 0.8072rem + 0.1392vw, 0.9377rem);
  /* Step 0: 16px → 20px */
  --fontsize-0: clamp(1rem, 0.9375rem + 0.3333vw, 1.25rem);
  /* Step 1: 19.2px → 26.66px */
  --fontsize-1: clamp(1.2rem, 1.0834rem + 0.6217vw, 1.6663rem);
  /* Step 2: 23.04px → 35.5378px */
  --fontsize-2: clamp(1.44rem, 1.2447rem + 1.0415vw, 2.2211rem);
  /* Step 3: 27.648px → 47.3719px */
  --fontsize-3: clamp(1.728rem, 1.4198rem + 1.6437vw, 2.9607rem);
  /* Step 4: 33.1776px → 63.1467px */
  --fontsize-4: clamp(2.0736rem, 1.6053rem + 2.4974vw, 3.9467rem);
  /* Step 5: 39.8131px → 84.1745px */
  --fontsize-5: clamp(2.4883rem, 1.7952rem + 3.6968vw, 5.2609rem);
}

/* Spaces
==================================================== */
/* @link https://utopia.fyi/space/calculator?c=300,16,1.2,1500,20,1.25,6,2,&s=0.75|0.5,1.5|2|3|4|6,&g=s,l,xl,12 */
:root {
  /* Space 2xs: 8px → 10px */
  --space-2xs: clamp(0.5rem, 0.4688rem + 0.1667vw, 0.625rem);
  /* Space xs: 12px → 15px */
  --space-xs: clamp(0.75rem, 0.7031rem + 0.25vw, 0.9375rem);
  /* Space s: 16px → 20px */
  --space-s: clamp(1rem, 0.9375rem + 0.3333vw, 1.25rem);
  /* Space m: 24px → 30px */
  --space-m: clamp(1.5rem, 1.4063rem + 0.5vw, 1.875rem);
  /* Space l: 32px → 40px */
  --space-l: clamp(2rem, 1.875rem + 0.6667vw, 2.5rem);
  /* Space xl: 48px → 60px */
  --space-xl: clamp(3rem, 2.8125rem + 1vw, 3.75rem);
  /* Space 2xl: 64px → 80px */
  --space-2xl: clamp(4rem, 3.75rem + 1.3333vw, 5rem);
  /* Space 3xl: 96px → 120px */
  --space-3xl: clamp(6rem, 5.625rem + 2vw, 7.5rem);
  /* One-up pairs */
  /* Space 2xs-xs: 8px → 15px */
  --space-2xs-xs: clamp(0.5rem, 0.3906rem + 0.5833vw, 0.9375rem);
  /* Space xs-s: 12px → 20px */
  --space-xs-s: clamp(0.75rem, 0.625rem + 0.6667vw, 1.25rem);
  /* Space s-m: 16px → 30px */
  --space-s-m: clamp(1rem, 0.7813rem + 1.1667vw, 1.875rem);
  /* Space m-l: 24px → 40px */
  --space-m-l: clamp(1.5rem, 1.25rem + 1.3333vw, 2.5rem);
  /* Space l-xl: 32px → 60px */
  --space-l-xl: clamp(2rem, 1.5625rem + 2.3333vw, 3.75rem);
  /* Space xl-2xl: 48px → 80px */
  --space-xl-2xl: clamp(3rem, 2.5rem + 2.6667vw, 5rem);
  /* Space 2xl-3xl: 64px → 120px */
  --space-2xl-3xl: clamp(4rem, 3.125rem + 4.6667vw, 7.5rem);
}

/* Apply Text-Styles
==================================================== */
h1,
h2,
h3,
h4,
h5 {
  font-family: inherit;
  line-height: 1em;
  hyphens: auto;
}

h1 {
  font-size: var(--fontsize-5);
  margin-bottom: var(--space-l);
}

h2 {
  font-size: var(--fontsize-4);
  margin-bottom: var(--space-m);
}

h3 {
  font-size: var(--fontsize-3);
  margin-bottom: var(--space-s);
}

h4 {
  font-size: var(--fontsize-2);
  margin-bottom: var(--space-s);
}

h5 {
  font-size: var(--fontsize-1);
  margin-bottom: var(--space-xs);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xs) var(--space-xl-2xl);
  border: 2px solid var(--fg);
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font: inherit;
  font-size: var(--fontsize-0);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover:not(:disabled) {
    opacity: 0.85;
  }
}
.btn:active:not(:disabled) {
  transform: scale(0.96);
}
.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.name-form {
  width: 100%;
  max-width: 20rem;
}

.text-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--fg);
  color: inherit;
  font: inherit;
  font-size: var(--fontsize-1);
  text-align: center;
  padding: 0.6em 0;
}
.text-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
.text-input:focus {
  outline: none;
  border-bottom-width: 2px;
}

.app-header {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: var(--space-s) var(--space-m);
}

.page-title {
  margin: 0;
  color: inherit;
  text-decoration: none;
  text-align: center;
  font-size: var(--fontsize-2);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.icon-btn {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: inherit;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover {
    opacity: 0.7;
  }
}
.icon-btn:active {
  opacity: 0.5;
}
.icon-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body[data-screen=video] .app-header {
  display: none;
}

.text-link {
  color: inherit;
  font-size: var(--fontsize--1);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
@media (hover: hover) and (pointer: fine) {
  .text-link:hover {
    opacity: 0.7;
  }
}

main {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
}

.screen {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--gap);
  padding: 0 var(--gap);
  width: 100%;
  text-align: center;
  overflow: hidden;
}
.screen[hidden] {
  display: none;
}

.lead-text,
.text-block {
  max-width: 32rem;
  font-size: var(--fontsize-0);
  line-height: 1.6;
}

.text-block p + p {
  margin-top: 1.25em;
}

.action-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-m) 0 var(--space-l);
}

.screen-video {
  position: relative;
  padding: 0;
  gap: 0;
  background: #ffffff;
  color: #000000;
}

body.is-inverted .screen-video {
  background: #000000;
  color: #ffffff;
}

.stage {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.shape {
  flex-shrink: 0;
  aspect-ratio: 1/1;
  width: 4vw;
  border-radius: 50%;
  background: currentColor;
}

@keyframes grow-large {
  from {
    width: 4vw;
  }
  to {
    width: 180vmax;
  }
}
@keyframes shrink-large {
  from {
    width: 180vmax;
  }
  to {
    width: 0vw;
  }
}
@keyframes grow-tiny {
  from {
    width: 0vw;
  }
  to {
    width: 4vw;
  }
}
body[data-screen=video] .action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
}

body[data-screen=video] .btn {
  background: #000000;
  color: #ffffff;
  border-color: #ffffff;
}

body[data-screen=video].is-inverted .btn {
  background: #ffffff;
  color: #000000;
  border-color: #000000;
}

.score-label,
.stat-label {
  margin: 0;
  font-size: var(--fontsize--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.score-value {
  margin: 0;
  font-size: var(--fontsize-3);
  font-weight: 700;
}

.stats-summary {
  display: flex;
  gap: var(--space-l);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.stat-value {
  margin: 0;
  font-size: var(--fontsize-2);
  font-weight: 700;
}

.stat-label {
  font-size: var(--fontsize--2);
}

.score-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 20rem;
  font-size: var(--fontsize--1);
}
.score-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.5em 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
