:root {
  --page: #f5f5ef;
  --from: #fff7ad;
  --to: #ffa9f9;
  --btn: #9f1239;
  --btn-border: #1e3a8a;
  --ink: #000000;
  --beam-pink: rgb(244 114 182);
  --beam-purple: rgb(192 132 252);
  --beam-yellow: rgb(255 210 77);
  --beam-blue: rgb(155 214 250);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: "Oxanium", "Segoe UI", sans-serif;
}

body.home {
  overflow: hidden;
  background: #fff;
}

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #fff;
}

.layer {
  position: absolute;
  inset: 0;
}

/* A slower, sheerer set of streaks crossing the main field. */
.layer-front {
  z-index: 1;
}

.layer-back .rainbow {
  /* Shorter than the front layer. --len is 70–112. */
  height: calc(54vh + (var(--len) - 70) * 1.7vh);
}

.layer-front .rainbow {
  --wave: 145s;
  width: 11vw;
  /* Longer than every back streak. */
  height: calc(168vh + (var(--len) - 70) * 2.2vh);
  transform: rotate(16deg);
  filter: blur(20px);
  opacity: calc(0.2 + mod(var(--i) * 5, 7) * 0.04);
}

.h,
.v {
  z-index: 2;
}

.rainbow {
  --wave: 60s;
  width: 13vw;
  /* Layers override this. Kept so a streak outside a layer still has a length. */
  height: calc(72vh + (var(--len) - 70) * 3.9vh);
  top: -28vh;
  position: absolute;
  transform: rotate(9deg);
  transform-origin: center center;
  --mix: 60%;
  --veil: 28%;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--c1) var(--mix), white) 0%,
    color-mix(in srgb, var(--c1) var(--mix), white) 22%,
    color-mix(in srgb, var(--c1) var(--veil), transparent) 48%,
    transparent 100%
  );
  filter: blur(16px);
  /* Neighboring streaks differ by a few percent. The field stays at the solid theme weight. */
  opacity: calc(0.72 + mod(var(--i) * 3, 5) * 0.04);
  animation-name: slide;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  /* Slowest streak in a layer takes a little over twice as long as the fastest. */
  animation-duration: calc(var(--wave) * (0.55 + mod(var(--i) * 5, 9) * 0.08));
  animation-delay: calc(var(--wave) * var(--i) / -25);
}

/* Yellow streaks only: a little more white, and a little less opacity. */
.rainbow:nth-child(16) {
  --mix: 54%;
  --veil: 22%;
  opacity: calc(0.7 + mod(var(--i) * 3, 5) * 0.03);
}

.rainbow:nth-child(1) {
  --len: 108;
  --shift: 0;
  --i: 1;
  --c1: var(--beam-pink);
  --c2: var(--beam-purple);
  --c3: var(--beam-yellow);
}
.rainbow:nth-child(2) {
  --len: 78;
  --shift: 1;
  --i: 2;
  --c1: var(--beam-pink);
  --c2: var(--beam-yellow);
  --c3: var(--beam-purple);
}
.rainbow:nth-child(3) {
  --len: 96;
  --shift: 0;
  --i: 3;
  --c1: var(--beam-purple);
  --c2: var(--beam-pink);
  --c3: var(--beam-purple);
}
.rainbow:nth-child(4) {
  --len: 86;
  --shift: 2;
  --i: 4;
  --c1: var(--beam-pink);
  --c2: var(--beam-purple);
  --c3: var(--beam-pink);
}
.rainbow:nth-child(5) {
  --len: 72;
  --shift: 1;
  --i: 5;
  --c1: var(--beam-purple);
  --c2: var(--beam-yellow);
  --c3: var(--beam-pink);
}
.rainbow:nth-child(6) {
  --len: 112;
  --shift: 0;
  --i: 6;
  --c1: var(--beam-blue);
  --c2: var(--beam-pink);
  --c3: var(--beam-yellow);
}
.rainbow:nth-child(7) {
  --len: 80;
  --shift: 2;
  --i: 7;
  --c1: var(--beam-pink);
  --c2: var(--beam-purple);
  --c3: var(--beam-yellow);
}
.rainbow:nth-child(8) {
  --len: 100;
  --shift: 0;
  --i: 8;
  --c1: var(--beam-pink);
  --c2: var(--beam-yellow);
  --c3: var(--beam-purple);
}
.rainbow:nth-child(9) {
  --len: 84;
  --shift: 1;
  --i: 9;
  --c1: var(--beam-purple);
  --c2: var(--beam-pink);
  --c3: var(--beam-purple);
}
.rainbow:nth-child(10) {
  --len: 74;
  --shift: 3;
  --i: 10;
  --c1: var(--beam-pink);
  --c2: var(--beam-purple);
  --c3: var(--beam-pink);
}
.rainbow:nth-child(11) {
  --len: 104;
  --shift: 0;
  --i: 11;
  --c1: var(--beam-purple);
  --c2: var(--beam-yellow);
  --c3: var(--beam-pink);
}
.rainbow:nth-child(12) {
  --len: 90;
  --shift: 1;
  --i: 12;
  --c1: var(--beam-purple);
  --c2: var(--beam-pink);
  --c3: var(--beam-yellow);
}
.rainbow:nth-child(13) {
  --len: 76;
  --shift: 2;
  --i: 13;
  --c1: var(--beam-pink);
  --c2: var(--beam-purple);
  --c3: var(--beam-yellow);
}
.rainbow:nth-child(14) {
  --len: 98;
  --shift: 0;
  --i: 14;
  --c1: var(--beam-pink);
  --c2: var(--beam-yellow);
  --c3: var(--beam-purple);
}
.rainbow:nth-child(15) {
  --len: 82;
  --shift: 1;
  --i: 15;
  --c1: var(--beam-purple);
  --c2: var(--beam-pink);
  --c3: var(--beam-purple);
}
.rainbow:nth-child(16) {
  --len: 94;
  --shift: 0;
  --i: 16;
  --c1: var(--beam-yellow);
  --c2: var(--beam-purple);
  --c3: var(--beam-pink);
}
.rainbow:nth-child(17) {
  --len: 70;
  --shift: 3;
  --i: 17;
  --c1: var(--beam-purple);
  --c2: var(--beam-yellow);
  --c3: var(--beam-pink);
}
.rainbow:nth-child(18) {
  --len: 110;
  --shift: 0;
  --i: 18;
  --c1: var(--beam-blue);
  --c2: var(--beam-pink);
  --c3: var(--beam-yellow);
}
.rainbow:nth-child(19) {
  --len: 88;
  --shift: 2;
  --i: 19;
  --c1: var(--beam-pink);
  --c2: var(--beam-purple);
  --c3: var(--beam-yellow);
}
.rainbow:nth-child(20) {
  --len: 92;
  --shift: 1;
  --i: 20;
  --c1: var(--beam-pink);
  --c2: var(--beam-yellow);
  --c3: var(--beam-purple);
}
.rainbow:nth-child(21) {
  --len: 78;
  --shift: 2;
  --i: 21;
  --c1: var(--beam-purple);
  --c2: var(--beam-pink);
  --c3: var(--beam-purple);
}
.rainbow:nth-child(22) {
  --len: 106;
  --shift: 0;
  --i: 22;
  --c1: var(--beam-pink);
  --c2: var(--beam-purple);
  --c3: var(--beam-pink);
}
.rainbow:nth-child(23) {
  --len: 84;
  --shift: 1;
  --i: 23;
  --c1: var(--beam-purple);
  --c2: var(--beam-yellow);
  --c3: var(--beam-pink);
}
.rainbow:nth-child(24) {
  --len: 80;
  --shift: 2;
  --i: 24;
  --c1: var(--beam-purple);
  --c2: var(--beam-pink);
  --c3: var(--beam-yellow);
}
.rainbow:nth-child(25) {
  --len: 96;
  --shift: 0;
  --i: 25;
  --c1: var(--beam-pink);
  --c2: var(--beam-purple);
  --c3: var(--beam-yellow);
}

.h {
  width: 100%;
  height: 24%;
  bottom: 0;
  left: 0;
  position: absolute;
  background: linear-gradient(
    to top,
    #fff 0%,
    rgb(255 255 255 / 0.7) 42%,
    rgb(255 255 255 / 0.22) 78%,
    transparent 100%
  );
}

.v {
  width: 16vw;
  height: 100%;
  top: 0;
  left: 0;
  position: absolute;
  background: linear-gradient(to left, rgb(255 255 255 / 0), rgb(255 255 255 / 0.72));
}

@keyframes slide {
  from {
    right: -25vw;
  }
  to {
    right: 125vw;
  }
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
}

.panel {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (prefers-reduced-motion: reduce) {
  .rainbow,
  .links-btn {
    animation: none;
  }

  .links-btn,
  .link-pill {
    transition: none;
  }

  body.home #site-name,
  .links-btn {
    transform: none;
  }
}

h1 {
  margin: 0;
  max-width: 92%;
  font-weight: 700;
  font-size: min(136px, 15vw);
  line-height: 1.178;
  letter-spacing: 0;
  text-align: center;
}

/* Light rose band. Light enough that the streaks show through, with rules a shade darker. */
#site-name {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin: 0;
  padding: 0.04em 4vw;
  line-height: 1;
  background: rgb(251 113 133 / 0.52);
  border-top: 2px solid rgb(190 24 93 / 0.62);
  border-bottom: 2px solid rgb(190 24 93 / 0.62);
  color: #fff;
  -webkit-text-stroke: 0;
  text-shadow: none;
}

#site-name span,
.links-btn .letter {
  display: inline-block;
  --letter: #fff;
  color: var(--letter);
  background-image: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--letter) 82%, white),
    var(--letter) 48%,
    color-mix(in srgb, var(--letter) 86%, black)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0.022em #4a044e;
  paint-order: stroke fill;
}

.links-btn .letter {
  font-weight: 700;
  -webkit-text-stroke-width: 0.01em;
}

/* Held off screen until layout and fonts are ready, then both slide in together. */
body.home #site-name {
  transform: translateX(-100%);
}

body.home.is-ready #site-name {
  animation: banner-enter 1.05s 0.35s ease-out forwards;
}

@keyframes banner-enter {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.links-btn,
.link-pill {
  --t: 0s;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  border: 2px solid var(--btn);
  border-radius: 10px;
  background: var(--btn);
  color: #f2f5ff;
  font: inherit;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  text-align: center;
  overflow: hidden;
  cursor: pointer;
  transition:
    color 0.25s var(--t),
    border-color 0.3s ease;
}

/* Thin bar slides in along the bottom, then the fill rises.
   The bar is its own layer, so the slide never leaves a gap at the edge. */
.links-btn::before,
.link-pill::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0.2em;
  background: linear-gradient(90deg, var(--btn), var(--btn-border));
  transform: translateX(-100%);
  pointer-events: none;
  transition:
    transform 0.3s calc(0.3s - var(--t, 0s)),
    height 0.3s var(--t, 0s);
}

.links-btn {
  --btn: #f27890;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  font-size: 28px;
  padding: 0 0.85em;
  transform: translateX(100vw);
  animation: button-glow 3.2s ease-in-out infinite alternate;
  box-shadow:
    0 0 1px #9f1239,
    0 0 4px #f27890,
    0 0 8px #fb7185;
}

body.home.is-ready .links-btn {
  animation:
    button-enter 1.05s 0.35s ease-out forwards,
    button-glow 3.2s ease-in-out infinite alternate;
}

@keyframes button-enter {
  from {
    transform: translateX(100vw);
  }
  to {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.home #site-name,
  body.home.is-ready #site-name,
  .links-btn,
  body.home.is-ready .links-btn {
    transform: none;
    animation: none;
  }
}

@keyframes button-glow {
  0% {
    box-shadow:
      0 0 1px #9f1239,
      0 0 4px #f27890,
      0 0 8px #fb7185;
  }
  100% {
    box-shadow:
      0 0 1px #172554,
      0 0 4px #1e3a8a,
      0 0 8px #1e40af;
  }
}

.links-btn::after {
  content: "";
  width: 0.9em;
  height: 0.9em;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.links-btn:hover,
.link-pill:hover,
.links-btn:focus-visible,
.link-pill:focus-visible {
  --t: 0.3s;
  color: #fff;
  border-color: var(--btn-border);
}

.links-btn:hover::before,
.link-pill:hover::before,
.links-btn:focus-visible::before,
.link-pill:focus-visible::before {
  transform: translateX(0);
  height: 100%;
}

.links-btn:focus-visible,
.link-pill:focus-visible,
.back:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.links-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px 64px;
}

.links-page h1 {
  font-size: min(120px, 15vw);
}

.back {
  margin-top: 28px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.link-list {
  width: min(420px, 100%);
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.link-pill {
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  font-size: 18px;
}
