@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Departure Mono";
  src: url("/assets/fonts/departure-mono.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f4f1ea;
  --paper-2: #ebe6da;
  --paper-3: #e1dbcc;
  --ink: #141413;
  --ink-2: #56544d;
  --ink-3: #8a877d;
  --rule: #d6d0c1;
  --blue: #2440f0;
  --sky: #9fb0ff;
  --hot: #ff5b2e;
  --display: "Bricolage Grotesque", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --pixel: "Departure Mono", ui-monospace, Consolas, monospace;
  --gutter: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font: 400 19px/1.5 var(--serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--blue);
  color: var(--paper);
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
  border-radius: 4px;
}

.wrap {
  width: min(1296px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -60px;
  z-index: 10;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: 550 15px/1 var(--display);
  text-decoration: none;
}

.skip:focus { top: 14px; }

.label {
  margin: 0;
  font: 400 11px/1 var(--pixel);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* header */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 650 21px/1 var(--display);
  letter-spacing: -.025em;
  text-decoration: none;
}

.brand svg {
  width: 26px;
  height: 26px;
  fill: var(--ink);
}

.top nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font: 500 16px/1 var(--display);
}

.top nav a,
.foot-row a {
  padding: 6px 0;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  transition: background-size .25s ease;
}

.top nav a:hover,
.foot-row a:hover { background-size: 100% 1.5px; }

/* hero */

.hero { padding-top: clamp(36px, 6vw, 88px); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font: 400 11px/1 var(--pixel);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.eyebrow i {
  flex: 0 1 160px;
  border-bottom: 2px dotted var(--ink-3);
}

.hero-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: end;
  gap: 56px;
  margin: 30px 0 clamp(44px, 6vw, 84px);
}

h1 {
  margin: 0;
  font: 700 clamp(56px, 9.1vw, 140px)/.92 var(--display);
  letter-spacing: -.045em;
}

h1 .px {
  font: 400 .76em/1 var(--pixel);
  letter-spacing: -.07em;
  white-space: nowrap;
}

h1 .px b {
  display: inline-block;
  width: .46em;
  height: .7em;
  margin-left: .16em;
  background: var(--hot);
  animation: blink 1.1s steps(1) infinite;
}

.lede {
  margin: 0 0 28px;
  font-size: 22px;
  line-height: 1.38;
  letter-spacing: -.005em;
}

.hero-side { padding-bottom: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px 16px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: 550 16px/1 var(--display);
  text-decoration: none;
  transition: background-color .2s ease;
}

.btn svg,
.go svg {
  width: 16px;
  height: 12px;
  transition: transform .2s ease;
}

.btn:hover { background: var(--blue); }

.btn:hover svg,
.card:hover .go svg { transform: translateX(4px); }

/* hero stage */

.stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1296 / 600;
  border-radius: 28px;
  background:
    radial-gradient(rgba(244, 241, 234, .2) 1px, transparent 1.3px) 0 0 / 10px 10px,
    var(--blue);
}

.orb {
  position: absolute;
  fill: var(--paper);
  opacity: .5;
}

.orb .back { fill: var(--blue); }

.orb-a {
  width: 34%;
  left: -5%;
  bottom: -24%;
}

.orb-b {
  width: 22%;
  right: 7%;
  top: -16%;
  opacity: .4;
}

.win {
  position: absolute;
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 8px 8px 0 rgba(6, 10, 60, .42);
  font: 400 11px/1.2 var(--pixel);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink);
}

.win-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 28px;
  padding: 0 9px;
  background: var(--ink);
  color: var(--paper);
}

.win-bar i {
  width: 10px;
  height: 10px;
  border: 2px solid var(--paper);
}

.win-bar em {
  margin-left: auto;
  font-style: normal;
  color: var(--sky);
}

.win-body {
  display: grid;
  gap: 12px;
  padding: 16px 14px;
}

.win-body p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.win-body p i {
  flex: 1;
  border-bottom: 2px dotted var(--ink-3);
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  background: var(--paper);
  font: inherit;
}

kbd + span { margin-left: 6px; }

.win-keys {
  width: 196px;
  left: 10%;
  top: 17%;
}

.win-score {
  width: 228px;
  right: 9%;
  bottom: 15%;
}

.win-game {
  width: min(520px, 58%);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.field {
  position: relative;
  height: 324px;
  overflow: hidden;
  background: var(--ink);
}

.bricks {
  position: absolute;
  left: 14px;
  top: 14px;
  width: calc(100% - 28px);
  height: 82px;
  fill: var(--paper);
}

.bricks .hot { fill: var(--hot); }
.bricks .cool { fill: var(--sky); }

.ball-x {
  position: absolute;
  left: 14px;
  right: 24px;
  top: 0;
  bottom: 0;
  animation: run 2.9s linear infinite alternate;
}

.ball-y {
  position: absolute;
  left: 0;
  top: 96px;
  bottom: 38px;
  width: 10px;
  animation: drop 1.9s linear infinite alternate;
}

.ball {
  position: absolute;
  left: 0;
  top: 0;
  width: 10px;
  height: 10px;
  background: var(--hot);
}

.pad-x {
  position: absolute;
  left: 14px;
  right: 74px;
  bottom: 20px;
  height: 8px;
  animation: run 2.9s linear infinite alternate;
}

.pad {
  position: absolute;
  left: 0;
  top: 0;
  width: 60px;
  height: 8px;
  background: var(--paper);
}

@keyframes run { to { transform: translateX(100%); } }
@keyframes drop { to { transform: translateY(100%); } }
@keyframes blink { 50% { opacity: 0; } }

/* games */

.games { padding: clamp(80px, 10vw, 148px) 0 clamp(80px, 9vw, 128px); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}

h2 {
  margin: 0;
  font: 650 clamp(38px, 4.6vw, 62px)/1 var(--display);
  letter-spacing: -.045em;
}

.section-head .label { padding-bottom: 8px; }

.shelf {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background: var(--paper-2);
  text-decoration: none;
  transition: background-color .2s ease;
}

a.card:hover { background: var(--paper-3); }

.cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--blue);
}

.cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px 30px 30px;
}

h3 {
  margin: 14px 0 10px;
  font: 650 30px/1.08 var(--display);
  letter-spacing: -.035em;
}

.card-body > p:not(.label) {
  margin: 0;
  font-size: 18px;
  line-height: 1.42;
  color: var(--ink-2);
}

.meta {
  align-self: stretch;
  margin: 26px 0 0;
  border-top: 1px solid var(--rule);
}

.meta div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
}

.meta dt {
  font: 400 11px/1 var(--pixel);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.meta dd {
  margin: 0;
  font: 500 15px/1.2 var(--display);
}

.go {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding: 13px 20px 13px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: 550 15px/1 var(--display);
}

.card-wide {
  grid-column: 1 / -1;
  flex-direction: row;
}

.card-wide .cover {
  flex: 0 0 48%;
  aspect-ratio: auto;
  min-height: 380px;
}

.card-wide .card-body {
  justify-content: center;
  padding: 56px clamp(32px, 5vw, 72px);
}

.card-wide h3 { font-size: clamp(34px, 3.6vw, 48px); }

.card-wide .card-body > p:not(.label) {
  max-width: 24em;
  font-size: 20px;
}

.cover-soon {
  display: grid;
  place-items: center;
  background:
    radial-gradient(rgba(244, 241, 234, .2) 1px, transparent 1.3px) 0 0 / 10px 10px,
    var(--blue);
}

.cover-soon .orb {
  width: 62%;
  right: -14%;
  bottom: -34%;
}

.cover-soon span {
  position: relative;
  font: 400 clamp(110px, 13vw, 176px)/1 var(--pixel);
  letter-spacing: -.06em;
  color: var(--paper);
}

/* footer */

.foot {
  overflow: hidden;
  border-top: 1px solid var(--rule);
}

.foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0;
  font: 500 15px/1 var(--display);
  color: var(--ink-2);
}

.foot-mark {
  height: .66em;
  margin: clamp(16px, 3vw, 40px) 0 0;
  font: 800 clamp(88px, 23vw, 410px)/.8 var(--display);
  letter-spacing: -.05em;
  text-align: center;
  white-space: nowrap;
  color: var(--paper-3);
  user-select: none;
}

/* not found page */

.lost {
  display: grid;
  align-content: center;
  justify-items: start;
  min-height: 64vh;
  padding: 48px 0 96px;
}

.lost .code {
  margin: 0 0 22px;
  font: 400 clamp(88px, 15vw, 198px)/.9 var(--pixel);
  letter-spacing: -.06em;
  color: var(--blue);
}

.lost h1 { font-size: clamp(40px, 5.4vw, 76px); }

.lost .lede { margin: 18px 0 30px; }

/* medium screens */

@media (max-width: 1020px) {
  .hero-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .hero-side { max-width: 30em; }

  .stage { aspect-ratio: 4 / 3; }

  .win-keys,
  .win-score { display: none; }

  .win-game { width: min(520px, 78%); }

  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* small screens */

@media (max-width: 680px) {
  .top { padding: 20px 0; }

  .eyebrow i { flex-basis: 40px; }

  h1 { letter-spacing: -.05em; }

  .lede { font-size: 20px; }

  .stage {
    aspect-ratio: 1 / 1;
    border-radius: 22px;
  }

  .win-game { width: 84%; }

  .field { height: 236px; }

  .bricks { height: 70px; }

  .ball-y { top: 84px; }

  .orb-a { width: 56%; }

  .orb-b { width: 38%; }

  .shelf { grid-template-columns: minmax(0, 1fr); }

  .card-wide { flex-direction: column; }

  .card-wide .cover {
    flex: none;
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .card-wide .card-body { padding: 30px 26px 32px; }

  .card-body { padding: 26px; }
}

@media (max-width: 400px) {
  .eyebrow i { display: none; }
  .eyebrow span + i + span { display: none; }
  .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .ball-x,
  .pad-x { animation: none; transform: translateX(46%); }

  .ball-y { animation: none; transform: translateY(58%); }

  h1 .px b { animation: none; }

  .btn, .btn svg, .go svg, .card, .top nav a, .foot-row a { transition: none; }
}
