/* =========================================================
   四季中心 · 共享样式 /assets/site.css
   观测站秩序感：直角、细线、24px 网格、季节色环
   ========================================================= */

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

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

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

ul, ol { list-style: none; }

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

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

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

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

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

::selection { background: #E2542C; color: #FFFFFF; }

/* ---------- 2. 变量 ---------- */
:root {
  --spring: #6FBF9E;
  --summer: #1E7F72;
  --autumn: #C98A2E;
  --winter: #A9B6BD;
  --spring-ink: #3C8267;
  --summer-ink: #1E7F72;
  --autumn-ink: #945F12;
  --winter-ink: #5A6A72;
  --signal: #E2542C;
  --signal-dark: #C4431F;
  --ink: #11302A;
  --deep: #0C2B24;
  --paper: #F6F3EC;
  --paper-2: #EFEAE0;
  --line: #D9D3C7;
  --muted: #55635D;
  --shell: 1240px;
  --rail: 64px;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, rgba(217, 211, 199, .55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(217, 211, 199, .55) 1px, transparent 1px);
  background-size: 24px 24px;
  min-height: 100vh;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.3; }

p { max-width: 68ch; }

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.page-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--ink);
}

.section-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.3;
  color: var(--ink);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--muted);
}

.lede {
  font-size: 17px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 62ch;
}

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

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

/* ---------- 4. 布局 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 20px;
}

.band { padding: 64px 0; position: relative; }
.band--tight { padding: 40px 0; }
.band--paper { background: var(--paper); }
.band--deep { background: var(--deep); color: #E9E5DC; }
.band--deep .section-title,
.band--deep .page-title { color: #F6F3EC; }
.band--deep .lede { color: #B9C4C0; }

.split {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.split__rail {
  position: sticky;
  top: 132px;
  align-self: start;
  border-top: 2px solid var(--ink);
  padding-top: 14px;
}

.split__main { min-width: 0; }

.grid { display: grid; gap: 20px; }
.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)); }

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: 0;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}

.btn--signal { background: var(--signal); color: #FFFFFF; }
.btn--signal:hover { background: var(--signal-dark); }
.btn--ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- 6. 页头 ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 120;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  font-size: 14px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 10px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-seasons { display: flex; height: 4px; }
.header-seasons__band { flex: 1 1 0; }
.header-seasons__band--spring { background: var(--spring); }
.header-seasons__band--summer { background: var(--summer); }
.header-seasons__band--autumn { background: var(--autumn); }
.header-seasons__band--winter { background: var(--winter); }

.header-bar {
  position: relative;
  z-index: 2;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--paper);
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }

.brand__seal {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}
.brand__seal i { display: block; }
.brand__seal i:nth-child(1) { background: var(--spring); }
.brand__seal i:nth-child(2) { background: var(--summer); }
.brand__seal i:nth-child(3) { background: var(--autumn); }
.brand__seal i:nth-child(4) { background: var(--winter); }

.brand__text { display: flex; flex-direction: column; line-height: 1.3; }
.brand__name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .02em;
}
.brand__sig { font-size: 12px; color: var(--muted); letter-spacing: .02em; }

.header-actions { display: flex; align-items: center; gap: 12px; }

.header-version {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--muted);
  background: var(--paper-2);
  border: 1px solid var(--line);
  max-width: none;
}
.header-version__label { letter-spacing: .06em; }
.header-version b { font-size: 13px; color: var(--ink); }

.header-cta { white-space: nowrap; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  font-size: 14px;
  color: var(--ink);
  border: 1px solid var(--ink);
  background: transparent;
}
.nav-toggle__bars { position: relative; display: block; width: 16px; height: 10px; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--ink);
}
.nav-toggle__bars::before { top: 1px; }
.nav-toggle__bars::after { bottom: 1px; }
.nav-toggle__text { letter-spacing: .06em; }

.site-nav {
  position: relative;
  z-index: 2;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.site-nav__list {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.site-nav__item { border-right: 1px solid var(--line); }
.site-nav__item:first-child { border-left: 1px solid var(--line); }

.site-nav__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 13px 14px;
  font-size: 15px;
  color: var(--muted);
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.site-nav__link:hover,
.site-nav__link:focus-visible { color: var(--ink); background: var(--paper-2); }

.site-nav__index { font-size: 12px; color: #9AA5A0; }
.site-nav__label { letter-spacing: .02em; }

.site-nav__link[aria-current="page"] { color: var(--ink); }
.site-nav__link[aria-current="page"] .site-nav__index { color: var(--signal); }
.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 3px;
  background: var(--signal);
}

.site-nav__tip {
  position: absolute;
  top: 100%;
  left: 0;
  padding: 5px 9px;
  font-size: 11px;
  color: var(--paper);
  background: var(--ink);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s var(--ease), visibility .18s var(--ease);
}
.site-nav__link:hover .site-nav__tip,
.site-nav__link:focus-visible .site-nav__tip { opacity: 1; visibility: visible; }

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(12, 43, 36, .55);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s var(--ease), visibility .2s var(--ease);
}
.nav-scrim[data-open] { opacity: 1; visibility: visible; }

.season-rail { display: none; }

.scroll-progress {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  z-index: 70;
  pointer-events: none;
}
.scroll-progress__bar {
  display: block;
  height: 100%;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.site-header.is-condensed { border-bottom-color: var(--winter); }

/* ---------- 7. 页脚 ---------- */
.site-footer {
  background: var(--deep);
  color: #E7E3D9;
  margin-top: 80px;
}

.footer-frame {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 56px 20px 40px;
  display: grid;
  grid-template-columns: 1.1fr 1.7fr 1fr;
  gap: 40px;
}

.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-brand__name {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  color: #F6F3EC;
  letter-spacing: .04em;
}
.footer-brand__sig { font-size: 14px; color: #A9B6BD; max-width: 30ch; }
.footer-brand__meta { font-size: 12px; color: #7E908A; }

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-col { display: flex; flex-direction: column; }
.footer-col__title {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .14em;
  color: var(--winter);
  margin-bottom: 14px;
}
.footer-col__list { display: grid; gap: 10px; }

.footer-link {
  display: inline-block;
  font-size: 15px;
  color: #D7D3C8;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.footer-link:hover,
.footer-link:focus-visible { color: #FFFFFF; border-bottom-color: var(--signal); }

.footer-contact { display: flex; flex-direction: column; }
.footer-contact__line {
  font-size: 14px;
  line-height: 1.9;
  color: #C6CFCB;
  max-width: 34ch;
}

.footer-legal {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 18px 20px 26px;
  border-top: 1px solid rgba(233, 229, 220, .16);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  font-size: 13px;
  color: #A9B6BD;
}
.footer-legal__line { max-width: none; }

.footer-seasons { display: flex; height: 8px; }
.footer-seasons__band { flex: 1 1 0; }
.footer-seasons__band--spring { background: var(--spring); }
.footer-seasons__band--summer { background: var(--summer); }
.footer-seasons__band--autumn { background: var(--autumn); }
.footer-seasons__band--winter { background: var(--winter); }

/* ---------- 8. 通用内容组件 ---------- */
.breadcrumb { padding: 18px 0; }
.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb__list li + li::before {
  content: "/";
  margin-right: 10px;
  color: var(--line);
}
.breadcrumb__list a { border-bottom: 1px solid var(--line); }

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0;
}
.card--deep {
  background: var(--deep);
  color: #E9E5DC;
  border-color: rgba(169, 182, 189, .32);
}
.card__title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}
.card__meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.card--deep .card__meta { color: var(--winter); }
.card__body { font-size: 16px; line-height: 1.75; color: var(--muted); }
.card--deep .card__body { color: #C6CFCB; }

.season-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 12px;
  border: 1px solid currentColor;
  border-radius: 0;
}
.season-tag--spring { color: var(--spring-ink); }
.season-tag--summer { color: var(--summer-ink); }
.season-tag--autumn { color: var(--autumn-ink); }
.season-tag--winter { color: var(--winter-ink); }

.version-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--autumn-ink);
  border: 1px solid var(--autumn);
}

.step-list { display: grid; }
.step {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.step__no {
  font-family: var(--mono);
  font-size: 20px;
  line-height: 1.2;
  color: var(--signal);
}
.step__title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 6px;
}
.step__body { font-size: 16px; line-height: 1.75; color: var(--muted); }

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.check-item__btn {
  position: relative;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 4px;
  border: 1px solid var(--muted);
  background: transparent;
  transition: background-color .18s var(--ease), border-color .18s var(--ease);
}
.check-item__btn[aria-pressed="true"] {
  background: var(--signal);
  border-color: var(--signal);
}
.check-item__btn[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #FFFFFF;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.check-item__text { font-size: 16px; line-height: 1.75; }
.check-item.is-done .check-item__text { color: var(--muted); }

.season-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.season-filter__btn {
  padding: 6px 13px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  transition: color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}
.season-filter__btn:hover { color: var(--ink); border-color: var(--ink); }
.season-filter__btn[aria-pressed="true"] {
  color: var(--ink);
  background: var(--paper-2);
  border-color: var(--ink);
}
.season-filter__btn[aria-pressed="true"]::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  background: var(--signal);
  vertical-align: 1px;
}

[data-reveal].is-filtered-out { display: none !important; }

/* ---------- 9. 图片容器 ---------- */
.media { display: block; }
.media__frame {
  position: relative;
  padding: 12px;
  background: var(--deep);
  border: 1px solid var(--line);
  border-radius: 0;
}
.media__img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0;
}
.media__ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #E8E3D8;
  background-image:
    linear-gradient(to right, rgba(217, 211, 199, .9) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(217, 211, 199, .9) 1px, transparent 1px);
  background-size: 24px 24px;
}
.media__ph::after {
  content: attr(data-label);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--muted);
  padding: 4px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.media__caption {
  padding: 10px 2px 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.media--wide .media__img,
.media--wide .media__ph { aspect-ratio: 21 / 9; }

/* ---------- 10. 动效 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .24s var(--ease), transform .24s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 11. 响应式 ---------- */
@media (max-width: 1099px) {
  .split { gap: 36px; }
  .split__rail { position: static; }
}

@media (max-width: 1023px) {
  .footer-frame { grid-template-columns: 1fr 1fr; }
  .footer-contact { grid-column: 1 / -1; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(86vw, 340px);
    z-index: 58;
    padding: 84px 0 24px;
    overflow-y: auto;
    background: var(--deep);
    border-top: 0;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .24s var(--ease), visibility .24s var(--ease);
  }
  .site-nav[data-open] { transform: none; visibility: visible; }

  .site-nav__list {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }
  .site-nav__item,
  .site-nav__item:first-child {
    border-left: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(233, 229, 220, .14);
  }
  .site-nav__item:first-child { border-top: 1px solid rgba(233, 229, 220, .14); }

  .site-nav__link {
    padding: 16px 6px;
    font-size: 16px;
    color: #D7D3C8;
  }
  .site-nav__link:hover,
  .site-nav__link:focus-visible { background: rgba(233, 229, 220, .07); color: #FFFFFF; }
  .site-nav__link[aria-current="page"] { color: #FFFFFF; box-shadow: inset 3px 0 0 var(--signal); }
  .site-nav__link[aria-current="page"]::after { display: none; }
  .site-nav__index { color: var(--winter); }

  .site-nav__tip {
    position: static;
    margin-left: auto;
    padding: 0;
    font-size: 11px;
    color: var(--winter);
    background: transparent;
    opacity: 1;
    visibility: visible;
  }

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

@media (max-width: 719px) {
  .header-version { display: none; }
  .brand__sig { display: none; }
  .band { padding: 44px 0; }
}

@media (max-width: 639px) {
  .footer-frame { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
  .footer-legal { flex-direction: column; }
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: 1fr; }
  .header-cta { padding: 10px 13px; font-size: 14px; }
}

@media (min-width: 1100px) {
  body { padding-left: var(--rail); }
  .season-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--rail);
    z-index: 1;
    background: var(--paper);
    border-right: 1px solid var(--line);
  }
  .season-rail__word {
    font-family: var(--serif);
    font-size: 13px;
    letter-spacing: .3em;
    color: var(--muted);
    writing-mode: vertical-rl;
  }
  .season-rail__dot {
    display: block;
    width: 10px;
    height: 10px;
    border: 1px solid var(--line);
  }
  .season-rail__dot--spring { background: var(--spring); }
  .season-rail__dot--summer { background: var(--summer); }
  .season-rail__dot--autumn { background: var(--autumn); }
  .season-rail__dot--winter { background: var(--winter); }
}

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