/* ============================================================
   永兴路线指南 · 全站共享样式 /assets/site.css
   深海蓝基底 + 熔岩橙行动 + 电子青状态，切角面板与斜向轨迹
   ============================================================ */

:root {
  --ink-950: #04121F;
  --ink-900: #061A2E;
  --ink-800: #0B2540;
  --lava: #FF6A2B;
  --lava-soft: #FF9A5A;
  --cyan: #23E6D0;
  --cyan-deep: #0FA79A;
  --gold: #F2B441;
  --cloud: #EAF2F8;
  --mist: #9BB2C6;
  --line: rgba(35, 230, 208, .24);
  --line-strong: rgba(35, 230, 208, .48);
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace, monospace;
  --wrap: 1240px;
  --gut: clamp(16px, 4vw, 32px);
  --cut: 18px;
  --ease: cubic-bezier(.22, .68, 0, 1);
  --dur: 200ms;
}

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

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

body {
  margin: 0;
  min-height: 100%;
  background-color: var(--ink-900);
  background-image:
    radial-gradient(1200px 620px at 82% -12%, rgba(35, 230, 208, .10), transparent 66%),
    radial-gradient(900px 520px at 4% 10%, rgba(255, 106, 43, .08), transparent 62%);
  background-repeat: no-repeat;
  color: var(--cloud);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .5em;
  color: var(--cloud);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
}

h1 { font-size: clamp(32px, 5.4vw, 60px); }
h2 { font-size: clamp(24px, 3.2vw, 34px); letter-spacing: -.01em; }
h3 { font-size: clamp(18px, 2vw, 22px); letter-spacing: -.01em; }
h4 { font-size: 17px; letter-spacing: -.01em; }

p { margin: 0 0 1em; max-width: 68ch; }

a { color: var(--cyan); text-decoration: none; }
a:hover, a:focus { color: var(--lava-soft); }

strong { color: var(--cloud); font-weight: 700; }

ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: .35em; }

code, kbd, samp, pre { font-family: var(--mono); font-size: .92em; letter-spacing: .02em; }
code { padding: .12em .42em; color: var(--cyan); background: rgba(35, 230, 208, .10); border-radius: 3px; }
pre {
  padding: 16px 18px;
  overflow-x: auto;
  background: var(--ink-950);
  border: 1px solid var(--line);
  line-height: 1.7;
}

hr { border: 0; }

img { max-width: 100%; }

::selection { background: rgba(255, 106, 43, .38); color: #fff; }

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

.btn:focus-visible,
.yx-cta:focus-visible,
.yx-nav-toggle:focus-visible,
.yx-skip:focus-visible,
.chip:focus-visible,
.yx-status:focus-visible { outline-offset: -4px; }

/* ---------- 布局工具 ---------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.section { padding-block: clamp(48px, 7vw, 92px); }
.section--tight { padding-block: clamp(28px, 4vw, 48px); }

.section__head { max-width: 72ch; margin-bottom: clamp(22px, 3vw, 40px); }
.section__title { margin-bottom: .3em; }
.section__lead { margin-bottom: 0; font-size: 17px; color: var(--mist); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--lava);
  flex: none;
}

.grid { display: grid; gap: clamp(18px, 2.4vw, 30px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); }
.grid--split { grid-template-columns: 1fr; }
@media (min-width: 1000px) {
  .grid--split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
}

/* ---------- 切角面板与轨迹装饰 ---------- */

.cut {
  --cut: 18px;
  position: relative;
  padding: clamp(20px, 2.6vw, 30px);
  background-color: var(--ink-800);
  background-image: linear-gradient(158deg, rgba(35, 230, 208, .10), transparent 54%);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

.cut--lava { background-image: linear-gradient(158deg, rgba(255, 106, 43, .16), transparent 56%); }
.cut--cyan { background-image: linear-gradient(158deg, rgba(35, 230, 208, .18), transparent 58%); }

.cut > :last-child { margin-bottom: 0; }

.yx-rule {
  height: 2px;
  margin: clamp(28px, 4vw, 52px) 0;
  background: linear-gradient(90deg, transparent, var(--cyan) 10%, var(--lava) 90%, transparent);
  transform: skewX(-18deg);
  opacity: .5;
}

/* ---------- 按钮与标签 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: .85em 1.35em;
  border: 1px solid transparent;
  background: var(--lava);
  color: #0A1420;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover, .btn:focus { background: var(--lava-soft); color: #0A1420; transform: translateY(-1px); }

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--cloud);
}
.btn--ghost:hover, .btn--ghost:focus {
  background: rgba(35, 230, 208, .12);
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn--cyan { background: var(--cyan); color: #061A2E; }
.btn--cyan:hover, .btn--cyan:focus { background: var(--cyan-deep); color: #04121F; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  color: var(--cyan);
  background: rgba(35, 230, 208, .09);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1.2;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.chip--lava {
  color: var(--lava-soft);
  background: rgba(255, 106, 43, .12);
  border-color: rgba(255, 106, 43, .34);
}
.chip--gold {
  color: var(--gold);
  background: rgba(242, 180, 65, .12);
  border-color: rgba(242, 180, 65, .32);
}

/* ---------- 图片容器基座 ---------- */

.img-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: var(--ink-950);
  background-image:
    radial-gradient(120% 90% at 12% 8%, rgba(35, 230, 208, .16), transparent 60%),
    radial-gradient(90% 80% at 88% 96%, rgba(255, 106, 43, .14), transparent 62%),
    linear-gradient(150deg, #0B2540, #04121F);
  border: 1px solid var(--line);
  clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%, 0 22px);
}
.img-frame > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-frame--wide { aspect-ratio: 21 / 9; }
.img-frame--tall { aspect-ratio: 3 / 4; }
.img-frame--square { aspect-ratio: 1 / 1; }

.img-frame__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 18px 14px;
  color: var(--mist);
  background: linear-gradient(0deg, rgba(4, 18, 31, .94), rgba(4, 18, 31, 0));
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .02em;
  line-height: 1.5;
}

/* ---------- 面包屑 ---------- */

.breadcrumb { color: var(--mist); font-size: 13px; }
.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.breadcrumb__item { display: inline-flex; align-items: center; gap: 10px; margin: 0; }
.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: var(--cyan-deep);
  font-family: var(--mono);
}
.breadcrumb__link { color: var(--mist); font-weight: 600; }
.breadcrumb__link:hover, .breadcrumb__link:focus { color: var(--cyan); }
.breadcrumb__current { color: var(--cloud); font-weight: 700; }

/* ============================================================
   头部：居中刊头 + 下一行横向导航
   ============================================================ */

.yx-header {
  position: relative;
  z-index: 40;
  background: linear-gradient(180deg, var(--ink-950) 0%, var(--ink-900) 100%);
  border-bottom: 1px solid var(--line);
  color: var(--cloud);
}

.yx-skip {
  position: absolute;
  top: -120px;
  left: 50%;
  z-index: 60;
  padding: 12px 22px;
  transform: translateX(-50%);
  background: var(--cyan);
  color: var(--ink-950);
  font-size: 14px;
  font-weight: 700;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: top var(--dur) var(--ease);
}
.yx-skip:focus { top: 12px; color: var(--ink-950); outline-color: var(--ink-950); }

.yx-masthead { position: relative; }
.yx-masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 130% at 50% 0%, rgba(35, 230, 208, .10), transparent 70%),
    linear-gradient(100deg, transparent 28%, rgba(255, 106, 43, .07) 50%, transparent 72%);
}

.yx-masthead__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "status toggle"
    "brand brand";
  gap: 12px 16px;
  align-items: center;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(14px, 2.4vw, 22px) var(--gut);
}

.yx-status {
  grid-area: status;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 12px;
  color: var(--cyan);
  background: rgba(35, 230, 208, .08);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1;
  white-space: nowrap;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.yx-status__dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--lava);
  animation: yx-pulse 2.4s var(--ease) infinite;
}
@keyframes yx-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.78); }
}

.yx-brand { grid-area: brand; justify-self: center; text-align: center; }
.yx-brand__link {
  display: grid;
  gap: 3px;
  color: var(--cloud);
  text-decoration: none;
}
.yx-brand__link:hover, .yx-brand__link:focus { color: var(--cloud); }
.yx-brand__name {
  display: block;
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.05;
}
.yx-brand__line {
  display: block;
  color: var(--mist);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .14em;
}

.yx-utility { display: none; }
.yx-utility__link {
  color: var(--mist);
  font-size: 13.5px;
  font-weight: 600;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.yx-utility__link:hover, .yx-utility__link:focus {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.yx-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  background: var(--lava);
  color: #0A1420;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .01em;
  white-space: nowrap;
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.yx-cta:hover, .yx-cta:focus { background: var(--lava-soft); color: #0A1420; transform: translateY(-1px); }

.yx-nav-toggle {
  grid-area: toggle;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  background: rgba(35, 230, 208, .07);
  border: 1px solid var(--line);
  color: var(--cloud);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .04em;
  cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.yx-nav-toggle:hover, .yx-nav-toggle:focus { background: rgba(35, 230, 208, .15); color: var(--cyan); }

.yx-nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  flex: none;
  background: currentColor;
  transition: background var(--dur) var(--ease);
}
.yx-nav-toggle__bars::before,
.yx-nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform 220ms var(--ease), opacity 220ms var(--ease);
}
.yx-nav-toggle__bars::before { top: -5px; }
.yx-nav-toggle__bars::after { top: 5px; }

.yx-header[data-open="true"] .yx-nav-toggle__bars { background: transparent; }
.yx-header[data-open="true"] .yx-nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.yx-header[data-open="true"] .yx-nav-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }

.yx-navbar {
  max-height: 0;
  overflow: hidden;
  border-top: 1px solid transparent;
  background: linear-gradient(180deg, rgba(4, 18, 31, .96), rgba(11, 37, 64, .96));
  transition: max-height 280ms var(--ease), border-color var(--dur) var(--ease);
}
.yx-header[data-open="true"] .yx-navbar {
  max-height: min(72vh, 520px);
  overflow-y: auto;
  border-top-color: var(--line);
}

.yx-nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 10px var(--gut) 20px;
  list-style: none;
}

.yx-nav__item { margin: 0; }

.yx-nav__link {
  position: relative;
  display: block;
  padding: 12px 12px;
  color: var(--mist);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.yx-nav__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 3px;
  background: linear-gradient(90deg, var(--lava), var(--gold));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms var(--ease), opacity var(--dur) var(--ease);
}
.yx-nav__link:hover, .yx-nav__link:focus {
  color: var(--cloud);
  background: rgba(35, 230, 208, .06);
}
.yx-nav__link:hover::after, .yx-nav__link:focus::after { transform: scaleX(1); opacity: .55; }
.yx-nav__link[aria-current="page"] { color: var(--cloud); background: rgba(255, 106, 43, .09); }
.yx-nav__link[aria-current="page"]::after { transform: scaleX(1); opacity: 1; }

@media (min-width: 960px) {
  .yx-masthead__inner {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "status brand utility";
    gap: 20px;
    padding-block: 22px 18px;
  }
  .yx-brand { justify-self: center; }
  .yx-utility {
    grid-area: utility;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .yx-nav-toggle { display: none; }
  .yx-navbar {
    max-height: none;
    overflow: visible;
    background: transparent;
    border-top: 1px solid var(--line);
  }
  .yx-nav__list {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(4px, 1.6vw, 26px);
    padding: 8px var(--gut) 10px;
  }
  .yx-nav__link { padding: 12px 6px; }
  .yx-nav__link::after { left: 6px; right: 6px; bottom: 4px; }
}

/* ============================================================
   页脚：极夜渐变尾
   ============================================================ */

.yx-footer {
  position: relative;
  background: linear-gradient(180deg, var(--ink-900) 0%, var(--ink-950) 100%);
  border-top: 1px solid var(--line);
  color: var(--mist);
}
.yx-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan) 18%, var(--lava) 82%, transparent);
  opacity: .6;
}

.yx-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 3vw, 36px);
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(36px, 5vw, 64px) var(--gut) clamp(24px, 3vw, 36px);
}

.yx-footer__brand { grid-column: 1 / -1; }
.yx-footer__logo {
  margin: 0 0 6px;
  color: var(--cloud);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.3;
}
.yx-footer__tagline {
  margin: 0 0 14px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
}
.yx-footer__note {
  margin: 0;
  max-width: 34ch;
  color: var(--mist);
  font-size: 13px;
  line-height: 1.7;
}

.yx-footer__col { min-width: 0; }

.yx-footer__title {
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--cloud);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .1em;
}

.yx-footer__list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.yx-footer__list li { margin: 0; }

.yx-footer__link {
  display: inline-block;
  color: var(--mist);
  font-size: 13.5px;
  font-weight: 500;
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.yx-footer__link:hover, .yx-footer__link:focus {
  color: var(--cyan);
  transform: translateX(5px);
}

.yx-footer__legal {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 18px var(--gut) clamp(26px, 3vw, 40px);
  border-top: 1px solid var(--line);
  color: var(--mist);
  font-size: 12.5px;
}
.yx-footer__legal-line {
  margin: 0;
  max-width: none;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .02em;
  line-height: 1.7;
}
.yx-footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}
.yx-footer__legal-link {
  color: var(--mist);
  font-size: 12.5px;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.yx-footer__legal-link:hover, .yx-footer__legal-link:focus {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

@media (min-width: 640px) {
  .yx-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .yx-footer__grid {
    grid-template-columns: 1.6fr repeat(5, minmax(0, 1fr));
    gap: clamp(22px, 2.4vw, 34px);
  }
  .yx-footer__brand { grid-column: auto; }
}

/* ---------- 阅读进度条（由 JS 注入） ---------- */

.yx-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--lava));
  pointer-events: none;
}

/* ---------- 滚动显现协议 ---------- */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
}
html.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 减弱动效 ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  html.js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .yx-progress { display: none; }
  .yx-nav-toggle__bars::before,
  .yx-nav-toggle__bars::after { transition: none !important; }
}
