@font-face {
  font-family: "DynaPuff";
  src: url("/assets/fonts/DynaPuff-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/AtkinsonHyperlegible-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/AtkinsonHyperlegible-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: oklch(96% 0.025 90);
  --paper-deep: oklch(91% 0.04 88);
  --ink: oklch(20% 0.035 258);
  --orange: oklch(74% 0.19 52);
  --orange-light: oklch(86% 0.12 75);
  --pink: oklch(67% 0.22 6);
  --blue: oklch(42% 0.15 258);
  --blue-light: oklch(74% 0.12 234);
  --lime: oklch(86% 0.18 117);
  --cream: oklch(96% 0.02 91);
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 0.75rem;
  --space-lg: 1rem;
  --space-xl: 1.5rem;
  --space-2xl: 2rem;
  --space-3xl: 3rem;
  --space-4xl: 4rem;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", sans-serif;
  background-color: var(--paper);
  background-image: radial-gradient(circle, color-mix(in oklch, var(--ink) 14%, transparent) 1px, transparent 1.5px);
  background-size: 20px 20px;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: var(--space-lg);
  left: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  color: var(--cream);
  background: var(--ink);
  font-weight: 700;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(var(--space-3xl), 8vw, 6rem);
  width: min(100% - clamp(2rem, 7vw, 8rem), 90rem);
  min-height: 100svh;
  margin-inline: auto;
  padding-block: clamp(1.25rem, 4vw, 3rem) var(--space-xl);
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  font-family: "DynaPuff", sans-serif;
  font-size: 1rem;
  font-weight: 650;
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  grid-template-columns: repeat(2, 0.55rem);
  gap: 0.16rem;
  padding: 0.38rem;
  background: var(--ink);
  box-shadow: 3px 3px 0 var(--pink);
}

.wordmark-mark i {
  width: 0.55rem;
  aspect-ratio: 1;
  background: var(--lime);
}

.wordmark-mark i:nth-child(2),
.wordmark-mark i:nth-child(3) {
  background: var(--orange);
}

.status {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.status span {
  width: 0.65rem;
  height: 0.65rem;
  background: oklch(67% 0.2 144);
  border: 2px solid var(--ink);
  border-radius: 50%;
}

main {
  display: grid;
  gap: clamp(var(--space-3xl), 7vw, 6rem);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.65fr);
  align-items: end;
  gap: var(--space-3xl);
}

.eyebrow {
  grid-column: 1 / -1;
  margin: 0 0 calc(var(--space-3xl) * -0.75);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  max-width: 10ch;
  margin: 0;
  font-family: "DynaPuff", sans-serif;
  font-size: clamp(3.2rem, 8.5vw, 8.5rem);
  font-weight: 700;
  line-height: 0.83;
  letter-spacing: -0.055em;
}

.lede {
  max-width: 31ch;
  margin: 0;
  padding-bottom: 0.5rem;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.35;
}

.choices {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 0.84fr);
  gap: clamp(var(--space-xl), 3.5vw, var(--space-4xl));
  align-items: stretch;
}

.choice {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  gap: var(--space-2xl);
  min-height: clamp(27rem, 44vw, 40rem);
  overflow: hidden;
  padding: clamp(var(--space-xl), 4vw, var(--space-3xl));
  border: 3px solid var(--ink);
  border-radius: 0.3rem;
  box-shadow: 10px 10px 0 var(--ink);
  text-decoration: none;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
  animation: card-enter 650ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.choice:hover {
  transform: translate(-4px, -4px);
}

.choice:active {
  transform: translate(2px, 2px);
}

.choice:focus-visible {
  outline: 5px solid var(--cream);
  outline-offset: -10px;
}

.choice-arcade {
  color: var(--ink);
  background: var(--orange);
  transform: rotate(-0.45deg);
}

.choice-arcade:hover {
  transform: translate(-4px, -4px) rotate(-0.45deg);
}

.choice-retro {
  color: var(--cream);
  background: var(--blue);
  transform: rotate(0.45deg);
  animation-delay: 100ms;
}

.choice-retro:hover {
  transform: translate(-4px, -4px) rotate(0.45deg);
}

.choice-index {
  position: relative;
  z-index: 2;
  align-self: start;
  justify-self: end;
  padding: 0.35rem 0.55rem 0.3rem;
  color: var(--cream);
  background: var(--ink);
  font-family: "DynaPuff", sans-serif;
  font-size: 0.85rem;
  line-height: 1;
}

.choice-retro .choice-index {
  color: var(--ink);
  background: var(--lime);
}

.choice-copy {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: start;
  gap: var(--space-md);
  grid-column: 1 / -1;
  max-width: 30rem;
}

.choice-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.choice-title {
  font-family: "DynaPuff", sans-serif;
  font-size: clamp(3.3rem, 6vw, 6.5rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.choice-description {
  max-width: 31ch;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.35;
}

.choice-action {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  grid-column: 1 / -1;
  align-self: end;
  width: 100%;
  padding-top: var(--space-lg);
  border-top: 2px solid currentColor;
  font-weight: 700;
}

.choice-action b {
  display: grid;
  width: 2.3rem;
  aspect-ratio: 1;
  place-items: center;
  background: var(--ink);
  color: var(--orange);
  font-size: 1.2rem;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.choice-retro .choice-action b {
  background: var(--cream);
  color: var(--blue);
}

.choice:hover .choice-action b {
  transform: translate(3px, -3px);
}

.arcade-scene {
  position: absolute;
  z-index: 1;
  right: clamp(1rem, 4vw, 3.5rem);
  bottom: clamp(5rem, 10vw, 8rem);
  width: min(44%, 18rem);
  aspect-ratio: 1;
  opacity: 0.92;
}

.arcade-scene::before {
  content: "";
  position: absolute;
  inset: 4% 0 0;
  background-color: var(--orange-light);
  background-image: linear-gradient(color-mix(in oklch, var(--ink) 16%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in oklch, var(--ink) 16%, transparent) 1px, transparent 1px);
  background-size: 1.5rem 1.5rem;
  border: 3px solid var(--ink);
  clip-path: polygon(8% 0, 100% 0, 100% 92%, 92% 100%, 0 100%, 0 8%);
}

.alien {
  position: absolute;
  z-index: 2;
  width: 2.6rem;
  height: 1.8rem;
  background: var(--pink);
  box-shadow: inset 0 -0.45rem 0 color-mix(in oklch, var(--pink) 65%, var(--ink));
  clip-path: polygon(20% 0, 80% 0, 80% 20%, 100% 20%, 100% 80%, 80% 80%, 80% 100%, 60% 100%, 60% 75%, 40% 75%, 40% 100%, 20% 100%, 20% 80%, 0 80%, 0 20%, 20% 20%);
}

.alien::before,
.alien::after {
  content: "";
  position: absolute;
  top: 0.55rem;
  width: 0.38rem;
  height: 0.38rem;
  background: var(--ink);
}

.alien::before { left: 0.55rem; }
.alien::after { right: 0.55rem; }
.alien-one { top: 18%; left: 18%; }
.alien-two { top: 18%; right: 13%; }
.alien-three { top: 42%; left: 43%; }

.ship {
  position: absolute;
  z-index: 2;
  bottom: 10%;
  left: 38%;
  width: 4.6rem;
  height: 2.3rem;
  background: var(--ink);
  clip-path: polygon(42% 0, 58% 0, 58% 30%, 78% 30%, 78% 55%, 100% 55%, 100% 100%, 0 100%, 0 55%, 22% 55%, 22% 30%, 42% 30%);
}

.laser {
  position: absolute;
  z-index: 2;
  bottom: 35%;
  left: calc(50% - 2px);
  width: 4px;
  height: 2.7rem;
  background: var(--pink);
  animation: laser-pulse 1.2s steps(2, end) infinite;
}

.controller {
  position: absolute;
  z-index: 1;
  right: -5%;
  bottom: 13%;
  width: min(78%, 24rem);
  aspect-ratio: 1.55;
  background: var(--paper-deep);
  border: 3px solid var(--ink);
  border-radius: 3rem 3rem 5rem 5rem;
  box-shadow: 9px 11px 0 color-mix(in oklch, var(--ink) 78%, var(--blue));
  transform: rotate(-8deg);
}

.controller-slot {
  position: absolute;
  top: 18%;
  left: 50%;
  width: 20%;
  height: 5%;
  background: var(--ink);
  border-radius: 99px;
  transform: translateX(-50%);
}

.dpad {
  position: absolute;
  top: 31%;
  left: 16%;
  width: 31%;
  aspect-ratio: 1;
}

.dpad::before,
.dpad::after {
  content: "";
  position: absolute;
  background: var(--ink);
}

.dpad::before { inset: 34% 0; }
.dpad::after { inset: 0 34%; }

.dpad i {
  position: absolute;
  z-index: 1;
  inset: 40%;
  background: color-mix(in oklch, var(--paper-deep) 32%, var(--ink));
}

.buttons {
  position: absolute;
  top: 37%;
  right: 13%;
  display: flex;
  gap: 1.1rem;
  transform: rotate(-14deg);
}

.buttons i {
  width: clamp(2.4rem, 5vw, 3.8rem);
  aspect-ratio: 1;
  background: var(--pink);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 3px 4px 0 var(--ink);
}

.buttons i:last-child {
  background: var(--blue-light);
}

.select-buttons {
  position: absolute;
  bottom: 18%;
  left: 50%;
  display: flex;
  gap: 0.65rem;
  transform: translateX(-50%) rotate(-8deg);
}

.select-buttons i {
  width: 2rem;
  height: 0.55rem;
  background: var(--ink);
  border-radius: 99px;
}

footer {
  display: flex;
  justify-content: flex-end;
  padding-top: var(--space-lg);
  border-top: 2px solid var(--ink);
}

footer p {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

footer span {
  padding-inline: var(--space-sm);
  color: var(--pink);
}

@keyframes card-enter {
  from { opacity: 0; transform: translateY(2rem) rotate(0); }
}

@keyframes laser-pulse {
  50% { opacity: 0.2; transform: translateY(-0.7rem); }
}

@media (max-width: 56rem) {
  .page-shell { gap: var(--space-4xl); }
  .intro { grid-template-columns: 1fr; gap: var(--space-xl); }
  .eyebrow { margin: 0 0 calc(var(--space-xl) * -0.5); }
  .lede { max-width: 42ch; }
  .choices { grid-template-columns: 1fr; }
  .choice { min-height: 31rem; transform: none; }
  .choice:hover { transform: translate(-3px, -3px); }
  .arcade-scene { width: min(42%, 16rem); }
  .controller { width: min(62%, 24rem); right: 2%; }
}

@media (max-width: 38rem) {
  .page-shell {
    width: min(100% - 2rem, 90rem);
    gap: var(--space-3xl);
    padding-top: var(--space-lg);
  }
  .masthead { align-items: flex-start; }
  .wordmark { max-width: 12rem; line-height: 1.05; }
  .status { font-size: 0; }
  .status::after { content: "Ready"; font-size: 0.82rem; }
  h1 { font-size: clamp(3.4rem, 19vw, 5.2rem); }
  .choice {
    min-height: 30rem;
    padding: var(--space-xl);
    box-shadow: 7px 7px 0 var(--ink);
  }
  .choice-title { font-size: clamp(3.4rem, 18vw, 5rem); }
  .choice-description { max-width: 23ch; }
  .arcade-scene { right: 0.25rem; bottom: 5.5rem; width: 43%; }
  .alien { transform: scale(0.8); }
  .controller { right: -12%; bottom: 17%; width: 76%; }
  footer { justify-content: flex-start; }
  footer p { line-height: 1.7; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .choice { animation: none; transition: none; }
  .choice-action b { transition: none; }
  .laser { animation: none; }
}
