/* ==========================================================================
   乐思体育 · Service Center V3.1
   共享样式表 /assets/site.css
   ========================================================================== */

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

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

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

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

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

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

a { color: inherit; }

hr { border: 0; }

/* ---------- 2. Tokens ---------- */
:root {
  --ink-blue:  #0B3C5D;
  --night-blue:#072A42;
  --frost:     #F7F9FB;
  --cream:     #F3EFE6;
  --pale-blue: #C9D8E2;
  --ice-blue:  #6E93A8;
  --signal:    #F26419;
  --signal-soft:#FF8A4C;
  --ink:       #16232B;
  --glass:     rgba(247, 249, 251, 0.62);

  --font-display: "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC",
                  "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
                  system-ui, sans-serif;
  --font-body: var(--font-display);
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular,
               Menlo, Consolas, "Courier New", monospace;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;

  --line: 1px solid var(--pale-blue);
  --shadow: 0 18px 44px -30px rgba(7, 42, 66, 0.6);

  --width: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
}

/* ---------- 3. Base ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--frost);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 768px) {
  body { font-size: 17px; }
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: var(--ink-blue);
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.15rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
h4 { font-size: 1.02rem; letter-spacing: 0; }

p { text-wrap: pretty; }

strong, b { font-weight: 700; }

code, kbd, samp {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

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

#main-content {
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.visually-hidden {
  position: absolute !important;
  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;
}

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

.container--narrow {
  max-width: 780px;
}

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

.section-head {
  display: grid;
  gap: 10px;
  margin-bottom: clamp(20px, 3vw, 36px);
}

.section-index {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--signal);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ice-blue);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--signal);
  border-radius: 2px;
}

.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--split {
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(20px, 4vw, 56px);
}

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

.rule {
  height: 1px;
  border: 0;
  background: var(--pale-blue);
  margin-block: clamp(24px, 4vw, 48px);
}

/* ---------- 5. Skip link ---------- */
.skip-link {
  position: absolute;
  top: 8px;
  left: var(--gutter);
  z-index: 300;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--signal);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--night-blue);
  outline-offset: 2px;
}

/* ---------- 6. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 249, 251, 0.88);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--pale-blue);
}

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

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

.brand-mark {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 30px;
  height: 30px;
  padding: 6px;
  border-radius: 8px;
  background: var(--ink-blue);
  transition: background-color 0.18s ease;
}

.brand-mark span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: rgba(247, 249, 251, 0.92);
}

.brand-mark span:nth-child(3) {
  width: 62%;
  background: var(--signal);
}

.brand:hover .brand-mark { background: var(--night-blue); }

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-blue);
}

.brand-version {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ice-blue);
}

/* Navigation */
.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(0px, 0.9vw, 8px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-blue);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.2s ease;
}

.nav-link:hover {
  color: var(--night-blue);
  background: rgba(201, 216, 226, 0.38);
}

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

.nav-link[aria-current="page"] {
  color: var(--ink-blue);
  font-weight: 700;
}

.nav-link[aria-current="page"]::after { transform: scaleX(1); }

/* Drawer extras (mobile only) */
.nav-drawer { display: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

/* Toggle */
.nav-toggle { display: none; }

/* Scroll progress */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(201, 216, 226, 0.45);
  pointer-events: none;
}

.scroll-progress-bar {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--ink-blue) 0%, var(--signal) 62%, var(--signal-soft) 100%);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* ---------- 7. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease,
              border-color 0.16s ease, transform 0.16s ease,
              box-shadow 0.16s ease;
}

.btn--primary {
  background: var(--signal);
  color: #fff;
  box-shadow: 0 10px 22px -16px rgba(242, 100, 25, 0.95);
}

.btn--primary:hover {
  background: var(--signal-soft);
  transform: translateY(-1px);
}

.btn--primary:active {
  background: #d8540f;
  transform: translateY(0);
}

.btn--ghost {
  background: transparent;
  color: var(--ink-blue);
  border-color: var(--pale-blue);
}

.btn--ghost:hover {
  border-color: var(--ink-blue);
  background: rgba(11, 60, 93, 0.06);
}

.btn--ghost:active { background: rgba(11, 60, 93, 0.12); }

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

/* ---------- 8. Breadcrumb ---------- */
.breadcrumb {
  padding-block: clamp(14px, 2.2vw, 24px);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ice-blue);
}

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

.breadcrumb-list li:not(:last-child)::after {
  content: "/";
  color: var(--pale-blue);
}

.breadcrumb-list a {
  color: var(--ice-blue);
  text-decoration: none;
}

.breadcrumb-list a:hover { color: var(--signal); }

.breadcrumb-list [aria-current="page"] {
  color: var(--ink-blue);
  font-weight: 500;
}

/* ---------- 9. Prose ---------- */
.prose {
  max-width: 68ch;
  font-size: 16.5px;
  line-height: 1.85;
}

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

.prose h2 {
  margin-top: 2em;
  padding-bottom: 0.35em;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  border-bottom: 2px solid var(--ink-blue);
}

.prose h3 { margin-top: 1.7em; }

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose li + li { margin-top: 0.4em; }

.prose a {
  color: var(--ink-blue);
  text-decoration: underline;
  text-decoration-color: var(--pale-blue);
  text-underline-offset: 3px;
}

.prose a:hover {
  color: var(--signal);
  text-decoration-color: var(--signal);
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 1.05em 1.3em;
  background: var(--cream);
  border-left: 3px solid var(--signal);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink);
  font-size: 1rem;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  letter-spacing: 0.02em;
  padding: 0.1em 0.4em;
  border-radius: 4px;
  background: rgba(201, 216, 226, 0.42);
}

/* ---------- 10. Components ---------- */
.card {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  background: #fff;
  border: var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  border-color: var(--ink-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(242, 100, 25, 0.12);
  color: #b4460f;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag--blue {
  background: rgba(11, 60, 93, 0.1);
  color: var(--ink-blue);
}

.callout {
  padding: clamp(18px, 2.4vw, 26px);
  background: var(--cream);
  border: 1px solid #e2d9c7;
  border-radius: var(--radius);
}

.aside-note {
  padding-left: 14px;
  border-left: 2px solid var(--pale-blue);
  font-size: 14px;
  line-height: 1.78;
  color: var(--ice-blue);
}

.band {
  padding-block: clamp(32px, 5vw, 64px);
  background: var(--cream);
  border-top: 1px solid #e2d9c7;
  border-bottom: 1px solid #e2d9c7;
}

.band--night {
  background: var(--night-blue);
  border-top-color: rgba(201, 216, 226, 0.2);
  border-bottom-color: rgba(201, 216, 226, 0.2);
  color: #e7eff4;
}

.band--night h2,
.band--night h3 { color: #fff; }

.band--night .aside-note {
  border-left-color: rgba(201, 216, 226, 0.4);
  color: rgba(231, 239, 244, 0.78);
}

/* ---------- 11. Figures ---------- */
.figure {
  display: grid;
  gap: 10px;
  margin: 0;
}

.figure-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: var(--line);
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(148deg, var(--night-blue) 0%, var(--ink-blue) 52%, #12405e 100%);
}

.figure-media--wide { aspect-ratio: 21 / 9; }

.figure-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.figure-glass {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(201, 216, 226, 0.75);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-blue);
}

.figure-caption {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ice-blue);
}

/* ---------- 12. Details / FAQ ---------- */
details {
  border: var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

details + details { margin-top: 10px; }

details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink-blue);
  list-style: none;
}

details > summary::-webkit-details-marker { display: none; }

details > summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--signal);
}

details[open] > summary::after { content: "−"; }

details[open] > summary { border-bottom: var(--line); }

details > p,
details > div { padding: 14px 18px 18px; }

/* ---------- 13. Footer ---------- */
.site-footer {
  margin-top: clamp(48px, 8vw, 96px);
  background: var(--night-blue);
  color: #e7eff4;
}

.footer-inner {
  width: 100%;
  max-width: var(--width);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: clamp(24px, 4vw, 48px);
}

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

.footer-brand {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
}

.footer-brand:hover { color: var(--signal-soft); }

.footer-version {
  margin: 6px 0 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal-soft);
}

.footer-region {
  max-width: 26em;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(231, 239, 244, 0.72);
}

.footer-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9fbccb;
}

.footer-list {
  display: grid;
  gap: 9px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14.5px;
  line-height: 1.7;
}

.footer-list a {
  color: rgba(231, 239, 244, 0.86);
  text-decoration: none;
  transition: color 0.16s ease;
}

.footer-list a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-contact li {
  color: rgba(231, 239, 244, 0.72);
  word-break: break-word;
}

.footer-label {
  display: block;
  margin-bottom: 1px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7fa3b6;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(32px, 5vw, 56px);
  padding-top: 16px;
  border-top: 1px solid rgba(201, 216, 226, 0.18);
  font-size: 12.5px;
  color: rgba(231, 239, 244, 0.6);
}

.footer-copy {
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-legal-links a {
  color: rgba(231, 239, 244, 0.78);
  text-decoration: none;
}

.footer-legal-links a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-hours { margin: 0; }

/* ---------- 14. Reveal ---------- */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

[data-chapter] { scroll-margin-top: calc(var(--header-h) + 24px); }

/* ---------- 15. Responsive ---------- */
@media (max-width: 1120px) {
  .brand-version { display: none; }
  .nav-link { font-size: 13.5px; padding: 8px 8px; }
  .header-actions .btn { padding: 8px 13px; font-size: 13px; }
}

@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }

  .header-inner { gap: 12px; }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-left: auto;
    padding: 8px 14px;
    border: 1px solid var(--pale-blue);
    border-radius: 999px;
    background: transparent;
    color: var(--ink-blue);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
  }

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

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

  .nav-toggle-bars span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

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

  .header-actions { display: none; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: 18px var(--gutter) 28px;
    background: var(--night-blue);
    border-bottom: 1px solid rgba(201, 216, 226, 0.25);
    box-shadow: 0 30px 60px -32px rgba(7, 42, 66, 0.85);
  }

  .site-nav[data-open="true"] { display: flex; }

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

  .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4px;
    border-radius: 0;
    border-bottom: 1px solid rgba(201, 216, 226, 0.16);
    font-size: 17px;
    font-weight: 500;
    color: #eaf1f6;
  }

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

  .nav-link:hover {
    background: transparent;
    color: #fff;
  }

  .nav-link[aria-current="page"] {
    color: var(--signal-soft);
    font-weight: 700;
  }

  .nav-drawer {
    display: block;
    margin-top: 22px;
  }

  .nav-drawer-actions {
    display: grid;
    gap: 10px;
  }

  .nav-drawer-actions .btn {
    width: 100%;
    padding: 13px 18px;
    font-size: 15px;
  }

  .nav-drawer .btn--ghost {
    color: #eaf1f6;
    border-color: rgba(201, 216, 226, 0.45);
  }

  .nav-drawer .btn--ghost:hover {
    background: rgba(247, 249, 251, 0.1);
    border-color: #eaf1f6;
  }

  .nav-drawer-note {
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.7;
    color: rgba(201, 216, 226, 0.85);
  }

  body.nav-open { overflow: hidden; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-legal { flex-direction: column; align-items: flex-start; gap: 10px; }
  .brand-name { font-size: 1rem; }
  .nav-toggle-label { display: none; }
  .nav-toggle { padding: 8px 11px; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal-ready [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .card:hover,
  .btn--primary:hover { transform: none; }
}
