/* ============================================================
   开全主站 · 共享样式 / assets/site.css
   时段核定调度系统 —— 深靛夜底 + 荧光青锚点
   ============================================================ */

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

html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, figcaption, blockquote, dl, dd, dt { margin: 0; padding: 0; }

ul, ol { list-style: none; }

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

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

button { background: none; border: 0; cursor: pointer; }

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

table { border-collapse: collapse; width: 100%; }

/* ---------- 2. Tokens ---------- */
:root {
  --ink: #0B1230;
  --panel: #16204A;
  --line: #2C3A6E;
  --cyan: #23E6C8;
  --cyan-lift: #4FF0D8;
  --amber: #FF9A3C;
  --magenta: #FF3D7F;
  --cloud: #F2F5FF;
  --slate: #9AA6C9;
  --deep: #05070F;
  --paper: #E9EDF7;
  --on-paper: #0B1230;

  --font-display: "Inter Tight", "Archivo Narrow", "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --frame-w: 16.5rem;
  --pad: clamp(1rem, 4vw, 1.6rem);
  --shell: 68rem;
  --shell-pad: clamp(1.1rem, 5vw, 3.5rem);

  --cut: 12px;
  --shadow-float: 0 14px 36px -16px rgba(5, 7, 15, .9);

  --ease: cubic-bezier(.2, .72, .24, 1);
  --dur: .4s;

  /* 时段功能色：由 data-daypart 改写 */
  --part: #FF9A3C;
  --part-soft: rgba(255, 154, 60, .14);
}

html[data-daypart="day"] {
  --part: #FF9A3C;
  --part-soft: rgba(255, 154, 60, .14);
}

html[data-daypart="night"] {
  --part: #23E6C8;
  --part-soft: rgba(35, 230, 200, .14);
}

/* ---------- 3. Base ---------- */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(44, 58, 110, .28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44, 58, 110, .18) 1px, transparent 1px);
  background-size: 100% 32px, 64px 100%;
  color: var(--cloud);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--cloud);
}

h1 { font-size: clamp(2.6rem, 6vw, 5.4rem); font-weight: 900; }
h2 { font-size: clamp(1.8rem, 3.4vw, 3rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; letter-spacing: 0; }

p { max-width: 68ch; }

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

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

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

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

#main-content { display: block; scroll-margin-top: 5.5rem; }

/* ---------- 4. Utilities ---------- */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -.01em;
  font-weight: 500;
}

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

.stack { display: flex; flex-direction: column; gap: clamp(1rem, 2.4vw, 1.75rem); }
.stack--tight { gap: .75rem; }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--part);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  flex: none;
}

.lede {
  font-size: clamp(1.02rem, 1.5vw, 1.15rem);
  line-height: 1.85;
  color: var(--slate);
  max-width: 60ch;
}

.note {
  font-size: .875rem;
  line-height: 1.75;
  color: var(--slate);
}

/* ---------- 5. Panels ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--cut);
  padding: clamp(1.1rem, 3vw, 1.9rem);
}

.cut-panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: clamp(1.15rem, 3vw, 2rem);
  clip-path: polygon(
    0 0,
    calc(100% - 20px) 0,
    100% 20px,
    100% 100%,
    20px 100%,
    0 calc(100% - 20px)
  );
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .72rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--cut);
  background: transparent;
  color: var(--cloud);
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .01em;
  text-align: center;
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}

.btn:hover { transform: translateY(-2px); }

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

.btn--primary:hover {
  background: var(--cyan-lift);
  border-color: var(--cyan-lift);
}

.btn--ghost { background: transparent; }

.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(35, 230, 200, .08);
}

.btn--block { width: 100%; }

/* ---------- 7. Breadcrumbs ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  padding-block: 1.4rem;
  font-family: var(--font-mono);
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--slate);
}

.crumbs a { transition: color var(--dur) var(--ease); }
.crumbs a:hover { color: var(--cyan); }

.crumbs__sep { color: var(--line); }

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

/* ---------- 8. Media containers ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--cut);
  background:
    linear-gradient(150deg, rgba(35, 230, 200, .10), transparent 55%),
    linear-gradient(0deg, var(--deep), var(--panel));
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(44, 58, 110, .55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44, 58, 110, .55) 1px, transparent 1px);
  background-size: 100% 28px, 28px 100%;
  opacity: .55;
}

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

.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }

.media__tag {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 2;
  padding: .3rem .6rem;
  background: var(--deep);
  border: 1px solid var(--cyan);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .08em;
  color: var(--cyan);
}

.media__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 1.6rem 1rem .85rem;
  background: linear-gradient(to top, rgba(5, 7, 15, .92), transparent);
  font-size: .8125rem;
  line-height: 1.6;
  color: var(--slate);
}

/* ---------- 9. Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .55rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .06em;
  line-height: 1.6;
  color: var(--slate);
  white-space: nowrap;
}

.badge--day { border-color: var(--amber); color: var(--amber); }
.badge--night { border-color: var(--cyan); color: var(--cyan); }
.badge--rush { border-color: var(--magenta); color: var(--magenta); }
.badge--done { border-color: var(--line); color: var(--cloud); }

/* ---------- 10. Skip link ---------- */
.skip-link {
  position: fixed;
  left: 50%;
  top: 0;
  z-index: 300;
  padding: .75rem 1.2rem;
  background: var(--cyan);
  color: var(--deep);
  font-size: .875rem;
  font-weight: 700;
  border-radius: 0 0 var(--cut) var(--cut);
  transform: translate(-50%, -140%);
  transition: transform .25s var(--ease);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* ---------- 11. Header / frame ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--deep);
  border-bottom: 1px solid var(--line);
  color: var(--cloud);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "status status"
    "brand  toggle"
    "nav    nav"
    "actions actions";
  align-items: center;
}

/* 11a. 状态条 */
.frame-status {
  grid-area: status;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .45rem var(--pad);
  border-bottom: 1px solid var(--line);
  font-size: .6875rem;
  line-height: 1.5;
  color: var(--slate);
}

.frame-status__pulse {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--part);
  box-shadow: 0 0 0 3px var(--part-soft);
}

.frame-status__text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 .5rem;
  flex: 1 1 auto;
  min-width: 0;
}

.frame-status__text .mono {
  font-size: .6875rem;
  color: var(--part);
}

.frame-status__label { color: var(--slate); }

.daypart {
  display: flex;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.daypart__btn {
  padding: .22rem .55rem;
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .04em;
  color: var(--slate);
  background: transparent;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.daypart__btn:hover { color: var(--cloud); }

.daypart__btn[aria-pressed="true"] {
  background: var(--part);
  color: var(--deep);
}

/* 11b. 品牌 */
.brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .85rem var(--pad);
  min-width: 0;
}

.brand__mark {
  display: grid;
  grid-template-columns: repeat(3, 4px);
  align-items: end;
  gap: 3px;
  width: 18px;
  height: 26px;
  flex: none;
}

.brand__mark i {
  display: block;
  border-radius: 1px;
  background: var(--cyan);
}

.brand__mark i:nth-child(1) { height: 42%; }
.brand__mark i:nth-child(2) { height: 100%; }
.brand__mark i:nth-child(3) { height: 66%; background: var(--amber); }

.brand__text {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
  color: var(--cloud);
}

.brand__sub {
  font-size: .625rem;
  letter-spacing: .1em;
  color: var(--slate);
  line-height: 1.3;
}

/* 11c. 移动导航按钮 */
.nav-toggle {
  grid-area: toggle;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-right: var(--pad);
  padding: .45rem .3rem;
  color: var(--cloud);
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .06em;
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 20px;
  height: 12px;
  flex: none;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease), top var(--dur) var(--ease), bottom var(--dur) var(--ease);
}

.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }

.site-header[data-open] .nav-toggle__bars::before { top: 5px; transform: rotate(45deg); }
.site-header[data-open] .nav-toggle__bars::after { bottom: 5px; transform: rotate(-45deg); }

/* 11d. 框架导航 */
.frame-nav {
  grid-area: nav;
  position: relative;
  display: none;
  padding: .5rem 0;
  border-top: 1px solid var(--line);
  background: var(--deep);
}

.site-header[data-open] .frame-nav { display: block; }

.frame-nav__rail {
  position: absolute;
  right: 0;
  top: 0;
  width: 2px;
  height: 0;
  background: var(--part);
  box-shadow: 0 0 10px var(--part-soft);
  pointer-events: none;
}

.frame-nav__list {
  display: flex;
  flex-direction: column;
}

.frame-nav__item { display: block; }

.frame-nav__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: .7rem;
  padding: .62rem var(--pad) .62rem calc(var(--pad) + .5rem);
  color: var(--slate);
  font-size: .9375rem;
  line-height: 1.5;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.frame-nav__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45rem;
  bottom: .45rem;
  width: 3px;
  background: var(--cyan);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--dur) var(--ease);
}

.frame-nav__link:hover {
  color: var(--cloud);
  background: rgba(35, 230, 200, .06);
}

.frame-nav__link[aria-current="page"] {
  color: var(--cloud);
  background: linear-gradient(90deg, rgba(35, 230, 200, .16), transparent 72%);
}

.frame-nav__link[aria-current="page"]::before { transform: scaleY(1); }

.frame-nav__tick {
  flex: none;
  min-width: 3.4em;
  font-size: .6875rem;
  letter-spacing: .04em;
  color: var(--slate);
  opacity: .6;
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.frame-nav__link[aria-current="page"] .frame-nav__tick {
  color: var(--cyan);
  opacity: 1;
}

.frame-nav__label { flex: 1 1 auto; }

/* 11e. 框架行动区 */
.frame-actions {
  grid-area: actions;
  display: none;
  flex-direction: column;
  gap: .5rem;
  padding: var(--pad);
  border-top: 1px solid var(--line);
}

.site-header[data-open] .frame-actions { display: flex; }

/* ---------- 12. Footer ---------- */
.site-footer {
  margin-top: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 1.4rem;
  background: var(--deep);
  border-top: 1px solid var(--line);
  color: var(--slate);
}

.footer-grid {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem 1.5rem;
}

.footer-col--brand { max-width: 28rem; }

.brand--footer {
  padding: 0 0 1rem;
  gap: .6rem;
}

.footer-note {
  font-size: .8125rem;
  line-height: 1.7;
  color: var(--slate);
  max-width: 34ch;
}

.footer-note--mono {
  margin-top: .55rem;
  font-size: .75rem;
  letter-spacing: .02em;
  color: var(--line);
  color: #46578f;
}

.footer-col__title {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .95rem;
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1.4;
  color: var(--cyan);
}

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

.footer-list {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.footer-list a {
  display: inline-block;
  font-size: .875rem;
  line-height: 1.6;
  color: var(--slate);
  background-image: linear-gradient(var(--cyan), var(--cyan));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size var(--dur) var(--ease), color var(--dur) var(--ease);
}

.footer-list a:hover {
  color: var(--cloud);
  background-size: 100% 1px;
}

.footer-list__plain {
  font-size: .8125rem;
  line-height: 1.6;
  color: var(--slate);
  word-break: break-all;
}

.footer-base {
  max-width: var(--shell);
  margin: 2.5rem auto 0;
  padding: 1.1rem var(--shell-pad) 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  justify-content: space-between;
  align-items: baseline;
  font-size: .75rem;
  line-height: 1.7;
  color: var(--slate);
}

.footer-base__copy { max-width: 52ch; }
.footer-base__icp { color: #46578f; }

/* ---------- 13. Reveal ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}

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

/* ---------- 14. Tablet ---------- */
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-col--brand { grid-column: 1 / -1; }
}

/* ---------- 15. Desktop frame ---------- */
@media (min-width: 1024px) {
  body { padding-left: var(--frame-w); }

  #main-content { scroll-margin-top: 1.5rem; }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--frame-w);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .frame-status {
    flex-wrap: wrap;
    padding: .55rem var(--pad);
    gap: .45rem;
  }

  .frame-status__text { flex: 1 1 100%; }

  .daypart { margin-left: auto; }

  .brand { padding: 1.1rem var(--pad); }

  .nav-toggle { display: none; }

  .frame-nav {
    display: block;
    flex: 1 1 auto;
    border-top: 1px solid var(--line);
  }

  .frame-actions {
    display: flex;
    margin-top: auto;
  }

  .footer-grid {
    grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr));
    gap: 2.5rem 1.75rem;
  }

  .footer-col--brand { grid-column: auto; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

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

  .btn:hover,
  .frame-nav__link:hover {
    transform: none;
  }
}
