:root {
  --brand: #e5261d;
  --background: #000;
  --foreground: #fff;
  --text: #e6e8eb;
  --muted: #abb1c7;
  --font:
    system-ui, -apple-system, 'Segoe UI', Roboto, 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

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

.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 6vw, 4.5rem);
  padding: 4rem 1.5rem 2rem;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(25rem, 100%);
}

.eyebrow {
  margin: 0 0 3.5rem;
  color: var(--foreground);
  font-size: 1.5rem;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  width: 100%;
}

.tagline {
  margin: 0.25rem 0 0;
  color: var(--foreground);
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.summary {
  margin: 1.5rem 0 0;
  max-width: 22rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* The collage is drawn in a 546-unit square; --u is one of those units */
.collage {
  --u: calc(100cqw / 546);
  position: relative;
  flex: none;
  width: min(34rem, 42vw, 68vh);
  max-width: 100%;
  aspect-ratio: 1;
  container-type: inline-size;
}

.rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.rings circle {
  fill: none;
  stroke: var(--brand);
  stroke-width: 5;
  stroke-dasharray: 177 360;
  stroke-dashoffset: -60;
  transform-box: fill-box;
  transform-origin: center;
}

.posters {
  position: absolute;
  top: calc(9.3 * var(--u));
  left: calc(56.8 * var(--u));
  width: calc(480 * var(--u));
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
}

.row {
  --r: 0;
  position: absolute;
  top: calc(-45.3 * var(--u));
  left: calc(4.2 * var(--u));
  display: flex;
  gap: calc(6 * var(--u));
}

.row:nth-child(2) {
  --r: 1;
  top: calc(146.7 * var(--u));
  left: calc(-75.8 * var(--u));
}

.row:nth-child(3) {
  --r: 2;
  top: calc(339.7 * var(--u));
}

.row img {
  --c: 0;
  flex: none;
  width: calc(150 * var(--u));
  height: calc(188 * var(--u));
  object-fit: cover;
  object-position: bottom;
}

.row:first-child img,
.row img.from-top {
  object-position: top;
}

.row img.centered {
  object-position: center;
}

.row img:nth-child(2) {
  --c: 1;
}

.row img:nth-child(3) {
  --c: 2;
}

.row img:nth-child(4) {
  --c: 3;
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.5rem 2rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.mediafan {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: var(--foreground);
}

.mediafan img {
  flex: none;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
}

.site-footer nav a {
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--foreground);
  text-decoration: underline;
}

.site-header {
  width: 100%;
  max-width: 45rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 0;
}

.document {
  flex: 1;
  width: 100%;
  max-width: 45rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

.document h1 {
  margin: 0;
  color: var(--foreground);
  font-size: 2rem;
  line-height: 1.2;
}

.document h2 {
  margin: 2.5rem 0 0;
  color: var(--foreground);
  font-size: 1.35rem;
  line-height: 1.3;
}

.document h3 {
  margin: 1.75rem 0 0;
  color: var(--foreground);
  font-size: 1rem;
}

.document strong {
  color: var(--foreground);
}

.document p,
.document li {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.document p {
  margin: 0.75rem 0 0;
}

.document ul {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

.document li + li {
  margin-top: 0.25rem;
}

.document a {
  color: var(--foreground);
  text-decoration-color: var(--brand);
  text-underline-offset: 3px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: scale(0.94) rotate(-6deg);
  }
}

@keyframes drift {
  50% {
    transform: translateY(-0.5rem);
  }
}

@keyframes draw {
  from {
    stroke-dasharray: 0 360;
  }
}

@keyframes swing {
  to {
    transform: rotate(10deg);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-text > * {
    animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .hero-text > :nth-child(2) {
    animation-delay: 0.12s;
  }

  .hero-text > :nth-child(3) {
    animation-delay: 0.24s;
  }

  .hero-text > :nth-child(4) {
    animation-delay: 0.36s;
  }

  .collage {
    animation: drift 8s ease-in-out 1.4s infinite;
  }

  .posters {
    animation: reveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
  }

  .row img {
    animation: pop 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(0.3s + var(--r) * 0.15s + var(--c) * 0.08s);
  }

  .rings circle {
    animation:
      draw 1.2s cubic-bezier(0.22, 1, 0.36, 1) both,
      swing 7s ease-in-out 1.2s infinite alternate;
  }

  .rings circle:nth-child(2) {
    animation-delay: 0.15s, 1.35s;
    animation-duration: 1.2s, 9s;
    animation-direction: normal, alternate-reverse;
  }

  .rings circle:nth-child(3) {
    animation-delay: 0.3s, 1.5s;
    animation-duration: 1.2s, 11s;
  }

  .hero ~ .site-footer {
    animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
  }
}

@media (max-width: 760px) {
  .hero {
    flex-direction: column;
    padding-top: 3rem;
  }

  .eyebrow {
    margin-bottom: 2rem;
    font-size: 1.2rem;
  }

  .hero h1 {
    width: 80%;
  }

  .collage {
    width: min(26rem, 90vw);
  }

  .mediafan {
    flex-direction: column;
    text-align: center;
  }
}

.document ol {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

.document ol li {
  padding-left: 0.25rem;
}

.panel {
  margin-top: 2rem;
  padding: 1.75rem 1.5rem;
  border-radius: 1rem;
  background: #14202e;
}

.panel-heading {
  margin: 0;
  color: var(--foreground);
  font-size: 1.25rem;
  line-height: 1.3;
}

.panel h3 {
  margin: 0;
  color: var(--foreground);
  font-size: 1.1rem;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.step[hidden] {
  display: none;
}

.step label {
  color: var(--foreground);
  font-size: 0.95rem;
  font-weight: 600;
}

.step input:not([type='checkbox']) {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #2b3a4c;
  border-radius: 0.75rem;
  background: var(--background);
  color: var(--foreground);
  font: inherit;
  font-size: 1rem;
}

.step input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.step input:disabled,
.step button:disabled {
  opacity: 0.6;
  cursor: default;
}

#code {
  max-width: 12rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.3em;
}

.panel .hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.check {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  color: var(--text);
  font-weight: 400;
}

.check input {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.2rem 0 0;
  accent-color: var(--brand);
}

.step button {
  align-self: flex-start;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: var(--foreground);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.step button:hover {
  background: #c91f17;
}

.step button:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 3px;
}

.step button.link {
  padding: 0;
  background: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.step button.link:hover {
  color: var(--foreground);
}

.panel .message {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: #1f2d3d;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
}

.panel .message.error {
  background: #3a1b1e;
  color: #ffd2cf;
}
