/* =========================================
   必博全站 / door-bibo.com.cn
   Shared Stylesheet (/assets/site.css)
   ========================================= */

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

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

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
}

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

ul,
ol { list-style: none; }

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

button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}

strong,
b { font-weight: 700; }

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

/* ---------- Variables ---------- */
:root {
  --deep: #0B2B5B;
  --deep-2: #081A33;
  --orange: #FF7F00;
  --orange-soft: #FF9A3D;
  --slate: #6B7A8A;
  --moss: #6A8F6A;
  --terra: #C67B5C;
  --mist: #F7F3E8;
  --mist-dim: #E0E4E8;
  --white: #FFFFFF;
  --ink: #081A33;
  --line-light: rgba(255,255,255,0.12);
  --font-head: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
  --container: 1240px;
  --cut: 18px;
  --transition: 150ms cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow: 0 18px 44px rgba(8,26,51,0.08);
}

/* ---------- Base Typography ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.25;
  color: var(--deep-2);
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(34px, 5vw, 46px); }
h2 { font-size: clamp(26px, 3.4vw, 34px); }
h3 { font-size: clamp(20px, 2.4vw, 24px); }

::selection {
  background: var(--orange);
  color: var(--deep-2);
}

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

/* ---------- Layout Utilities ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 80px 0; }
.section--deep { background: var(--deep); color: rgba(247,243,232,0.88); }
.section--deep .section-title { color: #FFFFFF; }
.section--deep .section-index { color: #FFFFFF; }
.section--deep .section-lead { color: rgba(247,243,232,0.72); }
.section--white { background: var(--white); }
.section--plain { background: var(--mist); }

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.coordinate {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--slate);
}

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

.prose p { margin: 0.9em 0; }
.prose ul { margin: 0.9em 0; }
.prose li { padding-left: 22px; position: relative; margin: 0.4em 0; }
.prose li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 7px;
  height: 7px;
  background: var(--orange);
  transform: rotate(45deg);
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  gap: 24px;
}

.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: 960px) {
  .grid--3,
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--slate);
}

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

.breadcrumb li + li::before {
  content: "/";
  color: rgba(107,122,138,0.6);
}

.breadcrumb a { transition: color var(--transition); }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb [aria-current="page"] { color: var(--deep); font-weight: 700; }

/* ---------- Section Head ---------- */
.section-head {
  max-width: 700px;
  margin-bottom: 40px;
}

.section-index {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--deep);
}

.section-index::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--orange);
}

.section-title { margin-top: 6px; }
.section-lead { margin-top: 12px; font-size: 16px; color: var(--slate); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 22px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  border-radius: 4px;
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.btn--primary {
  background: var(--orange);
  color: var(--deep-2);
}

.btn--primary:hover {
  background: var(--orange-soft);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(255,127,0,0.2);
}

.btn--ghost {
  background: transparent;
  border: 1px solid rgba(247,243,232,0.4);
  color: var(--mist);
}

.btn--ghost:hover {
  border-color: var(--orange);
  color: var(--orange-soft);
  background: rgba(255,127,0,0.08);
}

.btn--dark {
  background: var(--deep);
  color: var(--white);
}

.btn--dark:hover {
  background: var(--deep-2);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(8,26,51,0.16);
}

/* ---------- Panels ---------- */
.panel {
  --cut: 18px;
  position: relative;
  background: var(--white);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}

.panel--deep {
  background: var(--deep);
  color: rgba(247,243,232,0.88);
}

.panel__inner { padding: 30px; }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--mist-dim);
  box-shadow: var(--shadow);
  padding: 26px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(8,26,51,0.12);
}

.card--accent {
  background: var(--deep);
  border-color: var(--deep);
  color: rgba(247,243,232,0.88);
}

.card--accent .card__title { color: #FFFFFF; }
.card--accent .card__text { color: rgba(247,243,232,0.72); }

.card__num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--deep);
}

.card--accent .card__num { color: var(--orange-soft); }

.card__title {
  font-size: 20px;
  margin: 10px 0 8px;
}

.card__text {
  font-size: 15px;
  color: var(--slate);
}

.card__link {
  display: inline-block;
  margin-top: 16px;
  font-weight: 700;
  color: var(--deep);
  border-bottom: 2px solid var(--orange);
  transition: color var(--transition), border-color var(--transition);
}

.card__link:hover {
  color: var(--orange);
  border-color: var(--deep);
}

.card--accent .card__link {
  color: #FFFFFF;
  border-color: var(--orange);
}

/* ---------- Route Index ---------- */
.route-index {
  border-top: 2px solid var(--deep);
}

.route-index__item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 20px;
  align-items: baseline;
  padding: 22px 4px;
  border-bottom: 1px dashed var(--mist-dim);
  transition: background var(--transition), padding var(--transition);
}

.route-index__item:hover {
  background: var(--white);
  padding-left: 12px;
}

.route-index__num {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--deep);
}

.route-index__num::before {
  content: "◆";
  color: var(--orange);
  margin-right: 8px;
  font-size: 9px;
  vertical-align: middle;
}

.route-index__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--deep-2);
}

.route-index__desc {
  font-size: 14px;
  color: var(--slate);
}

.route-index__action {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--deep);
}

.route-index__action::after {
  content: " →";
  color: var(--orange);
}

@media (max-width: 640px) {
  .route-index__item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .route-index__action { display: none; }
}

/* ---------- Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid currentColor;
}

.tag::before {
  content: "";
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}

.tag--new,
.tag--safe {
  color: var(--moss);
  background: rgba(106,143,106,0.12);
}

.tag--warn,
.tag--hot {
  color: var(--terra);
  background: rgba(198,123,92,0.12);
}

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

.stat__num {
  font-family: var(--font-mono);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--deep);
}

.stat__num--accent { color: var(--orange); }

.stat__label {
  font-size: 14px;
  color: var(--slate);
}

/* ---------- Media Placeholder ---------- */
.media {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  background: linear-gradient(135deg, var(--deep) 0%, var(--deep-2) 100%);
}

.media--soft {
  background: linear-gradient(135deg, var(--mist) 0%, var(--mist-dim) 100%);
}

.media--orange {
  background: linear-gradient(135deg, #FF9A3D 0%, #FF7F00 100%);
}

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

.media::after {
  content: "GRAPHIC";
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: rgba(255,255,255,0.65);
  background: rgba(8,26,51,0.55);
  padding: 3px 8px 2px;
}

.media--soft::after {
  color: var(--slate);
  background: rgba(247,243,232,0.6);
}

.media img,
.media > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Path Elements ---------- */
.path-line {
  display: block;
  height: 2px;
  background-image: repeating-linear-gradient(to right, currentColor 0 6px, transparent 6px 14px);
  opacity: 0.55;
}

.entry-mark {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--orange);
  transform: rotate(45deg);
  box-shadow: 0 0 0 3px rgba(255,127,0,0.18);
}

/* ---------- Skip Link & Progress ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 5000;
  transform: translateY(-260%);
  background: var(--orange);
  color: var(--deep-2);
  font-family: var(--font-head);
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 4px;
  box-shadow: 0 8px 20px rgba(8,26,51,0.2);
  transition: transform 120ms ease;
}

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

.progress-line {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(to right, var(--orange), var(--orange-soft));
  z-index: 3000;
  pointer-events: none;
}

/* ---------- Masthead Header ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(11,43,91,0.96);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-light);
  color: var(--mist);
}

.masthead__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px 0;
}

.masthead__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.masthead__coord {
  justify-self: start;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: rgba(247,243,232,0.72);
}

.masthead__coord::before {
  content: "◆";
  color: var(--orange);
  font-size: 9px;
  margin-right: 6px;
  vertical-align: middle;
}

.masthead__ver {
  justify-self: end;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(247,243,232,0.72);
}

.masthead__tagline {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--orange-soft);
  margin: 4px 0 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: center;
  font-family: var(--font-head);
}

.brand__mark {
  position: relative;
  width: 28px;
  height: 28px;
  background: var(--orange);
  border-radius: 2px;
  clip-path: polygon(0 0, 68% 0, 100% 32%, 100% 100%, 0 100%);
  flex: 0 0 auto;
}

.brand__mark::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  width: 8px;
  height: 8px;
  background: var(--deep-2);
  transform: rotate(45deg);
}

.brand__name {
  font-size: 24px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.08em;
  line-height: 1;
}

.brand:hover .brand__name {
  color: var(--orange-soft);
}

/* ---------- Nav Toggle ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(247,243,232,0.28);
  border-radius: 999px;
  color: var(--mist);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  justify-self: end;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

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

.nav-toggle__icon {
  position: relative;
  width: 16px;
  height: 12px;
  display: block;
}

.nav-toggle__icon i {
  position: absolute;
  left: 0;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: top 0.15s ease, transform 0.15s ease;
}

.nav-toggle__icon i:nth-child(1) { top: 0; }
.nav-toggle__icon i:nth-child(2) { top: 5px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__icon i:nth-child(1) {
  top: 5px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon i:nth-child(2) {
  top: 5px;
  transform: rotate(-45deg);
}

.nav-toggle__text {
  letter-spacing: 0.2em;
}

/* ---------- Site Nav ---------- */
.site-nav {
  margin-top: 12px;
  border-top: 1px solid var(--line-light);
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 6px;
  padding: 6px 0;
}

.site-nav__item { position: relative; }

.site-nav__link {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(247,243,232,0.86);
  transition: color var(--transition), background var(--transition);
}

.site-nav__link:hover {
  color: #FFFFFF;
  background: rgba(255,255,255,0.08);
}

.site-nav__link[aria-current="page"] {
  color: #FFFFFF;
  font-weight: 700;
}

.site-nav__link[aria-current="page"]::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  background: var(--orange);
  transform: rotate(45deg) translateY(-1px);
  vertical-align: middle;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--deep-2);
  color: rgba(247,243,232,0.76);
  margin-top: 96px;
}

.footer__route {
  position: relative;
  display: flex;
  align-items: center;
  height: 46px;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: rgba(247,243,232,0.4);
}

.footer__route .path-line {
  flex: 1;
  min-width: 0;
}

.footer__route .entry-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -5px 0 0 -5px;
}

.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 24px 34px;
}

.footer__columns {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 44px;
  margin-bottom: 48px;
}

.footer__block { min-width: 0; }
.footer__block--links,
.footer__block--contact { min-width: 0; }

.footer__logo {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
}

.footer__logo sup {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--orange);
  margin-left: 2px;
}

.footer__tagline {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.28em;
  color: var(--orange-soft);
  margin-top: 8px;
}

.footer__trust {
  max-width: 400px;
  margin-top: 20px;
  padding-left: 14px;
  border-left: 3px solid var(--orange);
  font-size: 14px;
  line-height: 1.85;
  color: rgba(247,243,232,0.64);
}

.footer__title {
  position: relative;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #FFFFFF;
  margin-bottom: 18px;
}

.footer__title::after {
  content: "";
  display: block;
  width: 26px;
  height: 2px;
  background: var(--orange);
  margin-top: 8px;
}

.footer__list li + li { margin-top: 8px; }

.footer__list a {
  color: rgba(247,243,232,0.72);
  transition: color var(--transition);
}

.footer__list a:hover {
  color: var(--orange-soft);
}

.footer__address,
.footer__email,
.footer__phone {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(247,243,232,0.72);
}

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  align-items: baseline;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(247,243,232,0.54);
}

.footer__copyright,
.footer__icp { margin: 0; }

.footer__bottom {
  flex-basis: 100%;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255,255,255,0.12);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: rgba(247,243,232,0.6);
}

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

  .footer__columns {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
  }
}

@media (max-width: 760px) {
  .masthead__inner {
    padding: 12px 16px 0;
  }

  .masthead__bar {
    grid-template-columns: 1fr auto;
  }

  .masthead__coord,
  .masthead__ver { display: none; }

  .brand { justify-self: start; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin: 0;
    background: var(--deep-2);
    border-top: 1px solid var(--line-light);
    box-shadow: 0 18px 30px rgba(8,26,51,0.25);
  }

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

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    padding: 4px 0 10px;
  }

  .site-nav__item {
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .site-nav__link {
    display: block;
    padding: 13px 20px;
    border-radius: 0;
  }
}

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

/* ---------- Scroll & Motion ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  will-change: opacity, transform;
}

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

[data-scroll] {
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--orange) var(--mist-dim);
  -webkit-overflow-scrolling: touch;
}

[data-scroll] > * {
  scroll-snap-align: start;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

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

  [data-scroll] { scroll-behavior: auto; }
}
