@font-face {
  font-family: "Press Start 2P";
  src: url("assets/fonts/press-start-2p.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Saira";
  src: url("assets/fonts/saira-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #09090b;
  --text: #f1f0ec;
  --secondary: #96969f;
  --quiet: #76767f;
  --focus: #c4b1f7;
  font-family: "Saira", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { background: var(--background); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--background);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 7px;
}

.masthead { padding: clamp(32px, 5vh, 56px) 24px 0; text-align: center; }
.wordmark {
  display: inline-block;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(13px, 1.5vw, 16px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .02em;
  color: #96968f;
}
.masthead p {
  margin: 8px 0 0;
  color: #fff;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(7px, .8vw, 8px);
  font-weight: 400;
  line-height: 2;
}

main { display: grid; place-items: center; padding: 14px 24px 32px; }
.product { width: min(100%, 480px); text-align: center; }
.device {
  position: relative;
  width: min(100%, 400px, 44svh);
  aspect-ratio: 1;
  margin: 0 auto 18px;
  overflow: hidden;
  isolation: isolate;
  background: var(--background);
}
.device-photo {
  position: absolute;
  left: -5.063291%;
  top: -6.170886%;
  width: 108.860759%;
  height: 113.924051%;
  max-width: none;
  display: block;
  pointer-events: none;
  user-select: none;
  mix-blend-mode: lighten;
  opacity: .65;
}
.character {
  display: block;
  position: absolute;
  left: 18.567285%;
  top: 17.800633%;
  width: 62.865431%;
  aspect-ratio: 410 / 420;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  background: transparent;
  appearance: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.character:disabled { cursor: default; }
.character:focus-visible { outline-offset: -5px; }
.character canvas { display: block; width: 100%; height: 100%; }
.character-fallback { position: absolute; width: 39%; height: auto; left: 30.5%; top: 30%; }
.character[data-ready="true"] .character-fallback { display: none; }

h1 {
  margin: -3px 0 0;
  font-size: clamp(36px, 4vw, 43px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.045em;
}
.description { margin: 13px 0 24px; color: var(--secondary); font-size: 17px; line-height: 1.55; }
.product-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 48px;
  padding: 11px 23px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--text);
  color: var(--background);
  font-size: 15px;
  font-weight: 550;
  line-height: 1.5;
  transition: background 160ms ease, transform 160ms ease;
}
.product-link svg { flex: none; transition: transform 160ms ease; }
@media (hover: hover) {
  .product-link:hover { background: white; transform: translateY(-2px); }
  .product-link:hover svg { transform: translateX(3px); }
}
.product-link:active { transform: translateY(0); }
footer { padding: 12px 24px 26px; text-align: center; color: var(--quiet); font-family: "Press Start 2P", monospace; font-size: clamp(7px, .8vw, 8px); font-weight: 400; line-height: 2; }

@media (max-height: 720px) and (min-width: 600px) {
  .masthead { padding-top: 26px; }
  .device { width: min(100%, 320px, 44svh); }
  main { padding-top: 4px; padding-bottom: 24px; }
}
@media (max-width: 420px) {
  .masthead { padding-top: 32px; }
  .description { font-size: 16px; }
  main { padding-bottom: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .product-link, .product-link svg { transition: none; }
  .product-link:hover, .product-link:hover svg { transform: none; }
}
