/* ==========================================================================
   利来体育赛事 · site.css
   深空数据指挥中心：深空底 / 玻璃层 / 电光青结构线 / 橙红脉冲锚点
   ========================================================================== */

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

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

body { margin: 0; }

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

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

a { color: inherit; }

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

button { background: none; border: 0; }

main { display: block; }

/* ---------- 2. Tokens ---------- */
:root {
  --void: #05070E;
  --panel: #0B1226;
  --steel: #2A3550;
  --cyan: #00E5FF;
  --cyan-soft: #7AF6FF;
  --pulse: #FF4B1F;
  --pulse-soft: #FF8A3D;
  --stat: #16E0A3;
  --ink: #E8EEF9;
  --ink-mute: #9AA9C2;
  --glass: rgba(232, 238, 249, 0.08);
  --glass-strong: rgba(232, 238, 249, 0.14);
  --line-soft: rgba(42, 53, 80, 0.6);

  --maxw: 1240px;
  --gutter: clamp(18px, 3.4vw, 40px);
  --header-h: 76px;
  --radius-capsule: 999px;
  --radius-panel: 4px;

  --font-display: "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC",
    "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-body: "PingFang SC", "Source Han Sans SC", "Noto Sans SC",
    "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", ui-monospace,
    Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 180ms;
  --t-enter: 520ms;
}

/* ---------- 3. Base typography ---------- */
body {
  background-color: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

::selection {
  background: rgba(0, 229, 255, 0.28);
  color: #ffffff;
}

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

main {
  padding-top: var(--header-h);
}

main.main-flush {
  padding-top: 0;
}

#main-content:focus {
  outline: none;
}

/* ---------- 4. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 300;
  padding: 11px 18px;
  border-radius: 6px;
  background: var(--cyan);
  color: #04131a;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform var(--t-fast) var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

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

.section {
  padding-block: clamp(56px, 7vw, 104px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 32px;
  margin-bottom: clamp(26px, 3.4vw, 46px);
}

.divider {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--steel), rgba(42, 53, 80, 0));
}

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

/* ---------- 6. Type scale ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.kicker::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--cyan);
  flex: 0 0 auto;
}

.display-xl {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(42px, 6.4vw, 76px);
  line-height: 1.03;
  letter-spacing: -0.02em;
}

.display-lg {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.display-md {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.heading-sm {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.01em;
}

/* ---------- 7. Capsules ---------- */
.capsule {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-capsule);
  border: 1px solid var(--steel);
  background: var(--glass);
  color: var(--ink-mute);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.5;
  white-space: nowrap;
}

.capsule--cyan {
  border-color: rgba(0, 229, 255, 0.45);
  background: rgba(0, 229, 255, 0.08);
  color: var(--cyan-soft);
}

.capsule--pulse {
  border-color: rgba(255, 75, 31, 0.52);
  background: rgba(255, 75, 31, 0.13);
  color: #FFD8CB;
}

.capsule--stat {
  border-color: rgba(22, 224, 163, 0.45);
  background: rgba(22, 224, 163, 0.1);
  color: var(--stat);
}

/* ---------- 8. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-capsule);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

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

.btn-pulse {
  background: var(--pulse);
  color: #ffffff;
  box-shadow: 0 10px 26px -14px rgba(255, 75, 31, 0.95);
}

.btn-pulse:hover {
  background: #FF6338;
  box-shadow: 0 12px 30px -10px rgba(255, 75, 31, 0.9);
}

.btn-line {
  background: var(--glass);
  border-color: var(--steel);
  color: var(--ink);
}

.btn-line:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(0, 229, 255, 0.42);
  color: var(--cyan);
}

.btn-ghost:hover {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--cyan);
}

.btn-search {
  padding: 9px 18px;
  font-size: 13px;
  animation: btn-breathe 2.4s ease-in-out infinite;
}

@keyframes btn-breathe {
  0%, 100% { box-shadow: 0 8px 22px -14px rgba(255, 75, 31, 0.9); }
  50% { box-shadow: 0 0 0 4px rgba(255, 75, 31, 0.14), 0 8px 26px -10px rgba(255, 75, 31, 0.95); }
}

/* ---------- 9. Panels / media ---------- */
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--steel);
  border-radius: var(--radius-panel);
}

.panel-glass {
  position: relative;
  background: var(--glass);
  border: 1px solid rgba(232, 238, 249, 0.12);
  border-radius: var(--radius-panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--panel);
  border: 1px solid var(--steel);
}

.media-frame img,
.media-frame picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 7, 14, 0.06) 42%, rgba(5, 7, 14, 0.78) 100%);
}

.media-frame--slant {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 36px), 0 100%);
}

.media-frame--cut {
  clip-path: polygon(0 0, calc(100% - 36px) 0, 100% 36px, 100% 100%, 0 100%);
}

.media-tag {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 3px 9px;
  border: 1px solid rgba(0, 229, 255, 0.32);
  border-radius: 4px;
  background: rgba(5, 7, 14, 0.74);
  color: var(--cyan-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.6;
}

/* ---------- 10. Stats ---------- */
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.stat-value--cyan { color: var(--cyan); }
.stat-value--pulse { color: var(--pulse-soft); }

.stat-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
}

/* ---------- 11. Grid ---------- */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }

/* ---------- 12. Prose / breadcrumbs ---------- */
.prose {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-mute);
}

.prose p + p { margin-top: 1em; }

.prose h2,
.prose h3 {
  color: var(--ink);
  margin-top: 1.9em;
  margin-bottom: 0.6em;
}

.prose h2 { font-size: clamp(22px, 2.2vw, 28px); }
.prose h3 { font-size: clamp(18px, 1.8vw, 22px); }

.prose ul,
.prose ol {
  margin: 1em 0;
  padding-left: 1.2em;
  list-style: disc;
}

.prose a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 229, 255, 0.35);
  transition: border-color var(--t-fast) var(--ease);
}

.prose a:hover {
  border-bottom-color: var(--cyan);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
}

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

.breadcrumbs li + li::before {
  content: "/";
  color: var(--steel);
}

.breadcrumbs a {
  text-decoration: none;
  color: var(--ink-mute);
  transition: color var(--t-fast) var(--ease);
}

.breadcrumbs a:hover { color: var(--cyan); }

.breadcrumbs [aria-current="page"] { color: var(--ink); }

/* ---------- 13. Brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(0, 229, 255, 0.65);
  background: rgba(0, 229, 255, 0.05);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 7px;
  background: linear-gradient(140deg, var(--cyan), rgba(0, 229, 255, 0) 68%);
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pulse);
  box-shadow: 0 0 9px rgba(255, 75, 31, 0.9);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.brand-line {
  margin-top: 3px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  white-space: nowrap;
}

.brand-version {
  margin-left: 2px;
  padding: 2px 8px;
  border: 1px solid rgba(0, 229, 255, 0.38);
  border-radius: var(--radius-capsule);
  background: rgba(0, 229, 255, 0.08);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.7;
}

/* ---------- 14. Site header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 260ms var(--ease),
    border-color 260ms var(--ease), box-shadow 260ms var(--ease);
}

.site-header[data-scrolled] {
  background: linear-gradient(180deg, rgba(5, 7, 14, 0.97), rgba(9, 14, 28, 0.93));
  border-bottom-color: var(--steel);
  box-shadow: 0 12px 40px -28px rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 32px);
  width: 100%;
  max-width: 1400px;
  min-height: var(--header-h);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 36px);
}

.primary-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 10px 13px;
  color: var(--ink-mute);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  line-height: 1.6;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 3px;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease);
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  color: var(--cyan);
}

.nav-link[aria-current="page"]::after {
  height: 2px;
  transform: scaleX(1);
  background: linear-gradient(90deg, var(--cyan), var(--pulse));
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  margin-left: auto;
}

.tool-link {
  position: relative;
  padding: 8px 2px;
  color: var(--ink-mute);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease);
}

.tool-link::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 4px;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--t-fast) var(--ease);
}

.tool-link:hover { color: var(--ink); }
.tool-link:hover::after { transform: scaleX(1); }

.nav-extra { display: none; }

.nav-toggle {
  position: relative;
  display: none;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--steel);
  border-radius: 10px;
  background: var(--glass);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease);
}

.nav-toggle:hover {
  border-color: var(--cyan);
  background: var(--glass-strong);
}

.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 17px;
  height: 1.5px;
  background: var(--ink);
  transform: translateX(-50%);
  transition: transform 220ms var(--ease), opacity 220ms var(--ease);
}

.nav-toggle::before { top: calc(50% - 4px); }
.nav-toggle::after { top: calc(50% + 4px); }

.nav-toggle[aria-expanded="true"]::before {
  transform: translateX(-50%) translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"]::after {
  transform: translateX(-50%) translateY(-4px) rotate(-45deg);
}

.nav-toggle-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--cyan-soft) 46%, var(--pulse));
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
  opacity: 0.92;
}

/* ---------- 15. Site footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(72px, 8vw, 120px);
  border-top: 1px solid var(--steel);
  background:
    radial-gradient(120% 100% at 84% -10%, rgba(0, 229, 255, 0.1), transparent 58%),
    radial-gradient(90% 90% at -10% 110%, rgba(255, 75, 31, 0.08), transparent 62%),
    linear-gradient(180deg, #0B1226 0%, #070B18 56%, #05070E 100%);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: min(440px, 48%);
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--pulse) 88%, transparent);
}

.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(42, 53, 80, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 53, 80, 0.28) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.62), transparent 74%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.62), transparent 74%);
}

.footer-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(44px, 6vw, 76px) var(--gutter) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 1fr 1.3fr;
  gap: clamp(32px, 4vw, 52px) clamp(24px, 2.6vw, 40px);
}

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

.footer-desc {
  margin-top: 18px;
  max-width: 34ch;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-mute);
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 5px 13px;
  border: 1px solid rgba(0, 229, 255, 0.24);
  border-radius: var(--radius-capsule);
  background: rgba(0, 229, 255, 0.06);
  color: var(--cyan-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.7;
}

.footer-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--stat);
  box-shadow: 0 0 8px rgba(22, 224, 163, 0.9);
}

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

.footer-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.footer-head::before {
  content: "";
  width: 14px;
  height: 1px;
  flex: 0 0 auto;
  background: var(--cyan);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.footer-list--links {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.footer-list--plain li {
  padding: 4px 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-mute);
  overflow-wrap: anywhere;
}

.footer-key {
  display: inline-block;
  margin-right: 9px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--cyan);
  vertical-align: 1px;
}

.footer-link {
  display: inline-block;
  padding: 4px 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-mute);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}

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

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  margin-top: clamp(36px, 5vw, 62px);
  padding: 22px 0 44px;
  border-top: 1px solid var(--steel);
}

.footer-legal,
.footer-hint {
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}

.footer-hint {
  padding-left: 11px;
  border-left: 2px solid rgba(0, 229, 255, 0.55);
  opacity: 0.86;
}

/* ---------- 16. Reveal protocol ---------- */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  clip-path: inset(0 0 18% 0);
  transition: opacity var(--t-enter) var(--ease),
    transform var(--t-enter) var(--ease),
    clip-path var(--t-enter) var(--ease);
  will-change: opacity, transform;
}

.js-reveal [data-reveal].is-shown {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 0 0);
  will-change: auto;
}

/* ---------- 17. Responsive ---------- */
@media (max-width: 1080px) {
  :root { --header-h: 66px; }

  .nav-toggle { display: block; }
  .tool-link { display: none; }

  .primary-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 130;
    display: block;
    justify-content: flex-start;
    padding: 22px var(--gutter) calc(24px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--steel);
    border-radius: 20px 20px 0 0;
    background: linear-gradient(180deg, rgba(11, 18, 38, 0.985), rgba(5, 7, 14, 0.995));
    box-shadow: 0 -24px 60px -18px rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    max-height: 84vh;
    overflow-y: auto;
    transform: translateY(103%);
    opacity: 0;
    visibility: hidden;
    transition: transform 340ms var(--ease), opacity 240ms var(--ease),
      visibility 240ms var(--ease);
  }

  .primary-nav[data-open] {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

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

  .nav-link {
    display: block;
    padding: 15px 4px;
    font-size: 16px;
    letter-spacing: 0.02em;
    border-bottom: 1px solid var(--line-soft);
  }

  .nav-link::after { display: none; }

  .nav-link:hover { color: var(--cyan); }

  .nav-link[aria-current="page"]::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 2px;
    margin-right: 9px;
    background: var(--cyan);
    vertical-align: 5px;
  }

  .nav-extra {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--steel);
  }

  .nav-extra-search {
    width: 100%;
  }

  .nav-extra-link {
    font-size: 14px;
    letter-spacing: 0.06em;
    color: var(--ink-mute);
    text-decoration: none;
    padding: 6px 2px;
    border-bottom: 1px solid transparent;
    transition: color var(--t-fast) var(--ease);
  }

  .nav-extra-link:hover { color: var(--cyan); }

  .nav-extra-note {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--ink-mute);
    opacity: 0.82;
  }

  .grid-12 > * { grid-column: 1 / -1; }

  .footer-grid { grid-template-columns: 1fr 1fr; }

  .footer-desc { max-width: 46ch; }
}

@media (max-width: 640px) {
  :root { --header-h: 62px; }

  .brand-line,
  .brand-version { display: none; }

  .brand-name { font-size: 14px; }

  .brand-mark { width: 26px; height: 26px; }

  .btn-search {
    padding: 8px 14px;
    font-size: 12px;
  }

  .header-tools { gap: 8px; }

  .footer-grid { grid-template-columns: 1fr; }

  .footer-base {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-legal br { display: none; }

  .media-frame { aspect-ratio: 4 / 3; }

  .display-xl { font-size: clamp(34px, 9vw, 46px); }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .btn-search { animation: none !important; }

  .js-reveal [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
  }

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