/* Luma Core — site styles */
:root {
  --bg: #0a0c13;
  --surface: #131724;
  --surface-2: #1b2031;
  --line: rgba(255, 255, 255, 0.09);
  --text: #eef1f8;
  --muted: #98a1b8;
  --accent: #ffc94d;
  --accent-ink: #1a1405;
  --accent-2: #6ee7ff;
  --ok: #4fd38a;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --max: 1180px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f4f8;
    --surface: #ffffff;
    --surface-2: #e9ebf2;
    --line: rgba(15, 20, 40, 0.11);
    --text: #141824;
    --muted: #5b6478;
    --accent: #e0a100;
    --accent-2: #0a8fb0;
    --ok: #17915a;
    --shadow: 0 20px 40px rgba(30, 40, 80, 0.14);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f3f4f8;
  --surface: #ffffff;
  --surface-2: #e9ebf2;
  --line: rgba(15, 20, 40, 0.11);
  --text: #141824;
  --muted: #5b6478;
  --accent: #e0a100;
  --accent-2: #0a8fb0;
  --ok: #17915a;
  --shadow: 0 20px 40px rgba(30, 40, 80, 0.14);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Outfit", "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.12; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

/* ---------- header ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 1.35rem; font-weight: 300; }
.brand b { font-weight: 700; }
.brand svg, .brand img { width: 38px; height: 38px; border-radius: 10px; }
.nav nav { display: flex; gap: 4px; margin-inline: auto; flex-wrap: wrap; }
.nav nav a {
  padding: 8px 16px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 0.95rem;
}
.nav nav a:hover { color: var(--text); background: var(--surface-2); }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); cursor: pointer; font-size: 1.05rem;
}
.icon-btn:hover { background: var(--surface-2); }

/* ---------- buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 24px; border-radius: 999px; font: inherit; font-weight: 600;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: default; transform: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.78rem; font-weight: 600; padding: 4px 11px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.chip.released::before, .chip.complete::before { background: var(--ok); }
.chip.planned::before { background: var(--muted); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 48px 0 28px; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% 0; z-index: -1;
  background:
    radial-gradient(48% 55% at 26% 40%, color-mix(in srgb, var(--c1, #8f7bff) 34%, transparent), transparent 70%),
    radial-gradient(40% 50% at 82% 30%, color-mix(in srgb, var(--c2, #2ad4c4) 26%, transparent), transparent 70%);
  transition: background 0.6s;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero-info { display: grid; gap: 18px; justify-items: start; }
.counter { display: flex; align-items: center; gap: 14px; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.counter i { width: 56px; height: 1px; background: var(--line); }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.hero .tagline { font-size: clamp(1.15rem, 2vw, 1.5rem); color: var(--muted); }
.hero .tagline span { display: block; }
.hero-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 6px; }

/* AYN Thor mock-up, drawn after the retro-grey model with coloured face buttons. */
.thor { width: min(480px, 100%); margin-inline: auto; container-type: inline-size; position: relative;
  --s1: #e2ded6; --s2: #cfcac1; --s3: #b4afa6; --s4: #979289;   /* shell: light to dark */
  --cap: #6f6d69; --cap2: #4f4d4a; --glass: #09090b; --led: #39d7ff;   /* --led: stick ring colour */
  filter: drop-shadow(0 5cqw 6cqw rgba(0, 0, 0, 0.55)); }

.t-lid { position: relative; margin: 0 2.2cqw; padding: 1.5cqw 1.5cqw 1.9cqw; border-radius: 4.2cqw 4.2cqw 1.2cqw 1.2cqw;
  background: linear-gradient(175deg, var(--s1), var(--s2) 60%, var(--s3));
  box-shadow: inset 0 0.3cqw 0 rgba(255, 255, 255, 0.7), inset 0 -0.3cqw 0.5cqw rgba(0, 0, 0, 0.18); }
.t-glass { position: relative; border-radius: 3cqw 3cqw 0.9cqw 0.9cqw; background: var(--glass); padding: 1.3cqw 2.3cqw 1.5cqw; overflow: hidden;
  box-shadow: 0 0 0 0.25cqw rgba(0, 0, 0, 0.25); }
.t-glass::after, .t-panel::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 20%, transparent 34%); }
.t-cam { position: absolute; top: 0.35cqw; left: 50%; width: 0.7cqw; aspect-ratio: 1; border-radius: 50%; background: #1b1c22; }
.t-top { aspect-ratio: 16 / 9; border-radius: 0.7cqw; overflow: hidden; background: #000; position: relative; }

/* hinge: two lid ears with the barrel between them */
.t-hinge { height: 6.6cqw; margin: -0.5cqw 2.2cqw 0; position: relative; z-index: 2; display: grid; grid-template-columns: 12.5cqw 1fr 12.5cqw; }
.t-hinge i { background: linear-gradient(var(--s2), var(--s3)); box-shadow: inset 0 -0.4cqw 0.6cqw rgba(0, 0, 0, 0.2); }
.t-hinge i:first-child { border-radius: 0 0 0.8cqw 2.2cqw; }
.t-hinge i:last-child { border-radius: 0 0 2.2cqw 0.8cqw; }
.t-hinge i:nth-child(2) { margin: 0.5cqw 0.4cqw 0.7cqw; border-radius: 0.8cqw 0.8cqw 1.6cqw 1.6cqw;
  background: linear-gradient(#f0ede6 0%, var(--s1) 22%, var(--s2) 55%, var(--s4) 92%, var(--s3) 100%);
  box-shadow: 0 0.3cqw 0.5cqw rgba(0, 0, 0, 0.3); }

.t-base { position: relative; margin-top: -1.3cqw; border-radius: 3.2cqw 3.2cqw 8.5cqw 8.5cqw; padding: 4.6cqw 2.6cqw 9cqw;
  background: linear-gradient(178deg, var(--s1) 0%, var(--s2) 55%, var(--s3) 100%);
  box-shadow: inset 0 0.35cqw 0 rgba(255, 255, 255, 0.75), inset 0 -1cqw 1.4cqw rgba(0, 0, 0, 0.16), inset 0.5cqw 0 0.6cqw rgba(255, 255, 255, 0.25), inset -0.5cqw 0 0.6cqw rgba(0, 0, 0, 0.08);
  display: grid; grid-template-columns: 1fr 48cqw 1fr; align-items: center; }
.t-panel { position: relative; background: var(--glass); border-radius: 1.8cqw; padding: 1cqw; overflow: hidden;
  box-shadow: 0 0 0 0.3cqw rgba(0, 0, 0, 0.2), 0 0.4cqw 0.5cqw rgba(255, 255, 255, 0.4); }
.t-bottom { aspect-ratio: 1240 / 1080; border-radius: 1cqw; overflow: hidden; background: #000; }
.t-pad { display: grid; justify-items: center; gap: 4.6cqw; }

/* sticks: dark concave cap in a shallow well */
.t-stick { width: 9.4cqw; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, var(--cap2) 0 38%, var(--cap) 62%, #807e7a 100%);
  box-shadow: inset 0 0.4cqw 0.5cqw rgba(255, 255, 255, 0.25), inset 0 -0.5cqw 0.6cqw rgba(0, 0, 0, 0.35),
    0 0 0 0.5cqw var(--s4), 0 0 0 1.5cqw var(--led), 0 0 0 2cqw var(--s3), 0 0 0 2.3cqw rgba(255, 255, 255, 0.5),
    0 0 2.6cqw 1.6cqw color-mix(in srgb, var(--led) 50%, transparent); }
.t-dpad { width: 13.4cqw; aspect-ratio: 1; border-radius: 50%; position: relative;
  background: radial-gradient(circle, var(--s3), var(--s2) 75%); box-shadow: inset 0 0.4cqw 0.6cqw rgba(0, 0, 0, 0.22), 0 0.3cqw 0 rgba(255, 255, 255, 0.5); }
.t-dpad::before { content: ""; position: absolute; inset: 9%; background: linear-gradient(160deg, #94918c, #757370);
  clip-path: polygon(33% 0, 67% 0, 67% 33%, 100% 33%, 100% 67%, 67% 67%, 67% 100%, 33% 100%, 33% 67%, 0 67%, 0 33%, 33% 33%);
  filter: drop-shadow(0 0.3cqw 0 rgba(0, 0, 0, 0.35)); }
.t-dpad::after { content: ""; position: absolute; inset: 41%; border-radius: 50%; background: rgba(0, 0, 0, 0.22); }

/* coloured face buttons in a round well */
.t-abxy { width: 17.4cqw; aspect-ratio: 1; position: relative; border-radius: 50%;
  background: radial-gradient(circle, var(--s2), var(--s3)); box-shadow: inset 0 0.4cqw 0.7cqw rgba(0, 0, 0, 0.2), 0 0.3cqw 0 rgba(255, 255, 255, 0.55); }
.t-abxy b { position: absolute; width: 5.6cqw; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  font: 700 2.7cqw/1 "Outfit", sans-serif; color: #fff;
  box-shadow: 0 0.35cqw 0 rgba(0, 0, 0, 0.35), inset 0 0.3cqw 0.3cqw rgba(255, 255, 255, 0.45), inset 0 -0.4cqw 0.4cqw rgba(0, 0, 0, 0.25); }
.t-abxy b:nth-child(1) { top: 4%; left: 50%; translate: -50% 0; background: #2f57cc; }
.t-abxy b:nth-child(2) { bottom: 4%; left: 50%; translate: -50% 0; background: #f2c11b; }
.t-abxy b:nth-child(3) { left: 4%; top: 50%; translate: 0 -50%; background: #2d9a4b; }
.t-abxy b:nth-child(4) { right: 4%; top: 50%; translate: 0 -50%; background: #d52b2b; }

/* small round buttons, speaker slits and the port tab */
.t-dot { position: absolute; width: 2.7cqw; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #f1eee8, var(--s2));
  box-shadow: 0 0.25cqw 0.3cqw rgba(0, 0, 0, 0.35), inset 0 0 0 0.15cqw rgba(0, 0, 0, 0.08); }
.t-dot.tl { top: 4cqw; left: 19.4cqw; } .t-dot.tr { top: 4cqw; right: 19.4cqw; }
.t-dot.bl { bottom: 7.2cqw; left: 17.6cqw; } .t-dot.br { bottom: 7.2cqw; right: 17.6cqw; }
.t-slit { position: absolute; bottom: 7.9cqw; width: 8.6cqw; height: 1.2cqw; border-radius: 1cqw; background: #2b2a28; box-shadow: 0 0.25cqw 0 rgba(255, 255, 255, 0.5); }
.t-slit.l { left: 7.4cqw; } .t-slit.r { right: 7.4cqw; }
.t-tab { position: absolute; bottom: 0; left: 50%; translate: -50% 0; width: 25cqw; height: 6.2cqw; border-radius: 1.6cqw 1.6cqw 0 0;
  background: linear-gradient(var(--s1), var(--s2)); box-shadow: inset 0 0.3cqw 0 rgba(255, 255, 255, 0.7), 0 0 0 0.2cqw rgba(0, 0, 0, 0.12); }
.t-tab::after { content: ""; position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 8cqw; height: 2.6cqw; border-radius: 0.6cqw; background: #151517; }
.t-lip { height: 2.6cqw; margin: -0.4cqw 9cqw 0; position: relative; z-index: -1; display: flex; justify-content: space-between; padding: 0 18cqw; }
.t-lip::before, .t-lip::after { content: ""; width: 9cqw; height: 100%; border-radius: 0 0 1.2cqw 1.2cqw; background: linear-gradient(#3a3937, #1c1b1a); }

/* what sits on the screens */
.t-top::before { content: ""; position: absolute; inset: -6cqw; background: var(--fill) center / cover; filter: blur(4cqw) brightness(0.4); }
.t-top .compare { background: transparent; }
.t-top img.shot, .t-top .compare { width: 100%; height: 100%; position: relative; }
.t-top img.shot { object-fit: contain; }
.t-bottom > img { width: 100%; height: 100%; object-fit: cover; }

/* bottom-screen info panel */
.panel {
  height: 100%; padding: 8% 9%; display: flex; flex-direction: column; gap: 6%;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c1, #8f7bff) 40%, #0b0d14), #0b0d14 75%);
  color: #eef1f8; font-size: 2.7cqw;
}
.panel .row { display: flex; align-items: center; gap: 8%; }
.panel img { width: 26%; aspect-ratio: 1; border-radius: 18%; }
.panel b { font-size: 1.2em; line-height: 1.15; }
.panel small { color: #b3bbd0; }
.panel .meter { margin-top: auto; }
.meter { height: 8px; border-radius: 99px; background: rgba(128, 136, 160, 0.25); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* before / after slider */
.compare { position: relative; overflow: hidden; background: #000; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.compare .before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare .before.lo { filter: blur(2.2px) saturate(0.75) contrast(0.92); }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: #fff; transform: translateX(-1px); pointer-events: none; }
.compare .handle::after {
  content: "‹ ›"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #141824;
  display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.compare .tag {
  position: absolute; top: 8px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.6); color: #fff; pointer-events: none;
}
.compare .tag.l { left: 8px; }
.compare .tag.r { right: 8px; }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare:has(input:focus-visible) { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* project strip */
.strip { display: flex; gap: 10px; margin-top: 40px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: thin; }
.strip button {
  flex: 1 0 150px; display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font: inherit; font-size: 0.82rem; font-weight: 600; line-height: 1.2; cursor: pointer;
}
.strip button img { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.strip button[aria-current="true"] { color: var(--text); border-color: var(--accent-2); background: var(--surface-2); }

/* ---------- sections ---------- */
section.block { padding: 72px 0; }
.section-head { display: grid; gap: 8px; margin-bottom: 30px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.grid a.block:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* artwork blocks: text is always light because it sits on the image */
a.block {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: clamp(320px, 31vw, 400px); padding: 26px 28px 28px;
  border-radius: 28px; color: #fff;
  background: color-mix(in srgb, var(--c2) 70%, #0a0c13);
  border: 1px solid color-mix(in srgb, var(--c1) 45%, rgba(255, 255, 255, 0.18));
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--c1) 12%, var(--surface)), var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}
a.block:hover { transform: translateY(-5px); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c1) 30%, var(--surface)), var(--shadow); }
.block-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 0.6s; }
a.block:hover .block-bg { transform: scale(1.05); }
a.block::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, color-mix(in srgb, var(--c2) 78%, #05060a) 0%, color-mix(in srgb, var(--c2) 55%, transparent) 38%, transparent 78%),
    linear-gradient(to right, rgba(5, 6, 10, 0.5), transparent 62%);
}
.block-bg.blur { filter: blur(40px) saturate(1.4); scale: 1.4; }
.block-feature {
  position: absolute; right: 7%; top: 50%; translate: 0 -54%; height: 58%; aspect-ratio: 1; object-fit: cover;
  border-radius: 22%; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35), 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 70px color-mix(in srgb, var(--c1) 55%, transparent);
  rotate: 4deg; transition: rotate 0.4s, scale 0.4s;
}
a.block:hover .block-feature { rotate: 0deg; scale: 1.05; }
.block-top, .block-body { position: relative; }
.block-logo { margin-left: auto; }
.block-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
a.block .chip { background: rgba(10, 14, 22, 0.78); color: #fff; border-color: rgba(255, 255, 255, 0.14); backdrop-filter: blur(6px); padding: 7px 14px; font-size: 0.82rem; }
.block-logo { max-width: 34%; max-height: 84px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6)); }
.block-logo.icon { width: 54px; height: 54px; border-radius: 13px; border: 2px solid rgba(255, 255, 255, 0.85); }
.block-body { display: grid; gap: 10px; justify-items: start; max-width: 78%; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); }
a.block .eyebrow { color: rgba(255, 255, 255, 0.82); }
a.block h3 { font-size: clamp(1.6rem, 2.7vw, 2.3rem); }
a.block .tagline { font-size: 1.08rem; color: rgba(255, 255, 255, 0.88); }
a.block .tagline span { display: block; }
a.block .btn { margin-top: 10px; background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.28); color: #fff; backdrop-filter: blur(6px); text-shadow: none; gap: 28px; }
a.block:hover .btn { background: rgba(255, 255, 255, 0.22); }
.block-num { position: absolute; right: 26px; bottom: 14px; font-size: clamp(3rem, 6vw, 4.6rem); font-weight: 300; line-height: 1; letter-spacing: -0.04em; color: rgba(255, 255, 255, 0.2); }

/* progress */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 22px; flex-wrap: wrap; }
.tabs button { padding: 8px 18px; border-radius: 999px; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; font-size: 0.92rem; cursor: pointer; }
.tabs button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.rows { display: grid; gap: 12px; }
.prow { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 10px; }
.prow-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.prow-top img { width: 44px; height: 44px; border-radius: 11px; }
.prow-top h3 { font-size: 1.1rem; }
.prow-top h3 a:hover { color: var(--accent-2); }
.prow-top .pct { margin-left: auto; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.prow-top .pct small { font-size: 0.6em; color: var(--muted); }
.checks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; font-size: 0.92rem; color: var(--muted); }
.checks li { display: flex; gap: 10px; align-items: baseline; }
.checks li::before { content: "○"; color: var(--muted); }
.checks li.done { color: var(--text); }
.checks li.done::before { content: "●"; color: var(--ok); }

/* about */
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: start; }
.about p { font-size: 1.1rem; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.fact b { display: block; font-size: 2rem; line-height: 1; }
.fact span { color: var(--muted); font-size: 0.88rem; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 0.85rem; }
footer .wrap { display: grid; gap: 6px; }

/* ---------- project page ---------- */
.p-hero { position: relative; overflow: hidden; padding: 40px 0 20px; }
.p-hero::before {
  content: ""; position: absolute; inset: -30% -10% 0; z-index: -1;
  background: radial-gradient(50% 60% at 70% 20%, color-mix(in srgb, var(--c1) 30%, transparent), transparent 70%),
    radial-gradient(40% 50% at 10% 60%, color-mix(in srgb, var(--c2) 24%, transparent), transparent 70%);
}
.back { display: inline-flex; gap: 8px; color: var(--muted); font-weight: 600; font-size: 0.92rem; margin-bottom: 26px; }
.back:hover { color: var(--text); }
.p-head { display: grid; gap: 14px; justify-items: start; margin-bottom: 30px; }
.p-head h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
.p-head .tagline { font-size: 1.3rem; color: var(--muted); }
.p-visual { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); aspect-ratio: 5 / 3; background: #000; margin-inline: auto; }
.p-visual .compare, .p-visual img.shot { width: 100%; height: 100%; object-fit: contain; }
.p-visual .compare .tag { top: 14px; font-size: 0.75rem; }
.p-visual .compare .tag.l { left: 14px; }
.p-visual .compare .tag.r { right: 14px; }
.hint { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 10px; }
.p-body { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: start; }
.p-body .lead { font-size: 1.12rem; }
.p-body ul.features { margin: 18px 0 0; padding-left: 1.1em; display: grid; gap: 8px; }
.side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 16px; }
.side .pct { font-size: 2.4rem; font-weight: 700; line-height: 1; }
.side .btn { justify-content: center; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.gallery { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-items: start; }
.gallery img { border-radius: 12px; border: 1px solid var(--line); width: 100%; }
.stats { margin: 0; display: grid; gap: 8px; }
.stats div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.stats dt { color: var(--muted); }
.stats dd { margin: 0; font-weight: 600; }
.about-logo img { width: 100%; margin-bottom: 18px; }
.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }


/* ---------- guide page ---------- */
.nav nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.guide-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; align-items: start; padding-block: 40px 80px; }
.guide-toc { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin; }
.guide-toc summary { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 600; cursor: pointer; margin-bottom: 10px; }
.guide-toc nav { display: grid; gap: 2px; }
.guide-toc a { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-size: 0.93rem; border-left: 2px solid transparent; }
.guide-toc a.l3 { padding-left: 26px; font-size: 0.86rem; }
.guide-toc a:hover { color: var(--text); background: var(--surface); }
.guide-toc a[aria-current="true"] { color: var(--text); border-left-color: var(--accent); background: var(--surface); }
.guide { max-width: 800px; }
.guide h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin-bottom: 18px; }
.guide h2 { font-size: 1.75rem; margin: 56px 0 16px; padding-top: 22px; border-top: 1px solid var(--line); }
.guide h3 { font-size: 1.25rem; margin: 32px 0 12px; }
.guide p, .guide ul, .guide ol { margin: 0 0 16px; }
.guide ul, .guide ol { padding-left: 1.3em; display: grid; gap: 8px; }
.guide a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.guide code { font-family: ui-monospace, Consolas, monospace; font-size: 0.88em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.guide blockquote { margin: 0 0 18px; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0; color: var(--muted); }
.guide figure { margin: 22px 0; }
.guide figure img { width: 100%; max-height: 80vh; object-fit: contain; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.guide figcaption { margin-top: 8px; text-align: center; font-size: 0.86rem; color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 12px; }
.guide table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.guide th, .guide td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.guide th { background: var(--surface); font-weight: 600; }
.guide tr:last-child td { border-bottom: 0; }

/* guide teaser on the home page */
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 26px; }
.topic { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; gap: 4px; transition: transform 0.2s, border-color 0.2s; }
.topic:hover { transform: translateY(-3px); border-color: var(--accent-2); }
.topic b { font-size: 1.02rem; }
.topic span { color: var(--muted); font-size: 0.88rem; }


/* companions on the home page */
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 26px; }
.shots figure { margin: 0; }
.shots img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.shots figcaption { margin-top: 8px; font-size: 0.86rem; color: var(--muted); text-align: center; }
.comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.comp { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 8px; justify-items: start; }
.comp b { font-size: 1rem; line-height: 1.25; }
.comp .sys { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--accent-2); }
.tabs-line { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs-line i { font-style: normal; font-size: 0.78rem; color: var(--muted); padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); }
.comp-note { margin: 20px 0 22px; max-width: 760px; }


/* extra detail on project pages */
.p-sections { display: grid; gap: 26px; margin-top: 34px; }
.p-sections h2 { font-size: 1.3rem; margin-bottom: 8px; }
.p-sections ul { margin: 8px 0 0; padding-left: 1.1em; display: grid; gap: 6px; }
.p-sections code { font-family: ui-monospace, Consolas, monospace; font-size: 0.88em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.guide-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.guide-links a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 0.88rem; font-weight: 600; color: var(--accent-2); }
.guide-links a:hover { background: var(--surface-2); }

@media (max-width: 860px) {
  .hero-grid, .about, .p-body, .grid { grid-template-columns: 1fr; }
  .block-body { max-width: 100%; }
  .shots { grid-template-columns: 1fr; }
  .block-feature { height: 34%; right: 6%; top: 30%; opacity: 0.9; }
  .hero-grid { gap: 32px; }
  .guide-layout { grid-template-columns: 1fr; gap: 20px; padding-top: 24px; }
  .guide-toc { position: static; max-height: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
  .guide-toc summary { margin: 0; }
  .guide-toc details[open] summary { margin-bottom: 10px; }
  .hero-info { justify-items: center; text-align: center; }
  .hero-actions { justify-content: center; }
  .nav nav { order: 3; width: 100%; margin: 0; justify-content: center; }
  .nav .icon-btn { margin-left: auto; }
  section.block { padding: 52px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* =====================================================================
   Polish pass: galaxy backdrop, intro, compact progress, richer pages
   ===================================================================== */

/* night sky behind everything (dark theme only) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 34% 62%, #cfe6ff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 58% 28%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 76% 74%, #ffe9b8 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 90% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 88%, #d9ccff 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 92%, #fff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 46% 8%, #bfe9ff 50%, transparent 51%);
  background-size: 420px 380px, 360px 420px, 520px 460px, 480px 340px, 600px 520px, 440px 500px, 380px 360px, 560px 440px;
  opacity: 0.55;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(60% 45% at 8% 0%, rgba(122, 86, 255, 0.22), transparent 70%),
    radial-gradient(50% 40% at 100% 18%, rgba(46, 170, 255, 0.16), transparent 70%),
    radial-gradient(55% 40% at 50% 100%, rgba(255, 150, 60, 0.1), transparent 70%);
}
:root[data-theme="light"] body::before { display: none; }
:root[data-theme="light"] body::after { opacity: 0.5; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) body::before { display: none; }
  :root:not([data-theme="dark"]) body::after { opacity: 0.5; }
}
@media (prefers-reduced-motion: no-preference) {
  body::before { animation: twinkle 7s ease-in-out infinite alternate; }
  @keyframes twinkle { from { opacity: 0.35; } to { opacity: 0.7; } }
}

/* brand touches */
.brand b { background: linear-gradient(180deg, #ffe08a, #ffab2e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { border-bottom-color: transparent; box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(0, 0, 0, 0.18); }
.btn.primary { background: linear-gradient(180deg, #ffd766, #ffab2e); color: #231803; box-shadow: 0 8px 24px rgba(255, 171, 46, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.55); }
.btn.primary:hover { box-shadow: 0 12px 30px rgba(255, 171, 46, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.55); }
.section-head .eyebrow { color: var(--accent); display: inline-flex; align-items: center; gap: 10px; }
.section-head .eyebrow::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.section-head > .muted { font-size: 1.08rem; max-width: 720px; }
section.block { padding: 64px 0; }
.grad { background: linear-gradient(92deg, #ffe08a 0%, #ffab2e 45%, #6ee7ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* intro at the top of the home page */
.intro { text-align: center; padding: 54px 0 8px; display: grid; justify-items: center; gap: 18px; }
.intro img.logo { width: min(520px, 86%); filter: drop-shadow(0 16px 40px rgba(110, 90, 255, 0.45)); }
.intro h1 { font-size: clamp(2.1rem, 5vw, 3.7rem); max-width: 16ch; letter-spacing: -0.02em; }
.intro p.lead { font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: var(--muted); max-width: 46rem; }
.intro .hero-actions { justify-content: center; margin-top: 4px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
.pills span { padding: 7px 15px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); backdrop-filter: blur(6px); }
.pills b { color: var(--text); font-weight: 700; margin-right: 5px; }
.hero { padding-top: 28px; }
.hero .showcase-label { text-align: center; margin-bottom: 26px; }
.hero h2.title { font-size: clamp(2rem, 4.2vw, 3.3rem); }
.strip button { transition: transform 0.2s, border-color 0.2s; }
.strip button:hover { transform: translateY(-2px); }
.strip button[aria-current="true"] { box-shadow: 0 0 0 1px var(--accent-2), 0 8px 24px rgba(57, 215, 255, 0.18); }

/* compact progress list */
.rows { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
.prow { padding: 12px 14px; gap: 9px; border-radius: 14px; transition: border-color 0.2s, transform 0.2s; }
.prow:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.prow-top { gap: 11px; flex-wrap: nowrap; }
.prow-top img { width: 38px; height: 38px; border-radius: 9px; flex: none; }
.prow-top > div { min-width: 0; flex: 1; }
.prow-top h3 { font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow-top .sub { font-size: 0.8rem; color: var(--muted); }
.prow-top .pct { font-size: 1.05rem; margin-left: 0; }
.prow .meter { height: 5px; }
.dotstate { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.dotstate.complete, .dotstate.released { background: var(--ok); }

/* blocks: a little more depth */
a.block { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c1) 12%, var(--surface)), 0 24px 60px rgba(0, 0, 0, 0.45); }
a.block h3 { letter-spacing: -0.01em; }
.comp, .topic, .fact { backdrop-filter: blur(6px); background: color-mix(in srgb, var(--surface) 86%, transparent); }
.comp { transition: transform 0.2s, border-color 0.2s; }
.comp:hover { transform: translateY(-2px); border-color: var(--accent-2); }
.fact b { background: linear-gradient(180deg, #ffe08a, #ffab2e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.about-logo img { filter: drop-shadow(0 14px 34px rgba(110, 90, 255, 0.4)); }

/* guide call-out band */
#guide .wrap { background: linear-gradient(135deg, color-mix(in srgb, #7a56ff 22%, var(--surface)), var(--surface) 55%, color-mix(in srgb, #2eaaff 16%, var(--surface))); border: 1px solid var(--line); border-radius: 30px; padding: 44px clamp(20px, 4vw, 48px); }
#guide .topic { background: color-mix(in srgb, var(--bg) 55%, transparent); }

/* project pages */
.p-hero { padding: 34px 0 26px; isolation: isolate; }
.p-backdrop { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; z-index: -2; filter: blur(34px) saturate(1.25) brightness(0.5); opacity: 0.75; }
.p-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 35%, transparent), var(--bg) 96%); }
.p-head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; justify-items: stretch; column-gap: 28px; }
.p-head > * { grid-column: 1; justify-self: start; }
.p-head .p-logo { grid-column: 2; grid-row: 1 / span 4; align-self: center; max-width: min(300px, 30vw); max-height: 150px; object-fit: contain; filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.6)); }
.p-head .p-logo.icon { width: 110px; height: 110px; border-radius: 24%; border: 3px solid rgba(255, 255, 255, 0.8); }
.p-visual { box-shadow: 0 0 0 1px color-mix(in srgb, var(--c1) 50%, transparent), 0 30px 80px color-mix(in srgb, var(--c1) 28%, rgba(0, 0, 0, 0.6)); }
.side { position: sticky; top: 92px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(8px); }
.side .pct { background: linear-gradient(180deg, #ffe08a, #ffab2e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.p-sections section { background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.p-sections { gap: 14px; }
.p-sections h2 { color: var(--text); display: flex; align-items: center; gap: 10px; }
.p-sections h2::before { content: ""; width: 6px; height: 1.1em; border-radius: 3px; background: linear-gradient(var(--accent), var(--accent-2)); }
.p-body ul.features { list-style: none; padding: 0; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.p-body ul.features li { padding: 12px 14px 12px 40px; border-radius: 12px; background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--line); position: relative; }
.p-body ul.features li::before { content: "✦"; position: absolute; left: 14px; top: 11px; color: var(--accent); }
.gallery a { border-radius: 12px; overflow: hidden; display: block; transition: transform 0.25s; }
.gallery a:hover { transform: scale(1.02); }
.pager .btn { max-width: 48%; }

/* footer */
footer { margin-top: 40px; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.foot-top { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding-bottom: 16px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.foot-top nav { display: flex; gap: 6px 18px; flex-wrap: wrap; margin-left: auto; }
.foot-top nav a { color: var(--muted); font-weight: 600; }
.foot-top nav a:hover { color: var(--text); }

/* reveal on scroll (only when the script switches it on) */
.js-reveal .rv { opacity: 0; translate: 0 22px; transition: opacity 0.45s ease, translate 0.45s ease, transform 0.25s, box-shadow 0.25s, border-color 0.2s; }
.js-reveal .rv.in { opacity: 1; translate: none; }

@media (max-width: 860px) {
  .p-head { grid-template-columns: 1fr; }
  .p-head .p-logo { grid-column: 1; grid-row: auto; max-height: 90px; max-width: 70%; }
  .p-head .p-logo.icon { width: 76px; height: 76px; }
  .side { position: static; }
  .intro { padding-top: 34px; }
  .foot-top nav { margin-left: 0; }
  .rows { grid-template-columns: 1fr; }
}

/* soften the top edge of the showcase glow so it blends into the intro */
.hero::before { -webkit-mask-image: linear-gradient(transparent 14%, #000 45%); mask-image: linear-gradient(transparent 14%, #000 45%); }

/* phone: keep the top bar to one swipeable row of links */
a.block .chip { white-space: nowrap; }
@media (max-width: 860px) {
  .nav .wrap { gap: 6px 14px; min-height: 0; }
  .nav nav { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; margin-inline: -16px; padding-inline: 12px; width: calc(100% + 32px); }
  .nav nav::-webkit-scrollbar { display: none; }
  .nav nav a { white-space: nowrap; padding: 6px 12px; }
  .block-logo { max-width: 40%; max-height: 56px; }
}

/* =====================================================================
   Polish pass 2
   ===================================================================== */

/* project page top: text beside a sensibly sized picture */
.p-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: 6px; }
.p-top.stack { grid-template-columns: 1fr; }
.p-head { display: grid; grid-template-columns: 1fr; gap: 14px; justify-items: start; align-items: start; margin-bottom: 0; }
.p-head > * { grid-column: auto; }
.p-head .p-logo { grid-column: auto; grid-row: auto; align-self: start; max-width: min(320px, 70%); max-height: 110px; margin-bottom: 6px; }
.p-head .p-logo.icon { width: 84px; height: 84px; }
.p-head h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); letter-spacing: -0.02em; }
.p-head .tagline span { display: block; }
.p-pic { display: grid; justify-items: center; }
.p-visual { width: min(560px, calc(min(440px, 50vh) * var(--r))); max-width: 100%; margin: 0; }
.p-top.stack .p-visual { width: min(100%, calc(min(400px, 46vh) * var(--r))); }
.p-top.stack .p-pic { margin-top: 10px; }
.stat-tiles { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.stat-tiles div { padding: 12px 18px; border-radius: 14px; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--line); backdrop-filter: blur(8px); display: grid; gap: 2px; }
.stat-tiles b { font-size: 1.45rem; line-height: 1.1; background: linear-gradient(180deg, #ffe08a, #ffab2e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-tiles span { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.gallery { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.gallery img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.gallery a, .shots a, .guide figure a { cursor: zoom-in; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(4, 5, 10, 0.9); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 24px; cursor: zoom-out; animation: lb 0.2s ease; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 48px); border-radius: 12px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7); }
.lightbox button { position: fixed; top: 16px; right: 18px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(20, 24, 36, 0.8); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
@keyframes lb { from { opacity: 0; } to { opacity: 1; } }

/* feature strip */
.features-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.feature { display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; }
.feature:hover { transform: translateY(-6px); border-color: var(--accent-2); box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45), 0 0 40px rgba(57, 215, 255, 0.12); }
.feature-pic { aspect-ratio: 16 / 11; overflow: hidden; background: #e9ebf2; }
.feature-pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.5s; }
.feature:hover .feature-pic img { transform: scale(1.06); }
.feature-body { padding: 18px 20px 20px; display: grid; gap: 8px; }
.feature-body h3 { font-size: 1.25rem; }
.feature-body p { color: var(--muted); font-size: 0.95rem; }
.feature-body .more { color: var(--accent-2); font-weight: 600; font-size: 0.9rem; margin-top: 4px; }

/* the Thor: a coloured halo, and a gentle float */
.hero .thor::before { content: ""; position: absolute; inset: -14% -18%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c1, #8f7bff) 60%, transparent), transparent 72%); filter: blur(30px); opacity: 0.85; transition: background 0.6s; }
@media (prefers-reduced-motion: no-preference) {
  .hero .thor { animation: floaty 6s ease-in-out infinite alternate; }
  @keyframes floaty { from { translate: 0 6px; } to { translate: 0 -8px; } }
}

/* blocks: light sweep and brighter edge on hover */
a.block::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.16) 50%, transparent 62%); translate: -110% 0; transition: translate 0.9s ease; }
a.block:hover::before { translate: 110% 0; }
a.block:hover { border-color: color-mix(in srgb, var(--c1) 80%, #fff); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c1) 30%, var(--surface)), 0 30px 70px color-mix(in srgb, var(--c1) 30%, rgba(0, 0, 0, 0.55)); }
.block-num { background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.08)); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }

/* shooting star */
.shooting { position: fixed; top: 12%; left: 70%; width: 140px; height: 2px; z-index: -1; pointer-events: none; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0)); rotate: -28deg; animation: shoot 11s linear infinite 3s; }
@keyframes shoot { 0% { opacity: 0; translate: 0 0; } 2% { opacity: 1; } 9% { opacity: 0; translate: -46vw 24vw; } 100% { opacity: 0; translate: -46vw 24vw; } }
:root[data-theme="light"] .shooting { display: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .shooting { display: none; } }

/* headings and intro, a little bolder */
.intro h1 { text-shadow: 0 6px 40px rgba(122, 86, 255, 0.35); }
.pills span { transition: transform 0.2s, border-color 0.2s; }
.pills span:hover { transform: translateY(-2px); border-color: var(--accent); }
.pills b { background: linear-gradient(180deg, #ffe08a, #ffab2e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tabs button[aria-pressed="true"] { background: linear-gradient(180deg, #ffd766, #ffab2e); color: #231803; }

@media (max-width: 860px) {
  .p-top { grid-template-columns: 1fr; }
  .p-visual, .p-top.stack .p-visual { width: min(100%, calc(46vh * var(--r))); }
}

/* =====================================================================
   Polish pass 3
   ===================================================================== */

/* scrolling band under the intro */
.marquee { overflow: hidden; margin-top: 30px; padding: 14px 0; border-block: 1px solid var(--line);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 70%, transparent) 20% 80%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12% 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12% 88%, transparent); }
.marquee-track { display: flex; gap: 34px; width: max-content; }
.marquee-track span { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-weight: 600; color: var(--muted); font-size: 0.95rem; }
.marquee-track img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); }
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: slide 48s linear infinite; }
  @keyframes slide { to { translate: -50% 0; } }
}

/* current section in the top bar */
.nav nav a { position: relative; transition: color 0.2s, background 0.2s; }
.nav nav a[aria-current="page"]::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 2px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* pointer glow on cards */
.feature, .comp, .topic, .prow, .fact, .p-sections section, .side { position: relative; }
.feature::after, .comp::after, .topic::after, .prow::after, .fact::after, .p-sections section::after, .side::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(110, 231, 255, 0.16), transparent 65%); }
.feature:hover::after, .comp:hover::after, .topic:hover::after, .prow:hover::after, .fact:hover::after, .p-sections section:hover::after, .side:hover::after { opacity: 1; }

/* the Thor responds to the pointer */
.hero .thor { transition: transform 0.25s ease-out; transform-style: preserve-3d; will-change: transform; }

/* section headings: a glow under each one */
.section-head { position: relative; }
.section-head h2 { text-wrap: balance; }
.intro h1, .p-head h1 { text-wrap: balance; }

/* artwork blocks: the picture drifts a little and the title lifts on hover */
a.block .block-body { transition: translate 0.35s ease; }
a.block:hover .block-body { translate: 0 -6px; }
a.block .btn { transition: background 0.25s, gap 0.25s; }
a.block:hover .btn { gap: 38px; background: linear-gradient(180deg, #ffd766, #ffab2e); color: #231803; border-color: transparent; }
.block-feature { animation: none; }
@media (prefers-reduced-motion: no-preference) {
  .block-feature { animation: bob 5s ease-in-out infinite alternate; }
  @keyframes bob { from { translate: 0 -52%; } to { translate: 0 -57%; } }
}

/* project page: picture frame with a moving sheen, and a coloured title underline */
.p-head h1 { background: linear-gradient(180deg, #fff 30%, color-mix(in srgb, var(--c1) 55%, #fff)); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="light"] .p-head h1 { color: var(--text); background: none; }
.p-visual { position: relative; }
.p-pic { filter: drop-shadow(0 30px 50px color-mix(in srgb, var(--c1) 30%, transparent)); }
.gallery a { position: relative; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.gallery a::after { content: "⤢"; position: absolute; right: 10px; top: 10px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(10, 12, 19, 0.75); color: #fff; opacity: 0; transition: opacity 0.2s; }
.gallery a:hover::after { opacity: 1; }
.pager .btn { backdrop-filter: blur(8px); }
.pager .btn:hover { border-color: var(--accent-2); }

/* =====================================================================
   The Thor, studio render: grained plastic, bevels, glossy buttons, glass
   ===================================================================== */
.thor { --s0: #f3f0ea; --s1: #e5e1d9; --s2: #d3cec5; --s3: #bab5ac; --s4: #9b968d; --s5: #7e7971; filter: none; }
.thor::after { content: ""; position: absolute; left: 4%; right: 4%; bottom: -5cqw; height: 8cqw; z-index: -1;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.7), transparent); filter: blur(1.6cqw); }
.thor .t-lid, .thor .t-base, .thor .t-tab { background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(177deg, var(--s0) 0%, var(--s1) 30%, var(--s2) 68%, var(--s3) 100%); background-blend-mode: multiply, normal; }
.thor .t-lid { box-shadow: inset 0 0.4cqw 0.25cqw rgba(255, 255, 255, 0.95), inset 0 -0.6cqw 0.8cqw rgba(0, 0, 0, 0.24), inset 0.45cqw 0 0.5cqw rgba(255, 255, 255, 0.45), inset -0.45cqw 0 0.5cqw rgba(0, 0, 0, 0.12), 0 0.3cqw 0.5cqw rgba(0, 0, 0, 0.5); }
.thor .t-glass { background: linear-gradient(155deg, #1b1c21 0%, #060607 38%, #020203 100%);
  box-shadow: 0 0 0 0.22cqw #33343a, 0 0 0 0.5cqw rgba(0, 0, 0, 0.4), inset 0 0 1.4cqw rgba(0, 0, 0, 0.95); }
.thor .t-glass::after, .thor .t-panel::after { background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.05) 14%, transparent 26%),
    linear-gradient(118deg, transparent 58%, rgba(255, 255, 255, 0.04) 66%, transparent 74%); }
.thor .t-top, .thor .t-bottom { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05); }
.thor .t-hinge i { background: linear-gradient(var(--s1), var(--s3)); box-shadow: inset 0 0.3cqw 0.2cqw rgba(255, 255, 255, 0.6), inset 0 -0.6cqw 0.7cqw rgba(0, 0, 0, 0.25), 0 0.3cqw 0.4cqw rgba(0, 0, 0, 0.35); }
.thor .t-hinge i:nth-child(2) { position: relative;
  background: linear-gradient(#fdfbf6 0%, #ece8e0 10%, var(--s2) 38%, var(--s4) 76%, var(--s5) 90%, var(--s3) 100%);
  box-shadow: 0 0.5cqw 0.8cqw rgba(0, 0, 0, 0.45), inset 0 0.15cqw 0 rgba(255, 255, 255, 0.9); }
.thor .t-hinge i:nth-child(2)::before, .thor .t-hinge i:nth-child(2)::after { content: ""; position: absolute; top: 8%; bottom: 8%; width: 0.25cqw; background: rgba(0, 0, 0, 0.28); box-shadow: 0.25cqw 0 0 rgba(255, 255, 255, 0.5); }
.thor .t-hinge i:nth-child(2)::before { left: 4%; } .thor .t-hinge i:nth-child(2)::after { right: 4%; }
.thor .t-base { box-shadow: inset 0 0.45cqw 0.25cqw rgba(255, 255, 255, 0.95), inset 0 2cqw 2cqw -1.4cqw rgba(0, 0, 0, 0.28), inset 0 -1.2cqw 1.6cqw rgba(0, 0, 0, 0.2), inset 0.6cqw 0 0.7cqw rgba(255, 255, 255, 0.35), inset -0.6cqw 0 0.7cqw rgba(0, 0, 0, 0.1), 0 0.4cqw 0.6cqw rgba(0, 0, 0, 0.5); }
.thor .t-panel { background: linear-gradient(155deg, #1b1c21, #050506 40%); box-shadow: 0 0 0 0.22cqw #33343a, 0 0 0 0.5cqw rgba(0, 0, 0, 0.35), 0 0.6cqw 0.5cqw rgba(255, 255, 255, 0.5), inset 0 0 1.2cqw rgba(0, 0, 0, 0.9); }
.thor .t-stick { width: 9.6cqw;
  background: radial-gradient(circle at 50% 46%, #2f2e2c 0 26%, #4d4b49 44%, #6a6865 56%, #4a4846 61%, #5d5b58 72%, #343331 100%);
  box-shadow: inset 0 0.5cqw 0.5cqw rgba(255, 255, 255, 0.22), inset 0 -0.7cqw 0.8cqw rgba(0, 0, 0, 0.55), 0 0.7cqw 0.7cqw rgba(0, 0, 0, 0.5),
    0 0 0 0.6cqw #6f6b64, 0 0 0 0.95cqw #e9fbff, 0 0 0 1.75cqw var(--led), 0 0 0 2.15cqw var(--s4), 0 0 0 2.5cqw rgba(255, 255, 255, 0.75), 0 0 3.2cqw 2cqw color-mix(in srgb, var(--led) 48%, transparent); }
.thor .t-dpad { background: radial-gradient(circle, var(--s4) 0%, var(--s3) 55%, var(--s2) 100%); box-shadow: inset 0 0.6cqw 0.8cqw rgba(0, 0, 0, 0.32), inset 0 -0.3cqw 0.3cqw rgba(255, 255, 255, 0.4), 0 0.35cqw 0 rgba(255, 255, 255, 0.6); }
.thor .t-dpad::before { background: linear-gradient(155deg, #a5a29c 0%, #8a8782 45%, #6c6a66 100%); filter: drop-shadow(0 0.45cqw 0.2cqw rgba(0, 0, 0, 0.45)) drop-shadow(0 -0.12cqw 0 rgba(255, 255, 255, 0.5)); }
.thor .t-dpad::after { inset: 39%; background: radial-gradient(circle at 50% 40%, #5c5a57, #7b7975); box-shadow: inset 0 0.2cqw 0.2cqw rgba(0, 0, 0, 0.5); }
.thor .t-abxy { background: radial-gradient(circle, var(--s3) 0%, var(--s2) 70%, var(--s1) 100%); box-shadow: inset 0 0.6cqw 0.9cqw rgba(0, 0, 0, 0.28), inset 0 -0.3cqw 0.3cqw rgba(255, 255, 255, 0.45), 0 0.35cqw 0 rgba(255, 255, 255, 0.65); }
.thor .t-abxy b { text-shadow: 0 0.15cqw 0.15cqw rgba(0, 0, 0, 0.35);
  box-shadow: 0 0.5cqw 0.35cqw rgba(0, 0, 0, 0.45), 0 0 0 0.2cqw rgba(0, 0, 0, 0.18), inset 0 -0.55cqw 0.5cqw rgba(0, 0, 0, 0.3), inset 0 0.25cqw 0.2cqw rgba(255, 255, 255, 0.35); }
.thor .t-abxy b:nth-child(1) { background: radial-gradient(circle at 36% 26%, rgba(255, 255, 255, 0.7) 0 7%, transparent 28%), radial-gradient(circle at 50% 55%, #3a66e0, #1f3fa3); }
.thor .t-abxy b:nth-child(2) { background: radial-gradient(circle at 36% 26%, rgba(255, 255, 255, 0.75) 0 7%, transparent 28%), radial-gradient(circle at 50% 55%, #f8cf2e, #d09a06); }
.thor .t-abxy b:nth-child(3) { background: radial-gradient(circle at 36% 26%, rgba(255, 255, 255, 0.7) 0 7%, transparent 28%), radial-gradient(circle at 50% 55%, #37ad58, #1d7a39); }
.thor .t-abxy b:nth-child(4) { background: radial-gradient(circle at 36% 26%, rgba(255, 255, 255, 0.7) 0 7%, transparent 28%), radial-gradient(circle at 50% 55%, #e2393a, #a81c1e); }
.thor .t-dot { background: radial-gradient(circle at 38% 30%, #ffffff, var(--s2) 70%, var(--s3)); box-shadow: 0 0.3cqw 0.35cqw rgba(0, 0, 0, 0.45), 0 0 0 0.2cqw rgba(0, 0, 0, 0.1), 0 0 0 0.45cqw rgba(255, 255, 255, 0.35); }
.thor .t-slit { background: linear-gradient(#111, #3a3937); box-shadow: inset 0 0.2cqw 0.2cqw #000, 0 0.25cqw 0 rgba(255, 255, 255, 0.6); }
.thor .t-tab { box-shadow: inset 0 0.35cqw 0.2cqw rgba(255, 255, 255, 0.9), inset 0.3cqw 0 0.3cqw rgba(255, 255, 255, 0.4), 0 0 0 0.22cqw rgba(0, 0, 0, 0.16), 0 -0.3cqw 0.5cqw rgba(0, 0, 0, 0.12); }
.thor .t-tab::after { background: linear-gradient(#26262a, #0b0b0d); box-shadow: inset 0 0.15cqw 0 rgba(255, 255, 255, 0.15); }

/* showcase title: wrap neatly instead of running to the edge */
.hero h2.title { font-size: clamp(1.8rem, 3.6vw, 3rem); text-wrap: balance; }
.hero-info { min-width: 0; }

/* =====================================================================
   The Thor in 3D: slabs with thickness, an open lid, raised controls
   ===================================================================== */
.hero .thor { perspective: 1500px; perspective-origin: 50% 30%; transform: none; transition: none; margin-block: 3cqw 6cqw; }
.t-rig { transform-style: preserve-3d; transition: transform 0.3s ease-out;
  transform: rotateX(calc(10deg + var(--rx, 0deg))) rotateY(calc(-18deg + var(--ry, 0deg))); }
.t-rig .t-lid, .t-rig .t-base, .t-rig .t-pad, .t-rig .t-abxy, .t-rig .t-stick, .t-rig .t-dpad, .t-rig .t-hinge { transform-style: preserve-3d; }

/* the lid leans back, the base lies flatter */
.t-rig .t-lid { transform-origin: 50% 100%; transform: rotateX(-9deg); }
.t-rig .t-base { transform-origin: 50% 0; transform: rotateX(30deg); }
.t-rig .t-hinge { transform: translateZ(0.5cqw); }
.t-rig .t-lip { display: none; }

/* thickness */
.t-depth { position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  transform: translateZ(calc(var(--i) * -0.42cqw));
  background: color-mix(in srgb, #6f6a62 calc(var(--i) * 6%), var(--s3)); box-shadow: inset 0 0 0 0.15cqw rgba(0, 0, 0, 0.08); }
.t-base .t-depth:last-of-type { background: #5f5b54; box-shadow: 0 2cqw 3cqw rgba(0, 0, 0, 0.55); }
.t-lid .t-depth:last-of-type { background: linear-gradient(160deg, #d9d5cc, #a9a49b); }

/* controls stand off the surface */
.t-rig .t-abxy b { transform: translateZ(0.9cqw); }
.t-rig .t-dpad::before { transform: translateZ(0.7cqw); }
.t-rig .t-dpad::after { transform: translateZ(0.75cqw); }
.t-rig .t-dot { transform: translateZ(0.35cqw); }
.t-rig .t-tab { transform: translateZ(0.2cqw); }
/* stick: a stem and a cap above the lit ring */
.t-rig .t-stick::before, .t-rig .t-stick::after { content: ""; position: absolute; border-radius: 50%; }
.t-rig .t-stick { position: relative; }
.t-rig .t-stick::before { inset: 16%; background: radial-gradient(circle, #2a2927, #3d3c3a); transform: translateZ(0.9cqw); box-shadow: 0 0.3cqw 0.6cqw rgba(0, 0, 0, 0.5); }
.t-rig .t-stick::after { inset: 2%; transform: translateZ(1.9cqw);
  background: radial-gradient(circle at 50% 46%, #2f2e2c 0 26%, #4d4b49 44%, #6a6865 56%, #4a4846 61%, #5d5b58 72%, #343331 100%);
  box-shadow: inset 0 0.5cqw 0.5cqw rgba(255, 255, 255, 0.22), inset 0 -0.7cqw 0.8cqw rgba(0, 0, 0, 0.55), 0 0.9cqw 1cqw rgba(0, 0, 0, 0.45); }

/* shadow on the ground, under the base */
.hero .thor::after { left: 2%; right: 2%; bottom: -7cqw; height: 11cqw; }

@media (max-width: 860px) {
  .t-rig { transform: rotateX(calc(8deg + var(--rx, 0deg))) rotateY(calc(-10deg + var(--ry, 0deg))); }
}

/* keep the glow and the ground shadow behind the 3D device, not cutting through it */
.hero .thor::before { transform: translateZ(-60cqw) scale(1.5); }
.hero .thor::after { transform: translateZ(-30cqw) scale(1.25); }

/* =====================================================================
   The Thor in 3D, part 2: faces the other way, controls with real height
   ===================================================================== */
.t-rig { transform: rotateX(calc(10deg + var(--rx, 0deg))) rotateY(calc(18deg + var(--ry, 0deg))); }
@media (max-width: 860px) {
  .t-rig { transform: rotateX(calc(8deg + var(--rx, 0deg))) rotateY(calc(10deg + var(--ry, 0deg))); }
}

/* --- analog sticks: a socket, a stem, and a mushroom cap --- */
.t-rig .t-stick { background: radial-gradient(circle, #0c0c0d 0 42%, #2a2927 60%, #4a4846 100%); }
.t-rig .t-stick::before, .t-rig .t-stick::after { content: none; }
.t-stick i { position: absolute; border-radius: 50%; display: block; }
.st-stem { inset: 27%; background: #262524; transform: translateZ(calc(var(--i) * 0.42cqw)); box-shadow: 0 0 0 0.12cqw #1a1918; }
.st-cap { inset: -3%; transform: translateZ(calc(2.5cqw + var(--i) * 0.26cqw));
  background: color-mix(in srgb, #5a5855 calc(var(--i) * 14%), #2b2a28); box-shadow: 0 0 0 0.1cqw rgba(0, 0, 0, 0.35); }
.st-cap:first-of-type { box-shadow: 0 0 0 0.1cqw rgba(0, 0, 0, 0.35), 0 1.4cqw 1.4cqw rgba(0, 0, 0, 0.5); }
.st-top { inset: -3%; transform: translateZ(4.05cqw);
  background: radial-gradient(circle at 50% 46%, #2c2b29 0 24%, #474543 42%, #6c6a67 56%, #4c4a48 61%, #63615e 74%, #3b3a38 100%);
  box-shadow: inset 0 0.5cqw 0.5cqw rgba(255, 255, 255, 0.25), inset 0 -0.6cqw 0.7cqw rgba(0, 0, 0, 0.5), 0 0 0 0.12cqw rgba(0, 0, 0, 0.4); }

/* --- face buttons: coloured cylinders with a glossy domed top --- */
.t-rig .t-abxy b { transform: none; background: #55524c; box-shadow: inset 0 0.3cqw 0.4cqw rgba(0, 0, 0, 0.6), 0 0 0 0.2cqw rgba(0, 0, 0, 0.12); transform-style: preserve-3d; text-shadow: none; }
.t-rig .t-abxy b:nth-child(1) { --bc: #3a66e0; --bd: #1c3a96; }
.t-rig .t-abxy b:nth-child(2) { --bc: #f8cf2e; --bd: #b98708; }
.t-rig .t-abxy b:nth-child(3) { --bc: #37ad58; --bd: #1a6e33; }
.t-rig .t-abxy b:nth-child(4) { --bc: #e2393a; --bd: #951719; }
.bt-side, .bt-top { position: absolute; inset: 4%; border-radius: 50%; }
.bt-side { background: var(--bd); transform: translateZ(calc(var(--i) * 0.3cqw)); }
.bt-side:first-of-type { box-shadow: 0 0.7cqw 0.7cqw rgba(0, 0, 0, 0.45); }
.bt-top { transform: translateZ(1.75cqw); display: grid; place-items: center; color: #fff; text-shadow: 0 0.15cqw 0.15cqw rgba(0, 0, 0, 0.4);
  background: radial-gradient(circle at 36% 26%, rgba(255, 255, 255, 0.75) 0 7%, transparent 30%), radial-gradient(circle at 50% 55%, var(--bc), var(--bd));
  box-shadow: inset 0 -0.45cqw 0.45cqw rgba(0, 0, 0, 0.28), inset 0 0.25cqw 0.2cqw rgba(255, 255, 255, 0.35); }

/* --- d-pad: a raised cross --- */
.t-rig .t-dpad::before, .t-rig .t-dpad::after { content: none; }
.dp-side, .dp-top { position: absolute; inset: 9%; display: block;
  clip-path: polygon(33% 0, 67% 0, 67% 33%, 100% 33%, 100% 67%, 67% 67%, 67% 100%, 33% 100%, 33% 67%, 0 67%, 0 33%, 33% 33%); }
.dp-side { background: #5f5d59; transform: translateZ(calc(var(--i) * 0.3cqw)); }
.dp-top { transform: translateZ(1.45cqw);
  background: radial-gradient(circle at 50% 50%, #6c6a66 0 9%, transparent 10%), linear-gradient(150deg, #b0ada7 0%, #8f8c87 45%, #74726e 100%); }

/* small round buttons and the port tab sit a little proud of the shell */
.t-rig .t-dot { transform: translateZ(0.5cqw); }

/* The device's own flat box sits in front of the parts of the 3D model that lean
   back, and was swallowing clicks meant for the slider. Only the slider takes clicks. */
.hero .thor { pointer-events: none; }
.hero .thor .compare input { pointer-events: auto; }
.hero .thor::before, .hero .thor::after { pointer-events: none; }

/* a wide logo as a block's feature (e.g. a game's title logo) instead of a square tile */
.block-feature.wide { height: auto; width: min(44%, 520px); aspect-ratio: auto; object-fit: contain; border-radius: 0; box-shadow: none; rotate: 0deg;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.6)); }
a.block:hover .block-feature.wide { rotate: 0deg; scale: 1.04; }
@media (max-width: 860px) { .block-feature.wide { width: 52%; height: auto; top: 26%; } }

/* videos on project pages */
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 12px; }
.yt, .yt-frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #000; padding: 0; }
.yt { cursor: pointer; font: inherit; color: #fff; transition: transform 0.25s, border-color 0.25s; }
.yt:hover { transform: translateY(-3px); border-color: var(--accent-2); }
.yt img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s, filter 0.3s; filter: brightness(0.8); }
.yt:hover img { transform: scale(1.05); filter: brightness(1); }
.yt-play { position: absolute; left: 50%; top: 50%; translate: -50% -60%; width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(180deg, #ffd766, #ffab2e); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.yt-play::after { content: ""; position: absolute; left: 54%; top: 50%; translate: -50% -50%; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #231803; }
.yt-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px; text-align: left; font-weight: 600; font-size: 0.95rem; background: linear-gradient(transparent, rgba(0, 0, 0, 0.85)); }

/* =====================================================================
   Polish pass 4
   ===================================================================== */

/* pages cross-fade when you move between them (browsers that support it) */
@view-transition { navigation: auto; }
::selection { background: color-mix(in srgb, var(--accent) 70%, transparent); color: #1a1405; }
html { scrollbar-color: color-mix(in srgb, var(--accent) 60%, var(--surface-2)) transparent; scrollbar-width: thin; }

/* scroll progress and back-to-top */
.scroll-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, #ffab2e, #ffe08a, #6ee7ff); box-shadow: 0 0 12px rgba(255, 190, 80, 0.6); }
.to-top { position: fixed; right: 22px; bottom: 22px; z-index: 50; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; font-size: 1.2rem; font-weight: 700;
  background: linear-gradient(180deg, #ffd766, #ffab2e); color: #231803; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  opacity: 0; translate: 0 14px; pointer-events: none; transition: opacity 0.3s, translate 0.3s, scale 0.2s; }
.to-top.show { opacity: 1; translate: none; pointer-events: auto; }
.to-top:hover { scale: 1.08; }

/* intro: an aurora behind the logo, and everything rises in */
.intro { position: relative; isolation: isolate; }
.intro::before { content: ""; position: absolute; left: 50%; top: 6%; width: min(760px, 96%); aspect-ratio: 2 / 1; translate: -50% 0; z-index: -1; border-radius: 50%;
  background: conic-gradient(from 0deg, #7a56ff, #2eaaff, #ffb347, #ff6aa0, #7a56ff); filter: blur(70px); opacity: 0.38; }
:root[data-theme="light"] .intro::before { opacity: 0.22; }
@media (prefers-reduced-motion: no-preference) {
  .intro::before { animation: aurora 18s linear infinite; }
  @keyframes aurora { to { rotate: 360deg; } }
  .intro > * { animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .intro > :nth-child(2) { animation-delay: 0.1s; }
  .intro > :nth-child(3) { animation-delay: 0.2s; }
  .intro > :nth-child(4) { animation-delay: 0.3s; }
  .intro > :nth-child(5) { animation-delay: 0.4s; }
  @keyframes rise { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: none; } }
  .intro img.logo { animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both, logo-float 7s ease-in-out 0.8s infinite alternate; }
  @keyframes logo-float { from { transform: translateY(0) rotate(-0.6deg); } to { transform: translateY(-10px) rotate(0.6deg); } }
  .brand img { transition: rotate 0.6s cubic-bezier(0.3, 1.4, 0.5, 1), scale 0.3s; }
  .brand:hover img { rotate: 360deg; scale: 1.08; }
}

/* a soft line between sections */
main > section.block { border-top: 1px solid transparent; border-image: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 14%, transparent), transparent) 1; }
main > section.block:first-of-type, #features, .p-hero + section.block { border-image: none; }

/* cards lean toward the pointer */
a.block, .pg, .feature { transform: perspective(1100px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); will-change: transform; }
a.block:hover { transform: perspective(1100px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)) translateY(-5px); }
.feature:hover { transform: perspective(1100px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)) translateY(-6px); }

/* block logos: a little bigger, and they drift */
.block-logo:not(.icon) { max-width: 40%; max-height: 104px; }
@media (prefers-reduced-motion: no-preference) {
  .block-logo:not(.icon) { animation: drift 6s ease-in-out infinite alternate; }
  @keyframes drift { from { translate: 0 0; } to { translate: 0 -6px; } }
}

/* progress rows and companions take on colour */
.prow { border-left: 3px solid var(--c1, var(--accent)); }
.prow .meter span { background: linear-gradient(90deg, var(--c1, var(--accent)), var(--accent-2)); }
.comp .sys.gbc { color: #c9a3ff; background: color-mix(in srgb, #8f5bff 22%, var(--surface-2)); }
.comp .sys.gba { color: #8fd0ff; background: color-mix(in srgb, #2e7bff 22%, var(--surface-2)); }
.comp { border-top: 2px solid color-mix(in srgb, var(--accent-2) 35%, transparent); }

/* previous / next project cards */
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.pg { position: relative; isolation: isolate; overflow: hidden; display: grid; align-content: end; gap: 4px; min-height: 190px; padding: 22px 24px; border-radius: 22px; color: #fff;
  background: color-mix(in srgb, var(--c2) 70%, #0a0c13); border: 1px solid color-mix(in srgb, var(--c1) 45%, rgba(255, 255, 255, 0.18)); transition: box-shadow 0.25s, border-color 0.25s; }
.pg:last-child { text-align: right; }
.pg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 0.6s; }
.pg::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, color-mix(in srgb, var(--c2) 85%, #05060a), color-mix(in srgb, var(--c2) 35%, transparent) 70%); }
.pg:hover img { transform: scale(1.06); }
.pg:hover { border-color: color-mix(in srgb, var(--c1) 80%, #fff); box-shadow: 0 24px 60px color-mix(in srgb, var(--c1) 28%, rgba(0, 0, 0, 0.55)); }
.pg-label { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; color: rgba(255, 255, 255, 0.8); }
.pg b { font-size: clamp(1.2rem, 2.2vw, 1.6rem); line-height: 1.15; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); }
.pg-sub { font-size: 0.85rem; color: rgba(255, 255, 255, 0.78); }

/* light mode fixes: gradient text needs darker stops on a pale page */
:root[data-theme="light"] .grad { background: linear-gradient(92deg, #c98200 0%, #e06a00 45%, #0a8fb0 100%); -webkit-background-clip: text; background-clip: text; }
:root[data-theme="light"] .brand b, :root[data-theme="light"] .fact b, :root[data-theme="light"] .pills b, :root[data-theme="light"] .stat-tiles b, :root[data-theme="light"] .side .pct {
  background: linear-gradient(180deg, #d99400, #b96a00); -webkit-background-clip: text; background-clip: text; }
:root[data-theme="light"] .intro h1 { text-shadow: none; }
:root[data-theme="light"] .p-backdrop { opacity: 0.35; }
:root[data-theme="light"] .p-hero::after { background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 55%, transparent), var(--bg) 96%); }
:root[data-theme="light"] .p-head h1 { -webkit-text-fill-color: currentColor; }

@media (max-width: 860px) {
  .pager { grid-template-columns: 1fr; }
  .pg:last-child { text-align: left; }
  .to-top { right: 14px; bottom: 14px; }
}

/* the wordmark: the LumaCore lettering from the banner */
.brand { gap: 10px; }
.brand img.wordmark { width: auto; height: 32px; border-radius: 0; filter: drop-shadow(0 2px 8px rgba(40, 80, 255, 0.35)); }
.brand:hover img.wordmark { rotate: 0deg; scale: 1.04; }
.foot-top .brand img.wordmark { height: 28px; }
@media (max-width: 860px) { .brand img.wordmark { height: 26px; } }

/* beta status */
.chip.beta::before, .dotstate.beta { background: #b58cff; }
.chip.beta { border-color: color-mix(in srgb, #b58cff 55%, var(--line)); }
a.block .chip.beta { background: rgba(60, 30, 120, 0.82); }
.notice { margin: 0 0 20px; padding: 14px 18px; border-radius: 14px; border: 1px solid color-mix(in srgb, #b58cff 55%, var(--line));
  background: color-mix(in srgb, #b58cff 14%, var(--surface)); display: flex; gap: 12px; align-items: baseline; }
.notice b { flex: none; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: #b58cff; color: #1c0f3a; }

/* light mode when it comes from the device setting rather than the toggle */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .grad { background: linear-gradient(92deg, #c98200 0%, #e06a00 45%, #0a8fb0 100%); -webkit-background-clip: text; background-clip: text; }
  :root:not([data-theme="dark"]) .fact b, :root:not([data-theme="dark"]) .pills b, :root:not([data-theme="dark"]) .stat-tiles b, :root:not([data-theme="dark"]) .side .pct {
    background: linear-gradient(180deg, #d99400, #b96a00); -webkit-background-clip: text; background-clip: text; }
  :root:not([data-theme="dark"]) .intro h1 { text-shadow: none; }
  :root:not([data-theme="dark"]) .intro::before { opacity: 0.22; }
  :root:not([data-theme="dark"]) .p-backdrop { opacity: 0.35; }
  :root:not([data-theme="dark"]) .p-head h1 { color: var(--text); background: none; }
}

/* small print under sections */
.disclaimer { margin: 18px 0 0; font-size: 0.82rem; line-height: 1.5; color: var(--muted); max-width: 760px; padding-left: 14px; border-left: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.side .disclaimer { margin: 0; font-size: 0.78rem; }

/* animated star icon in the top bar */
.brand picture { display: flex; }
.brand picture img { width: 42px; height: 42px; border-radius: 11px; }
@media (max-width: 860px) { .brand picture img { width: 36px; height: 36px; } }

/* downloads */
.side .btn.small, .btn.small { padding: 10px 16px; font-size: 0.88rem; justify-content: center; }
.sum { font-size: 0.8rem; color: var(--muted); }
.sum summary { cursor: pointer; }
.sum code { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-family: ui-monospace, Consolas, monospace; font-size: 0.72rem; overflow-wrap: anywhere; user-select: all; }
.guide a.dl { display: inline-block; padding: 6px 14px; border-radius: 999px; background: linear-gradient(180deg, #ffd766, #ffab2e); color: #231803; font-weight: 600; text-decoration: none; white-space: nowrap; }
.guide ol { counter-reset: none; }
.guide td code { white-space: nowrap; }

/* =====================================================================
   Polish pass 5
   ===================================================================== */

/* app tour */
.tour { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 26px; align-items: stretch; }
.tour-tabs { display: grid; gap: 8px; align-content: start; }
.tour-tabs button { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; text-align: left; padding: 13px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 86%, transparent); color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; transition: color 0.2s, border-color 0.2s, background 0.2s, translate 0.2s; }
.tour-tabs button:hover { color: var(--text); translate: 4px 0; }
.tour-tabs .n { font-size: 0.72rem; letter-spacing: 0.08em; color: var(--accent); font-variant-numeric: tabular-nums; }
.tour-tabs button[aria-selected="true"] { color: var(--text); border-color: color-mix(in srgb, var(--accent) 70%, var(--line)); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 18%, var(--surface)), var(--surface)); }
.tour-tabs button i { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.tour.playing .tour-tabs button[aria-selected="true"] i { animation: tour-bar 6s linear forwards; }
@keyframes tour-bar { to { width: 100%; } }
.tour-stage { border-radius: 24px; overflow: hidden; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); display: grid; grid-template-rows: auto auto; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4); }
.tour-pic { position: relative; height: clamp(280px, 40vw, 470px); overflow: hidden; background: #0a0c13; isolation: isolate; }
.tour-pic::before { content: ""; position: absolute; inset: -40px; z-index: -1; background: var(--fill) center / cover; filter: blur(30px) brightness(0.55) saturate(1.2); }
.tour-pic img { width: 100%; height: 100%; object-fit: contain; padding: 18px; animation: tour-in 0.5s ease both; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.5)); }
@keyframes tour-in { from { opacity: 0; scale: 0.97; } to { opacity: 1; scale: 1; } }
.tour-text { padding: 20px 24px 24px; display: grid; gap: 8px; }
.tour-text h3 { font-size: 1.5rem; }
.tour-text p { color: var(--muted); max-width: 62ch; }
.tour-text .more { color: var(--accent-2); font-weight: 600; font-size: 0.95rem; margin-top: 4px; }

/* pack stats on the artwork blocks */
.block-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 0; }
.block-stats span { padding: 4px 11px; border-radius: 999px; font-size: 0.8rem; color: rgba(255, 255, 255, 0.85); background: rgba(8, 10, 18, 0.55); border: 1px solid rgba(255, 255, 255, 0.16); backdrop-filter: blur(6px); text-shadow: none; }
.block-stats b { color: #ffd766; font-weight: 700; }

/* guide and install pages: a proper title */
.guide > h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); letter-spacing: -0.02em; background: linear-gradient(92deg, #fff 20%, #ffe08a 55%, #6ee7ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 6px; }
:root[data-theme="light"] .guide > h1 { background: linear-gradient(92deg, #141824 20%, #c98200 60%, #0a8fb0 100%); -webkit-background-clip: text; background-clip: text; }
.guide h2 { scroll-margin-top: 90px; position: relative; padding-left: 16px; }
.guide h2::before { content: ""; position: absolute; left: 0; top: calc(22px + 0.2em); width: 5px; height: 1em; border-radius: 3px; background: linear-gradient(var(--accent), var(--accent-2)); }
.guide figure img { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); transition: transform 0.25s; }
.guide figure a:hover img { transform: scale(1.01); }
.guide ol > li::marker { color: var(--accent); font-weight: 700; }
.guide-toc { padding: 14px 10px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--line); backdrop-filter: blur(8px); }

/* page not found */
.lost { min-height: 62vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }
.lost img { width: 140px; border-radius: 30px; margin-inline: auto; }
.lost h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin: 18px 0 8px; }
.lost .hero-actions { justify-content: center; margin-top: 22px; }

@media (max-width: 860px) {
  .tour { grid-template-columns: 1fr; }
  .tour-tabs { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .tour-tabs::-webkit-scrollbar { display: none; }
  .tour-tabs button:hover { translate: none; }
  .tour-pic { height: 300px; }
}

/* live release list on a project page */
.rel { display: grid; gap: 6px; }
.rel-head { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.rel-file { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 600; font-size: 0.9rem; transition: border-color 0.2s, translate 0.2s; }
.rel-file:hover { border-color: var(--accent-2); translate: 2px 0; }
.rel-file small { color: var(--muted); font-weight: 400; }

/* =====================================================================
   What's next, and "work in progress" touches
   ===================================================================== */
.wip-pill { display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; padding: 8px 16px; border-radius: 999px; font-size: 0.88rem; font-weight: 600; color: var(--text);
  border: 1px solid color-mix(in srgb, #b58cff 55%, var(--line)); background: color-mix(in srgb, #b58cff 14%, var(--surface)); transition: translate 0.2s, border-color 0.2s; }
.wip-pill:hover { translate: 0 -2px; border-color: #b58cff; }
.wip-pill i, .next-tag i { width: 9px; height: 9px; border-radius: 50%; background: #b58cff; flex: none; box-shadow: 0 0 0 0 rgba(181, 140, 255, 0.6); }
@media (prefers-reduced-motion: no-preference) {
  .wip-pill i, .next-tag i { animation: pulse 2s ease-out infinite; }
  @keyframes pulse { to { box-shadow: 0 0 0 10px rgba(181, 140, 255, 0); } }
}

.next-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.next-card { position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 10px; align-content: start; padding: 26px 26px 28px; border-radius: 24px; min-height: 230px;
  border: 1px solid color-mix(in srgb, #b58cff 40%, var(--line)); background: color-mix(in srgb, var(--surface) 90%, transparent); transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; }
.next-card::before { content: ""; position: absolute; inset: -40%; z-index: -1; opacity: 0.3;
  background: conic-gradient(from 0deg, transparent 0 55%, #7a56ff 70%, #6ee7ff 82%, #ffb347 92%, transparent 100%); filter: blur(40px); }
@media (prefers-reduced-motion: no-preference) { .next-card::before { animation: aurora 12s linear infinite; } }
.next-card:hover { transform: translateY(-6px); border-color: #b58cff; box-shadow: 0 26px 60px rgba(90, 60, 200, 0.35); }
.next-sym { font-size: 2.6rem; line-height: 1; background: linear-gradient(180deg, #ffe08a, #ffab2e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.next-tag { display: inline-flex; align-items: center; gap: 8px; justify-self: start; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: #cdb4ff; }
:root[data-theme="light"] .next-tag { color: #6a3fd1; }
.next-card h3 { font-size: 1.4rem; }
.next-card p { color: var(--muted); }

/* "more on the way" placeholders in the grids */
a.block.soon { background: linear-gradient(135deg, #2a1f5e, #14243f 60%, #3a2414); border-style: dashed; border-color: rgba(205, 180, 255, 0.55); }
a.block.soon::after { background: radial-gradient(60% 70% at 78% 30%, rgba(181, 140, 255, 0.35), transparent 70%); }
.soon-plus { position: absolute; right: 9%; top: 50%; translate: 0 -55%; font-size: clamp(7rem, 14vw, 11rem); font-weight: 300; line-height: 1; color: rgba(255, 255, 255, 0.16); z-index: -1; }
@media (prefers-reduced-motion: no-preference) { .soon-plus { animation: breathe 4s ease-in-out infinite alternate; } @keyframes breathe { to { color: rgba(255, 224, 138, 0.4); scale: 1.06; } } }
.comp.soon { border: 1px dashed color-mix(in srgb, #b58cff 60%, var(--line)); background: color-mix(in srgb, #b58cff 10%, var(--surface)); }
.comp.soon .sys { color: #cdb4ff; background: color-mix(in srgb, #7a56ff 26%, var(--surface-2)); }

/* =====================================================================
   Polish pass 6
   ===================================================================== */

/* top bar tightens once you scroll */
.nav .wrap { transition: min-height 0.3s, padding 0.3s; }
.nav.scrolled { background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(20px) saturate(1.4); box-shadow: 0 1px 0 var(--line), 0 14px 40px rgba(0, 0, 0, 0.35); }
.nav.scrolled .wrap { min-height: 56px; padding-block: 4px; }
.nav nav { padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 55%, transparent); border: 1px solid var(--line); }

/* main buttons catch the light */
.btn.primary { position: relative; overflow: hidden; }
.btn.primary::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.65), transparent); transform: skewX(-18deg); transition: left 0.6s ease; }
.btn.primary:hover::after { left: 120%; }

/* sparkles around the logo */
.sparkles { position: absolute; inset: 0 8% 45% 8%; pointer-events: none; animation: none !important; }
.sparkles span { position: absolute; color: #ffe9a8; text-shadow: 0 0 12px rgba(255, 220, 130, 0.9); opacity: 0; animation: sparkle 3.6s ease-in-out infinite; }
.sparkles span:nth-child(3n) { color: #9fe6ff; text-shadow: 0 0 12px rgba(110, 231, 255, 0.9); }
.sparkles span:nth-child(4n) { color: #e2c8ff; text-shadow: 0 0 12px rgba(181, 140, 255, 0.9); }
@keyframes sparkle { 0%, 100% { opacity: 0; scale: 0.4; rotate: 0deg; } 50% { opacity: 1; scale: 1; rotate: 40deg; } }
:root[data-theme="light"] .sparkles { display: none; }

/* progress tally */
.tally { margin-bottom: 20px; display: grid; gap: 10px; max-width: 720px; }
.tally-bar { display: flex; gap: 4px; height: 12px; }
.tally-bar span { border-radius: 99px; min-width: 14px; transform-origin: 0 50%; }
.tally-bar .complete, .tally-key i.complete { background: linear-gradient(90deg, #2fbf74, #4fd38a); }
.tally-bar .released, .tally-key i.released { background: #6ee7ff; }
.tally-bar .beta, .tally-key i.beta { background: #b58cff; }
.tally-bar .dev, .tally-key i.dev { background: linear-gradient(90deg, #ffab2e, #ffd766); }
.tally-bar .planned, .tally-key i.planned { background: var(--muted); }
.tally-key { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 0.92rem; color: var(--muted); }
.tally-key span { display: inline-flex; align-items: center; gap: 8px; }
.tally-key i { width: 10px; height: 10px; border-radius: 50%; }
.tally-key b { color: var(--text); }
@media (prefers-reduced-motion: no-preference) {
  .js-reveal .tally-bar span { animation: grow 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .js-reveal .tally-bar span:nth-child(2) { animation-delay: 0.12s; } .js-reveal .tally-bar span:nth-child(3) { animation-delay: 0.24s; }
  @keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* stat tiles and the status panel respond to the pointer */
.stat-tiles div { transition: translate 0.2s, border-color 0.2s; }
.stat-tiles div:hover { translate: 0 -3px; border-color: var(--accent); }
.rel-file, .guide-links a, .topic { will-change: transform; }
.guide-links a { transition: translate 0.2s, border-color 0.2s; }
.guide-links a:hover { translate: 0 -2px; border-color: var(--accent-2); }

@media (max-width: 860px) {
  .nav nav { border-radius: 0; background: none; border: 0; padding: 0 12px; }
  .sparkles { inset: 0 2% 55% 2%; }
}

/* credits page */
.credits-top { padding-bottom: 20px; }
.credits-top h1 { font-size: clamp(2.8rem, 7vw, 5rem); }
.credit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.credit-grid:empty { display: none; }
.credit { position: relative; display: grid; gap: 4px; align-content: start; padding: 18px 20px; border-radius: 16px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(6px); transition: translate 0.2s, border-color 0.2s; }
a.credit:hover { translate: 0 -3px; border-color: var(--accent-2); }
.credit::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(110, 231, 255, 0.16), transparent 65%); }
.credit:hover::after { opacity: 1; }
.credit b { font-size: 1.08rem; padding-right: 22px; }
.credit .by { color: var(--accent); font-size: 0.88rem; font-weight: 600; }
:root[data-theme="light"] .credit .by { color: #b96a00; }
.credit .what { color: var(--muted); font-size: 0.92rem; }
.credit .go { position: absolute; right: 16px; top: 16px; color: var(--muted); font-size: 0.95rem; }
.lib-list { display: flex; flex-wrap: wrap; gap: 8px; }
.lib-list span { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 86%, transparent); font-size: 0.88rem; color: var(--muted); }

/* =====================================================================
   Polish pass 7
   ===================================================================== */

/* skip link for keyboard users */
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 10px; background: #ffd766; color: #231803; font-weight: 700; transition: top 0.2s; }
.skip:focus { top: 12px; }

/* latest updates */
.news { display: grid; gap: 10px; max-width: 900px; }
.news-item { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px 20px; border-radius: 16px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(6px); transition: translate 0.2s, border-color 0.2s; }
.news-item:hover { translate: 4px 0; border-color: var(--accent-2); }
.news-item time { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.news-item h3 { font-size: 1.1rem; margin-bottom: 2px; }
.news-item p { color: var(--muted); font-size: 0.93rem; }
.news-item > span { color: var(--accent-2); font-size: 1.2rem; }
.news-item:first-child { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface)); }

/* "works with" on project pages */
.compat { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 0; font-size: 0.86rem; }
.compat-label { color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.74rem; font-weight: 600; }
.compat span:not(.compat-label) { padding: 4px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent-2) 45%, var(--line)); background: color-mix(in srgb, var(--accent-2) 10%, var(--surface)); font-weight: 600; }

/* three related projects at the bottom of a project page */
.pager.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pager.three .pg { text-align: left; min-height: 210px; }
.pager.three .pg-label { justify-self: start; padding: 3px 10px; border-radius: 999px; background: rgba(8, 10, 18, 0.6); letter-spacing: 0.08em; }

/* guide search */
.guide-search { display: grid; gap: 6px; margin-bottom: 8px; }
.guide-search span { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.guide-search input { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 0.95rem; }
.guide-search input:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.guide-found { font-size: 0.82rem; color: var(--accent); min-height: 1.2em; margin-bottom: 8px; }
.guide-toc a[hidden] { display: none; }

@media (max-width: 860px) {
  .news-item { grid-template-columns: 1fr auto; }
  .news-item time { grid-column: 1 / -1; }
  .pager.three { grid-template-columns: 1fr; }
}

/* pack downloads not open yet */
.soon-note { font-size: 0.86rem; color: #cdb4ff; margin: 0; display: flex; gap: 8px; align-items: baseline; }
.soon-note::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #b58cff; flex: none; translate: 0 -1px; }
:root[data-theme="light"] .soon-note { color: #6a3fd1; }
.wrap > .soon-note { margin-top: 12px; }
.dl-soon { display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1px dashed color-mix(in srgb, #b58cff 60%, var(--line)); color: var(--muted); font-size: 0.88rem; white-space: nowrap; }

/* =====================================================================
   Polish pass 8
   ===================================================================== */

/* the stars drift slowly as the page scrolls */
body::before { inset: -30% 0; transform: translate3d(0, calc(var(--sy, 0) * -0.06px), 0); will-change: transform; }

/* each home section gets its own colour of light and a big faint number */
main { counter-reset: sec; }
main > section.block[id] { position: relative; isolation: isolate; }
main > section.block[id]::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.55;
  background: radial-gradient(46% 60% at var(--gx, 88%) 18%, color-mix(in srgb, var(--glow, #6ee7ff) 20%, transparent), transparent 70%); }
main > section.block[id]:nth-of-type(even)::before { --gx: 10%; }
#packs { --glow: #2eaaff; } #ds { --glow: #ffb347; } #companions { --glow: #b58cff; } #apps { --glow: #2ad4c4; }
#progress { --glow: #ffd766; } #news { --glow: #6ee7ff; } #next { --glow: #b58cff; } #features { --glow: #7a56ff; } #about { --glow: #ff8fc7; }
main > section.block[id] > .wrap > .section-head { counter-increment: sec; }
main > section.block[id] > .wrap > .section-head::after { content: counter(sec, decimal-leading-zero); position: absolute; right: 0; top: -0.28em; z-index: -1;
  font-size: clamp(5rem, 13vw, 10rem); font-weight: 700; line-height: 1; letter-spacing: -0.05em; color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--text) 12%, transparent); pointer-events: none; }
#guide > .wrap > .section-head::after, #beta .section-head::after { display: none; }

/* beta call-out */
#beta { padding-block: 36px; }
#beta::before { display: none; }
.beta-card { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 30px; align-items: center;
  padding: clamp(24px, 4vw, 44px); border-radius: 30px; border: 1px solid color-mix(in srgb, #b58cff 50%, var(--line));
  background: linear-gradient(120deg, color-mix(in srgb, #7a56ff 26%, var(--surface)), var(--surface) 55%, color-mix(in srgb, #ffab2e 16%, var(--surface))); box-shadow: 0 30px 80px rgba(60, 40, 160, 0.3); }
.beta-card::before { content: ""; position: absolute; inset: -50%; z-index: -1; opacity: 0.28; background: conic-gradient(from 0deg, transparent 0 50%, #7a56ff 66%, #6ee7ff 80%, #ffb347 92%, transparent); filter: blur(60px); }
@media (prefers-reduced-motion: no-preference) { .beta-card::before { animation: aurora 16s linear infinite; } }
.beta-orb { width: clamp(84px, 11vw, 130px); aspect-ratio: 1; border-radius: 28%; padding: 6px; background: conic-gradient(#ffd766, #6ee7ff, #b58cff, #ffd766); box-shadow: 0 0 50px rgba(181, 140, 255, 0.55); }
.beta-orb img { width: 100%; height: 100%; border-radius: 24%; }
@media (prefers-reduced-motion: no-preference) { .beta-orb { animation: orb 5s ease-in-out infinite alternate; } @keyframes orb { to { translate: 0 -8px; box-shadow: 0 16px 60px rgba(110, 231, 255, 0.5); } } }
.beta-text { display: grid; gap: 10px; }
.beta-text h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
.beta-text p:not(.eyebrow) { color: var(--muted); max-width: 60ch; }
.beta-text .eyebrow { color: #cdb4ff; }
:root[data-theme="light"] .beta-text .eyebrow { color: #6a3fd1; }
.beta-text ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.beta-text li { padding: 5px 13px 5px 30px; border-radius: 999px; font-size: 0.88rem; font-weight: 600; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 50%, transparent); position: relative; }
.beta-text li::before { content: "✦"; position: absolute; left: 11px; top: 4px; color: var(--accent); }
.beta-actions { display: grid; gap: 10px; }
.beta-actions .btn { justify-content: center; white-space: nowrap; }

/* footer: the name, large and faint, behind everything */
footer { position: relative; overflow: hidden; isolation: isolate; }
footer::before { content: "LUMA CORE"; position: absolute; left: 50%; bottom: -0.2em; translate: -50% 0; z-index: -1; white-space: nowrap;
  font-size: clamp(4.5rem, 17vw, 15rem); font-weight: 700; letter-spacing: 0.02em; line-height: 1; color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--text) 9%, transparent); pointer-events: none; }

@media (max-width: 860px) {
  .beta-card { grid-template-columns: 1fr; gap: 18px; text-align: left; }
  .beta-actions { grid-template-columns: 1fr; }
  main > section.block[id] > .wrap > .section-head::after { font-size: 5rem; top: -0.1em; }
}

/* =====================================================================
   Polish pass 9: the showcase has a second mode, Luma Core Home on the Thor
   ===================================================================== */
.mode-tabs { display: flex; justify-content: center; gap: 4px; width: max-content; margin: 0 auto 16px; padding: 5px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.mode-tabs button { padding: 10px 22px; border-radius: 999px; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; transition: color 0.2s, background 0.2s; }
.mode-tabs button:hover { color: var(--text); }
.mode-tabs button[aria-pressed="true"] { background: linear-gradient(180deg, #ffd766, #ffab2e); color: #231803; box-shadow: 0 6px 18px rgba(255, 171, 46, 0.3); }

/* a capture of both screens, split between the Thor's two displays */
.screen-shot { position: absolute; inset: 0; background-repeat: no-repeat; background-color: #000; }
.screen-shot.top { background-size: 100% auto; background-position: 50% 0; }
.screen-shot.bot { background-size: 155% auto; background-position: 50% 100%; }
.t-bottom { position: relative; }
.hero[data-mode="screens"] .t-top::before { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .screen-shot, #heroTop .compare, #heroTop img.shot, #heroBottom .panel { animation: screen-on 0.45s ease both; }
  @keyframes screen-on { from { opacity: 0; filter: brightness(1.8); } to { opacity: 1; filter: none; } }
}

/* showcase text slides in when the selection changes */
.hero-info > * { transition: none; }
@media (max-width: 860px) { .mode-tabs button { padding: 9px 16px; font-size: 0.92rem; } }

/* =====================================================================
   Polish pass 10
   ===================================================================== */

/* the five systems */
.systems { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: -8px 0 26px; }
.systems-label { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-right: 4px; }
.sys-chip { padding: 7px 16px 7px 34px; border-radius: 12px; font-weight: 700; font-size: 0.92rem; position: relative; border: 1px solid color-mix(in srgb, var(--k) 55%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--k) 24%, var(--surface)), var(--surface)); transition: translate 0.2s, box-shadow 0.2s; }
.sys-chip::before { content: ""; position: absolute; left: 13px; top: 50%; translate: 0 -50%; width: 12px; height: 12px; border-radius: 4px; background: var(--k); box-shadow: 0 0 12px var(--k); }
.sys-chip:hover { translate: 0 -3px; box-shadow: 0 10px 24px color-mix(in srgb, var(--k) 30%, transparent); }
.sys-chip.gb { --k: #9bbc0f; } .sys-chip.gbc { --k: #b06bff; } .sys-chip.gba { --k: #5b6dff; } .sys-chip.ds { --k: #7fd0ff; } .sys-chip.tds { --k: #ff5a5f; }

/* showcase text slides in when the selection changes (never fully hidden) */
@media (prefers-reduced-motion: no-preference) {
  .hero-info.swap > * { animation: swap-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .hero-info.swap > :nth-child(2) { animation-delay: 0.04s; } .hero-info.swap > :nth-child(3) { animation-delay: 0.08s; }
  .hero-info.swap > :nth-child(4) { animation-delay: 0.12s; } .hero-info.swap > :nth-child(5) { animation-delay: 0.16s; }
  @keyframes swap-in { from { opacity: 0.35; translate: 18px 0; } to { opacity: 1; translate: none; } }
}

/* theme switch turns as it flips */
[data-theme-toggle] { transition: rotate 0.5s cubic-bezier(0.3, 1.4, 0.5, 1), background 0.2s; }
:root[data-theme="light"] [data-theme-toggle] { rotate: 180deg; }

/* enlarge the comparison on a project page */
.p-pic { position: relative; }
.enlarge { position: absolute; right: 12px; bottom: 44px; z-index: 3; padding: 7px 13px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(10, 12, 19, 0.78); color: #fff; font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; backdrop-filter: blur(6px); transition: background 0.2s, scale 0.2s; }
.enlarge:hover { background: linear-gradient(180deg, #ffd766, #ffab2e); color: #231803; border-color: transparent; scale: 1.05; }
.lightbox.cmp { cursor: default; }
.cmp-frame { width: min(94vw, calc(86vh * var(--r))); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7); background: #000; }
.cmp-frame .compare { width: 100%; height: 100%; }
.cmp-frame .compare .tag { font-size: 0.85rem; top: 16px; padding: 5px 12px; }
.cmp-frame .compare .tag.l { left: 16px; } .cmp-frame .compare .tag.r { right: 16px; }
.cmp-frame .compare .handle::after { width: 46px; height: 46px; font-size: 1rem; }

@media (max-width: 860px) { .enlarge { bottom: 40px; right: 8px; } .systems { margin-top: 0; } }

/* =====================================================================
   Polish pass 11
   ===================================================================== */

/* dock of Luma app tiles */
.dock { display: flex; gap: 6px; width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 0 26px; padding: 12px 14px 10px; border-radius: 26px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(10px); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); }
.dock::-webkit-scrollbar { display: none; }
.dock a { display: grid; justify-items: center; gap: 6px; width: 86px; flex: none; padding: 4px 2px; border-radius: 16px; font-size: 0.72rem; font-weight: 600; color: var(--muted); text-align: center; line-height: 1.15; transition: color 0.2s; }
.dock img { width: 58px; height: 58px; border-radius: 16px; transition: translate 0.25s cubic-bezier(0.3, 1.5, 0.5, 1), scale 0.25s cubic-bezier(0.3, 1.5, 0.5, 1), box-shadow 0.25s; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); }
.dock a:hover { color: var(--text); }
.dock a:hover img { translate: 0 -10px; scale: 1.14; box-shadow: 0 16px 30px color-mix(in srgb, var(--c1) 45%, rgba(0, 0, 0, 0.5)); }

/* wall of small pictures (achievement badges) */
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 14px; }
.wall img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 18px; padding: 8px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 86%, transparent);
  transition: translate 0.2s, scale 0.2s, border-color 0.2s, box-shadow 0.2s; }
.wall img:hover { translate: 0 -5px; scale: 1.08; border-color: var(--accent); box-shadow: 0 14px 30px rgba(255, 171, 46, 0.25); }

/* six companion screenshots sit in two rows */
.shots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shots a { display: block; border-radius: 14px; overflow: hidden; }
.shots img { transition: transform 0.4s; }
.shots a:hover img { transform: scale(1.04); }

@media (max-width: 860px) { .dock a { width: 74px; } .dock img { width: 50px; height: 50px; } }

/* =====================================================================
   Achievements: named, tiered badge cards
   ===================================================================== */
.tier-tabs { margin-bottom: 20px; }
.tier-tabs button { display: inline-flex; align-items: center; gap: 8px; }
.tier-tabs small { opacity: 0.7; font-weight: 400; }
.tier-tabs i, .badge-card .meta i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
i.bronze { background: #d08a4e; } i.silver { background: #cfd6e4; } i.gold { background: #ffd24d; } i.platinum { background: linear-gradient(135deg, #9fe6ff, #e2c8ff); }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.badge-card { --t: #d08a4e; position: relative; display: grid; gap: 6px; align-content: start; justify-items: center; text-align: center; padding: 18px 14px 16px; border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--t) 45%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--t) 12%, var(--surface)), var(--surface) 60%);
  transition: translate 0.2s, box-shadow 0.2s, border-color 0.2s; }
.badge-card.silver { --t: #cfd6e4; } .badge-card.gold { --t: #ffd24d; } .badge-card.platinum { --t: #b9d9ff; }
.badge-card[hidden] { display: none; }
.badge-card:hover { translate: 0 -5px; border-color: var(--t); box-shadow: 0 16px 36px color-mix(in srgb, var(--t) 28%, transparent); }
.badge-card img { width: 78px; height: 78px; object-fit: contain; filter: drop-shadow(0 6px 14px color-mix(in srgb, var(--t) 45%, transparent)); transition: scale 0.25s cubic-bezier(0.3, 1.5, 0.5, 1), rotate 0.25s; }
.badge-card:hover img { scale: 1.12; rotate: -4deg; }
.badge-card b { font-size: 1rem; line-height: 1.2; }
.badge-card .how { color: var(--muted); font-size: 0.84rem; line-height: 1.35; }
.badge-card .meta { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: color-mix(in srgb, var(--t) 70%, var(--muted)); font-weight: 600; }
.badge-card.platinum { background: linear-gradient(160deg, color-mix(in srgb, #9fe6ff 16%, var(--surface)), var(--surface) 55%, color-mix(in srgb, #e2c8ff 16%, var(--surface))); }
:root[data-theme="light"] .badge-card .meta { color: var(--muted); }
@media (max-width: 860px) { .badge-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }

/* =====================================================================
   The top of the home page, opened up: wider headline, more air between parts
   ===================================================================== */
.intro { padding: 84px 0 34px; gap: 34px; }
.intro img.logo { width: min(640px, 88%); }
.intro h1 { max-width: 22ch; font-size: clamp(2.3rem, 5.2vw, 4.2rem); line-height: 1.14; margin-top: 6px; }
.intro p.lead { max-width: 54rem; font-size: clamp(1.1rem, 1.8vw, 1.4rem); line-height: 1.6; }
.intro .hero-actions { gap: 18px; margin-top: 8px; }
.intro .hero-actions .btn { padding: 17px 30px; font-size: 1.05rem; }
.pills { gap: 14px 16px; margin-top: 18px; max-width: 1000px; }
.pills span { padding: 10px 20px; font-size: 0.98rem; }
.wip-pill { margin-top: 10px; padding: 11px 22px; }
.marquee { margin-top: 56px; }
@media (max-width: 860px) {
  .intro { padding: 44px 0 20px; gap: 24px; }
  .intro h1 { max-width: 14ch; }
  .pills { gap: 10px; }
  .pills span { padding: 8px 14px; font-size: 0.9rem; }
  .marquee { margin-top: 34px; }
}

/* keep the tier dot beside its text when a badge's last line wraps */
.badge-card .meta { display: block; text-align: center; line-height: 1.5; }
.badge-card .meta i { display: inline-block; margin-right: 6px; vertical-align: 0; }

/* =====================================================================
   Polish pass 12: site search, richer companion cards, game chips
   ===================================================================== */
.nav [data-search] { margin-left: auto; font-size: 1.25rem; line-height: 1; }
.nav [data-search] + [data-theme-toggle] { margin-left: 0; }
.nav nav { margin-inline: auto 0; }
.nav .brand { margin-right: auto; }

.search { position: fixed; inset: 0; z-index: 120; background: rgba(4, 5, 10, 0.72); backdrop-filter: blur(8px); display: grid; justify-items: center; align-content: start; padding: 12vh 16px 16px; animation: lb 0.15s ease; }
.search-panel { width: min(640px, 100%); border-radius: 22px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent-2) 40%, var(--line)); background: var(--surface); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6); }
.search-panel input { width: 100%; padding: 20px 22px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; font-size: 1.15rem; outline: none; }
.search-list { max-height: min(56vh, 480px); overflow-y: auto; padding: 8px; display: grid; gap: 2px; scrollbar-width: thin; }
.search-list a { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; }
.search-list a.on, .search-list a:hover { background: var(--surface-2); }
.search-list a.on { box-shadow: inset 3px 0 0 var(--accent); }
.search-list img, .search-list .dot { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.search-list .dot { display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.search-list span { display: grid; min-width: 0; }
.search-list b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-list small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-list .none { padding: 22px; color: var(--muted); text-align: center; }
.search-tip { padding: 10px 18px; border-top: 1px solid var(--line); font-size: 0.78rem; color: var(--muted); }

.comp-detail { color: var(--muted); font-size: 0.86rem; line-height: 1.45; }
.comp-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.chips span { padding: 5px 13px; border-radius: 999px; font-size: 0.88rem; font-weight: 600; border: 1px solid color-mix(in srgb, var(--accent-2) 40%, var(--line)); background: color-mix(in srgb, var(--accent-2) 9%, var(--surface)); }

@media (max-width: 860px) {
  .nav [data-search] { margin-left: auto; }
  .nav .icon-btn[data-theme-toggle] { margin-left: 0; }
  .search { padding-top: 8vh; }
}

/* =====================================================================
   Polish pass 13: a labelled picture of Home, and the dock on app pages
   ===================================================================== */
.anatomy { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.anatomy-pic { position: relative; max-width: 500px; width: 100%; margin-inline: auto; border-radius: 22px; overflow: visible; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.5)); }
.anatomy-pic img { width: 100%; border-radius: 22px; border: 1px solid var(--line); background: #000; }
.dot-n { position: absolute; translate: -50% -50%; width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; cursor: pointer; font: 700 0.95rem/1 "Outfit", sans-serif;
  background: linear-gradient(180deg, #ffd766, #ffab2e); color: #231803; box-shadow: 0 0 0 0 rgba(255, 190, 80, 0.7), 0 6px 16px rgba(0, 0, 0, 0.5); transition: scale 0.2s, background 0.2s; }
.dot-n.on { scale: 1.25; background: linear-gradient(180deg, #9ff0ff, #39d7ff); }
@media (prefers-reduced-motion: no-preference) {
  .dot-n { animation: ping 2.4s ease-out infinite; }
  .dot-n:nth-of-type(2) { animation-delay: 0.4s; } .dot-n:nth-of-type(3) { animation-delay: 0.8s; } .dot-n:nth-of-type(4) { animation-delay: 1.2s; } .dot-n:nth-of-type(5) { animation-delay: 1.6s; }
  @keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 190, 80, 0.7), 0 6px 16px rgba(0, 0, 0, 0.5); } 100% { box-shadow: 0 0 0 16px rgba(255, 190, 80, 0), 0 6px 16px rgba(0, 0, 0, 0.5); } }
}
.anatomy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.anatomy-list li { display: flex; gap: 16px; align-items: flex-start; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); cursor: default;
  background: color-mix(in srgb, var(--surface) 86%, transparent); transition: border-color 0.2s, translate 0.2s, background 0.2s; }
.anatomy-list li.on { border-color: var(--accent-2); translate: 6px 0; background: linear-gradient(90deg, color-mix(in srgb, var(--accent-2) 14%, var(--surface)), var(--surface)); }
.anatomy-list .num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--surface-2); color: var(--accent); }
.anatomy-list li.on .num { background: linear-gradient(180deg, #9ff0ff, #39d7ff); color: #06222b; }
.anatomy-list b { font-size: 1.08rem; }
.anatomy-list p { color: var(--muted); font-size: 0.93rem; margin-top: 2px; }
#screens { --glow: #39d7ff; }

/* the dock marks the app you are on */
.dock a[aria-current="page"] { color: var(--text); }
.dock a[aria-current="page"] img { box-shadow: 0 0 0 3px var(--accent), 0 10px 24px rgba(255, 171, 46, 0.35); }
.pager.three + .dock, .dock + .pager { margin-top: 0; }

@media (max-width: 860px) {
  .anatomy { grid-template-columns: 1fr; }
  .anatomy-pic { max-width: 380px; }
  .anatomy-list li.on { translate: none; }
  .dot-n { width: 28px; height: 28px; font-size: 0.82rem; }
}

/* =====================================================================
   Polish pass 14: Forged tags, and fixes from a light-mode and phone check
   ===================================================================== */
.block-tags, .comp-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.forged-tag { position: relative; display: inline-flex; align-items: center; padding: 6px 13px 6px 27px; border-radius: 999px; white-space: nowrap;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #231803; text-shadow: none;
  background: linear-gradient(180deg, #ffe9a3, #ffb52e); box-shadow: 0 4px 14px rgba(255, 181, 46, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
.forged-tag::before { content: "✦"; position: absolute; left: 11px; top: 50%; translate: 0 -50%; font-size: 0.8rem; }
.forged-tag.small { padding: 3px 9px 3px 21px; font-size: 0.64rem; box-shadow: none; }
.forged-tag.small::before { left: 8px; font-size: 0.66rem; }
@media (prefers-reduced-motion: no-preference) {
  a.block:hover .forged-tag { animation: forged-glint 0.9s ease; }
  @keyframes forged-glint { 50% { box-shadow: 0 4px 24px rgba(255, 220, 120, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.9); scale: 1.06; } }
}

/* light mode: the white half of the wordmark needs an edge to read against a pale bar */
:root[data-theme="light"] .brand img.wordmark { filter: drop-shadow(0 0 1px #16235c) drop-shadow(0 0 1px #16235c) drop-shadow(0 2px 4px rgba(22, 35, 92, 0.4)); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .brand img.wordmark { filter: drop-shadow(0 0 1px #16235c) drop-shadow(0 0 1px #16235c) drop-shadow(0 2px 4px rgba(22, 35, 92, 0.4)); }
}

@media (max-width: 860px) {
  /* the dock scrolls sideways on a phone: fade its right edge as a hint */
  .dock { -webkit-mask-image: linear-gradient(90deg, #000 80%, transparent); mask-image: linear-gradient(90deg, #000 80%, transparent); padding-right: 40px; }
  /* the big faint section numbers crowd the headings at this size */
  main > section.block[id] > .wrap > .section-head::after { display: none; }
}

/* =====================================================================
   Polish pass 15: the packs in numbers, what 4x means, a ribbon of badges
   ===================================================================== */
.pack-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 36px; margin-bottom: 26px; padding: 20px 24px; border-radius: 22px;
  border: 1px solid var(--line); background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 9%, var(--surface)), color-mix(in srgb, var(--surface) 80%, transparent)); }
.pack-band .stat-tiles { margin-top: 0; }
.px-demo { display: grid; grid-template-columns: auto auto auto minmax(0, 1fr); align-items: center; gap: 14px; flex: 1 1 380px; max-width: 560px; }
.px-demo p { color: var(--muted); font-size: 0.93rem; }
.px-demo p b { color: var(--text); }
.px { width: 60px; height: 60px; border-radius: 8px; flex: none; }
.px.one { background: #c98a2b; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.px.many { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.px.many i { border-radius: 2px; background: #c98a2b; }
.px.many i:nth-child(1) { background: #7a4a12; } .px.many i:nth-child(2) { background: #9a6218; } .px.many i:nth-child(3) { background: #c98a2b; } .px.many i:nth-child(4) { background: #e8b04a; }
.px.many i:nth-child(5) { background: #9a6218; } .px.many i:nth-child(6) { background: #c98a2b; } .px.many i:nth-child(7) { background: #f2c766; } .px.many i:nth-child(8) { background: #ffe9a3; }
.px.many i:nth-child(9) { background: #b8791f; } .px.many i:nth-child(10) { background: #e8b04a; } .px.many i:nth-child(11) { background: #ffe9a3; } .px.many i:nth-child(12) { background: #f2c766; }
.px.many i:nth-child(13) { background: #c98a2b; } .px.many i:nth-child(14) { background: #d99c38; } .px.many i:nth-child(15) { background: #e8b04a; } .px.many i:nth-child(16) { background: #b8791f; }
.px-arrow { color: var(--accent); font-size: 1.3rem; font-weight: 700; }
@media (prefers-reduced-motion: no-preference) {
  .pack-band.in .px.many i, .rv.in .px.many i { animation: px-pop 0.5s backwards; }
  .px.many i:nth-child(4n + 2) { animation-delay: 0.08s; } .px.many i:nth-child(4n + 3) { animation-delay: 0.16s; } .px.many i:nth-child(4n) { animation-delay: 0.24s; }
  .px.many i:nth-child(n + 5) { animation-duration: 0.6s; } .px.many i:nth-child(n + 9) { animation-duration: 0.7s; } .px.many i:nth-child(n + 13) { animation-duration: 0.8s; }
  @keyframes px-pop { from { scale: 0; opacity: 0; } }
}

.ribbon { display: flex; align-items: center; gap: 22px; margin: 6px 0 26px; padding: 14px 0 14px 22px; border-radius: 20px; border: 1px solid var(--line); overflow: hidden; color: inherit; text-decoration: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), color-mix(in srgb, var(--surface) 78%, transparent)); transition: border-color 0.2s, translate 0.2s; }
.ribbon:hover, .ribbon:focus-visible { border-color: var(--accent); translate: 0 -2px; }
.ribbon-text { display: grid; gap: 2px; flex: none; }
.ribbon-text b { font-size: 1.1rem; }
.ribbon-text small { color: var(--muted); font-size: 0.86rem; }
.ribbon-view { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 92%, transparent); }
.ribbon-track { display: flex; gap: 14px; width: max-content; padding-right: 14px; }
.ribbon-track img { width: 58px; height: 58px; flex: none; object-fit: contain; filter: drop-shadow(0 5px 10px color-mix(in srgb, var(--ring, #c98a52) 55%, transparent)); }
.ribbon-track img.bronze { --ring: #c98a52; } .ribbon-track img.silver { --ring: #cfd8e6; } .ribbon-track img.gold { --ring: #ffcf4a; } .ribbon-track img.platinum { --ring: #8ff0ff; }
@media (prefers-reduced-motion: no-preference) {
  .ribbon-track { animation: slide 70s linear infinite reverse; }
}
@media (max-width: 860px) {
  .pack-band { padding: 16px; }
  .px-demo { grid-template-columns: auto auto auto; flex-basis: 100%; }
  .px-demo p { grid-column: 1 / -1; }
  .ribbon { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px 0; }
  .ribbon-text { padding-inline: 16px; }
  .ribbon-track img { width: 46px; height: 46px; }
}

/* light mode: the system and Planned tags on companion cards need darker lettering */
:root[data-theme="light"] .comp .sys.gbc { color: #5a2bb8; } :root[data-theme="light"] .comp .sys.gba { color: #1250b8; } :root[data-theme="light"] .comp.soon .sys { color: #4a2fb0; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .comp .sys.gbc { color: #5a2bb8; } :root:not([data-theme="dark"]) .comp .sys.gba { color: #1250b8; } :root:not([data-theme="dark"]) .comp.soon .sys { color: #4a2fb0; }
}

/* seven menu links: tighten them on narrower desktop windows so they clear the search and theme buttons */
@media (min-width: 861px) and (max-width: 1120px) {
  .nav .wrap { gap: 10px; }
  .nav nav { gap: 0; }
  .nav nav a { padding-inline: 10px; font-size: 0.9rem; }
  .nav nav a[aria-current="page"]::after { left: 10px; right: 10px; }
}

/* =====================================================================
   Polish pass 16: what each system gets
   ===================================================================== */
#systems { --glow: #b06bff; }
.sys-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.sys-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px 18px 18px; border-radius: 22px; overflow: hidden; color: inherit; text-decoration: none; isolation: isolate;
  border: 1px solid color-mix(in srgb, var(--k) 40%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--k) 16%, var(--surface)), var(--surface) 62%);
  transition: translate 0.25s, box-shadow 0.25s, border-color 0.25s; }
.sys-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--k); box-shadow: 0 0 22px var(--k); }
.sys-card::after { content: ""; position: absolute; z-index: -1; right: -40px; top: -40px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--k) 45%, transparent), transparent 70%); opacity: 0.55; transition: opacity 0.25s, scale 0.25s; }
.sys-card:hover, .sys-card:focus-visible { translate: 0 -6px; border-color: var(--k); box-shadow: 0 18px 40px color-mix(in srgb, var(--k) 28%, transparent); }
.sys-card:hover::after { opacity: 1; scale: 1.25; }
.sys-code { font-size: 2.3rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; color: color-mix(in srgb, var(--k) 72%, var(--text)); text-shadow: 0 0 26px color-mix(in srgb, var(--k) 55%, transparent); }
.sys-card > b { font-size: 1.02rem; }
.sys-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 0.9rem; color: var(--muted); flex: 1; align-content: start; }
.sys-card li { position: relative; padding-left: 16px; }
.sys-card li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 7px; height: 7px; border-radius: 2px; background: var(--k); }
.sys-card li.lead { color: var(--text); font-weight: 600; }
.sys-go { font-size: 0.86rem; font-weight: 700; color: color-mix(in srgb, var(--k) 60%, var(--text)); }
:root[data-theme="light"] .sys-code { text-shadow: none; color: color-mix(in srgb, var(--k) 62%, #10183f); }
:root[data-theme="light"] .sys-go { color: color-mix(in srgb, var(--k) 45%, #10183f); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .sys-code { text-shadow: none; color: color-mix(in srgb, var(--k) 62%, #10183f); }
  :root:not([data-theme="dark"]) .sys-go { color: color-mix(in srgb, var(--k) 45%, #10183f); }
}
@media (max-width: 1100px) { .sys-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .sys-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sys-card { padding: 18px 14px 14px; }
  .sys-card:last-child { grid-column: 1 / -1; }
  .sys-code { font-size: 1.9rem; }
}

/* =====================================================================
   Polish pass 17: flip between projects of the same kind
   ===================================================================== */
.p-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 26px; flex-wrap: wrap; }
.p-top .back { margin-bottom: 0; }
.flip { display: inline-flex; align-items: center; gap: 10px; padding: 5px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(8px); }
.flip > a { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; line-height: 1; padding-bottom: 3px; color: var(--text); text-decoration: none; background: var(--surface-2); transition: background 0.2s, color 0.2s, translate 0.2s; }
.flip > a:hover, .flip > a:focus-visible { background: linear-gradient(180deg, #ffd766, #ffab2e); color: #231803; }
.flip > a[rel="prev"]:hover { translate: -2px 0; } .flip > a[rel="next"]:hover { translate: 2px 0; }
.flip-dots { display: inline-flex; gap: 6px; align-items: center; }
.flip-dots a { width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 45%, transparent); transition: scale 0.2s, background 0.2s; }
.flip-dots a:hover { scale: 1.5; background: var(--accent-2); }
.flip-dots a.on { width: 22px; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.flip-n { font-size: 0.86rem; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.flip-n b { color: var(--text); }
/* a lone screenshot gets room instead of sitting small in an empty row */
.gallery.solo { grid-template-columns: minmax(0, 640px); }
@media (max-width: 860px) {
  .flip-dots { display: none; }
}

/* =====================================================================
   Polish pass 18: button caps in the guide, game icons in the downloads table
   ===================================================================== */
kbd.pad { display: inline-grid; place-items: center; vertical-align: 0.05em; min-width: 1.75em; height: 1.75em; padding: 0 0.45em; margin-inline: 1px; font: 700 0.82em/1 "Outfit", sans-serif; color: #fff;
  border-radius: 0.6em; background: linear-gradient(180deg, #4a5578, #2a3252); box-shadow: 0 2px 0 #171c33, inset 0 1px 0 rgba(255, 255, 255, 0.28); }
kbd.pad.face { border-radius: 50%; padding: 0; width: 1.75em; }
kbd.pad.a { background: linear-gradient(180deg, #ffbf4d, #f08a12); box-shadow: 0 2px 0 #96500a, inset 0 1px 0 rgba(255, 255, 255, 0.45); color: #2b1802; }
kbd.pad.b { background: linear-gradient(180deg, #ff7f86, #e2404b); box-shadow: 0 2px 0 #8c1f28, inset 0 1px 0 rgba(255, 255, 255, 0.4); }
kbd.pad.x { background: linear-gradient(180deg, #6fd8ff, #1f9fe0); box-shadow: 0 2px 0 #0f5f8c, inset 0 1px 0 rgba(255, 255, 255, 0.45); color: #04202f; }
kbd.pad.y { background: linear-gradient(180deg, #b993ff, #7c4fe6); box-shadow: 0 2px 0 #46288f, inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.pad-or { color: var(--muted); margin-inline: 2px; }

.dl-name { display: inline-flex; align-items: center; gap: 12px; }
.dl-name img, .dl-noicon { width: 34px; height: 34px; flex: none; border-radius: 9px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); }
.dl-noicon { background: linear-gradient(135deg, #5b6dff, #b06bff); }
td .sys { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; padding: 3px 9px; border-radius: 6px; color: #fff; background: #5a6488; }
td .sys.\33 ds { background: #d8434a; } td .sys.ds { background: #1f8fc9; }
tbody tr { transition: background 0.2s; }
tbody tr:hover { background: color-mix(in srgb, var(--accent-2) 7%, transparent); }
#dlRows td:nth-child(4) { white-space: nowrap; }

/* =====================================================================
   Polish pass 19: a secret shower of stars, places to go on the 404 page
   ===================================================================== */
.star-shower { position: fixed; inset: 0; z-index: 300; pointer-events: none; overflow: hidden; }
.star-shower i { position: absolute; top: -60px; font-style: normal; text-shadow: 0 0 14px currentColor; animation: star-fall 3s cubic-bezier(0.3, 0, 0.7, 1) forwards; }
@keyframes star-fall { to { translate: var(--sway) 115vh; rotate: 540deg; } }
.secret-note { position: fixed; left: 50%; bottom: 34px; translate: -50% 0; z-index: 301; padding: 12px 22px; border-radius: 999px; font-weight: 700; color: #231803; white-space: nowrap; max-width: calc(100vw - 32px);
  background: linear-gradient(180deg, #ffe9a3, #ffb52e); box-shadow: 0 12px 34px rgba(255, 181, 46, 0.5); animation: secret-in 5.6s ease forwards; }
@keyframes secret-in { 0% { opacity: 0; translate: -50% 24px; } 8%, 88% { opacity: 1; translate: -50% 0; } 100% { opacity: 0; translate: -50% 12px; } }

.lost-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.lost-links a { position: relative; padding: 9px 16px 9px 32px; border-radius: 12px; font-weight: 600; font-size: 0.92rem; color: var(--text); text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--k) 50%, var(--line)); background: color-mix(in srgb, var(--k) 10%, var(--surface)); transition: translate 0.2s, box-shadow 0.2s; }
.lost-links a::before { content: ""; position: absolute; left: 13px; top: 50%; translate: 0 -50%; width: 10px; height: 10px; border-radius: 3px; background: var(--k); box-shadow: 0 0 10px var(--k); }
.lost-links a:hover { translate: 0 -3px; box-shadow: 0 10px 24px color-mix(in srgb, var(--k) 30%, transparent); }

@media (max-width: 860px) {
  /* downloads table: keep game names on fewer lines; the table scrolls sideways */
  #dlRows td:first-child { min-width: 190px; }
}

/* =====================================================================
   Polish pass 20: where the achievement points come from
   ===================================================================== */
.points-bar { display: flex; gap: 5px; margin-bottom: 10px; }
.points-bar button { min-width: 0; display: grid; gap: 1px; justify-items: start; padding: 12px 14px; border: 0; cursor: pointer; text-align: left; font: inherit; color: #1c1405; border-radius: 8px; overflow: hidden;
  transition: translate 0.2s, box-shadow 0.2s, filter 0.2s; }
.points-bar button:first-child { border-radius: 16px 8px 8px 16px; } .points-bar button:last-child { border-radius: 8px 16px 16px 8px; }
.points-bar button:hover, .points-bar button:focus-visible { translate: 0 -3px; filter: brightness(1.08); box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35); }
.points-bar b { font-size: 1.5rem; line-height: 1; }
.points-bar span { font-size: 0.76rem; font-weight: 600; white-space: nowrap; opacity: 0.85; }
.points-bar .bronze { background: linear-gradient(180deg, #e6a66d, #c07a3e); }
.points-bar .silver { background: linear-gradient(180deg, #eef2f8, #b9c3d6); }
.points-bar .gold { background: linear-gradient(180deg, #ffe58a, #ffbf2e); }
.points-bar .platinum { background: linear-gradient(135deg, #a8ecff, #e6ccff); }
.points-sum { font-size: 0.93rem; margin-bottom: 18px; }
.points-sum b { color: var(--text); }
@media (prefers-reduced-motion: no-preference) {
  .rv.in .points-bar button, .in .points-bar button { animation: seg-grow 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; transform-origin: 0 50%; }
  .points-bar button:nth-child(2) { animation-delay: 0.1s; } .points-bar button:nth-child(3) { animation-delay: 0.2s; } .points-bar button:nth-child(4) { animation-delay: 0.3s; }
  @keyframes seg-grow { from { transform: scaleX(0); opacity: 0; } }
}
@media (max-width: 860px) {
  .points-bar { flex-wrap: wrap; }
  .points-bar button { flex: 1 1 40% !important; border-radius: 12px !important; }
}

/* =====================================================================
   The trailer
   ===================================================================== */
#trailer { --glow: #b06bff; }
.trailer { position: relative; max-width: 1040px; margin-inline: auto; padding: 12px; border-radius: 28px; border: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--surface)), color-mix(in srgb, var(--accent-2) 16%, var(--surface)));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 90px color-mix(in srgb, var(--accent-2) 16%, transparent); }
.trailer video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 18px; background: #0a0c13; }
#trailer .disclaimer { max-width: 1040px; margin-inline: auto; margin-top: 16px; }
@media (max-width: 860px) { .trailer { padding: 6px; border-radius: 18px; } .trailer video { border-radius: 13px; } }

/* =====================================================================
   Support (Ko-fi) and the AI disclosure
   ===================================================================== */
#support { --glow: #ff8fb1; }
.support-card { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 30px; align-items: center; padding: clamp(22px, 4vw, 40px); border-radius: 28px; overflow: hidden;
  border: 1px solid color-mix(in srgb, #ff8fb1 40%, var(--line)); background: linear-gradient(120deg, color-mix(in srgb, #ff8fb1 12%, var(--surface)), color-mix(in srgb, var(--accent) 8%, var(--surface)) 60%, var(--surface)); }
.support-cup { width: 96px; height: 96px; border-radius: 28px; display: grid; place-items: center; font-size: 3rem; background: linear-gradient(160deg, #ffd766, #ff8fb1); box-shadow: 0 16px 36px rgba(255, 143, 177, 0.35); }
.support-card h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 4px 0 8px; }
.support-card p { color: var(--muted); max-width: 640px; }
.support-card ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 7px; }
.support-card li { position: relative; padding-left: 26px; color: var(--text); }
.support-card li::before { content: "♥"; position: absolute; left: 0; color: #ff8fb1; }
.support-card .disclaimer { margin-top: 16px; }
.btn.kofi { white-space: nowrap; }
.nav .kofi-btn { display: grid; place-items: center; text-decoration: none; color: #ff8fb1; margin-left: 0; }
.nav .kofi-btn:hover { color: #fff; background: linear-gradient(160deg, #ff8fb1, #ffab2e); }
.nav [data-search] + .kofi-btn + [data-theme-toggle] { margin-left: 0; }
footer .foot-kofi { color: #ff8fb1; font-weight: 600; }
footer .foot-ai { opacity: 0.9; }
@media (max-width: 860px) {
  .support-card { grid-template-columns: 1fr; gap: 18px; }
  .support-cup { width: 72px; height: 72px; font-size: 2.2rem; border-radius: 22px; }
}

/* =====================================================================
   The opening screen: Mage's Arcane Gazette presents Luma Core
   ===================================================================== */
.gate { display: none; }
html.gate-on { overflow: hidden; }
html.gate-on .gate { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 34px 24px; overflow: hidden; cursor: pointer; color: #f0f3ff;
  background: radial-gradient(60% 50% at 50% 30%, rgba(255, 190, 90, 0.10), transparent 70%), radial-gradient(70% 60% at 50% 74%, rgba(122, 86, 255, 0.26), transparent 70%),
    radial-gradient(900px 600px at 12% 6%, rgba(106, 61, 240, 0.38), transparent 70%), radial-gradient(800px 560px at 92% 24%, rgba(57, 215, 255, 0.13), transparent 70%),
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55)), #0a0c13; }
.gate-stars { position: absolute; inset: -20%; opacity: 0.85;
  background-image: radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 28% 64%, #fff 50%, transparent 51%), radial-gradient(1.4px 1.4px at 44% 32%, #ffe9a3 50%, transparent 51%),
    radial-gradient(1px 1px at 61% 78%, #fff 50%, transparent 51%), radial-gradient(1.3px 1.3px at 73% 22%, #9ff0ff 50%, transparent 51%), radial-gradient(1px 1px at 86% 58%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 7% 84%, #fff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 93% 9%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 52% 52%, #e6ccff 50%, transparent 51%);
  background-size: 420px 420px, 360px 360px, 520px 520px, 300px 300px, 460px 460px, 380px 380px, 340px 340px, 500px 500px, 280px 280px; }

/* a thin gold frame with a star in each corner, like a title card */
.gate-frame { position: absolute; inset: clamp(10px, 2.2vmin, 26px); border-radius: 26px; border: 1px solid rgba(255, 215, 120, 0.22); box-shadow: inset 0 0 0 5px rgba(10, 12, 19, 0.0), inset 0 0 60px rgba(255, 190, 90, 0.05); pointer-events: none; }
.gate-frame i { position: absolute; width: 26px; height: 26px; display: grid; place-items: center; font-style: normal; color: #ffd98a; background: #0c0e17; border-radius: 50%; font-size: 0.9rem; text-shadow: 0 0 12px rgba(255, 190, 90, 0.9); }
.gate-frame i::before { content: "✦"; }
.gate-frame i:nth-child(1) { left: -13px; top: -13px; } .gate-frame i:nth-child(2) { right: -13px; top: -13px; }
.gate-frame i:nth-child(3) { left: -13px; bottom: -13px; } .gate-frame i:nth-child(4) { right: -13px; bottom: -13px; }

.gate-inner { position: relative; display: grid; justify-items: center; text-align: center; width: min(720px, 100%); }

/* the Gazette's crest: the smaller of the two marks, with a slow shimmering halo */
.gate-crest { position: relative; width: min(280px, 23vh, 54vw); aspect-ratio: 1; border-radius: 50%; isolation: isolate; }
.gate-crest::before { content: ""; position: absolute; inset: -5px; z-index: -1; border-radius: 50%;
  background: conic-gradient(from 0deg, #8a5a12, #ffe9a3 12%, #b9791c 26%, #fff3c4 42%, #8a5a12 58%, #ffd766 74%, #b9791c 88%, #8a5a12); }
.gate-crest::after { content: ""; position: absolute; inset: -34px; z-index: -2; border-radius: 50%; background: radial-gradient(circle, rgba(255, 190, 90, 0.42), transparent 68%); }
.gate-gazette { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6); }

.gate-by { margin-top: clamp(14px, 2.2vh, 24px); font-family: "Cinzel", Georgia, serif; font-weight: 700; font-size: clamp(1.15rem, 2.6vh, 1.7rem); letter-spacing: 0.14em; text-transform: uppercase; padding-left: 0.14em;
  background: linear-gradient(180deg, #fff3c4, #ffc85a 55%, #c98a2b); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 14px rgba(255, 190, 90, 0.35)); }
.gate-motto { margin-top: 4px; font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: clamp(0.8rem, 1.6vh, 0.98rem); color: #b9a98a; }
.gate-presents { margin: clamp(14px, 2.6vh, 28px) 0 clamp(8px, 1.6vh, 16px); display: flex; align-items: center; gap: 16px; font-family: "Cinzel", Georgia, serif; font-weight: 500; font-size: 0.82rem; letter-spacing: 0.5em; text-transform: uppercase; color: #cfd6ee; }
.gate-presents span { padding-left: 0.5em; }
.gate-presents::before, .gate-presents::after { content: ""; width: clamp(50px, 14vw, 150px); height: 1px; background: linear-gradient(90deg, transparent, #ffab2e 80%, #fff3c4); }
.gate-presents::after { transform: scaleX(-1); }

/* Luma Core: the star of the screen */
.gate-hero { position: relative; width: min(640px, 88vw, 78vh); filter: drop-shadow(0 0 46px rgba(122, 86, 255, 0.6)) drop-shadow(0 16px 30px rgba(0, 0, 0, 0.5)); }
.gate-luma { display: block; width: 100%; height: auto; }
.gate-shine { position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.85) 50%, transparent 58%) no-repeat; background-size: 260% 100%; background-position: 130% 0;
  -webkit-mask: url("../img/logo-banner.png") center / contain no-repeat; mask: url("../img/logo-banner.png") center / contain no-repeat; mix-blend-mode: screen; }
.gate-tag { margin-top: clamp(4px, 1vh, 10px); font-size: clamp(0.95rem, 2.1vh, 1.2rem); font-weight: 600; color: #cfd6ee; }
.gate-enter { position: relative; margin-top: clamp(16px, 3vh, 30px); padding: 14px 40px; font-size: 1.08rem; letter-spacing: 0.04em; }
.gate-enter::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; border: 2px solid rgba(255, 200, 100, 0.8); opacity: 0; pointer-events: none; }
.gate-hint { margin-top: 14px; font-size: 0.8rem; letter-spacing: 0.04em; color: #7e87a6; }
@media (max-height: 640px) { .gate-motto, .gate-hint { display: none; } .gate-crest { width: min(150px, 22vh); } }
@media (max-width: 520px) { .gate-by { letter-spacing: 0.08em; } .gate-presents { letter-spacing: 0.36em; } }

@media (prefers-reduced-motion: no-preference) {
  .gate-stars { animation: gate-drift 90s linear infinite; }
  @keyframes gate-drift { to { transform: translate3d(-6%, -4%, 0); } }
  .gate-frame { animation: gate-fade 1.6s ease 0.2s backwards; }
  @keyframes gate-fade { from { opacity: 0; } }

  /* the pieces arrive one after another */
  html.gate-on .gate-inner > * { animation: gate-rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
  html.gate-on .gate-crest { animation: gate-pop 1.1s cubic-bezier(0.2, 0.9, 0.25, 1.1) 0.15s backwards, gate-float 6s ease-in-out 1.4s infinite alternate; }
  .gate-crest::before { animation: gate-spin 14s linear infinite; }
  .gate-crest::after { animation: gate-halo 4.5s ease-in-out infinite alternate; }
  html.gate-on .gate-by { animation-delay: 0.65s; }
  html.gate-on .gate-motto { animation-delay: 0.85s; }
  html.gate-on .gate-presents { animation-delay: 1.15s; }
  html.gate-on .gate-hero { animation: gate-arrive 1.1s cubic-bezier(0.2, 0.9, 0.25, 1.05) 1.5s backwards; }
  html.gate-on .gate-tag { animation-delay: 2.2s; }
  html.gate-on .gate-enter { animation-delay: 2.6s; }
  html.gate-on .gate-hint { animation-delay: 3s; }
  .gate-shine { animation: gate-shine 5.5s ease-in-out 2.4s infinite; }
  .gate-enter::after { animation: gate-pulse 2.4s ease-out 3.4s infinite; }
  @keyframes gate-rise { from { opacity: 0; translate: 0 24px; } }
  @keyframes gate-pop { from { opacity: 0; scale: 0.8; rotate: -8deg; } }
  @keyframes gate-arrive { from { opacity: 0; scale: 0.86; translate: 0 18px; } }
  @keyframes gate-float { to { translate: 0 -8px; } }
  @keyframes gate-spin { to { rotate: 360deg; } }
  @keyframes gate-halo { from { opacity: 0.6; scale: 0.94; } to { opacity: 1; scale: 1.08; } }
  @keyframes gate-shine { 0% { opacity: 0; background-position: 130% 0; } 6% { opacity: 1; } 26% { opacity: 1; background-position: -40% 0; } 30%, 100% { opacity: 0; background-position: -40% 0; } }
  @keyframes gate-pulse { 0% { opacity: 0.9; scale: 1; } 70%, 100% { opacity: 0; scale: 1.22 1.5; } }

  /* leaving: the Gazette steps back, Luma Core comes forward, and the page opens up behind it */
  html.gate-leave .gate { animation: gate-out 1.25s cubic-bezier(0.6, 0, 0.3, 1) forwards; pointer-events: none; }
  html.gate-leave .gate-inner > * { animation: gate-away 0.6s ease forwards; }
  html.gate-leave .gate-frame { animation: gate-away 0.5s ease forwards; }
  html.gate-leave .gate-hero { animation: gate-forward 1.15s cubic-bezier(0.5, 0, 0.2, 1) forwards; }
  @keyframes gate-out { 0%, 35% { opacity: 1; } 100% { opacity: 0; } }
  @keyframes gate-away { to { opacity: 0; translate: 0 -18px; } }
  @keyframes gate-forward { 0% { opacity: 1; scale: 1; } 60% { opacity: 1; } 100% { opacity: 0; scale: 1.9; } }
  html.gate-leave main { animation: gate-page 1.25s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
  @keyframes gate-page { from { scale: 0.965; opacity: 0; } }
}

/* the second project the Gazette presents: a small link to the Dragon Quest XI English Patch */
.gate-also { margin-top: clamp(14px, 2.6vh, 26px); display: inline-flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; border-radius: 16px; text-decoration: none; text-align: left; color: #f0f3ff;
  border: 1px solid rgba(181, 140, 255, 0.4); background: rgba(22, 26, 44, 0.72); backdrop-filter: blur(6px); transition: translate 0.2s, border-color 0.2s, box-shadow 0.2s; }
.gate-also:hover, .gate-also:focus-visible { translate: 0 -3px; border-color: #b58cff; box-shadow: 0 12px 30px rgba(122, 86, 255, 0.35); }
.gate-also img { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.gate-also span { display: grid; line-height: 1.2; }
.gate-also small { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: #b9a98a; }
.gate-also b { font-size: 0.98rem; }
.gate-also em { font-style: normal; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; color: #1b1033; background: #b58cff; }
@media (max-height: 700px) { .gate-also small { display: none; } .gate-also img { width: 34px; height: 34px; } }
@media (prefers-reduced-motion: no-preference) {
  html.gate-on .gate-also { animation-delay: 3s; }
  html.gate-on .gate-hint { animation-delay: 3.3s; }
}

/* live download count on a project page */
.stat-tiles .dl-tile { border-color: color-mix(in srgb, #4fd38a 55%, var(--line)); }
.stat-tiles .dl-tile b { background: linear-gradient(180deg, #a8f5c8, #2fbf74); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dl-count { margin-top: 12px; font-size: 0.84rem; color: var(--muted); max-width: 560px; line-height: 1.5; }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #4fd38a; box-shadow: 0 0 0 0 rgba(79, 211, 138, 0.7); vertical-align: 1px; }
@media (prefers-reduced-motion: no-preference) {
  .live-dot { animation: live-ping 2.2s ease-out infinite; }
  @keyframes live-ping { to { box-shadow: 0 0 0 9px rgba(79, 211, 138, 0); } }
  .stat-tiles .dl-tile { animation: gate-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
}
:root[data-theme="light"] .stat-tiles .dl-tile b { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: #17834c; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .stat-tiles .dl-tile b { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: #17834c; } }

/* two places to give: the buttons stack beside the text */
.support-btns { display: grid; gap: 10px; }
.support-btns .btn { justify-content: center; text-align: center; }
@media (max-width: 860px) { .support-btns { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }

/* a video of our own on a project page, and the Discord button */
.clip { margin: 12px 0 0; padding: 10px; border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), color-mix(in srgb, var(--accent-2) 12%, var(--surface))); }
.clip video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 14px; background: #0a0c13; }
.clip figcaption { display: grid; gap: 2px; padding: 12px 6px 4px; }
.clip figcaption span { color: var(--muted); font-size: 0.9rem; }
.btn.discord { border-color: color-mix(in srgb, #5865f2 60%, var(--line)); }
.btn.discord:hover { background: #5865f2; color: #fff; }
