/* Wendermods: custom Minecraft mods, addons and plugins. Home page, portfolio and the pixel world behind them. */

/* fonts, served from this site rather than Google so the first paint doesn't wait on another server.
   Both are under the SIL Open Font License (assets/fonts/OFL-*.txt). */
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/onest-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Pixelify Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/pixelify-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Pixelify Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/pixelify-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #000d1f;
  --surface: #061a33;
  --surface-2: #0a2342;
  --line: rgba(140, 175, 225, 0.12);
  --line-2: rgba(140, 175, 225, 0.22);
  --field: #0d284c;
  --field-hover: #11305a;

  --text: #eef2f8;
  --text-2: #a9b8d0;
  --text-3: #8497b6;
  --dim: #6b80a3; /* unlit statement words: still 4.8:1, so the reveal never hides text */
  --link: #8cbcff;

  --accent: #2f86ff;
  --focus: #6fb0ff;
  --pos: #24ae56;
  --danger: #ff7a6e;

  /* chart + chip colors, validated for the dark card surface */
  --series: #368fee;
  --mod: #8774e8;
  --pack: #e4569e;
  --plugin: #d87710;

  --l-bg: #f3f5f9;
  --l-line: #e2e7ee;
  --ink: #0c1f35;
  --ink-2: #53647c;

  --font: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --pixel: "Pixelify Sans", var(--font);
  --gutter: 24px;
  --max: 1240px;
  --card: linear-gradient(180deg, #071d39 0%, #051630 100%);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- pixel icons ---------- */

.pxi { display: inline-block; width: 1em; height: 1em; flex: none; }
.pxi svg { width: 100%; height: 100%; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s, transform 0.12s, color 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--sm { height: 42px; padding: 0 15px; font-size: 15px; border-radius: 12px; }
.btn--lg { height: 60px; padding: 0 26px 0 22px; font-size: 19px; border-radius: 17px; }
.btn--block { width: 100%; }

.btn--primary {
  color: #fff;
  /* the mid tone sits behind the label so white text keeps 4.5:1 */
  background: #1b65f5 linear-gradient(180deg, #3a82fb 0%, #1b65f5 40%, #1553d8 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -2px 0 rgba(0, 24, 90, 0.28),
    0 12px 32px -10px rgba(40, 120, 255, 0.75);
}
.btn--primary:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 0 rgba(0, 24, 90, 0.28),
    0 14px 38px -8px rgba(40, 120, 255, 0.95);
}
.btn__tile {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: #fff;
  color: #1d68f0;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}
.btn__tile svg { width: 16px; height: 13px; }

.btn--white { background: #f4f6fa; color: #081a31; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.1); }
.btn--white:hover { background: #fff; }
.btn--ghost { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.13); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #18324f; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #f7f9fc; }

.textbtn {
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--link);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.textbtn:hover { color: #fff; }

/* ---------- banner ---------- */

.banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 52px;
  background: #1f6bff;
  color: #fff;
}
.banner[hidden] { display: none; }
.banner__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
}
.banner__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.banner__caret { width: 7px; height: 9px; }
.banner__close {
  position: absolute;
  right: 8px; top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: #fff;
  cursor: pointer;
}
.banner__close:hover { background: rgba(255, 255, 255, 0.14); }
.banner__close svg { width: 16px; height: 16px; }
.banner :focus-visible { outline-color: #fff; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 12px;
  z-index: 50;
  margin-top: 14px;
  padding: 0 var(--gutter);
  pointer-events: none;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: calc(var(--max) + 24px);
  margin: 0 auto;
}
/* past the top of the page the nav gathers into frosted pills and the brand folds down to its
   tile; every part of that change shares one easing (--nav-move), and the same in reverse */
.nav { --nav-move: 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
.nav__group {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-radius: 20px;
  pointer-events: auto;
  box-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0);
  /* the blur is there at zero so it can grow, not appear at once */
  -webkit-backdrop-filter: blur(0px) saturate(100%);
  backdrop-filter: blur(0px) saturate(100%);
  transition: background-color var(--nav-move), box-shadow var(--nav-move),
    -webkit-backdrop-filter var(--nav-move), backdrop-filter var(--nav-move);
}
.is-scrolled .nav__group {
  background: rgba(6, 26, 54, 0.8);
  box-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-right: 8px;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-decoration: none;
  transition: gap var(--nav-move), padding var(--nav-move);
}
.brand__tile {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex: none;
  border-radius: 11px;
  background: #f4f6fa;
  color: #04142b;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}
.brand__tile svg { width: 20px; height: 16px; }
.brand__name {
  display: inline-block;
  max-width: 124px; /* just over the word's own width, so its whole fold shows */
  overflow: hidden;
  white-space: nowrap;
  transition: max-width var(--nav-move), opacity var(--nav-move), translate var(--nav-move);
}
.is-scrolled .brand__name { max-width: 0; opacity: 0; translate: -8px 0; }
.is-scrolled .brand { gap: 0; padding-right: 4px; }

.nav__links { display: flex; gap: 2px; }
.nav__links a, .nav__icon {
  border-radius: 12px;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.nav__links a { padding: 10px 13px; font-size: 16px; font-weight: 500; }
.nav__links a:hover, .nav__icon:hover { background: rgba(255, 255, 255, 0.07); }
.nav__icon {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  color: var(--text-2);
}
.nav__icon:hover { color: #fff; }
.nav__icon svg { width: 19px; height: 19px; }
.nav__icon[hidden] { display: none; }
.nav__group--right .btn { margin-left: 4px; }

.nav__menu {
  display: none;
  place-items: center;
  width: 42px; height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}
.nav__menu svg { width: 18px; height: 18px; }

.menu {
  position: absolute;
  top: calc(100% + 8px);
  left: var(--gutter);
  right: var(--gutter);
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 20px;
  background: rgba(6, 26, 54, 0.98);
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.8);
  pointer-events: auto;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.menu[hidden] { display: none; }
.menu > a {
  padding: 14px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
}
.menu > a:hover { background: rgba(255, 255, 255, 0.06); }
.menu__ext {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.menu__ext a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--text-2);
  font-size: 15px;
  text-decoration: none;
}
.menu__ext a[hidden] { display: none; }
.menu__ext svg { width: 16px; height: 16px; }

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

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(640px, calc(100svh - 130px), 880px);
  padding: 48px var(--gutter) 150px;
  isolation: isolate;
}
/* tags clip at the edge of the screen, but are placed within 1440px so they stay near the headline on wide screens */
.hero__pills {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero__pills-box { position: relative; height: 100%; max-width: 1440px; margin: 0 auto; }
.pill-slot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 0;
  transform: translate(var(--ax, -50%), -50%)
    translate3d(calc(var(--mx, 0) * var(--depth, 1) * 1px), calc(var(--my, 0) * var(--depth, 1) * 1px), 0);
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* the two tags mirror each other. On wide screens they flank the subtitle (640px wide) with the same gap
   on each side, anchored by their inner edges; on narrow ones they sit in the top corners, the same
   distance in from each side. --ax picks the edge a tag is anchored by. */
.pill-slot { --depth: 0.8; }
.pill-slot:nth-child(1) { --ax: -100%; --x: calc(50% - 376px); --y: 57%; }
.pill-slot:nth-child(2) { --ax: 0%; --x: calc(50% + 376px); --y: 57%; }

/* a pixel tag, drawn like a Minecraft button in whole pixels of --p (its icon in --ip): flat
   colour, a light edge top left, a dark edge bottom right and notched corners. The hero's two
   float; the Bedrock chip in the platforms card sits still */
.hero-tag, .next-slot__chip {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--p) * 2);
  padding: calc(var(--p) * 2) calc(var(--p) * 4) calc(var(--p) * 2) calc(var(--p) * 3);
  background: var(--c);
  box-shadow:
    inset var(--p) var(--p) 0 color-mix(in srgb, var(--c), white 32%),
    inset calc(var(--p) * -1) calc(var(--p) * -1) 0 color-mix(in srgb, var(--c), black 32%);
  clip-path: polygon(
    var(--p) 0, calc(100% - var(--p)) 0, calc(100% - var(--p)) var(--p), 100% var(--p),
    100% calc(100% - var(--p)), calc(100% - var(--p)) calc(100% - var(--p)), calc(100% - var(--p)) 100%, var(--p) 100%,
    var(--p) calc(100% - var(--p)), 0 calc(100% - var(--p)), 0 var(--p), var(--p) var(--p));
  color: #fff;
  font-family: var(--pixel);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: var(--p) var(--p) 0 rgba(0, 0, 0, 0.3);
}
.hero-tag {
  font-size: 26px;
  /* bobbing and tilting on loops of different lengths, so the motion never quite repeats */
  animation: tag-float 4.2s ease-in-out infinite, tag-tilt 6.4s ease-in-out infinite;
}
/* the pixel sizes (--p for the tag, --ip for its icon) and the shadow sit on the slot: the tag's
   notched corners would clip a shadow of its own */
.hero .pill-slot { --p: 4px; --ip: 3px; filter: drop-shadow(0 calc(var(--p) * 2) 0 rgba(0, 0, 0, 0.35)); }
.hero-tag .pxi, .next-slot__chip .pxi { width: calc(var(--gw, 10) * var(--ip)); height: calc(var(--gh, 10) * var(--ip)); }
/* once the headline is in, each tag rises into place, then floats up and down and tilts a little */
.js:not(.is-ready) .hero .pill-slot { opacity: 0; animation: failsafe-show 0s 3s forwards !important; }
.is-ready .hero .pill-slot { animation: tag-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 1.1s backwards; }
.is-ready .hero .pill-slot:nth-child(2) { animation-delay: 1.3s; }
.pill-slot:nth-child(2) .hero-tag { animation-delay: -2.1s, -4.3s; }
@keyframes tag-in { from { opacity: 0; translate: 0 calc(var(--p) * 6); } }
@keyframes tag-float { 50% { translate: 0 calc(var(--p) * -3); } }
@keyframes tag-tilt {
  0%, 100% { rotate: -3deg; }
  50% { rotate: 3deg; }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.42em;
  padding: 0.5em 1em 0.5em 0.62em;
  border-radius: 999px;
  color: #fff;
  font-size: clamp(15px, 1.8vw, 27px);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  background: var(--c);
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--c), white 30%) 0%,
    var(--c) 50%,
    color-mix(in oklab, var(--c), black 14%) 100%);
  box-shadow:
    inset 0 2px 1px rgba(255, 255, 255, 0.45),
    inset 0 -4px 7px rgba(0, 0, 0, 0.2);
  rotate: var(--r, 0deg);
  /* the drop shadow is a filter, not a box-shadow: a blurred box-shadow on a tilted pill can leave a hairline beside it */
  --shadow: drop-shadow(0 12px 13px rgba(0, 0, 0, 0.5));
  filter: blur(var(--blur, 0px)) var(--shadow);
}
.pill .pxi { width: 1.3em; height: 1.3em; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.3)); }
@supports (width: round(down, 10px, 3px)) {
  .pill .pxi {
    width: max(calc(var(--gw, 10) * 1px), round(down, 1.3em, calc(var(--gw, 10) * 1px)));
    height: auto;
  }
  .pill .pxi svg { height: auto; }
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  text-align: center;
}
.hero__content::before {
  content: "";
  position: absolute;
  inset: -12% 0;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(0, 13, 31, 0.85), rgba(0, 13, 31, 0));
}
.hero__title {
  padding-bottom: 0.06em;
  font-size: clamp(48px, 7vw, 104px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.92;
  text-wrap: balance;
  color: #e9eef6;
  background: linear-gradient(180deg, #ffffff 0%, #e8edf5 42%, #a3b1c7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__sub {
  max-width: 640px;
  margin: 34px auto 0;
  color: #c8d3e4;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.4;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
}

/* ---------- pixel world ---------- */

.world {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.world canvas, .ground canvas, .cover__art {
  position: absolute;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}
.world__base, .world__twinkle { left: 0; bottom: 0; }
.world__clouds { left: 0; top: 0; animation: drift 200s linear infinite; }
.world__twinkle { animation: twinkle 6s steps(1, end) infinite; }
@keyframes drift { to { transform: translateX(calc(var(--period, 0px) * -1)); } }
@keyframes twinkle {
  30% { opacity: 0.25; }
  55% { opacity: 1; }
  80% { opacity: 0.5; }
}

/* ---------- statement ---------- */

.statement {
  max-width: 1060px;
  margin: 0 auto;
  padding: 100px var(--gutter) 60px;
  text-align: center;
}
/* the team: each player's head and shoulders, drawn from their skin, with their nickname over it */
.statement__team {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 0 auto 44px;
  padding: 0;
  list-style: none;
}
.statement__team li { display: grid; justify-items: center; gap: 22px; }
.statement__team img { width: 104px; height: auto; border-radius: 16px; }
/* a nickname as the game draws a name tag (site.js): white pixel letters on a see-through plate
   one pixel bigger than the text all round, in whole pixels of --np, about 40% of the head's height.
   The game's plate is 25% black; over this dark page it is lightened so it still shows. */
.nametag { --np: 3px; translate: 0 var(--tag-drop, 0px); }
.nametag svg { display: block; width: auto; height: calc(var(--np) * 9); }
/* a player in 3D (app.js builds it from their skin), in units of --tx, one skin pixel. The
   window shows the head and shoulders; the camera angle comes from --yaw and --pitch. */
.bust {
  --tx: 6px;
  position: relative;
  display: block;
  width: calc(var(--tx) * 17.5);
  height: calc(var(--tx) * 13.6);
  overflow: hidden;
  border-radius: 16px;
  perspective: calc(var(--tx) * 36);
  perspective-origin: 50% calc(var(--tx) * 5.2);
}
.bust__model {
  position: absolute;
  left: 50%;
  top: calc(var(--tx) * 9.2);
  transform-style: preserve-3d;
  transform-origin: 0 calc(var(--tx) * -4);
  /* a positive pitch looks down on the model: its top tips toward the viewer */
  transform: rotateX(calc(var(--pitch, 14deg) * -1)) rotateY(var(--yaw, 26deg));
}
.bust__box { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.bust__face { position: absolute; left: 0; top: 0; background-repeat: no-repeat; image-rendering: pixelated; }
.bust__face--solid { backface-visibility: hidden; }
.nametag__plate { fill: rgba(255, 255, 255, 0.13); }
.nametag__text { fill: #fff; }
/* before the script draws it, or for a name the pixel letters can't spell */
.nametag:not(.is-drawn) { padding: 4px 7px 5px; background: rgba(255, 255, 255, 0.13); color: #fff; font: 15px/1 var(--pixel); white-space: nowrap; }
.statement__text {
  font-size: clamp(28px, 4.3vw, 58px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.13;
  text-wrap: pretty;
}
.js .statement__text .w { color: var(--dim); transition: color 0.4s ease; }
.js .statement__text .w.is-lit { color: var(--text); }

/* ---------- sections ---------- */

.section {
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 120px var(--gutter);
}
.section__head {
  max-width: 860px;
  margin: 0 auto 56px;
  text-align: center;
}
.section__title {
  font-size: clamp(40px, 6.2vw, 84px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  text-wrap: balance;
}
.section__lede {
  margin-top: 20px;
  color: var(--text-2);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.45;
  text-wrap: pretty;
}

.section__more { display: flex; justify-content: center; margin-top: 28px; }
.section__more .live { margin-left: 0; }

/* ---------- bento ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 30px;
  border-radius: 26px;
  background: var(--card);
}
.card--projects { grid-column: span 7; }
.card--cadence { grid-column: span 5; }
.card--downloads { grid-column: span 5; }
.card--platforms { grid-column: span 7; }

.card__head { margin-bottom: 22px; }
.card__title {
  font-size: clamp(21px, 2vw, 26px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.card__text {
  margin-top: 8px;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.45;
}
.card__label { color: var(--text-2); font-size: 16px; font-weight: 500; }
.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
}
.card__foot .textbtn[hidden] { display: none; }

/* project list */
.plist { margin: 0 -12px; padding: 0; list-style: none; }
.plist li[hidden] { display: none; }
.prow {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 128px 64px;
  grid-template-areas: "icon name chip dl" "icon bar bar dl";
  align-items: center;
  column-gap: 14px;
  row-gap: 9px;
  padding: 9px 12px;
  border-radius: 14px;
  text-decoration: none;
  transition: background-color 0.15s;
}
.prow:hover { background: rgba(255, 255, 255, 0.045); }
.prow__icon {
  grid-area: icon;
  width: 44px; height: 44px;
  border-radius: 11px;
  background: #0d2747;
  object-fit: cover;
}
.prow__name {
  grid-area: name;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}
.prow__name span { overflow: hidden; text-overflow: ellipsis; }
.prow__name svg { width: 13px; height: 13px; flex: none; color: var(--text-3); opacity: 0; transition: opacity 0.15s; }
.prow:hover .prow__name svg, .prow:focus-visible .prow__name svg { opacity: 1; }
.prow__bar {
  grid-area: bar;
  display: block;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
}
.prow__bar i {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--bc);
}
.prow__dl {
  grid-area: dl;
  text-align: right;
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.prow .chip { grid-area: chip; justify-self: end; }
.chip {
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip--mod { color: #c4baff; background: rgba(135, 116, 232, 0.17); }
.chip--pack { color: #ffaad3; background: rgba(228, 86, 158, 0.17); }
.chip--plugin { color: #ffbe78; background: rgba(216, 119, 16, 0.18); }
.chip__short { display: none; }

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--text-3);
  font-size: 13px;
}
.live__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.live.is-live .live__dot { background: var(--pos); box-shadow: 0 0 0 3px rgba(36, 174, 86, 0.22); }

/* cadence chart */
.chart {
  position: relative;
  flex: 1 1 auto;
  min-height: 220px;
  max-height: 380px;
  margin: auto -4px 0;
}
.chart__plot { position: absolute; inset: 0; border-radius: 12px; }
.chart svg { display: block; overflow: visible; }
.chart__plot:focus { outline: none; }
.chart__plot:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.chart text { font-family: var(--font); }

/* downloads */
.figure {
  margin: 10px 0 4px;
  font-size: clamp(52px, 6vw, 74px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}
.meter { display: flex; gap: 2px; height: 14px; margin: 28px 0 20px; }
.meter__seg { flex: none; height: 100%; min-width: 4px; background: var(--sc); cursor: default; }
.meter__seg:first-child { border-radius: 4px 0 0 4px; }
.meter__seg:last-child { border-radius: 0 4px 4px 0; }
.meter__seg:only-child { border-radius: 4px; }
.legend { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.legend li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto 48px;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--sc); }
.legend .v { font-variant-numeric: tabular-nums; font-weight: 500; }
.legend .p { color: var(--text-3); text-align: right; font-variant-numeric: tabular-nums; }

/* platforms */
.loaders { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.loaders li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 15px;
  font-weight: 500;
}
.loaders .n { color: var(--text-3); font-variant-numeric: tabular-nums; }
.next-slot {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 12px 16px;
  min-height: 112px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(47, 134, 255, 0.1);
  text-decoration: none;
  transition: background-color 0.2s;
}
.next-slot:hover { background: rgba(47, 134, 255, 0.16); }
/* the Bedrock chip: a pixel tag (above), in bedrock grey */
.next-slot__chip {
  --p: 2px;
  --ip: 2px;
  --c: #5b6274;
  grid-column: 1 / -1;
  align-self: start;
  justify-self: start;
  font-size: 15px;
}
.next-slot__text { color: var(--text-2); font-size: 15px; }
.next-slot__cta { display: inline-flex; align-items: center; gap: 6px; color: var(--link); font-size: 15px; font-weight: 600; white-space: nowrap; }
.next-slot__cta svg { width: 15px; height: 15px; }

/* ---------- light section: services ---------- */

.light {
  margin: 40px 0;
  border-radius: 44px;
  background: var(--l-bg);
  color: var(--ink);
  color-scheme: light;
}
.light :focus-visible { outline-color: #1d68f0; }
.light__inner {
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 120px var(--gutter);
}
.light .section__lede, .light .service__text { color: var(--ink-2); }

.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.services + .services { margin-top: 16px; }
.services--products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 1200px) {
  .services--products .code__body { font-size: 12px; }
}
.service {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(13, 32, 54, 0.04), 0 14px 34px -22px rgba(13, 32, 54, 0.2);
}
.service__visual {
  position: relative;
  display: grid;
  place-items: center;
  height: 252px;
  overflow: hidden;
  border-radius: 19px;
  background: #f4f6fa;
}
.service__body { display: flex; flex: 1; flex-direction: column; gap: 14px; padding: 22px 16px 14px; }
.service__title { font-size: 24px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; }
.service__text { font-size: 16px; line-height: 1.5; }
.service__text code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #eef2f7;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.86em;
}
.service .btn { align-self: flex-start; margin-top: auto; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li {
  padding: 6px 11px;
  border-radius: 999px;
  background: #eef2f7;
  color: #33455e;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
}
.tags--dark { justify-content: center; }
.tags--dark li { background: rgba(255, 255, 255, 0.07); color: var(--text-2); }

/* service visual: code */
.code {
  width: calc(100% - 32px);
  max-width: 540px;
  overflow: hidden;
  border-radius: 14px;
  background: #061a33;
  box-shadow: 0 22px 44px -22px rgba(6, 26, 51, 0.55);
}
.code__tab { display: flex; padding: 9px 12px 0; background: #03122a; }
.code__file {
  padding: 7px 12px;
  border-radius: 8px 8px 0 0;
  background: #061a33;
  color: #dfe8f5;
  font: 500 12px/1 var(--mono);
}
.code__body {
  margin: 0;
  padding: 14px 16px 16px;
  overflow: hidden;
  color: #dce6f4;
  font: 12.5px/1.7 var(--mono);
  white-space: pre;
}
.code .ln { display: inline-block; width: 20px; color: #6f87ad; user-select: none; }
.code .k { color: #c9adff; }
.code .s { color: #ffadd4; }
.code .f { color: #82bbff; }
.code .a { color: #ffd27a; }

/* service visual: component inspector */
.inspect {
  width: calc(100% - 44px);
  max-width: 440px;
  padding: 6px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 44px -26px rgba(13, 32, 54, 0.4);
}
.inspect__head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 9px; }
.inspect__icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #fde7f1; }
.inspect__icon .pxi { width: 20px; height: 20px; }
.inspect__id { color: var(--ink); font: 600 13px var(--mono); }
.inspect__chip {
  margin-left: auto;
  padding: 4px 7px;
  border-radius: 6px;
  background: #fde7f1;
  color: #ad2b6b;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.inspect__rows { margin: 0; padding: 4px 0 0; }
.inspect__rows div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border-radius: 8px; }
.inspect__rows div:nth-child(2) { background: #eef5ff; }
.inspect__rows dt { color: #56667e; font: 12.5px var(--mono); }
.inspect__rows dd { margin: 0; color: var(--ink); font: 600 12.5px var(--mono); }

/* service visual: model viewport */
.viewport {
  width: calc(100% - 44px);
  max-width: 440px;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 44px -26px rgba(13, 32, 54, 0.4);
}
.viewport__cube {
  width: 100%;
  height: 150px;
  background-color: #f8fafc;
  background-image:
    linear-gradient(#edf1f6 1px, transparent 1px),
    linear-gradient(90deg, #edf1f6 1px, transparent 1px);
  background-size: 16px 16px;
}
.timeline { position: relative; padding: 6px 0 7px; }
.timeline__row { position: relative; height: 20px; }
.timeline__row::before {
  content: "";
  position: absolute;
  left: 64px; right: 12px; top: 50%;
  height: 1px;
  background: #e6ebf1;
}
.timeline__row span { position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: #5d6c82; font: 11px var(--mono); }
.timeline__row i {
  position: absolute;
  left: calc(64px + (100% - 76px) * var(--at));
  top: 50%;
  width: 8px; height: 8px;
  background: var(--ink);
  translate: -50% -50%;
  rotate: 45deg;
}
.timeline__head {
  position: absolute;
  left: calc(64px + (100% - 76px) * var(--at));
  top: 2px; bottom: 2px;
  width: 2px;
  border-radius: 1px;
  background: var(--accent);
}

/* service visual: paint */
.paint { display: flex; align-items: center; gap: 20px; }
.paint__canvas {
  padding: 8px;
  border-radius: 12px;
  background-color: #fff;
  background-image: conic-gradient(#eef1f5 25%, transparent 0 50%, #eef1f5 0 75%, transparent 0);
  background-size: 20px 20px;
  background-position: 8px 8px;
  box-shadow: 0 20px 44px -26px rgba(13, 32, 54, 0.45);
}
.pxi--sprite { width: 160px; height: 160px; }
.paint__side { display: flex; flex-direction: column; gap: 12px; }
.paint__label { color: #56667e; font: 600 12px var(--mono); }
.paint__swatches { display: grid; grid-template-columns: repeat(2, 28px); gap: 7px; }
.paint__swatches i { width: 28px; height: 28px; border-radius: 7px; background: var(--s); }
.paint__swatches i.is-on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }

/* service visual: a plugin's chest menu, drawn like the game's own container screen */
.gui {
  position: relative;
  padding: 6px 7px 8px;
  border-radius: 4px;
  background: #c6c6c6;
  box-shadow: inset 2px 2px 0 #fff, inset -2px -2px 0 #555, 0 0 0 2px #1e1e1e, 0 20px 44px -26px rgba(13, 32, 54, 0.55);
}
.gui__title { margin: 2px 2px 6px; color: #404040; font: 500 15px/1.2 var(--pixel); }
.gui__slots { display: grid; grid-template-columns: repeat(9, 36px); }
.gui__slot {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  background: #8b8b8b;
  box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff;
}
.gui__slot .pxi { width: 20px; height: 20px; }
.gui__slot.is-hover::after { content: ""; position: absolute; inset: 2px; background: rgba(255, 255, 255, 0.45); }
.gui__tip {
  --tip: rgba(16, 4, 28, 0.95);
  position: absolute;
  left: 46px;
  top: 64px;
  display: grid;
  padding: 5px 9px 6px;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--tip), var(--tip)) padding-box,
    linear-gradient(180deg, #5b2dff, #2c0f8f) border-box;
  box-shadow: 0 0 0 2px var(--tip);
  color: #a8a8a8;
  font: 400 14px/1.4 var(--pixel);
  text-shadow: 2px 2px 0 #2a2a2a;
  white-space: nowrap;
}
.gui__tip b { color: #ff9ccf; font-weight: 500; text-shadow: 2px 2px 0 #3f2433; }
.gui__tip-cta { color: #7cf27c; text-shadow: 2px 2px 0 #1f3d1f; }

.service-else {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 16px;
  padding: 26px 28px;
  border-radius: 24px;
  background: #e8edf4;
}
.service-else .service__text { margin-top: 6px; }

/* ---------- process ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step { padding: 28px; border-radius: 24px; background: var(--card); }
.ring { position: relative; display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 26px; }
.ring svg { position: absolute; inset: 0; rotate: -90deg; }
.ring__track { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 5; }
.ring__arc {
  fill: none;
  stroke: var(--c);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: calc(144.5 * var(--p)) 200;
}
.ring b { font-size: 19px; font-weight: 600; }
.step__title { margin-bottom: 8px; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.step__text { color: var(--text-2); font-size: 16px; line-height: 1.5; }

/* ---------- the not-found page (404.html) ---------- */

.lost {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  min-height: 100svh;
  padding: 48px var(--gutter);
  text-align: center;
}
.lost .brand { margin-bottom: 28px; }
.lost__code { color: var(--text-3); font: 600 20px/1 var(--pixel); letter-spacing: 0.08em; }
.lost__title { max-width: 16ch; font-size: clamp(36px, 6vw, 64px); font-weight: 650; letter-spacing: -0.035em; line-height: 1.05; }
.lost__text { max-width: 44ch; color: var(--text-2); font-size: 18px; line-height: 1.5; }
.lost .hero__actions { margin-top: 14px; }

/* ---------- common questions ---------- */

.faq { display: grid; gap: 10px; max-width: 860px; margin: 0 auto; }
.faq__item { border-radius: 20px; background: var(--card); }
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-radius: 20px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  list-style: none;
  cursor: pointer;
}
.faq__q::-webkit-details-marker { display: none; }
/* a pixel arrow that turns down when the answer is open */
.faq__q .pxi { color: var(--text-3); transition: rotate 0.2s; }
.faq__item[open] .faq__q .pxi { rotate: 90deg; }
.faq__a { max-width: 68ch; padding: 0 24px 22px; color: var(--text-2); font-size: 16px; line-height: 1.55; }
.faq__a a { color: var(--link); }

/* ---------- apply ---------- */

.request { padding-top: 60px; }
.request__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: start;
}
.request__intro { position: sticky; top: 110px; padding-top: 16px; }
.request__intro .section__title { text-align: left; }
.request__facts { display: grid; gap: 14px; margin: 34px 0 0; padding: 0; list-style: none; }
.request__facts li { display: flex; align-items: center; gap: 14px; color: var(--text-2); font-size: 16px; line-height: 1.4; }
.request__fact-icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex: none;
  border-radius: 11px;
  background: var(--surface-2);
  color: #aab4ff;
}
.request__fact-icon svg { width: 18px; height: 18px; }
.request__fact-icon .pxi { width: 20px; height: 20px; color: #9fd0ff; }
.request__alt { margin-top: 26px; color: var(--text-2); }
.request__alt[hidden] { display: none; }
.request__alt a { color: var(--link); }

.formcard { padding: 32px; border-radius: 28px; background: var(--card); }

.form { display: grid; gap: 26px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form__notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 8px 14px;
  border-radius: 12px;
  background: rgba(47, 134, 255, 0.14);
  color: var(--text-2);
  font-size: 14px;
}
.form__notice[hidden] { display: none; }
.form__notice .textbtn { padding: 6px 8px; font-size: 14px; }

.field { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field__label { padding: 0; color: var(--text); font-size: 15px; font-weight: 600; }
legend.field__label { margin-bottom: 10px; }
.field__sublabel { color: var(--text-2); font-size: 14px; font-weight: 500; }
.field__hint { margin-top: -2px; color: var(--text-3); font-size: 14px; line-height: 1.4; }
.field__hint-inline, .field__optional { margin-left: 6px; color: var(--text-3); font-size: 14px; font-weight: 400; }
.field__error { color: var(--danger); font-size: 14px; line-height: 1.4; }
.field__error:empty { display: none; }
.field__meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.counter { margin-left: auto; color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.counter.is-low { color: #ffbe78; }

.input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--field);
  color: var(--text);
  font-size: 16px;
  transition: box-shadow 0.15s, background-color 0.15s;
}
.input::placeholder { color: #60779b; }
.input:hover { background: var(--field-hover); }
.input:focus, .input--prefix:focus-within {
  outline: none;
  background: var(--field-hover);
  box-shadow: 0 0 0 3px rgba(47, 134, 255, 0.5);
}
.input[aria-invalid="true"], .input--prefix:has(input[aria-invalid="true"]) { background: #3a1f33; }
.input[aria-invalid="true"]:focus, .input--prefix:has(input[aria-invalid="true"]):focus-within { box-shadow: 0 0 0 3px rgba(255, 122, 110, 0.55); }
.input--prefix { display: flex; align-items: center; padding: 0 0 0 14px; }
.input--prefix span { color: var(--text-3); }
.input--prefix input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 14px 0 3px;
  border: 0;
  background: none;
  font-size: 16px;
}
.input--prefix input:focus { outline: none; }
.input--area { height: auto; min-height: 140px; padding: 12px 14px; line-height: 1.5; resize: vertical; }

.select { position: relative; }
.select select { padding-right: 40px; appearance: none; -webkit-appearance: none; cursor: pointer; }
.select::after {
  content: "";
  position: absolute;
  right: 17px; top: 50%;
  width: 8px; height: 8px;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  translate: 0 -70%;
  rotate: 45deg;
  pointer-events: none;
}
.select option { background: #0a2342; color: var(--text); }

/* need + segmented pickers */
.needpick { display: flex; flex-wrap: wrap; gap: 8px; }
.needpick__opt, .seg label { position: relative; }
.needpick__opt input, .seg input {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.needpick__box, .seg span {
  display: flex;
  align-items: center;
  border-radius: 12px;
  background: var(--field);
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  pointer-events: none;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.needpick__box { gap: 9px; min-height: 46px; padding: 0 15px 0 11px; }
.needpick__box .pxi { width: 20px; height: 20px; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.seg--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seg span { justify-content: center; min-height: 48px; padding: 8px 10px; text-align: center; line-height: 1.25; }
.needpick__opt:hover .needpick__box, .seg label:hover span { background: var(--field-hover); color: var(--text); }
.needpick__opt input:checked + .needpick__box, .seg input:checked + span {
  background: #1c55b8;
  color: #fff;
}
.needpick__opt input:focus-visible + .needpick__box, .seg input:focus-visible + span {
  box-shadow: 0 0 0 4px rgba(47, 134, 255, 0.4);
}
.is-invalid .needpick__box, .is-invalid .seg span { background: #3a1f33; }

.links { display: grid; gap: 8px; }
.links__row { display: flex; gap: 8px; }
.links__remove {
  display: grid;
  place-items: center;
  width: 50px; height: 50px;
  flex: none;
  border: 0;
  border-radius: 12px;
  background: var(--field);
  color: var(--text-3);
  cursor: pointer;
}
.links__remove:hover { color: #fff; background: var(--field-hover); }
.links__remove svg { width: 14px; height: 14px; }
.textbtn--add { justify-self: start; padding: 4px 0; }
.textbtn--add[hidden] { display: none; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form__alert {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 122, 110, 0.14);
}
.form__alert[hidden], .form__alert-actions[hidden], .form__alert-actions a[hidden] { display: none; }
.form__alert-text { color: #ffd6d1; font-size: 15px; line-height: 1.45; }
.form__alert-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.is-loading .spinner { display: inline-block; }
.is-loading { cursor: progress; opacity: 0.9; }
@keyframes spin { to { rotate: 360deg; } }

.result { display: grid; justify-items: center; gap: 16px; padding: 28px 8px; text-align: center; }
.result[hidden] { display: none; }
.result:focus { outline: none; }
.result__icon {
  display: grid;
  place-items: center;
  width: 68px; height: 68px;
  border-radius: 20px;
  background: rgba(36, 174, 86, 0.16);
  color: #62e294;
}
.result__icon .pxi { width: 30px; height: 30px; }
.result__title { font-size: 32px; font-weight: 600; letter-spacing: -0.03em; }
.result__text { max-width: 440px; color: var(--text-2); line-height: 1.5; }
.result__text strong { color: var(--text); font-weight: 600; }
.result .btn { margin-top: 8px; }

/* ---------- tooltip ---------- */

/* drawn like an item tooltip: dark panel, purple frame, notched corners, hard text shadow */
.tooltip {
  --tip: rgba(16, 4, 28, 0.95);
  position: fixed;
  z-index: 100;
  padding: 6px 10px 7px;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--tip), var(--tip)) padding-box,
    linear-gradient(180deg, #5b2dff, #2c0f8f) border-box;
  box-shadow: 0 0 0 2px var(--tip);
  clip-path: polygon(0 -2px, 100% -2px, 100% 0, calc(100% + 2px) 0, calc(100% + 2px) 100%, 100% 100%,
    100% calc(100% + 2px), 0 calc(100% + 2px), 0 100%, -2px 100%, -2px 0, 0 0);
  color: #bcb6d0;
  font: 400 15px/1.45 var(--pixel);
  text-shadow: 2px 2px 0 #2b2540;
  white-space: nowrap;
  pointer-events: none;
  translate: -50% calc(-100% - 14px);
}
.tooltip[hidden] { display: none; }
.tooltip b { display: block; color: #fff; font-weight: 500; text-shadow: 2px 2px 0 #3f3f3f; }

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

.footer { position: relative; overflow: hidden; margin-top: 60px; }
.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 72px var(--gutter) 0;
}
.brand__tile--lg { width: 54px; height: 54px; border-radius: 15px; }
.brand__tile--lg svg { width: 29px; height: 23px; }
.footer__tag { max-width: 340px; margin-top: 20px; color: var(--text-2); line-height: 1.5; }
.footer__legal { max-width: 380px; margin-top: 22px; color: var(--text-3); font-size: 13px; line-height: 1.55; }
.footer__head { margin-bottom: 6px; font-size: 15px; font-weight: 600; }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.footer__col a { padding: 4px 0; color: var(--link); font-size: 16px; text-decoration: none; }
.footer__col a:hover { color: #fff; }
.footer__col a[hidden] { display: none; }

.pile { position: relative; max-width: 1440px; height: 210px; margin: 36px auto 0; }
.pile .pill {
  position: absolute;
  left: var(--px);
  bottom: calc(var(--py) * 1em);
  font-size: clamp(14px, 2.3vw, 31px);
  transform: translateX(-50%);
}
.js .pile .pill { opacity: 0; }
.js .pile.is-in .pill { animation: drop 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.15) both; animation-delay: calc(var(--d) * 80ms); }
@keyframes drop {
  from { opacity: 0; translate: 0 -280px; }
  to { opacity: 1; translate: 0 0; }
}

/* the pills land on grass; below it, dirt and stone down to bedrock */
.ground { position: relative; height: 160px; overflow: hidden; }
.ground canvas { left: 0; top: 0; }
.ground__note {
  position: absolute;
  left: 50%;
  bottom: 6px;
  translate: -50% 0;
  color: #d6dde9;
  font: 500 16px/20px var(--pixel);
  letter-spacing: 0.02em;
  text-shadow: 2px 2px 0 #121317;
  white-space: nowrap;
}

/* ---------- portfolio ---------- */

.nav__links a[aria-current="page"] { background: rgba(255, 255, 255, 0.08); }
.menu > a[aria-current="page"] { background: rgba(255, 255, 255, 0.06); }
.footer__col a[aria-current="page"] { color: #fff; }

.hero--page { min-height: clamp(560px, calc(80svh - 80px), 720px); }
.hero--page .hero__title { font-size: clamp(50px, 7.6vw, 108px); }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  padding: 8px 14px 8px 10px;
  border-radius: 12px;
  background: rgba(13, 40, 76, 0.85);
  color: #cfe0ff;
  font: 500 17px/1 var(--pixel);
  letter-spacing: 0.02em;
}
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}
.hero__stats li {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(13, 40, 76, 0.85);
  color: var(--text-2);
  font-size: 16px;
}
.hero__stats b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* an inventory slot: sunken edge top left, lit edge bottom right */
.slot {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 72px; height: 72px;
  background: #102a4c;
  box-shadow: inset 4px 4px 0 #041127, inset -4px -4px 0 #2a4c7b;
}
.slot img { width: 56px; height: 56px; }
.slot--lg { width: 88px; height: 88px; }
.slot--lg img { width: 72px; height: 72px; }
.light .slot { background: #8b8b8b; box-shadow: inset 4px 4px 0 #373737, inset -4px -4px 0 #fff; }

.light .chip--mod { color: #5a46c4; background: #eeeaff; }
.light .chip--pack { color: #ad2d6b; background: #fde6f1; }
.light .chip--plugin { color: #9a5205; background: #fff0de; }

/* spotlight */
.spots { display: grid; gap: 20px; }
.spot {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(13, 32, 54, 0.04), 0 14px 34px -22px rgba(13, 32, 54, 0.2);
}
.spot:nth-child(even) .spot__visual { order: 2; }
.spot__visual { position: relative; display: grid; gap: 8px; }
.spot--banner .spot__visual { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.spot--banner .shot { aspect-ratio: 1600 / 856; }
.spot--banner .shot:first-child { grid-column: 1 / -1; aspect-ratio: 4 / 1; }
.spot--strip .spot__visual { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.spot--strip .shot { aspect-ratio: 694 / 434; border-radius: 12px; }
.spot--strip .shot:first-child { grid-column: 1 / -1; border-radius: 18px; }
.spot--grid .spot__visual { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.spot--grid .shot { aspect-ratio: 634 / 260; }
.spot--grid .shot img { object-position: center top; }
.spot--wide .spot__visual { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.spot--wide .shot { aspect-ratio: 16 / 9; border-radius: 12px; }
.spot--wide .shot:first-child { grid-column: 1 / -1; aspect-ratio: 1600 / 856; border-radius: 18px; }

.shot {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #0c1f35;
  cursor: zoom-in;
}
.shot img, .shot video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.shot:hover img, .shot:hover video { transform: scale(1.035); }
/* clips: a play badge on ones that open in the lightbox, a pause/play button on one playing in place */
.shot__play, .shot-toggle {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(3, 17, 39, 0.75);
  color: #fff;
}
.shot__play { position: absolute; inset: 0; margin: auto; }
.shot-toggle { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 0; border: 0; cursor: pointer; }
.shot-toggle:hover { background: rgba(3, 17, 39, 0.92); }
.light .shot-toggle:focus-visible { outline: 3px solid #1d68f0; outline-offset: 3px; }
.shot__zoom {
  position: absolute;
  right: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(3, 17, 39, 0.75);
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s;
}
.shot:hover .shot__zoom, .shot:focus-visible .shot__zoom { opacity: 1; }
.light .shot:focus-visible { outline: 3px solid #1d68f0; outline-offset: 3px; }

.spot__body { display: flex; flex-direction: column; gap: 18px; padding: 20px 18px 16px; }
.spot__head { display: flex; align-items: center; gap: 18px; }
.spot__name { display: grid; justify-items: start; gap: 9px; min-width: 0; }
.spot__title { font-size: clamp(24px, 2.3vw, 30px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.spot__text { color: var(--ink-2); font-size: 17px; line-height: 1.5; }
.spot__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  margin: 0;
}
.spot__facts dt { color: var(--ink-2); font-size: 13px; }
.spot__facts dd { margin: 2px 0 0; color: var(--ink); font-size: 16px; font-weight: 600; }
.spot .btn { align-self: flex-start; }

/* project cards */
.works { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.work {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
}
.work__cover { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #04132a; }
/* a little above centre, clear of the slot that overlaps the bottom edge */
.cover__icon, .cover__shot {
  position: absolute;
  left: 50%;
  top: 46%;
  translate: -50% -50%;
}
.cover__icon { width: 128px; height: 128px; }
.cover__shot { width: auto; height: auto; max-width: 88%; max-height: 74%; } /* wide shots fit instead of cropping */
.cover__open {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.cover__open:focus-visible { outline-offset: -4px; }
.cover__badge {
  position: absolute;
  right: 10px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 9px;
  background: rgba(0, 6, 16, 0.72);
  color: #fff;
  font: 500 14px/1 var(--pixel);
}
.cover__badge .pxi { width: 18px; height: 18px; }
/* a line of chat, the way the command looks in game */
.cover__cmd {
  position: absolute;
  left: 8px;
  top: 8px;
  max-width: calc(100% - 16px);
  padding: 5px 8px 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font: 400 16px/1.2 var(--pixel);
  text-shadow: 2px 2px 0 #3f3f3f;
  white-space: nowrap;
}
.cover__cmd i {
  display: inline-block;
  width: 8px; height: 2px;
  margin-left: 2px;
  background: #fff;
  box-shadow: 2px 2px 0 #3f3f3f;
  animation: caret 1.1s steps(1, end) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.work__body { display: flex; flex: 1; flex-direction: column; gap: 12px; padding: 0 20px 20px; }
.work__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: -36px;
}
.work__top .chip { margin-bottom: 4px; }
.work__title { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.work__link { text-decoration: none; }
.work__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.work__link svg { display: inline-block; width: 13px; height: 13px; margin-left: 6px; color: var(--text-3); vertical-align: 1px; }
.work__text { color: var(--text-2); font-size: 15px; line-height: 1.5; }
.work__meta { display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 0; padding: 4px 0 0; list-style: none; }
.work__meta li {
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.work--next {
  justify-content: center;
  align-items: flex-start;
  gap: 14px;
  padding: 26px 22px;
  background: rgba(47, 134, 255, 0.1);
}
.work--next .slot { margin-bottom: 6px; }
.work--next .btn { margin-top: 4px; }

.cta { text-align: center; padding-top: 60px; }
.cta__tile {
  display: inline-grid;
  place-items: center;
  width: 88px; height: 88px;
  margin-bottom: 30px;
  border-radius: 24px;
  background: var(--surface-2);
  box-shadow: 0 24px 60px -24px rgba(80, 200, 120, 0.45);
}
.cta .section__lede { max-width: 560px; margin-left: auto; margin-right: auto; }
.cta .hero__actions { margin-top: 34px; }

/* lightbox */
.has-dialog { overflow: hidden; }
.lightbox {
  width: min(1180px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background: #031127;
  color: var(--text);
}
.lightbox::backdrop { background: rgba(0, 5, 14, 0.86); }
.lightbox__head { display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 22px; }
.lightbox__title {
  min-width: 0;
  overflow: hidden;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lightbox__count { flex: none; color: var(--text-3); font: 15px/1 var(--pixel); }
#lightbox-close { margin-left: auto; }
.lightbox__btn {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  flex: none;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  cursor: pointer;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.14); }
.lightbox__btn svg { width: 18px; height: 18px; }
.lightbox__fig { margin: 0; padding: 0 12px 16px; }
.lightbox__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 200px;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
}
.lightbox__img { width: auto; max-width: 100%; height: auto; max-height: calc(100dvh - 200px); }
.lightbox__video { width: 100%; } /* small clips fill the stage instead of sitting at their own size */
.lightbox__btn--prev, .lightbox__btn--next { position: absolute; top: 50%; translate: 0 -50%; background: rgba(3, 17, 39, 0.78); }
.lightbox__btn--prev { left: 12px; }
.lightbox__btn--prev svg { scale: -1 1; }
.lightbox__btn--next { right: 12px; }
.lightbox__caption { padding: 14px 10px 0; color: var(--text-2); font-size: 16px; line-height: 1.45; }

/* ---------- entrance: the headline appears word by word ---------- */

/* site.js splits the headline and subtitle into words (keeping a plain copy for screen readers),
   then adds .is-ready. Until then the hero text is held back; it shows after 3s regardless. */
.js:not(.is-ready) .hero__content > * { opacity: 0; animation: failsafe-show 0s 3s forwards !important; }

/* each word carries its own slice of the headline's gradient, lined up by site.js (--th, --ty) */
.hero__title.is-split { background: none; }
.hero__title .w {
  display: inline-block;
  padding: 0.1em 0.05em 0.16em 0;
  margin: -0.1em -0.05em -0.16em 0;
  background: linear-gradient(180deg, #ffffff 0%, #e8edf5 42%, #a3b1c7 100%) 0 var(--ty, 0px) / 100% var(--th, 100%) no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
}
.hero__sub .w { display: inline-block; }

.is-ready .hero__content .w {
  animation: word-in 1.1s cubic-bezier(0.2, 0.75, 0.25, 1) backwards;
  animation-delay: calc(var(--wd, 0ms) + var(--wi, 0) * var(--ws, 60ms));
}
/* the rest of the hero follows the words */
.is-ready .hero__content .kicker,
.is-ready .hero__content .hero__actions,
.is-ready .hero__content .hero__stats {
  animation: word-in 1s cubic-bezier(0.2, 0.75, 0.25, 1) backwards;
  animation-delay: var(--after, 0ms);
}
.hero__actions, .hero__stats { --after: 950ms; }
@keyframes word-in { from { opacity: 0; translate: 0 0.45em; filter: blur(14px); } }
@keyframes word-fade { from { opacity: 0; filter: blur(14px); } }
@keyframes failsafe-show { to { opacity: 1; } }

/* sections, cards and steps appear as they scroll into view (site.js adds .reveal and .is-in) */
.js .reveal { opacity: 0; }
.js .reveal.is-in { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    translate: 0 28px;
    transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), translate 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: calc(var(--i, 0) * 90ms);
  }
  .js .reveal.is-in { translate: 0 0; }
}

@media print {
  .reveal { opacity: 1 !important; translate: none !important; }
}

/* ---------- responsive ---------- */

@media (max-width: 1023px) {
  .card--projects, .card--platforms { grid-column: 1 / -1; }
  .card--cadence, .card--downloads { grid-column: span 6; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request__grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .request__intro { position: static; }
}

@media (max-width: 1180px) {
  .works { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* three across needs room for the chest menu's nine slots */
@media (max-width: 1279px) {
  .hero .pill-slot { --p: 3px; --ip: 2px; }
  .hero-tag { font-size: 20px; }
  .pill-slot:nth-child(1) { --ax: 0%; --x: 5%; --y: 7%; }
  .pill-slot:nth-child(2) { --ax: -100%; --x: 95%; --y: 7%; }
}

@media (max-width: 1199px) {
  .services--products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services--products .service:last-child { grid-column: 1 / -1; }
}

@media (max-width: 959px) {
  .spot { grid-template-columns: minmax(0, 1fr); }
  .spot:nth-child(even) .spot__visual { order: 0; }
}

@media (max-width: 899px) {
  .services, .services--products { grid-template-columns: minmax(0, 1fr); }
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .nav__links, .nav__icon { display: none; }
  .nav__icon[hidden] { display: none; }
  .nav__menu { display: grid; }
  .footer__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer__brand { grid-column: 1 / -1; }
}
@media (min-width: 821px) {
  .menu { display: none !important; }
}

@media (max-width: 719px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .bento > * { grid-column: 1 / -1 !important; }
  .card { padding: 22px; border-radius: 22px; }
  .section { padding: 84px var(--gutter); }
  .light__inner { padding: 84px var(--gutter); }
  .light { border-radius: 30px; }
  .section__head { margin-bottom: 40px; }
  .statement { padding: 72px var(--gutter) 24px; }
  .statement__team { gap: 18px; margin-bottom: 32px; }
  .statement__team img { width: 80px; border-radius: 12px; }
  .statement__team li { gap: 16px; }
  .nametag { --np: 2px; }
  .bust { --tx: 4.5px; border-radius: 12px; }

  .hero { min-height: 640px; padding: 104px var(--gutter) 128px; }
  .hero--page { min-height: 560px; padding: 72px var(--gutter) 120px; }
  .hero__sub { margin-top: 24px; }
  .hero__actions { flex-direction: column; align-items: stretch; max-width: 360px; margin: 32px auto 0; }
  .pill { font-size: 13px; filter: blur(calc(var(--blur, 0px) * 0.5)) var(--shadow); }
  .hero .pill-slot { --p: 2px; --ip: 2px; }
  .hero-tag { font-size: 15px; }
  .pill-slot:nth-child(1) { --x: 7%; --y: 7%; }
  .pill-slot:nth-child(2) { --x: 93%; --y: 7%; }

  .prow {
    grid-template-columns: 40px 62px minmax(0, 1fr) 48px;
    grid-template-areas: "icon name name dl" "icon chip bar dl";
    column-gap: 10px;
    row-gap: 7px;
  }
  .prow .chip { justify-self: start; }
  .prow__icon { width: 40px; height: 40px; border-radius: 10px; }
  .prow__name { font-size: 15px; white-space: normal; line-height: 1.25; }
  .chip { font-size: 10.5px; padding: 5px 7px; }
  .chip__full { display: none; }
  .chip__short { display: inline; }
  .next-slot__cta { grid-column: 1 / -1; }

  .service__visual { height: 220px; }
  .code { width: calc(100% - 24px); }
  .code__body { font-size: 10.5px; padding: 12px 8px; }
  /* six pills, spaced for a narrow screen: three on the grass, three resting on them */
  .pile .pill:nth-child(3) { display: none; }
  .pile .pill:nth-child(1) { --px: 16% !important; --py: 2.05 !important; --r: -10deg !important; }
  .pile .pill:nth-child(2) { --px: 17% !important; }
  .pile .pill:nth-child(4) { --px: 50% !important; }
  .pile .pill:nth-child(5) { --px: 51% !important; --py: 2.05 !important; --r: 8deg !important; }
  .pile .pill:nth-child(6) { --px: 83% !important; }
  .pile .pill:nth-child(7) { --px: 81% !important; --py: 2.1 !important; --r: 26deg !important; }
  .service-else { flex-direction: column; align-items: flex-start; padding: 22px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step { padding: 22px; }

  .formcard { padding: 20px; border-radius: 22px; }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .seg--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pile { height: 150px; }
  .ground { height: 128px; }

  .spot { padding: 8px; border-radius: 24px; }
  .spot__visual { gap: 6px; }
  .shot { border-radius: 14px; }
  .spot--strip .shot, .spot--wide .shot { border-radius: 8px; }
  .spot__body { padding: 16px 10px 10px; }
  .slot--lg { width: 72px; height: 72px; }
  .slot--lg img { width: 56px; height: 56px; }
  .lightbox { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 18px; }
  .lightbox__head { padding-left: 16px; }
  .lightbox__fig { padding: 0 8px 12px; }
  .lightbox__btn--prev, .lightbox__btn--next { width: 38px; height: 38px; }
  .lightbox__btn--prev { left: 6px; }
  .lightbox__btn--next { right: 6px; }
}

@media (max-width: 560px) {
  .works { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 370px) {
  .brand__name { display: none; }
}

@media (max-width: 400px) {
  .paint { gap: 12px; }
  .pxi--sprite { width: 128px; height: 128px; }
  .inspect__rows dt, .inspect__rows dd { font-size: 11.5px; }
  .gui__slots { grid-template-columns: repeat(9, 30px); }
  .gui__slot { width: 30px; height: 30px; }
  .gui__slot .pxi { width: 18px; height: 18px; }
}

/* the smallest phones (320px wide) */
@media (max-width: 359px) {
  .code__body { font-size: 9px; }
  .gui__slots { grid-template-columns: repeat(9, 27px); }
  .gui__slot { width: 27px; height: 27px; }
  .gui__slot .pxi { width: 16px; height: 16px; }
  .pile .pill { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  /* the nav keeps its fold, as the site owner asked for it */
  .nav__group { transition: background-color var(--nav-move), box-shadow var(--nav-move), -webkit-backdrop-filter var(--nav-move), backdrop-filter var(--nav-move) !important; }
  .brand { transition: gap var(--nav-move), padding var(--nav-move) !important; }
  .brand__name { transition: max-width var(--nav-move), opacity var(--nav-move), translate var(--nav-move) !important; }
  /* the hero tags keep their entrance, float and tilt */
  .is-ready .hero .pill-slot { animation: tag-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 1.1s backwards !important; }
  .is-ready .hero .pill-slot:nth-child(2) { animation-delay: 1.3s !important; }
  .hero-tag { animation: tag-float 4.2s ease-in-out infinite, tag-tilt 6.4s ease-in-out infinite !important; }
  .pill-slot:nth-child(2) .hero-tag { animation-delay: -2.1s, -4.3s !important; }
  .js .statement__text .w { color: var(--text); }
  .js .pile .pill { opacity: 1; }
}

/* Reduced motion: the words still appear, fading in from a blur without moving.
   These beat the rule above because they are more specific. */
@media (prefers-reduced-motion: reduce) {
  .is-ready .hero__content .w {
    animation: word-fade 1.1s cubic-bezier(0.2, 0.75, 0.25, 1) backwards !important;
    animation-delay: calc(var(--wd, 0ms) + var(--wi, 0) * var(--ws, 60ms)) !important;
  }
  .is-ready .hero__content .kicker,
  .is-ready .hero__content .hero__actions,
  .is-ready .hero__content .hero__stats {
    animation: word-fade 1s cubic-bezier(0.2, 0.75, 0.25, 1) backwards !important;
    animation-delay: var(--after, 0ms) !important;
  }
  .js .reveal { transition: opacity 0.6s ease !important; transition-delay: calc(var(--i, 0) * 90ms) !important; }
}

@media (forced-colors: active) {
  .pill, .hero-tag, .next-slot__chip, .btn, .chip, .slot { border: 1px solid CanvasText; }
  .world, .ground canvas { display: none; }
}
