:root {
  --void: #080806;
  --charcoal: #11100d;
  --ink: #f7f1df;
  --muted: #b7ad97;
  --line: rgba(247, 241, 223, 0.17);
  --signal: #a7ff4f;
  --copper: #ff9f5f;
  --cyan: #83dbc8;
  --red: #ff665c;

  --font-display: Georgia, "Times New Roman", Times, serif;
  --font-text: "Aptos", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --measure: 1100px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --gap: clamp(1.5rem, 4vw, 3.5rem);

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: color-mix(in srgb, var(--signal) 35%, transparent);
  color: var(--ink);
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.scene {
  width: 100%;
  padding-block: calc(var(--gutter) * 1.5);
  padding-inline: var(--gutter);
}

.scene + .scene {
  border-top: 1px solid var(--line);
}

.scene > * {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
}

.scene > * + * {
  margin-block-start: var(--gap);
}

.kicker {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6ch;
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 0.68rem + 0.25vw, 0.86rem);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.kicker time {
  color: var(--copper);
  letter-spacing: 0.12em;
}

.lede {
  margin: 0;
  max-width: 62ch;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: pretty;
}

.quote {
  margin: 0;
  max-width: 58ch;
  padding-inline-start: clamp(1rem, 3vw, 1.75rem);
  border-inline-start: 3px solid var(--copper);
  font-family: Georgia, var(--font-display);
  font-size: clamp(1.15rem, 0.98rem + 1vw, 1.6rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--ink);
}

.quote cite,
.quote footer {
  display: block;
  margin-block-start: 0.85em;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.status {
  --tint: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.5ch;
  padding: 0.25em 0.7em;
  border: 1px solid var(--tint);
  border-radius: 999px;
  background: color-mix(in srgb, var(--tint) 12%, transparent);
  color: var(--tint);
  font-family: var(--font-mono);
  font-size: clamp(0.66rem, 0.62rem + 0.2vw, 0.75rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: middle;
}

.status::before {
  content: "";
  inline-size: 0.5em;
  block-size: 0.5em;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.status.implemented {
  --tint: var(--cyan);
}

.status.tested {
  --tint: var(--signal);
}

.status.observed {
  --tint: var(--signal);
  color: var(--void);
  background: var(--signal);
}

.status.observed::before {
  background: var(--void);
}

.status.not-observed {
  --tint: var(--red);
}

.timeline {
  position: relative;
  inline-size: 100%;
  block-size: clamp(7.5rem, 18vw, 9.5rem);
  background:
    linear-gradient(var(--line), var(--line)) 0 50% / 100% 1px no-repeat,
    repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px 10%) 0 50% / 100% 0.55rem no-repeat;
}

.timeline::before,
.timeline::after {
  position: absolute;
  top: calc(50% + 0.9rem);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.timeline::before {
  content: "11:00";
  left: 0;
}

.timeline::after {
  content: "21:00";
  right: 0;
}

.commit {
  position: absolute;
  top: 50%;
  left: var(--at, 0%);
  inline-size: 0.7rem;
  block-size: 0.7rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--dot, var(--muted));
  border: 2px solid var(--void);
  box-shadow: 0 0 0 1px var(--line);
  z-index: 2;
}

.silence {
  position: absolute;
  top: 50%;
  left: 39.67%;
  width: 49.67%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 0.5rem;
  block-size: clamp(2.4rem, 6vw, 3.1rem);
  border: 1px solid var(--red);
  border-radius: 3px;
  background: repeating-linear-gradient(
    135deg,
    color-mix(in srgb, var(--red) 24%, transparent) 0 6px,
    transparent 6px 12px
  );
  font-family: var(--font-mono);
  font-size: clamp(0.58rem, 1.5vw, 0.72rem);
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
  color: var(--red);
  z-index: 1;
}

.loop {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: clamp(0.75rem, 3vw, 2rem);
  padding-block: 0.5rem;
}

.loop::before,
.loop::after {
  content: "";
  position: absolute;
  top: 0.7rem;
  left: 0.42rem;
  right: 0.42rem;
  height: 2px;
  border-radius: 2px;
}

.loop::before {
  background: var(--line);
}

.loop::after {
  right: auto;
  width: calc(100% - 0.84rem);
  background: linear-gradient(90deg, var(--copper), var(--cyan));
  transform: scaleX(1);
  transform-origin: left center;
  z-index: 1;
}

.loop .station {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-block-start: 2rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--muted);
}

.loop .station strong {
  color: var(--ink);
  font-weight: 600;
}

.loop .station::before {
  content: "";
  position: absolute;
  top: 0.3rem;
  left: 0;
  inline-size: 0.9rem;
  block-size: 0.9rem;
  border-radius: 50%;
  background: var(--charcoal);
  border: 2px solid var(--cyan);
  z-index: 2;
}

.loop .station:first-child::before {
  border-color: var(--copper);
}

.counter {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4ch;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.25rem, 8vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--signal);
}

.counter span {
  font-size: 0.28em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.problem {
  position: relative;
  max-width: 62ch;
  margin: 0;
  padding-inline-start: clamp(0.9rem, 3vw, 1.4rem);
  border-inline-start: 3px solid var(--red);
  background: linear-gradient(90deg, color-mix(in srgb, var(--red) 10%, transparent), transparent 70%);
  color: var(--ink);
}

.problem strong {
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 0.78em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .loop {
    grid-auto-flow: row;
    gap: 1rem;
  }

  .loop::before,
  .loop::after {
    top: 0.42rem;
    bottom: 0.42rem;
    left: 0.4rem;
    right: auto;
    width: 2px;
    height: auto;
  }

  .loop::after {
    top: auto;
    bottom: 0.42rem;
    width: 2px;
    height: calc(100% - 0.84rem);
    background: linear-gradient(180deg, var(--copper), var(--cyan));
    transform: scaleY(1);
    transform-origin: top center;
  }

  .loop .station {
    padding-block-start: 0;
    padding-inline-start: 1.9rem;
  }

  .loop .station::before {
    top: 0.15rem;
  }
}

@media (max-width: 400px) {
  :root {
    --gutter: 1.1rem;
  }

  .silence {
    left: 37%;
    width: 54%;
    font-size: 0.56rem;
  }

  .timeline::before,
  .timeline::after {
    font-size: 0.62rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(1.1rem);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes fade {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  @keyframes growX {
    from {
      transform: scaleX(0);
    }
    to {
      transform: scaleX(1);
    }
  }

  @keyframes growY {
    from {
      transform: scaleY(0);
    }
    to {
      transform: scaleY(1);
    }
  }

  @keyframes dotPop {
    0% {
      transform: scale(0.2);
      opacity: 0;
    }
    70% {
      transform: scale(1.15);
      opacity: 1;
    }
    100% {
      transform: scale(1);
      opacity: 1;
    }
  }

  @keyframes pulse {
    0%,
    100% {
      opacity: 0.55;
    }
    50% {
      opacity: 1;
    }
  }

  .scene > * {
    animation: rise 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .scene > *:nth-child(2) {
    animation-delay: 0.08s;
  }

  .scene > *:nth-child(3) {
    animation-delay: 0.16s;
  }

  .scene > *:nth-child(4) {
    animation-delay: 0.24s;
  }

  .quote {
    animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .silence {
    animation: fade 1.1s ease-out 0.2s both;
  }

  .commit {
    animation: dotPop 0.5s cubic-bezier(0.2, 0.8, 0.25, 1.2) both;
  }

  .commit:nth-child(2) {
    animation-delay: 0.12s;
  }

  .commit:nth-child(3) {
    animation-delay: 0.24s;
  }

  .commit:nth-child(4) {
    animation-delay: 0.36s;
  }

  .commit:nth-child(5) {
    animation-delay: 0.48s;
  }

  .commit:nth-child(6) {
    animation-delay: 0.6s;
  }

  .commit:nth-child(7) {
    animation-delay: 0.72s;
  }

  .commit:nth-child(8) {
    animation-delay: 0.84s;
  }

  .commit:nth-child(9) {
    animation-delay: 0.96s;
  }

  .loop::after {
    animation: growX 2.4s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
  }

  .loop .station::before {
    animation: dotPop 0.5s cubic-bezier(0.2, 0.8, 0.25, 1.2) both;
  }

  .loop .station:nth-child(2)::before {
    animation-delay: 0.35s;
  }

  .loop .station:nth-child(3)::before {
    animation-delay: 0.7s;
  }

  .loop .station:nth-child(4)::before {
    animation-delay: 1.05s;
  }

  .loop .station:nth-child(5)::before {
    animation-delay: 1.4s;
  }

  .counter {
    animation: pulse 2.6s ease-in-out infinite;
  }
}

@media (max-width: 640px) and (prefers-reduced-motion: no-preference) {
  .loop::after {
    animation-name: growY;
  }
}
