/* ============================================================
   天博赛场 · Site Kit
   assets/site.css
   夜场墨绿基底 / 荧光青柠比分脉冲 / 暖沙金索引徽章
   ============================================================ */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 118px;
}

body,
h1, h2, h3, h4, h5,
p, ul, ol, li, figure, blockquote, dl, dd, fieldset {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

img, svg, picture, video, canvas { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:where(h1, h2, h3, h4) {
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: .02em;
}

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

::selection {
  background: var(--lime);
  color: var(--ink-950);
}

/* ---------- 2. Tokens ---------- */
:root {
  --ink-950: #04120E;
  --ink-900: #071C17;
  --ink-800: #0E2E25;
  --ink-700: #163D31;
  --ink-600: #1F4C3D;

  --lime: #B6FF3B;
  --lime-dim: #7BD12A;
  --sand: #D8B36A;
  --sand-bright: #E9C46A;
  --paper: #F4F7F2;
  --sage: #9BB3A6;
  --wine: #6E2335;
  --indigo: #2B2E6B;

  --line: rgba(182, 255, 59, .16);
  --line-soft: rgba(244, 247, 242, .10);

  --r-xs: 10px;
  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 32px;
  --r-pill: 999px;

  --shell: 1240px;
  --gutter: clamp(16px, 4vw, 44px);

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --shadow-island: 0 22px 48px -26px rgba(0, 0, 0, .92), inset 0 1px 0 rgba(244, 247, 242, .07);
}

/* ---------- 3. Base ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .012em;
  color: var(--paper);
  background-color: var(--ink-900);
  background-image:
    radial-gradient(900px 520px at 84% -10%, rgba(182, 255, 59, .10), transparent 62%),
    radial-gradient(880px 520px at 4% 10%, rgba(43, 46, 107, .38), transparent 62%),
    radial-gradient(820px 500px at 52% 106%, rgba(110, 35, 53, .32), transparent 64%),
    repeating-linear-gradient(0deg, rgba(244, 247, 242, .026) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(90deg, rgba(244, 247, 242, .026) 0 1px, transparent 1px 96px);
  background-attachment: fixed, fixed, fixed, fixed, fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#main-content {
  display: block;
  padding-top: clamp(94px, 11vw, 126px);
  outline: none;
}

/* ---------- 4. Layout ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(34px, 6vw, 76px); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px clamp(16px, 3vw, 40px);
  margin-bottom: clamp(20px, 3vw, 34px);
}

.section-title {
  font-size: clamp(24px, 3.4vw, 40px);
  letter-spacing: .08em;
  line-height: 1.12;
}

.lead {
  max-width: 62ch;
  color: var(--sage);
  font-size: clamp(14.5px, 1.2vw, 16.5px);
  line-height: 1.85;
}

.rule {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--line), var(--line-soft) 60%, transparent);
  margin-block: clamp(22px, 4vw, 46px);
}

/* ---------- 5. Typography helpers ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--sand);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--sand);
  flex: none;
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

.score {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: .86;
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .07em;
  line-height: 1;
  white-space: nowrap;
  transition: transform .22s var(--ease), background-color .22s var(--ease),
              color .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-sm { padding: 9px 16px; font-size: 13px; }

.btn-lime {
  background: var(--lime);
  color: var(--ink-950);
  box-shadow: 0 12px 28px -16px rgba(182, 255, 59, .95);
}

.btn-lime:hover {
  background: var(--sand-bright);
  box-shadow: 0 14px 30px -16px rgba(233, 196, 106, .95);
}

.btn-ghost {
  border-color: rgba(244, 247, 242, .22);
  color: var(--paper);
}

.btn-ghost:hover {
  border-color: var(--lime);
  color: var(--lime);
}

/* ---------- 7. Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(182, 255, 59, .30);
  background: rgba(182, 255, 59, .10);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  line-height: 1.5;
}

.chip--sand {
  border-color: rgba(216, 179, 106, .38);
  background: rgba(216, 179, 106, .12);
  color: var(--sand);
}

.chip--muted {
  border-color: var(--line-soft);
  background: rgba(244, 247, 242, .05);
  color: var(--sage);
}

/* ---------- 8. Panels ---------- */
.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
  background: linear-gradient(160deg, rgba(22, 61, 49, .92), rgba(14, 46, 37, .74));
  box-shadow: inset 0 1px 0 rgba(244, 247, 242, .05);
}

.panel--wine {
  border-color: rgba(216, 179, 106, .22);
  background: linear-gradient(160deg, rgba(110, 35, 53, .86), rgba(7, 28, 23, .92));
}

.panel--indigo {
  border-color: rgba(182, 255, 59, .20);
  background: linear-gradient(160deg, rgba(43, 46, 107, .86), rgba(7, 28, 23, .92));
}

.panel--lime {
  border-color: rgba(182, 255, 59, .34);
  background: linear-gradient(160deg, rgba(182, 255, 59, .14), rgba(14, 46, 37, .82));
}

/* ---------- 9. Grids ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

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

/* ---------- 10. Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--sage);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "/";
  color: rgba(155, 179, 166, .45);
}

.breadcrumb a { transition: color .2s var(--ease); }
.breadcrumb a:hover { color: var(--lime); }
.breadcrumb [aria-current="page"] { color: var(--paper); }

/* ---------- 11. Prose ---------- */
.prose {
  max-width: 72ch;
  color: rgba(244, 247, 242, .84);
  font-size: 16.5px;
  line-height: 1.92;
}

.prose > * + * { margin-top: 1.05em; }

.prose h2 {
  margin-top: 2em;
  font-size: clamp(21px, 2.4vw, 28px);
  letter-spacing: .06em;
  color: var(--paper);
}

.prose h3 {
  margin-top: 1.6em;
  font-size: clamp(17px, 1.6vw, 19px);
  letter-spacing: .05em;
  color: var(--paper);
}

.prose strong { color: var(--paper); font-weight: 700; }

.prose a {
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.prose ul { list-style: disc; padding-left: 1.25em; }
.prose ol { list-style: decimal; padding-left: 1.4em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--lime-dim); }

.prose code {
  font-family: var(--font-mono);
  font-size: .88em;
  padding: .16em .46em;
  border-radius: 6px;
  color: var(--sand);
  background: rgba(216, 179, 106, .12);
}

.prose blockquote {
  padding-left: 18px;
  border-left: 2px solid var(--lime);
  color: var(--sage);
}

/* ---------- 12. Image frames ---------- */
.img-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
  background:
    radial-gradient(120% 120% at 18% 0%, rgba(182, 255, 59, .18), transparent 56%),
    linear-gradient(160deg, var(--ink-700), var(--ink-950));
}

.img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .45;
  background-image:
    linear-gradient(rgba(244, 247, 242, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 247, 242, .10) 1px, transparent 1px);
  background-size: 46px 46px;
}

.img-frame > img,
.img-frame > picture > img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-frame--wide { aspect-ratio: 16 / 9; }
.img-frame--tall { aspect-ratio: 4 / 5; }

.img-frame--badge {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border-color: rgba(216, 179, 106, .3);
}

/* ---------- 13. Skip link ---------- */
.skip-link {
  position: absolute;
  top: -90px;
  left: 16px;
  z-index: 200;
  padding: 12px 22px;
  border-radius: 0 0 16px 16px;
  background: var(--lime);
  color: var(--ink-950);
  font-weight: 700;
  letter-spacing: .08em;
  transition: top .2s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible { top: 0; }

/* ---------- 14. Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  padding-top: 14px;
  transition: padding-top .3s var(--ease);
}

.header-shell {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand nav actions";
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
  min-height: 66px;
  padding: 10px 14px 10px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: linear-gradient(140deg, rgba(22, 61, 49, .92), rgba(7, 28, 23, .88));
  box-shadow: var(--shadow-island);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  backdrop-filter: blur(14px) saturate(130%);
  transition: min-height .3s var(--ease), background .3s var(--ease),
              box-shadow .3s var(--ease), border-radius .3s var(--ease);
}

.site-header[data-scrolled] { padding-top: 8px; }

.site-header[data-scrolled] .header-shell {
  min-height: 56px;
  border-color: rgba(182, 255, 59, .26);
  background: linear-gradient(140deg, rgba(14, 46, 37, .97), rgba(4, 18, 14, .95));
  box-shadow: 0 16px 34px -22px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(182, 255, 59, .10);
}

/* brand */
.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--paper);
  border-radius: var(--r-pill);
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 12px;
  background: conic-gradient(from 210deg, var(--lime), var(--lime-dim) 38%, var(--ink-600) 74%, var(--lime));
  box-shadow: 0 0 0 1px rgba(182, 255, 59, .32), 0 0 22px -8px rgba(182, 255, 59, .9);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 8px;
  background: var(--ink-900);
}

.brand-pulse {
  position: relative;
  z-index: 1;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 0 rgba(182, 255, 59, .55);
  animation: brandPulse 2.8s var(--ease) infinite;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .18em;
  line-height: 1.1;
  white-space: nowrap;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .26em;
  line-height: 1.2;
  color: var(--sage);
  white-space: nowrap;
}

/* nav */
.nav-capsule {
  grid-area: nav;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  min-width: 0;
}

.nav-item { display: flex; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: var(--r-pill);
  font-size: 14px;
  letter-spacing: .07em;
  color: var(--sage);
  white-space: nowrap;
  transition: color .22s var(--ease), background-color .22s var(--ease);
}

.nav-link:hover {
  color: var(--paper);
  background: rgba(182, 255, 59, .10);
}

.nav-link[aria-current="page"] {
  color: var(--ink-950);
  font-weight: 700;
  background: var(--lime);
  box-shadow: 0 8px 22px -14px rgba(182, 255, 59, .95);
}

.nav-link[aria-current="page"]:hover {
  color: var(--ink-950);
  background: var(--lime);
}

.nav-foot { display: none; }

.nav-foot-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--sand);
}

/* header actions */
.header-actions {
  grid-area: actions;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(216, 179, 106, .42);
  background: rgba(216, 179, 106, .10);
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  line-height: 1.4;
  white-space: nowrap;
}

.version-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sand-bright);
  box-shadow: 0 0 10px 1px rgba(233, 196, 106, .8);
}

/* toggle */
.nav-toggle {
  grid-area: toggle;
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(244, 247, 242, .18);
  color: var(--paper);
  font-size: 12px;
  letter-spacing: .14em;
  line-height: 1.4;
  justify-self: end;
}

.nav-toggle:hover { border-color: var(--lime); }

.nav-toggle-label { font-weight: 700; }

.nav-toggle-bars {
  display: grid;
  gap: 3px;
  width: 16px;
  flex: none;
}

.nav-toggle-bars i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--lime);
  transition: transform .26s var(--ease), opacity .2s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* scroll progress */
.header-progress {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: rgba(182, 255, 59, .12);
  overflow: hidden;
  pointer-events: none;
}

.header-progress::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(var(--scroll, 0));
  background: linear-gradient(90deg, var(--lime-dim), var(--lime) 62%, var(--sand-bright));
}

/* ---------- 15. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(60px, 9vw, 120px);
  padding-bottom: 34px;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--ink-900) 0%, var(--ink-950) 100%);
}

.footer-stripe {
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--lime) 0 26px, transparent 26px 54px);
  opacity: .5;
}

.footer-shell { padding-top: clamp(42px, 6vw, 74px); }

.footer-top {
  display: grid;
  grid-template-columns: 1.45fr .85fr .85fr 1.25fr;
  gap: clamp(26px, 4vw, 56px);
  align-items: start;
}

.footer-brand { display: grid; justify-items: start; gap: 12px; }

.footer-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: conic-gradient(from 200deg, var(--lime), var(--lime-dim) 42%, var(--ink-700) 76%, var(--lime));
  box-shadow: 0 0 26px -8px rgba(182, 255, 59, .85);
}

.footer-name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .18em;
  line-height: 1.2;
}

.footer-tagline {
  max-width: 24ch;
  color: var(--sage);
  font-size: 14px;
  line-height: 1.8;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(216, 179, 106, .38);
  background: rgba(216, 179, 106, .10);
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  line-height: 1.6;
}

.footer-col { min-width: 0; }

.footer-col-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--sand);
}

.footer-col-title::before {
  content: "";
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--lime);
  flex: none;
}

.footer-links { display: grid; gap: 10px; }

.footer-link {
  display: inline-block;
  color: var(--sage);
  font-size: 14.5px;
  letter-spacing: .04em;
  transition: color .2s var(--ease), transform .2s var(--ease);
}

.footer-link:hover {
  color: var(--lime);
  transform: translateX(2px);
}

.footer-contact { display: grid; gap: 2px; }

.footer-contact li {
  padding: 9px 0;
  border-bottom: 1px dashed rgba(244, 247, 242, .08);
}

.footer-contact li:last-child { border-bottom: 0; }

.contact-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  color: rgba(155, 179, 166, .8);
}

.contact-value {
  display: block;
  margin-top: 2px;
  color: var(--paper);
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  margin-top: clamp(30px, 4vw, 52px);
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--sage);
}

.footer-copy { letter-spacing: .05em; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
}

.footer-legal .footer-link { font-size: 12.5px; }

.footer-icp {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: rgba(155, 179, 166, .78);
}

/* back to top */
.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 30px);
  bottom: clamp(16px, 3vw, 30px);
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(182, 255, 59, .34);
  background: rgba(14, 46, 37, .92);
  color: var(--paper);
  font-size: 12.5px;
  letter-spacing: .1em;
  box-shadow: 0 14px 30px -20px #000;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .26s var(--ease), transform .26s var(--ease),
              color .2s var(--ease), border-color .2s var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.to-top:hover {
  color: var(--lime);
  border-color: var(--lime);
}

.to-top-arrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--lime);
}

/* ---------- 16. Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 17. Animation ---------- */
@keyframes brandPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(182, 255, 59, .55); }
  50% { box-shadow: 0 0 0 7px rgba(182, 255, 59, 0); }
}

@keyframes navIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 18. Responsive ---------- */
@media (max-width: 1180px) {
  .version-badge { display: none; }
  .nav-link { padding: 8px 10px; font-size: 13.2px; }
}

@media (max-width: 1024px) {
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  html { scroll-padding-top: 96px; }

  .site-header { padding-top: 10px; }
  .site-header[data-scrolled] { padding-top: 6px; }

  .header-shell {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand toggle"
      "nav nav";
    gap: 0 10px;
    min-height: 58px;
    padding: 10px 12px;
    border-radius: 24px;
  }

  .nav-toggle { display: inline-flex; }
  .header-actions { display: none; }
  .header-progress { display: none; }

  .nav-capsule {
    display: none;
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(7, 28, 23, .97);
    box-shadow: inset 0 1px 0 rgba(244, 247, 242, .05);
  }

  .nav-capsule[data-open] {
    display: block;
    animation: navIn .26s var(--ease);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 15px;
    color: var(--paper);
  }

  .nav-link::after {
    content: "→";
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--sage);
    opacity: .8;
  }

  .nav-link[aria-current="page"]::after { color: var(--ink-950); opacity: 1; }

  .nav-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    padding: 12px 6px 4px;
    border-top: 1px solid var(--line-soft);
  }

  #main-content { padding-top: 104px; }
}

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

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: minmax(0, 1fr); }

  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 30px; }

  .footer-tagline { max-width: none; }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-legal { gap: 6px 16px; }

  .brand-name { font-size: 16px; }
  .brand-tag { letter-spacing: .2em; }
}

/* ---------- 19. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .btn:hover,
  .footer-link:hover { transform: none; }
}
