/* Blinking Robot Media
   Powder-blue enamel, navy ink, signal yellow, one red LED. */

:root {
  --enamel: #bfd3dc;
  --enamel-deep: #a9c2ce;
  --ink: #14213d;
  --ink-soft: #3c4a66;
  --signal: #ffc93c;
  --led: #e8432e;
  --panel: #f7fafb;

  --display: "Unbounded", "Arial Black", sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;

  /* modular scale, ratio 1.25 from 18px */
  --s-1: 0.889rem;
  --s0: 1.125rem;
  --s1: 1.406rem;
  --s2: 1.758rem;
  --s3: 2.197rem;
  --s4: clamp(2.4rem, 6vw, 4.6rem);

  --measure: 62ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--enamel);
  color: var(--ink);
  font: 400 var(--s0)/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--led); }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--signal);
}

h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0; }
h1 { font-size: var(--s4); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: var(--s3); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: var(--s1); font-weight: 500; }
h3 a { text-decoration: none; }
h3 a:hover { text-decoration: underline; text-decoration-color: var(--led); }

p { margin: 0 0 1em; max-width: var(--measure); }

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--signal); padding: 0.5rem 1rem; z-index: 10;
}
.skip:focus { top: 1rem; }

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-block;
  font: 700 var(--s0)/1 var(--body);
  color: var(--ink);
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 0.8em 1.4em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.btn:hover { background: #fff; }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
.btn-primary { background: var(--signal); }
.btn-primary:hover { background: #ffd666; }
.btn-big { font-size: var(--s1); padding: 0.9em 1.6em; }

/* --------------------------------------------------------------- hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--gutter);
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 6rem) var(--gutter) clamp(2rem, 6vw, 4rem);
}
.hero h1 { max-width: 9ch; }
.lede { font-size: var(--s1); line-height: 1.4; margin-top: 1.2rem; max-width: 30ch; }
.hero-links { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

.robot { width: 100%; max-width: 26rem; justify-self: center; overflow: visible; }
.r-head { fill: var(--panel); }
.r-outline { fill: none; stroke: var(--ink); stroke-width: 6; }
.r-outline-thin { stroke: var(--ink); stroke-width: 5; }
.r-dark { fill: var(--ink); }
.r-wire { stroke: var(--ink); stroke-width: 6; stroke-linecap: round; }
.r-bolt { fill: var(--enamel-deep); stroke: var(--ink); stroke-width: 3; }
.r-face { fill: var(--ink); }
.r-eye { fill: var(--signal); }
.r-lid { fill: var(--ink-soft); transform-box: fill-box; transform-origin: top; transform: scaleY(0); }
.r-grille { stroke: var(--enamel-deep); stroke-width: 4; }
.r-led { fill: var(--led); stroke: var(--ink); stroke-width: 5; }

/* The one animated moment: the robot blinks, eyes and antenna together. */
@media (prefers-reduced-motion: no-preference) {
  .r-lid { animation: blink 5.5s infinite; }
  .r-led { animation: led 5.5s infinite; }
}
@keyframes blink {
  0%, 92%, 100% { transform: scaleY(0); }
  95% { transform: scaleY(1); }
}
@keyframes led {
  0%, 91%, 99%, 100% { fill: var(--led); }
  93%, 97% { fill: #ffd2c9; }
}

/* ------------------------------------------------------------ feature */

main { max-width: 76rem; margin: 0 auto; padding: 0 var(--gutter); }

.feature {
  background: var(--ink);
  color: var(--panel);
  border-radius: 28px;
  padding: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: clamp(3rem, 8vw, 6rem);
}
.feature a:not(.btn) { color: var(--panel); }
.feature a:hover { text-decoration-color: var(--signal); }
.feature :focus-visible { outline-color: var(--signal); box-shadow: 0 0 0 6px var(--ink); }
.feature-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 0 var(--gutter); margin-bottom: 2rem; }
.feature-head h2 { grid-row: span 2; color: var(--signal); }
.feature-head p { color: #dbe5ea; }

.player {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  border: 4px solid var(--signal);
}
.player-cover { width: 100%; height: 100%; object-fit: cover; opacity: 0.45; }
.player-start {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; padding: 1.5rem; text-align: center;
}
.player-note { color: var(--panel); font-size: var(--s-1); max-width: 38ch; margin: 0; text-shadow: 0 1px 6px #000; }

.feature-links { margin: 1.5rem 0 0; }

/* -------------------------------------------------------------- games */

.games h2 { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }

.game {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: var(--gutter);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem) 0;
  border-top: 3px solid var(--ink);
}
.game:nth-of-type(even) .game-art { order: 2; }
.game-art img { border-radius: 18px; border: 3px solid var(--ink); background: var(--ink); }
.game-art:hover img { border-color: var(--led); }
.tagline { font-size: var(--s1); line-height: 1.35; margin: 0.5rem 0 1rem; font-style: italic; }
.meta { color: var(--ink-soft); font-size: var(--s-1); margin: 0; }

/* ------------------------------------------------------------- assets */

.assets {
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  gap: var(--gutter);
  align-items: center;
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: 22px;
  padding: clamp(1.25rem, 3vw, 2rem);
  margin: clamp(2rem, 6vw, 4rem) 0;
}
.assets img { border-radius: 12px; }
.assets h2 { font-size: var(--s1); color: var(--ink-soft); font-weight: 500; margin-bottom: 0.4rem; }
.assets h3 { font-size: var(--s2); font-weight: 800; margin-bottom: 0.8rem; }
.assets p { margin: 0; }

/* ------------------------------------------------------------- footer */

.footer {
  max-width: 76rem;
  margin: 0 auto;
  padding: 2rem var(--gutter) 3rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem;
  font-size: var(--s-1);
  color: var(--ink-soft);
}
.footer p { margin: 0; }

/* -------------------------------------------------------------- small */

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .robot { max-width: 15rem; order: -1; }
  .feature-head { grid-template-columns: 1fr; }
  .feature-head h2 { margin-bottom: 1rem; }
  .game { grid-template-columns: 1fr; }
  .game:nth-of-type(even) .game-art { order: 0; }
  .assets { grid-template-columns: 1fr; }
  .player { aspect-ratio: auto; }
  .player-cover { height: auto; opacity: 0.8; }
  .player-start { position: static; padding: 1.25rem 1rem 1.5rem; }
}
