/* =========================================================
   球速竞界 Site Kit — shared header/footer & base components
   File: /assets/site.css
   ========================================================= */

/* ---------- 1. Tokens & Reset ---------- */
:root {
  --deep-space: #0A0E27;
  --ultraviolet: #3D0A6E;
  --cyan: #00E5FF;
  --amber: #FFC107;
  --paper: #F5F0E1;
  --ink: #1A1A1A;
  --glass: rgba(255, 255, 255, 0.08);
  --gray: #9E9E9E;
  --green: #00C853;
  --orange: #FF6D00;

  --font-head: "DIN Condensed", "Oswald", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --rail-w: 80px;
  --content-max: 1200px;
  --radius-s: 2px;
  --radius-m: 8px;
  --radius-l: 14px;
  --gap: 24px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

html[data-js] {
  /* JS enabled flag */
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.02em;
  color: var(--paper);
  background-color: var(--deep-space);
  background-image:
    radial-gradient(circle at 10% 92%, rgba(61, 10, 110, 0.3) 0%, transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(0, 229, 255, 0.05) 0%, transparent 26%),
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
}

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

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
}

/* ---------- 2. Base Typography & Elements ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.16;
  color: var(--paper);
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
  margin-bottom: 0.4em;
}

h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  margin-bottom: 0.45em;
}

h3 {
  font-size: 1.18rem;
  margin-bottom: 0.5em;
}

h4 {
  font-size: 1rem;
  margin-bottom: 0.5em;
}

p {
  margin-bottom: 1em;
}

a {
  color: var(--cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover {
  color: #8af1ff;
}

strong {
  font-weight: 600;
}

code {
  font-family: var(--font-mono);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

blockquote {
  margin: 1.5em 0;
  padding: 12px 20px;
  border-left: 3px solid var(--cyan);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(245, 240, 225, 0.85);
}

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

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

[data-year] {
  font-variant-numeric: tabular-nums;
}

/* ---------- 3. Accessibility ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: calc(var(--rail-w) + 20px);
  z-index: 9999;
  padding: 10px 18px;
  background: var(--cyan);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.35);
  transform: translateY(-220%);
  transition: transform 0.22s ease;
}

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

/* ---------- 4. Shared Header / Brand Rail ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: var(--rail-w);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 22px 0 18px;
  background: linear-gradient(180deg, rgba(12, 17, 45, 0.98), rgba(24, 8, 52, 0.97));
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  overflow-y: auto;
  scrollbar-width: none;
}

.site-header::-webkit-scrollbar {
  display: none;
}

.site-header::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(0, 229, 255, 0.4) 14%,
    rgba(255, 193, 7, 0.16) 84%,
    transparent 100%);
  opacity: 0.85;
  pointer-events: none;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 6px 4px;
  color: var(--paper);
  text-decoration: none;
  border-radius: 10px;
  transition: color 0.2s ease;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  color: var(--cyan);
}

.brand-mark svg,
.footer-brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  line-height: 1.5;
  writing-mode: vertical-rl;
  opacity: 0.92;
}

/* --- Navigation (desktop base) --- */
.site-nav {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.nav-item {
  width: 100%;
  display: flex;
  justify-content: center;
}

.nav-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 68px;
  height: 54px;
  color: var(--gray);
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: color 0.22s ease, background-color 0.22s ease,
    border-color 0.22s ease, box-shadow 0.22s ease;
}

.nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 0;
  border-radius: 0 2px 2px 0;
  background: var(--cyan);
  opacity: 0;
  transform: translateY(-50%);
  transition: height 0.25s var(--ease-out), opacity 0.2s ease;
}

.nav-link:hover {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.nav-link:hover::before {
  height: 20px;
  opacity: 0.9;
}

.nav-link[aria-current="page"] {
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.09);
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.15);
}

.nav-link[aria-current="page"]::before {
  height: 24px;
  opacity: 1;
}

.nav-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.nav-label {
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.06em;
  color: inherit;
  white-space: nowrap;
}

/* --- toggle & backdrop (hidden on desktop) --- */
.nav-toggle {
  display: none;
}

.nav-backdrop {
  display: none;
}

/* --- short viewport compression --- */
@media (max-height: 720px) {
  .site-header {
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .brand {
    gap: 6px;
  }

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

  .nav-link {
    height: 44px;
    gap: 3px;
  }

  .nav-icon {
    width: 19px;
    height: 19px;
  }
}

/* ---------- 5. Scroll Progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  width: calc(100% - var(--rail-w));
  height: 3px;
  z-index: 1200;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--cyan) 72%, var(--amber) 100%);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

/* ---------- 6. Main Layout ---------- */
.main-content {
  margin-left: var(--rail-w);
  min-height: 60dvh;
  outline: none;
  scroll-margin-top: 70px;
}

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

.container {
  width: min(100%, var(--content-max));
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 48px);
}

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

.rule {
  display: block;
  height: 1px;
  margin: 48px 0;
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.5), rgba(255, 193, 7, 0.25) 60%, transparent);
  border: 0;
}

.section-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 10px;
}

/* ---------- 7. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.4;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease,
    background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: var(--cyan);
  color: var(--ink);
}

.btn-primary:hover {
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.4);
  transform: translateY(-2px);
  color: var(--ink);
}

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

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

.btn-amber {
  background: var(--amber);
  color: var(--ink);
}

.btn-amber:hover {
  box-shadow: 0 0 18px rgba(255, 193, 7, 0.4);
  transform: translateY(-2px);
  color: var(--ink);
}

/* ---------- 8. Cards ---------- */
.card {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius-m);
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid rgba(245, 240, 225, 0.2);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

.card h1,
.card h2,
.card h3,
.card h4 {
  color: inherit;
}

.card-dark {
  background: linear-gradient(150deg, rgba(61, 10, 110, 0.55), rgba(255, 255, 255, 0.06));
  color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

/* ---------- 9. Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.4;
  border-radius: 999px;
  border: 1px solid;
}

.badge-cyan {
  color: var(--cyan);
  border-color: rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.1);
}

.badge-amber {
  color: var(--amber);
  border-color: rgba(255, 193, 7, 0.4);
  background: rgba(255, 193, 7, 0.1);
}

.badge-green {
  color: var(--green);
  border-color: rgba(0, 200, 83, 0.4);
  background: rgba(0, 200, 83, 0.1);
}

.badge-orange {
  color: var(--orange);
  border-color: rgba(255, 109, 0, 0.4);
  background: rgba(255, 109, 0, 0.1);
}

/* ---------- 10. Index List ---------- */
.index-list {
  margin: 0;
  padding: 0;
}

.index-item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 14px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.2s ease, padding-left 0.2s ease;
}

.index-item:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.index-item:hover {
  background: rgba(255, 255, 255, 0.045);
  padding-left: 14px;
}

.index-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  min-width: 34px;
  flex: 0 0 auto;
}

.index-title {
  color: var(--paper);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.index-title:hover {
  color: var(--cyan);
}

.index-meta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray);
  flex: 0 0 auto;
}

/* ---------- 11. Breadcrumb ---------- */
.breadcrumb {
  margin-bottom: 24px;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gray);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin: 0 10px;
  color: var(--cyan);
  opacity: 0.7;
}

.breadcrumb-item a {
  color: var(--cyan);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
}

/* ---------- 12. Grid Utilities ---------- */
.grid {
  display: grid;
  gap: var(--gap);
}

.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));
}

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

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

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

/* ---------- 13. Screen Placeholder (CSS/SVG visuals) ---------- */
.screen {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-l);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg,
    rgba(0, 229, 255, 0.05) 0%,
    rgba(61, 10, 110, 0.25) 50%,
    rgba(255, 193, 7, 0.06) 100%);
  overflow: hidden;
}

.screen::before {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(circle at 25% 30%, rgba(0, 229, 255, 0.14), transparent 42%),
    radial-gradient(circle at 75% 62%, rgba(255, 193, 7, 0.12), transparent 40%),
    linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.08) 50%, transparent 58%);
}

.screen::after {
  content: attr(data-caption);
  position: relative;
  z-index: 1;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: rgba(245, 240, 225, 0.62);
  border: 1px solid rgba(245, 240, 225, 0.18);
  border-radius: 999px;
  background: rgba(10, 14, 39, 0.6);
  backdrop-filter: blur(4px);
}

.screen-4-3 {
  aspect-ratio: 4 / 3;
}

.screen-1-1 {
  aspect-ratio: 1 / 1;
}

/* ---------- 14. Reveal Transition ---------- */
[data-reveal] {
  opacity: 1;
  transform: none;
}

html[data-js] [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s var(--ease-out);
  will-change: opacity, transform;
}

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

/* ---------- 15. Shared Footer ---------- */
.site-footer {
  position: relative;
  margin-left: var(--rail-w);
  padding: 52px clamp(20px, 4vw, 48px) 28px;
  background: linear-gradient(180deg, rgba(9, 12, 33, 0.92), rgba(8, 10, 28, 0.98));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--gray);
  font-size: 13px;
  line-height: 1.7;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan) 0%, rgba(61, 10, 110, 0.8) 45%, var(--amber) 100%);
  opacity: 0.7;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 40px;
  width: min(100%, var(--content-max));
  margin: 0 auto;
}

.footer-brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.footer-brand-mark {
  width: 36px;
  height: 36px;
  color: var(--cyan);
  margin-bottom: 2px;
}

.footer-brand {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--paper);
}

.footer-trust {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray);
  padding-left: 10px;
  border-left: 2px solid var(--cyan);
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 240, 225, 0.5);
  margin: 0 0 14px;
}

.footer-heading::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  background: var(--cyan);
  border-radius: 50%;
  vertical-align: 1px;
  opacity: 0.85;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--gray);
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-links a:hover {
  color: var(--cyan);
  padding-left: 6px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.contact-label {
  display: inline-block;
  width: 60px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(245, 240, 225, 0.4);
  flex: 0 0 auto;
}

.footer-note {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(158, 158, 158, 0.75);
  max-width: min(360px, 100%);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  width: min(100%, var(--content-max));
  margin: 36px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(158, 158, 158, 0.8);
}

.legal-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0.55;
  flex: 0 0 auto;
}

@media (max-width: 1023px) and (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr;
  }

  .footer-contact-block {
    grid-column: 1 / -1;
  }
}

/* ---------- 16. Mobile (max-width: 767px) ---------- */
@media (max-width: 767px) {
  html,
  body {
    overflow-x: hidden;
  }

  .skip-link {
    left: 16px;
  }

  .scroll-progress {
    left: 0;
    width: 100%;
  }

  .main-content,
  .site-footer {
    margin-left: 0;
  }

  .main-content {
    padding-top: 60px;
    min-height: 100dvh;
  }

  /* --- header -> top bar --- */
  .site-header {
    width: 100%;
    height: auto;
    min-height: 60px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    padding: 0 12px 0 16px;
    background: rgba(8, 11, 32, 0.96);
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow: visible;
  }

  .site-header::after {
    display: none;
  }

  .brand {
    flex-direction: row;
    gap: 10px;
    padding: 0;
  }

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

  .brand-name {
    writing-mode: horizontal-tb;
    font-size: 15px;
    letter-spacing: 0.1em;
  }

  /* --- nav: static fallback without JS; drawer with JS --- */
  .site-nav {
    order: 5;
    width: 100%;
    position: static;
    transform: none;
    height: auto;
    padding: 6px 12px 16px;
    background: transparent;
    border-left: 0;
    box-shadow: none;
    overflow: visible;
  }

  html[data-js] .site-header {
    height: 60px;
    flex-wrap: nowrap;
  }

  html[data-js] .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    order: 0;
    width: min(280px, 82vw);
    height: 100vh;
    height: 100dvh;
    padding: 76px 16px 24px;
    background: rgba(8, 11, 32, 0.97);
    backdrop-filter: blur(14px);
    border-left: 1px solid rgba(0, 229, 255, 0.22);
    transform: translateX(105%);
    transition: transform 0.35s var(--ease-out);
    overflow-y: auto;
  }

  html[data-js] .site-nav[data-open] {
    transform: translateX(0);
    box-shadow: -18px 0 48px rgba(0, 0, 0, 0.45);
  }

  .nav-list {
    align-items: stretch;
    gap: 2px;
  }

  .nav-item {
    display: block;
  }

  .nav-link {
    width: 100%;
    height: 48px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 0 14px;
    border-radius: 6px;
  }

  /* --- toggle (hamburger) --- */
  .nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 1005;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0;
    cursor: pointer;
    border-radius: 8px;
    margin: 9px 2px 9px auto;
    transition: background-color 0.2s ease;
  }

  .nav-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .nav-toggle-line {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--paper);
    transition: transform 0.3s var(--ease-out), opacity 0.2s ease, background 0.2s ease;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: var(--cyan);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: var(--cyan);
  }

  /* --- backdrop --- */
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1001;
    background: rgba(5, 8, 24, 0.55);
    backdrop-filter: blur(2px);
  }

  .nav-backdrop[hidden] {
    display: none !important;
  }

  /* --- footer stacking --- */
  .site-footer {
    padding: 40px 20px 24px;
  }

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

  .footer-legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px 0;
    margin-top: 28px;
  }

  .legal-sep {
    display: none;
  }
}

/* ---------- 17. 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;
  }

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

/* ---------- 18. Print ---------- */
@media print {
  .site-header,
  .skip-link,
  .scroll-progress,
  .nav-backdrop {
    display: none !important;
  }

  .main-content,
  .site-footer {
    margin-left: 0;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .site-footer {
    border-top: 1px solid #000;
  }
}
