/* Kronspire - crimson on near-black, brushed-metal display type, Minecraft inventory details.
   The CSP has no 'unsafe-inline', so the browser drops every style="" attribute. Anything a template
   needs has a class in here; the only runtime values (quota bar, picker previews) are set from JS. */

:root {
  --ink: #070709;
  --ink-2: #0b0b0e;
  --panel: #15161b;
  --panel-2: #1c1d23;
  --line: #26272e;
  --line-2: #363741;
  --text: #e6e8eb;
  --silver: #cecfe2;
  --dim: #9a9aa6;
  --mute: #6e6f7a;
  --bronze: #5a4a40;
  --crimson: #b00020;
  --red: #ff2e2e;
  --red-soft: #ff6b6b;
  --crimson-dim: #6d0016;

  /* status colours are Minecraft's own formatting codes (a, e, b), toned down a notch */
  --ok: #62d962;
  --dev: #f2cf4a;
  --soon: #5fd3ea;

  /* the two pixel buttons' own fills, sampled from the textures */
  --kofi: #f13434;
  --discord: #5865f2;
  --gitlab: #fc6d26;
  --curseforge: #f16436;

  --font-display: "Bahnschrift SemiCondensed", Bahnschrift, "DIN Alternate", "DIN Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-mono: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;

  /* chrome band: bright top, a dark horizon just under the middle, lit again below */
  --metal: linear-gradient(180deg, #ffffff 0%, #eef0f4 18%, #c6c8d3 40%, #75777f 53%, #c0c2cd 64%, #e9ebef 82%, #9a9ca8 100%);
  --metal-soft: linear-gradient(178deg, #fdfdfe 0%, #e6e8eb 20%, #cecfe2 38%, #8f9099 50%, #cecfe2 62%, #e6e8eb 80%, #a8a9b4 100%);
  /* inventory slot frame. Even on all four sides: the vanilla one-sided bevel vanished into the dark
     page on the top-left and made every box look nudged to the right */
  --slot: inset 0 0 0 1px #33343c, inset 0 0 0 3px #060608;

  --wrap: 1200px;
  --gutter: 24px;
  --gap: 22px;
}

*, *::before, *::after { box-sizing: border-box; }
/* author display rules (flex cells, notices) would otherwise beat the attribute and keep it visible */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 1rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-soft); }
::selection { background: var(--crimson); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.main { display: block; }
.icon { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: -0.125em; }

/* ---------- display type ---------- */

/* The gradient repeats once per line (1lh). Stretched over a whole three-line hero heading, each
   line only got a flat slice of it and the silver read as plain white. The drop-shadow is the
   same dark edge the pixel lettering in the logo has. */
h1, h2, h3, .orn-title, .display, .col-title, .inv-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  line-height: 1.04;
  background-image: var(--metal);
  background-size: 100% 1.04em;
  background-size: 100% 1lh;
  background-repeat: repeat-y;
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--text);
  -webkit-text-fill-color: transparent;
}
h1, h2 { filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.7)); }
/* Small headings (card titles, footer columns, the inventory label) keep the original soft silver
   over the whole title: at 1rem the chrome band's dark middle just turns the letters muddy. */
h3, .col-title, .inv-title {
  background-image: var(--metal-soft);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); margin: 0 0 20px; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 12px; }
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.15;
  font-size: 1.2rem;
  margin: 0 0 8px;
}
/* links inside headings keep the metal fill, so hover brightens instead of recolouring */
h3 a:hover { filter: brightness(1.25); }
/* Glossy crimson like the logo lettering: bright highlight on top, a dark band through the middle,
   a lit lower edge. An inline span's box is already one line tall, so no per-line sizing needed. */
h1 .accent, h2 .accent {
  background-image: linear-gradient(180deg, #ffb0b0 0%, #ff4d4d 16%, #e8132c 36%, #7a0012 52%, #c40d25 64%, #ff3d3d 82%, #a3001b 100%);
  background-size: 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 1px 0 #2b0007) drop-shadow(0 0 1px #3d000a);
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  h1, h2, h3, .orn-title, .col-title, .inv-title { color: var(--silver); -webkit-text-fill-color: currentColor; }
}

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font: 600 0.8rem/1.2 var(--font-display);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--red);
}
.kicker::before { content: ""; width: 28px; height: 1px; background: var(--crimson); flex: none; }

.lead { font-size: 1.1rem; color: var(--dim); max-width: 620px; margin: 0 0 32px; }
.muted { color: var(--dim); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mt-s { margin-top: 12px; }
.mt-m { margin-top: 22px; }
.mt-l { margin-top: 34px; }
.mb-0 { margin-bottom: 0 !important; }
.narrow { max-width: 560px; }
.narrow-lg { max-width: 760px; }

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--silver);
  background: #0d0e11;
  border: 1px solid var(--line);
  padding: 1px 6px;
  overflow-wrap: anywhere;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 7, 9, 0.84);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { width: 40px; height: 40px; display: block; filter: drop-shadow(0 0 12px rgba(255, 46, 46, 0.28)); }
/* the logo's own lettering, cut out of kronspirelogotransparent.png, so header and logo match */
.brand img.brand-word { height: 40px; width: auto; filter: none; }
.brand-tag {
  font: 700 0.68rem/1 var(--font-display);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
  border: 1px solid var(--line-2);
  padding: 5px 7px 4px;
}

.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font: 600 0.86rem/1 var(--font-display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.nav a:hover { color: var(--text); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav a.active { color: var(--text); }
.nav a.nav-cta { margin-left: 10px; border: 1px solid var(--line-2); color: var(--silver); }
.nav a.nav-cta::after { display: none; }
.nav a.nav-cta .icon { width: 16px; height: 16px; color: var(--discord); }
.nav a.nav-cta:hover { border-color: var(--discord); color: #fff; background: rgba(88, 101, 242, 0.14); }

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

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #0f1013, var(--ink));
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    repeating-linear-gradient(45deg, rgba(230, 232, 235, 0.022) 0 2px, transparent 2px 14px),
    repeating-linear-gradient(-45deg, rgba(230, 232, 235, 0.014) 0 2px, transparent 2px 14px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 700px;
  height: 700px;
  margin-top: -350px;
  margin-left: -350px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(255, 46, 46, 0.16) 0%, rgba(176, 0, 32, 0.06) 42%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  will-change: transform, opacity;
}
.hero.has-glow .hero-glow {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .hero-glow { display: none; }
}
body[data-motion="off"] .hero-glow {
  display: none;
}

/* top/bottom only: this sits on the same element as .wrap, and a padding shorthand here would
   wipe the side gutter on phones */
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 56px;
  align-items: center;
  padding-top: 92px;
  padding-bottom: 100px;
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: 76px 0 80px;
  max-width: 820px;
}
.hero-inner .lead:last-child { margin-bottom: 0; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 4px;
  color: var(--dim);
  font: 600 0.8rem/1 var(--font-display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.scroll-hint::before { content: "\2193"; color: var(--red); }
.scroll-hint:hover { color: var(--text); }

/* ---------- inventory (hero) ---------- */

.inv {
  justify-self: end;
  width: 100%;
  max-width: 452px;
  padding: 12px 14px 14px;
  background: linear-gradient(180deg, #1c1d23, #131318);
  border: 2px solid #000;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.06),
    0 40px 80px -30px rgba(0, 0, 0, 0.9),
    0 0 70px -24px rgba(255, 46, 46, 0.3);
}
.inv-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 2px 2px 10px; }
.inv-title { margin: 0; font: 700 0.95rem/1.1 var(--font-display); letter-spacing: 0.12em; }
.inv-count { font: 500 0.75rem/1 var(--font-mono); color: var(--mute); }
.inv-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.inv-grid > li { position: relative; }
.inv-foot { margin: 10px 2px 0; font: 0.75rem/1.4 var(--font-mono); color: var(--mute); }

.slot { position: relative; display: grid; place-items: center; aspect-ratio: 1; background: #0b0b0e; box-shadow: var(--slot); }
.slot img { width: 76%; height: 76%; object-fit: contain; filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.5)); transition: transform 0.15s ease; }
img.pixel, .pixel img { image-rendering: pixelated; }
a.slot::after { content: ""; position: absolute; inset: 2px; background: rgba(255, 255, 255, 0); transition: background 0.12s; pointer-events: none; }
a.slot:hover::after, a.slot:focus-visible::after { background: rgba(255, 255, 255, 0.16); }
a.slot:hover img, a.slot:focus-visible img { transform: translateY(-2px) scale(1.05); }
a.slot:focus-visible { outline: none; box-shadow: var(--slot), 0 0 0 2px var(--red); }

/* Minecraft item tooltip: near-black with the purple gradient frame, beside the slot like the
   vanilla one. The two right-hand columns open to the left so it never runs off the panel. */
.tip {
  position: absolute;
  z-index: 30;
  top: -6px;
  left: calc(100% + 10px);
  width: max-content;
  max-width: 250px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px 9px;
  background: rgba(16, 0, 16, 0.96);
  border: 2px solid #3d0ea0;
  border-image: linear-gradient(180deg, #5000ff, #28007f) 1;
  box-shadow: 0 0 0 2px rgba(16, 0, 16, 0.96), 0 20px 40px -10px rgba(0, 0, 0, 0.85);
  font: 500 0.9rem/1.3 var(--font-display);
  letter-spacing: 0.02em;
  text-align: left;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-4px);
  transition: opacity 0.12s, transform 0.12s, visibility 0s linear 0.12s;
  pointer-events: none;
}
.inv-grid > li:nth-child(5n) .tip, .inv-grid > li:nth-child(5n - 1) .tip { left: auto; right: calc(100% + 10px); transform: translateX(4px); }
a.slot:hover .tip, a.slot:focus-visible .tip { opacity: 1; visibility: visible; transform: none; transition: opacity 0.12s, transform 0.12s; }
.tip-name { color: #fff; font-size: 0.98rem; }
.tip-lore { color: #aaaaaa; }
.tip-status { color: #aaaaaa; }
.tip-status.s-released { color: #55ff55; }
.tip-status.s-dev { color: #ffff55; }
.tip-status.s-soon { color: #55ffff; }
.tip-mod { color: #7b7bff; font-style: italic; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.015);
  color: var(--silver);
  cursor: pointer;
  font: 600 0.875rem/1 var(--font-display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s, filter 0.15s;
}
.btn .icon { width: 16px; height: 16px; }
.btn:hover { border-color: var(--red); color: #fff; background: rgba(255, 46, 46, 0.08); }
.btn-primary {
  background: linear-gradient(180deg, var(--red), var(--crimson));
  border-color: var(--red);
  color: #fff;
}
.btn-primary:hover { background: linear-gradient(180deg, var(--red), var(--crimson)); filter: brightness(1.1); transform: translateY(-1px); }
.btn-danger { border-color: var(--crimson-dim); color: var(--red-soft); }
.btn-danger:hover { border-color: var(--red); background: rgba(176, 0, 32, 0.16); }
.btn-sm { padding: 9px 14px; font-size: 0.78rem; letter-spacing: 0.12em; gap: 8px; }
.btn-sm .icon { width: 14px; height: 14px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; filter: none; }

/* ---------- shields-style badges ---------- */

.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  --brand: var(--red);
  display: inline-flex;
  align-items: stretch;
  height: 28px;
  font: 700 0.7rem/1 var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s, box-shadow 0.15s;
}
.badge-key, .badge-val { display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; white-space: nowrap; }
.badge-key { background: #2b2c33; color: #f1f1f4; }
.badge-key .icon { width: 14px; height: 14px; color: var(--brand); }
.badge-val { background: var(--brand); color: #fff; }
.badge:hover, .badge:focus-visible { color: #fff; transform: translateY(-1px); box-shadow: 0 0 0 1px var(--brand); }
.badge-lg { height: 34px; font-size: 0.76rem; }
.badge-lg .badge-key, .badge-lg .badge-val { padding: 0 13px; }
.badge-lg .badge-key .icon { width: 16px; height: 16px; }
.badge-kofi { --brand: var(--kofi); }
.badge-kofi .badge-key .icon { color: #fff; }
.badge-discord { --brand: var(--discord); }
.badge-gitlab { --brand: var(--gitlab); }
.badge-curseforge { --brand: var(--curseforge); }
.badge-mail { --brand: var(--crimson); }
.badge-mail .badge-key .icon { color: var(--red-soft); }

/* ---------- pixel-art buttons (Ko-fi, Discord) ----------
   The link is the picture and nothing else: no padding, no frame at rest. The texture is drawn at
   its native 240x36 so the pixel lettering stays sharp - scaling it to 34px is what blurred it.
   Hover and focus draw a ring in the texture's own fill colour. */

.pixel-btn {
  --brand: var(--kofi);
  display: inline-block;
  line-height: 0;
  vertical-align: middle;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.15s, transform 0.15s;
}
.pixel-btn img { display: block; width: 240px; height: 36px; max-width: none; image-rendering: pixelated; }
.pixel-btn:hover, .pixel-btn:focus-visible {
  outline-color: var(--brand);
  transform: translateY(-1px);
}
.pixel-btn-discord { --brand: var(--discord); }
.pixel-buttons { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }

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

.section { position: relative; padding: 96px 0; border-bottom: 1px solid var(--line); }
.section.tight { padding: 64px 0; }
.section.band { background: linear-gradient(180deg, #0c0c10, #08080a); }
.section-head { margin-bottom: 40px; }
.orn-title { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0; }
.orn { color: var(--crimson); display: inline-flex; }
.orn svg { width: 84px; height: 14px; display: block; }
.orn.flip svg { transform: scaleX(-1); }
.section-sub { color: var(--dim); margin: 14px 0 0; max-width: 660px; font-size: 1.03rem; }

.split { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.split-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split p { color: var(--dim); }
.split p:first-child { margin-top: 0; }

/* ---------- cards ---------- */

.cards { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  color: inherit;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: rgba(255, 46, 46, 0.5); transform: translateY(-3px); box-shadow: 0 26px 50px -32px rgba(255, 46, 46, 0.6); color: inherit; }
.card p { margin: 0; color: var(--dim); }
.card h3 { margin: 0; }
.card h3 a { color: inherit; }
.card h3 a:hover { color: var(--red-soft); }
.card-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }

.tile { width: 52px; height: 52px; flex: none; display: grid; place-items: center; background: #0b0b0e; box-shadow: var(--slot); }
.tile img { width: 38px; height: 38px; object-fit: contain; }
.tile .icon { width: 24px; height: 24px; color: var(--red); }
.tile-discord .icon { color: var(--discord); }
.tile-gitlab .icon { color: var(--gitlab); }
.tile-curseforge .icon { color: var(--curseforge); }
.tile-kofi .icon { color: #fff; }

/* the three lanes: each one shows its projects as a row of slots */
.lane-slots { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.lane-slots .slot { width: 46px; }
.lane-slots .slot img { width: 78%; height: 78%; }
.lane-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 0.95rem; }
.lane-links a { color: var(--silver); display: inline-flex; align-items: center; gap: 8px; }
.lane-links a::before { content: ""; width: 6px; height: 6px; background: var(--crimson); flex: none; }
.lane-links a:hover { color: var(--red-soft); }

/* ---------- project cards ---------- */

.project-card { padding: 0; overflow: hidden; }
.project-card .card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }

/* Card art comes in every shape - 4:1 banners, squares, a transparent Mumak. Contain keeps the
   lettering whole, and a blurred copy of the same picture fills the rest of the frame. */
.media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; isolation: isolate; background: #09090b; border-bottom: 1px solid var(--line); }
.media-bg {
  position: absolute;
  left: -10%;
  top: -10%;
  width: 120%;
  height: 120%;
  max-width: none;
  object-fit: cover;
  filter: blur(24px) saturate(1.3) brightness(0.42);
  z-index: -1;
}
.media-fg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 16px; transition: transform 0.4s ease; }
.project-card:hover .media-fg { transform: scale(1.035); }
.media-empty { display: grid; place-items: center; background: url("/img/tex-deepslate.png") 0 0 / 64px 64px repeat; image-rendering: pixelated; }
.media-empty::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 70% at 50% 45%, rgba(176, 0, 32, 0.26), rgba(7, 7, 9, 0.78) 82%); }
.media-empty img { width: 30%; max-width: 128px; image-rendering: pixelated; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.65)); }
.media-kind {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 6px 9px 5px;
  font: 700 0.68rem/1 var(--font-display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(7, 7, 9, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.media-lg { border: 1px solid var(--line); }

.meta-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.status { display: inline-flex; align-items: center; gap: 8px; font: 700 0.75rem/1 var(--font-display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); }
.status::before { content: ""; width: 8px; height: 8px; background: currentColor; flex: none; }
.status.s-released { color: var(--ok); }
.status.s-dev { color: var(--dev); }
.status.s-soon { color: var(--soon); }
.version { font: 500 0.78rem/1 var(--font-mono); color: var(--mute); }

.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { padding: 4px 9px; font: 600 0.72rem/1.2 var(--font-mono); color: var(--silver); background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-2); }
.pill::before { content: "#"; color: var(--crimson); margin-right: 1px; }

/* ---------- project page ---------- */

.project-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 30px; align-items: center; }
.logo-slot {
  width: 136px;
  height: 136px;
  padding: 14px;
  display: grid;
  place-items: center;
  background: #0b0b0e;
  box-shadow: var(--slot), 0 0 60px -16px rgba(255, 46, 46, 0.4);
}
.logo-slot img { width: 100%; height: 100%; object-fit: contain; }
.project-hero h1 { margin-bottom: 12px; }
.project-hero .lead { margin-bottom: 22px; }

.facts { margin: 0; }
.facts td:first-child { width: 42%; color: var(--dim); font: 600 0.74rem/1.2 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; }
.facts td { color: var(--silver); }

.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.features li { position: relative; padding: 15px 18px 15px 46px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); color: var(--silver); }
.features li::before { content: ""; position: absolute; left: 18px; top: 23px; width: 10px; height: 10px; background: var(--red); box-shadow: 0 0 0 3px rgba(255, 46, 46, 0.16); }

/* install steps: plain red numerals in a slot, no glow */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; position: relative; min-height: 58px; padding: 15px 18px 15px 64px; background: var(--panel); border: 1px solid var(--line); color: var(--silver); }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 13px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: #0b0b0e;
  box-shadow: var(--slot);
  font: 700 1rem/1 var(--font-display);
  color: var(--red);
}

.gallery { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.gallery a { display: block; border: 1px solid var(--line); }
.gallery img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- panels, tables, forms ---------- */

.panel { border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel-2), var(--panel)); padding: 24px; }
.panel + .panel { margin-top: 18px; }
.panel h3 { margin-bottom: 12px; }
.panel > p { color: var(--dim); }
.panel > p:last-child { margin-bottom: 0; }
.panel-textured { background: linear-gradient(180deg, rgba(28, 29, 35, 0.94), rgba(21, 22, 27, 0.97)), url("/img/tex-deepslate.png") 0 0 / 64px 64px; image-rendering: pixelated; }

table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font: 600 0.74rem/1.2 var(--font-display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }

.field { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.field > label { flex: 0 0 140px; font: 600 0.74rem/1.2 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.field > input[type="text"], .field > input[type="search"] { flex: 1 1 240px; width: auto; }
.field-choice { flex: 0 0 auto !important; display: inline-flex; align-items: center; gap: 6px; color: var(--silver) !important; text-transform: none !important; letter-spacing: 0 !important; font: 0.95rem var(--font-body) !important; }

input[type="text"], input[type="password"], input[type="search"], textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-2);
  border-radius: 0;
  background: #0a0a0c;
  color: var(--text);
  font: inherit;
}
input:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 46, 46, 0.15); }
input[readonly] { color: var(--silver); font-family: var(--font-mono); font-size: 0.86rem; }

.stack-label { display: block; font: 600 0.74rem/1.2 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin-bottom: 7px; }
form.stack { display: flex; flex-direction: column; gap: 16px; }
.inline-form { display: inline-flex; margin: 0; }

.notice { padding: 12px 15px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: 0.95rem; margin: 0; }
.notice + .notice { margin-top: 10px; }
.notice.error { border-color: var(--crimson); color: #ff8a8a; }
.notice.ok { border-color: #2f5a2a; color: var(--ok); }
.notice.warn { border-color: #6a5616; color: var(--dev); }
.notice strong { color: inherit; }

.tabs { display: flex; gap: 4px; margin-bottom: 22px; border-bottom: 1px solid var(--line-2); }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; margin-bottom: -1px; border: 1px solid transparent; border-bottom: 0; color: var(--dim); font: 600 0.8rem/1 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; }
.tab .icon { width: 15px; height: 15px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); background: var(--panel-2); border-color: var(--line-2); box-shadow: inset 0 2px 0 var(--red); }

/* ---------- contact ---------- */

.contact-card .contact-value { font: 600 1.02rem/1.3 var(--font-mono); color: var(--text); overflow-wrap: anywhere; }
.contact-card .contact-value:hover { color: var(--red-soft); }
.contact-head { display: flex; align-items: center; gap: 14px; }

.copy-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: #0d0d11;
  border: 1px solid var(--line-2);
  color: var(--text);
  font: 600 0.95rem/1 var(--font-mono);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.copy-chip .icon { width: 16px; height: 16px; }
.copy-chip .brand-glyph { color: var(--discord); }
.copy-chip .copy-state { font: 700 0.68rem/1 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.copy-chip:hover { border-color: var(--discord); background: rgba(88, 101, 242, 0.1); }
.copy-chip.copied .copy-state { color: var(--ok); }

.support {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) auto;
  gap: 32px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--line-2);
  border-top-color: var(--bronze);
}
.support h3 { font-size: 1.35rem; margin-bottom: 10px; }
.support p { margin: 0; color: var(--dim); max-width: 560px; }
.support .pixel-buttons { justify-content: flex-end; }

.checklist .card { padding: 22px; }

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

.site-footer { position: relative; isolation: isolate; padding: 72px 0 0; background: var(--ink-2); border-top: 1px solid var(--line); }
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("/img/tex-deepslate.png") 0 0 / 64px 64px;
  image-rendering: pixelated;
  opacity: 0.14;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 75%);
  mask-image: linear-gradient(180deg, transparent, #000 75%);
}
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.footer-brand p { color: var(--dim); max-width: 380px; margin: 16px 0 22px; }
.col-title { font: 700 0.78rem/1 var(--font-display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--silver); margin: 12px 0 18px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-links a, .link-button { color: var(--dim); font-size: 0.95rem; }
.footer-links a:hover, .link-button:hover { color: var(--red-soft); }
.footer-links .icon { width: 15px; height: 15px; margin-right: 7px; }
.footer-links .glyph-discord { color: var(--discord); }
.footer-links .glyph-mail { color: var(--red-soft); }
.footer-bar {
  margin-top: 60px;
  padding: 22px 0 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
  font: 600 0.74rem/1.4 var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}
.owner-link { border: 1px solid var(--line-2); padding: 7px 12px; color: var(--dim); }
.owner-link:hover { border-color: var(--red); color: var(--red-soft); }

.link-button { background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; text-align: left; }

/* ---------- image host ---------- */

.dropzone {
  display: block;
  width: 100%;
  border: 2px dashed var(--line-2);
  padding: 52px 22px;
  text-align: center;
  color: inherit;
  background: linear-gradient(180deg, rgba(206, 207, 226, 0.025), transparent);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--crimson); }
.dropzone.dragging { border-color: var(--red); border-style: solid; background: rgba(176, 0, 32, 0.1); }
.dropzone .icon { width: 34px; height: 34px; color: var(--red); margin-bottom: 10px; }
.dropzone strong { display: block; font: 700 1.25rem/1.2 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--silver); }
.dropzone span { display: block; margin-top: 8px; color: var(--dim); }

.quota-text { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; font: 600 0.84rem/1.3 var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.quota-text strong { color: var(--text); }
.quota-bar { display: block; width: 100%; height: 10px; border: 1px solid var(--line-2); background: #0b0b0e; -webkit-appearance: none; appearance: none; }
.quota-bar::-webkit-progress-bar { background: #0b0b0e; }
.quota-bar::-webkit-progress-value { background: linear-gradient(90deg, var(--crimson-dim), var(--red)); transition: width 0.35s ease; }
.quota-bar::-moz-progress-bar { background: linear-gradient(90deg, var(--crimson-dim), var(--red)); }
.quota-bar.hot::-webkit-progress-value { background: linear-gradient(90deg, var(--red), #fff); }
.quota-bar.hot::-moz-progress-bar { background: linear-gradient(90deg, var(--red), #fff); }

.status-list { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.status-list li { display: flex; gap: 10px; align-items: baseline; color: var(--dim); font-size: 0.93rem; }
.status-list b { color: var(--silver); font-weight: 600; min-width: 130px; font-family: var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.8rem; }

.result { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: start; }
.result img { display: block; width: 100%; border: 1px solid var(--line); background: #0a0a0c; }

.img-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.img-cell { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--panel); transition: border-color 0.15s; }
.img-cell:hover { border-color: var(--crimson); }
.img-cell .thumb { display: block; height: 136px; background: #0a0a0c; border-bottom: 1px solid var(--line); }
.img-cell .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-cell .body { padding: 11px; display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; }
.img-cell .name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-cell .sub { color: var(--dim); font-size: 0.76rem; }
.img-cell .row { display: flex; gap: 8px; margin-top: 2px; }

.link-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--gap); }
.link-row img { display: block; width: 100%; border: 1px solid var(--line); }

.qr { display: block; width: 100%; max-width: 300px; margin: 0 auto 12px; border: 1px solid var(--line); background: #ece9e4; }
.preview-img { display: block; width: 100%; border: 1px solid var(--line); margin: 20px 0; }

.picker-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: 16px; }
.picker-cell { padding: 0; text-align: left; color: var(--dim); font: inherit; background: #0a0a0c; border: 1px solid var(--line); cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.picker-cell:hover, .picker-cell:focus-visible { border-color: var(--red); transform: translateY(-2px); }
.picker-cell img { display: block; width: 100%; height: 96px; object-fit: cover; }
.picker-cell span { display: block; padding: 7px 9px; font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.shot-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--line); }
.shot-row:last-child { border-bottom: 0; }
.shot-preview { width: 136px; height: 76px; flex: none; background: #0a0a0c; border: 1px solid var(--line); }
.shot-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
.shot-meta { flex: 1 1 180px; }
.shot-meta strong { display: block; color: var(--silver); }
.shot-meta span { color: var(--dim); font-size: 0.82rem; }

/* ---------- consent + dialogs ---------- */

.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 16px var(--gutter); background: rgba(12, 12, 15, 0.97); border-top: 1px solid var(--crimson); box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.55); }
.consent-inner { max-width: var(--wrap); margin: 0 auto; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.consent p { margin: 0; flex: 1 1 380px; color: var(--dim); font-size: 0.9rem; }

.overlay { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(4, 4, 6, 0.8); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.overlay[hidden] { display: none; }
.dialog { position: relative; width: 100%; max-width: 760px; max-height: 86vh; overflow: auto; padding: 28px; background: var(--panel); border: 1px solid var(--line-2); border-top-color: var(--crimson); }
.dialog h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); padding-right: 90px; }
.dialog-close { position: absolute; top: 20px; right: 20px; }

.pref-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pref-row:last-of-type { border-bottom: 0; }
.pref-body { flex: 1; }
.pref-body strong { display: block; color: var(--silver); font: 600 0.86rem/1.4 var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; }
.pref-body span { color: var(--dim); font-size: 0.88rem; }
.pref-row input[type="checkbox"] { width: 18px; height: 18px; margin-top: 3px; accent-color: #b00020; }
.locked { color: var(--dim); font: 600 0.72rem/1 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; border: 1px solid var(--line); padding: 5px 8px; white-space: nowrap; }

/* ---------- legal ---------- */

.legal { max-width: 800px; }
.legal h3 { margin-top: 30px; }
.legal p, .legal li { color: var(--dim); }
.legal ul { padding-left: 20px; }
.legal li { margin: 6px 0; }
.legal ul li::marker { color: var(--crimson); }
.legal strong { color: var(--silver); }

/* ---------- accessibility & assistive tools ---------- */

html.text-lg { font-size: 115% !important; }
html.text-xl { font-size: 130% !important; }
html.text-xxl { font-size: 150% !important; }

/* Motion control */
html.motion-off *, html.motion-off *::before, html.motion-off *::after { animation: none !important; transition: none !important; transform: none !important; }
html.motion-off { scroll-behavior: auto !important; }

/* Dyslexia-friendly font */
html.ks-font-dyslexic,
html.ks-font-dyslexic body,
html.ks-font-dyslexic p,
html.ks-font-dyslexic a,
html.ks-font-dyslexic span,
html.ks-font-dyslexic li,
html.ks-font-dyslexic h1,
html.ks-font-dyslexic h2,
html.ks-font-dyslexic h3,
html.ks-font-dyslexic h4,
html.ks-font-dyslexic button,
html.ks-font-dyslexic input {
  font-family: 'OpenDyslexic', 'Comic Sans MS', 'Trebuchet MS', 'Segoe UI', sans-serif !important;
  letter-spacing: 0.04em !important;
  word-spacing: 0.08em !important;
}

/* Contrast modes */
html.contrast-high,
html.ks-contrast-dark {
  --bg: #000000 !important;
  --bg-subtle: #0a0a0c !important;
  --panel: #0d0d11 !important;
  --panel-2: #141419 !important;
  --text: #ffffff !important;
  --silver: #ffffff !important;
  --dim: #e4e4ed !important;
  --mute: #c4c5d4 !important;
  --line: #454655 !important;
  --line-2: #65677b !important;
  --accent: #ffff00 !important;
}
html.contrast-high body,
html.ks-contrast-dark body {
  background: #000000 !important;
  color: #ffffff !important;
}

html.ks-contrast-light {
  --bg: #ffffff !important;
  --bg-subtle: #f5f5f7 !important;
  --panel: #ffffff !important;
  --panel-2: #eaebee !important;
  --text: #050508 !important;
  --silver: #0a0a10 !important;
  --dim: #1f2026 !important;
  --mute: #454652 !important;
  --line: #b0b2c2 !important;
  --line-2: #8a8d9f !important;
  --accent: #0044cc !important;
}
html.ks-contrast-light body {
  background: #ffffff !important;
  color: #050508 !important;
}
html.ks-contrast-light a {
  color: #0033aa !important;
  text-decoration: underline !important;
}
html.ks-contrast-light .brand img {
  filter: invert(100%);
}

html.ks-contrast-invert {
  filter: invert(100%) hue-rotate(180deg) !important;
  background: #000 !important;
}
html.ks-contrast-invert img,
html.ks-contrast-invert video,
html.ks-contrast-invert picture {
  filter: invert(100%) hue-rotate(180deg) !important;
}

html.ks-contrast-monochrome {
  filter: grayscale(100%) !important;
}

/* Spacing and line height */
html.ks-spacing-relaxed body,
html.ks-spacing-relaxed p,
html.ks-spacing-relaxed li,
html.ks-spacing-relaxed div {
  line-height: 1.85 !important;
}
html.ks-spacing-loose body,
html.ks-spacing-loose p,
html.ks-spacing-loose li,
html.ks-spacing-loose div {
  line-height: 2.2 !important;
}
html.ks-letter-spacing-wide body,
html.ks-letter-spacing-wide p,
html.ks-letter-spacing-wide a,
html.ks-letter-spacing-wide span,
html.ks-letter-spacing-wide li {
  letter-spacing: 0.06em !important;
}
html.ks-letter-spacing-wider body,
html.ks-letter-spacing-wider p,
html.ks-letter-spacing-wider a,
html.ks-letter-spacing-wider span,
html.ks-letter-spacing-wider li {
  letter-spacing: 0.12em !important;
}

/* Big cursor */
html.ks-big-cursor,
html.ks-big-cursor *,
html.ks-big-cursor a,
html.ks-big-cursor button {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'><polygon points='0,0 0,36 9,27 18,39 23,36 14,23 27,23' fill='%23ffff00' stroke='%23000000' stroke-width='2.5'/></svg>"), auto !important;
}

/* Highlight links */
html.ks-highlight-links a:not(.brand):not(.pixel-btn):not(.btn) {
  text-decoration: underline 3px #ffff00 !important;
  text-underline-offset: 4px !important;
  color: #ffff00 !important;
  background-color: rgba(255, 255, 0, 0.15) !important;
  padding: 1px 4px !important;
  border-radius: 2px !important;
}
html.ks-highlight-links .btn {
  outline: 3px solid #ffff00 !important;
  outline-offset: 2px !important;
}

/* Reading guide line */
.reading-guide {
  position: fixed;
  left: 0;
  right: 0;
  height: 4px;
  background: #ffff00;
  pointer-events: none;
  z-index: 999999;
  box-shadow: 0 0 10px rgba(255, 255, 0, 0.85);
  transform: translateY(-50%);
}

/* Floating accessibility button */
.a11y-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 65;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #15161c;
  border: 2px solid #5a5c6e;
  color: #cfd0dc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
  transition: transform 0.15s, border-color 0.15s, color 0.15s, background-color 0.15s;
}
.a11y-trigger:hover,
.a11y-trigger:focus-visible {
  transform: scale(1.1);
  border-color: #ffdd00;
  color: #ffffff;
  background: #20222b;
  outline: 3px solid #ffdd00;
  outline-offset: 3px;
}
.a11y-trigger .icon-a11y {
  width: 24px;
  height: 24px;
}

/* Dialog layout for a11y tools */
.dialog-lg {
  max-width: 880px;
}
.dialog-header kbd {
  display: inline-block;
  padding: 2px 6px;
  font: 700 0.75rem/1.2 var(--font-mono, monospace);
  color: #ffff00;
  background: #1a1b24;
  border: 1px solid #55576a;
  border-radius: 3px;
}
.a11y-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.a11y-card {
  padding: 16px;
  background: #0d0e12;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
}
.a11y-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  margin: 0 0 6px;
  color: var(--silver);
}
.a11y-card h3 .icon {
  width: 18px;
  height: 18px;
  color: var(--crimson);
  flex-shrink: 0;
}
.a11y-dialog-footer {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 90; padding: 10px 16px; background: var(--crimson); color: #fff; }
.skip-link:focus { left: 8px; top: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

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

@media (max-width: 1020px) {
  /* top/bottom only: this sits on the same element as .wrap, and a padding shorthand here would
   wipe the side gutter on phones */
.hero-grid { grid-template-columns: 1fr; gap: 44px; padding-top: 70px; padding-bottom: 76px; }
  .inv { justify-self: start; }
  .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .split, .split-even, .link-row { grid-template-columns: 1fr; }
  .cards-2, .cards-3 { grid-template-columns: 1fr; }
  .support { grid-template-columns: 1fr; }
  .support .pixel-buttons { justify-content: flex-start; }
  .section { padding: 72px 0; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .header-inner { flex-wrap: wrap; gap: 4px 16px; min-height: 0; padding-top: 12px; }
  .nav { width: calc(100% + var(--gutter) * 2); margin: 0 calc(var(--gutter) * -1); padding: 0 calc(var(--gutter) - 10px); overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 12px 10px; font-size: 0.8rem; letter-spacing: 0.12em; }
  .nav a::after { left: 10px; right: 10px; }
  .nav a.nav-cta { margin-left: auto; padding: 9px 11px; }
  .nav-cta-text { display: none; }
  .brand img.brand-word { height: 34px; }
  .project-hero { grid-template-columns: 1fr; gap: 20px; }
  .logo-slot { width: 104px; height: 104px; padding: 10px; }
  .result { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hero-inner { padding: 52px 0 58px; }
  .section { padding: 56px 0; }
  .card { padding: 22px; }
  .cards, .cards-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .field > label { flex-basis: 100%; }
  .support { padding: 24px; }
  .dialog { padding: 22px; }
  .tip { display: none; }
  .inv { padding: 10px; }
}
