@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-hyperlegible-next-var-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url("/fonts/atkinson-hyperlegible-mono-var-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #17150f;
  --cream: #fff3c4;
  --cream-soft: #c9be96;
  --butter: #f4cf58;
  --blue: #2348c4;
  --ink: #211b0b;
  --sans: "Atkinson Hyperlegible Next", ui-sans-serif, system-ui, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  background: var(--night);
  color: var(--cream);
  font-family: var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body {
  margin: 0;
  min-width: 20rem;
  background:
    radial-gradient(
      50rem 32rem at 50% 45%,
      rgb(244 207 88 / 9%),
      transparent 68%
    ),
    var(--night);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
body::after,
.page-shell::after {
  content: "";
  position: fixed;
  width: clamp(5rem, 12vw, 9rem);
  height: clamp(3.5rem, 8vw, 6rem);
  pointer-events: none;
  opacity: 0.12;
  background-image: radial-gradient(var(--cream) 1.25px, transparent 1.4px);
  background-size: 0.8rem 0.8rem;
}
body::after {
  right: clamp(0.75rem, 4vw, 4rem);
  bottom: clamp(3rem, 7vh, 5rem);
  mask-image: linear-gradient(115deg, black 55%, transparent);
}
.page-shell::after {
  left: clamp(0.75rem, 4vw, 4rem);
  top: clamp(3rem, 7vh, 5rem);
  mask-image: linear-gradient(295deg, black 55%, transparent);
}
::selection {
  background: var(--butter);
  color: var(--ink);
}
p {
  margin: 0;
}
:focus-visible {
  outline: 2px solid var(--butter);
  outline-offset: 3px;
}

.page-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  justify-items: center;
  width: min(100% - clamp(2rem, 7vw, 7rem), 56rem);
  height: 100svh;
  margin: 0 auto;
  padding: clamp(0.75rem, 1.8vh, 1.25rem) 0;
  text-align: center;
}
.masthead,
footer {
  width: 100%;
  padding-block: 0.7rem;
  border-color: rgb(255 243 196 / 22%);
}
.masthead {
  display: flex;
  justify-content: center;
  border-bottom: 1px solid rgb(255 243 196 / 22%);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.wordmark-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.mark {
  position: relative;
  width: 0.8rem;
  height: 0.8rem;
}
.mark::before,
.mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 3px solid var(--blue);
  border-left: 3px solid var(--blue);
}
.mark::after {
  translate: 0.26rem 0.26rem;
  border-color: var(--butter);
}

.hero {
  display: grid;
  grid-template-areas: "art" "copy";
  align-content: center;
  justify-items: center;
  gap: clamp(0.7rem, 1.8vh, 1.2rem);
  min-height: 0;
  width: 100%;
  padding: clamp(0.5rem, 1.5vh, 1rem) 0;
}
.hero-pat {
  grid-area: art;
  width: clamp(8rem, 18vh, 10.5rem);
  rotate: 4deg;
}
.hero-pat svg {
  display: block;
  width: 100%;
  height: auto;
}
.hero-copy {
  grid-area: copy;
  display: grid;
  justify-items: center;
}
.kicker {
  margin-bottom: clamp(0.5rem, 1.2vh, 0.8rem);
  color: var(--butter);
  font-family: var(--mono);
  font-size: clamp(0.68rem, 1.4vh, 0.8rem);
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
}
h1 {
  max-width: 14ch;
  margin: 0 0 clamp(0.5rem, 1.2vh, 0.8rem);
  font-size: clamp(2.15rem, 5.8vh, 3.8rem);
  font-weight: 720;
  letter-spacing: -0.035em;
  line-height: 0.95;
  text-wrap: balance;
}
.lede {
  max-width: 32rem;
  margin-bottom: clamp(0.65rem, 1.7vh, 1.1rem);
  color: var(--cream-soft);
  font-size: clamp(0.9rem, 1.9vh, 1.08rem);
  line-height: 1.45;
  text-wrap: balance;
}
.sticker {
  position: relative;
  display: inline-block;
  padding: 0.42rem 0.7rem;
  background: var(--butter);
  border: 2px solid var(--cream);
  box-shadow: 0.22rem 0.22rem 0 rgb(255 243 196 / 28%);
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(0.75rem, 1.6vh, 0.88rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  rotate: -2.5deg;
}
.sticker::before,
.sticker::after {
  content: "";
  position: absolute;
  width: 1.8rem;
  height: 0.55rem;
  background: rgb(255 243 196 / 30%);
  rotate: -38deg;
}
.sticker::before {
  top: -0.42rem;
  left: -0.8rem;
}
.sticker::after {
  right: -0.8rem;
  bottom: -0.42rem;
}
.loading {
  position: relative;
  width: min(100%, 22rem);
  height: 0.6rem;
  margin-top: clamp(0.7rem, 1.6vh, 1rem);
  border-bottom: 1px solid var(--cream-soft);
  background:
    repeating-linear-gradient(
      90deg,
      rgb(201 190 150 / 80%) 0 1px,
      transparent 1px 1.25rem
    )
    bottom / 100% 0.35rem no-repeat;
  overflow: hidden;
}
.loading-sweep {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3.8rem;
  height: 0.22rem;
  background: var(--butter);
}
.loading-note {
  margin-top: 0.4rem;
  color: var(--cream-soft);
  font-family: var(--mono);
  font-size: clamp(0.65rem, 1.35vh, 0.75rem);
  letter-spacing: 0.04em;
  line-height: 1.3;
}
.loading-note s {
  opacity: 0.5;
  text-decoration-thickness: 2px;
}

footer {
  display: flex;
  justify-content: center;
  gap: 0.35rem 1.5rem;
  border-top: 1px solid rgb(255 243 196 / 22%);
  color: var(--cream-soft);
  font-family: var(--mono);
  font-size: clamp(0.65rem, 1.4vh, 0.76rem);
  letter-spacing: 0.04em;
  line-height: 1.3;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *,
  .hero-pat {
    animation: reveal 600ms var(--ease) both;
  }
  .hero-copy > :nth-child(2) {
    animation-delay: 70ms;
  }
  .hero-copy > :nth-child(3) {
    animation-delay: 140ms;
  }
  .hero-copy > :nth-child(4) {
    animation-delay: 210ms;
  }
  .hero-copy > :nth-child(5) {
    animation-delay: 280ms;
  }
  .hero-copy > :nth-child(6) {
    animation-delay: 350ms;
  }
  .hero-pat svg {
    animation: roll 3.5s var(--ease) 1s infinite;
  }
  .loading-sweep {
    animation: sweep 4.5s var(--ease) 1.2s infinite;
  }
}
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes roll {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  40% {
    transform: translateY(0.18rem) rotate(-1deg);
  }
  70% {
    transform: translateY(0.08rem) rotate(0.7deg);
  }
}
@keyframes sweep {
  0% {
    translate: -4rem 0;
  }
  55%,
  100% {
    translate: 25rem 0;
  }
}

@media (max-width: 36rem) {
  .page-shell {
    width: min(100% - 1.5rem, 56rem);
  }
  footer {
    flex-direction: column;
    gap: 0.15rem;
  }
}

/* Extremely short viewports and browser zoom must reflow instead of clipping. */
@media (max-height: 31rem) {
  html,
  body {
    height: auto;
    overflow: auto;
  }
  .page-shell {
    height: auto;
    min-height: 100svh;
  }
  .hero {
    padding-block: 1rem;
  }
  .hero-pat {
    width: 7rem;
  }
}
