:root {
  --sheet-height: max(100vw, 100vh);
  --sheet-offset: calc(var(--sheet-height) * 0.14);
}

html {
  overflow-x: hidden;
}

body {
  width: 100%;
  margin: 0;
  font-family: Arial, sans-serif;
}

.hero {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 0;
}

/* Scroll colour sweep: stacked curtain-shaped sheets, one per colour step,
   each offset further down the page. Scrolling reveals them in turn. */
.spectrum {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 100vh;
  height: calc((var(--steps) - 1) * var(--sheet-offset) + var(--sheet-height));
}

.sheet {
  position: absolute;
  top: calc(var(--i) * var(--sheet-offset));
  left: 0;
  display: block;
  box-sizing: content-box;
  width: 100%;
  height: var(--sheet-height);
  fill: var(--c);
  border-bottom: 100vh solid var(--c);
}

html[data-theme="light"] .sheet {
  fill: var(--c-rev);
  border-bottom-color: var(--c-rev);
}

.outro {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20vh 24px;
  box-sizing: border-box;
  text-align: center;
  background: #fff;
  color: #111;
}

.outro * {
  color: inherit;
}

.outro p {
  margin: 0 0 1.4em;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  line-height: 1.8;
  text-transform: uppercase;
}

.outro p.outro-brand {
  font-size: 2rem;
  margin-bottom: 2em;
}

.outro p.outro-note {
  margin-top: 4em;
  margin-bottom: 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: none;
  opacity: 0.6;
}

html[data-theme="light"] .outro {
  background: #000;
  color: #eee;
}

.typing-container {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
  font-size: 4rem;
  font-weight: bold;
}

.letter {
  opacity: 0;
  transform: translateX(100%);
  animation: type-in 1.5s ease forwards;
}

@keyframes type-in {
  0% {
    opacity: 0;
    transform: translateX(100%);
  }

  100% {
    opacity: 1;
    transform: translateX(0%);
  }
}

#tagline {
  opacity: 0;
}

.mode-hint {
  position: fixed;
  right: 20px;
  bottom: 16px;
  margin: 0;
  padding: 6px 12px;
  min-height: 24px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-align: right;
  z-index: 3;
}

.mode-hint:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

@media (max-width: 768px) {
  .typing-container {
    font-size: 3rem;
  }

  .mode-hint {
    right: 12px;
    bottom: 12px;
    font-size: 0.75rem;
  }

  .outro p {
    font-size: 0.95rem;
  }

  .outro p.outro-brand {
    font-size: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .letter {
    opacity: 1;
    transform: none;
    animation: none;
  }

  #tagline {
    opacity: 1;
    transition: none;
  }
}
