/* ==========================================================================
   28圈指南 · 共享样式 /assets/site.css
   ========================================================================== */

:root {
  --ochre: #B8552F;
  --ochre-deep: #7A3521;
  --loess: #D9A441;
  --sand: #F2E3C9;
  --paper: #FAF4E8;
  --teal: #0F6F6C;
  --teal-deep: #0B5654;
  --teal-soft: #9FD3CB;
  --ink: #241E18;
  --ember: #E57A3C;
  --signal: #F2C14E;

  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  --rail-w: 84px;
  --wrap: 1180px;
  --gutter: 24px;
  --radius: 3px;

  --border: 2px solid var(--ink);
  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-mid: 4px 4px 0 var(--ink);
  --ease: cubic-bezier(.2, .75, .3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 140px;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; }
figure { margin: 0; }
button { font: inherit; color: inherit; }
a { color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--ochre); }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.site-footer :focus-visible { outline-color: var(--signal); }

::selection { background: var(--loess); color: var(--ink); }

/* ---------- 排版与区块 ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: .01em;
  margin: 0 0 .6em;
}
h1 { font-size: 40px; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }

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

.section { padding: 56px 0; }
.section--sand { background: var(--sand); }
.section--loess { background: var(--loess); }
.section--narrow { max-width: 780px; margin: 0 auto; }

.prose { max-width: 40em; }
.prose h2 { font-size: 28px; margin-top: 1.5em; }
.prose h3 { font-size: 20px; margin-top: 1.4em; }
.prose li { margin-bottom: .35em; }

.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--ochre);
}

.lead {
  font-size: 18px;
  line-height: 1.8;
  color: #4b3f34;
  max-width: 34em;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--loess);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
  text-decoration: none;
  box-shadow: var(--shadow-mid);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
}
.btn:hover {
  background: var(--signal);
  color: var(--ink);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.btn-cta { background: var(--teal); color: var(--paper); }
.btn-cta:hover { background: var(--teal-deep); color: var(--paper); }

.btn-quiet { background: var(--paper); }
.btn-quiet:hover { background: var(--sand); }

/* ---------- 卡片 / 标签 / 栅格 ---------- */
.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)); }

.card {
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-mid);
  padding: 22px;
}
.card--sand { background: var(--sand); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--sand);
  color: var(--ink);
}
.tag--teal { background: var(--teal-soft); }
.tag--loess { background: var(--signal); }
.tag--ochre { background: var(--ochre); color: var(--paper); }

/* ---------- 面包屑 ---------- */
.breadcrumbs { padding: 14px 0 6px; font-size: 13px; }
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.breadcrumb-item { display: flex; align-items: center; gap: 8px; color: #6b5847; }
.breadcrumb-item + .breadcrumb-item::before {
  content: "／";
  color: var(--ochre);
  font-weight: 700;
}
.breadcrumb-link { color: var(--teal); font-weight: 700; text-decoration: none; }
.breadcrumb-link:hover { color: var(--ochre); text-decoration: underline; }
.breadcrumb-current { color: var(--ink); font-weight: 700; }

/* ---------- 图片容器基础规则 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-mid);
  background: var(--sand);
}
.media > img,
.media > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--wide { aspect-ratio: 16 / 9; }
.media--square { aspect-ratio: 1 / 1; }
.media--tall { aspect-ratio: 3 / 4; }
.media--strip { aspect-ratio: 21 / 9; }
.media--placeholder {
  background-image: repeating-linear-gradient(45deg, rgba(184, 85, 47, .13) 0 10px, transparent 10px 20px);
}
.media-caption {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: .04em;
  color: #6b5847;
}

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: 24px;
  top: -72px;
  z-index: 200;
  padding: 10px 20px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; color: var(--paper); }

/* ---------- 品牌轨道 ---------- */
.rail {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 90;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 24px;
  background: var(--ochre);
  color: var(--paper);
  border-right: 3px solid var(--ink);
}
.rail-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid var(--paper);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: -.02em;
}
.rail-word {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .32em;
  color: var(--paper);
}
.rail-dots { display: flex; flex-direction: column; gap: 10px; }
.rail-dot {
  width: 9px;
  height: 9px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  display: block;
}
.rail-dot.is-active { background: var(--signal); border-color: var(--signal); }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--paper);
  border-bottom: var(--border);
}

.header-strip {
  background: var(--sand);
  border-bottom: 1px solid rgba(36, 30, 24, .22);
  font-size: 12px;
}
.strip-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 5px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.strip-note {
  margin: 0;
  color: #6f5b49;
  letter-spacing: .14em;
}
.utility-list { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.utility-link {
  color: var(--teal);
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}
.utility-link:hover { color: var(--ochre); border-bottom-color: var(--ochre); }

.header-bar {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  background: var(--ochre);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -.02em;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.brand-text { display: block; }
.brand-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: .08em;
  line-height: 1.2;
}
.brand-tagline {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  letter-spacing: .12em;
  color: #6b5847;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  background: var(--loess);
  border: var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .08em;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease), transform .16s var(--ease), box-shadow .16s var(--ease);
}
.nav-toggle:hover { background: var(--signal); }
.nav-toggle:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.nav-toggle[aria-expanded="true"] {
  background: var(--ochre);
  color: var(--paper);
}
.nav-toggle-bars { display: grid; gap: 3px; width: 16px; }
.nav-toggle-bars > span {
  display: block;
  height: 2px;
  background: currentColor;
}
.nav-toggle-label { line-height: 1; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-link {
  display: block;
  padding: 6px 10px;
  border: 2px solid transparent;
  border-radius: 2px;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.25;
  transition: background .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.nav-label { display: block; font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.nav-note {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: .1em;
  color: #7c6a58;
}
.nav-link:hover { background: var(--sand); border-color: var(--ink); color: var(--ink); }
.nav-link:hover .nav-note { color: var(--ochre-deep); }
.nav-link[aria-current="page"] {
  background: var(--loess);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.nav-link[aria-current="page"] .nav-note { color: var(--ochre-deep); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 18px;
  border-left: 2px solid rgba(36, 30, 24, .18);
}

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  background: var(--ember);
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
  pointer-events: none;
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  border-top: 8px solid var(--ochre);
  font-size: 14px;
}
.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 52px var(--gutter) 26px;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 48px;
  align-items: start;
}
.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--paper);
}
.footer-brand-link:hover { color: var(--paper); }
.footer-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: var(--ochre);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  border: 2px solid var(--paper);
  box-shadow: 4px 4px 0 rgba(250, 244, 232, .22);
}
.footer-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: .08em;
}
.footer-summary {
  margin: 18px 0 22px;
  max-width: 32em;
  line-height: 1.85;
  color: rgba(250, 244, 232, .74);
}
.footer-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--loess);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ochre-deep);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.footer-tag:hover {
  background: var(--signal);
  color: var(--ink);
  transform: translate(-1px, -1px);
  box-shadow: 7px 7px 0 var(--ochre-deep);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.footer-col-title {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--loess);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(250, 244, 232, .22);
}
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-link {
  color: rgba(250, 244, 232, .82);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.footer-link:hover { color: var(--signal); border-bottom-color: var(--signal); }

.footer-contact {
  margin-top: 40px;
  padding: 20px 22px;
  display: grid;
  gap: 10px;
  border: 2px dashed rgba(250, 244, 232, .28);
  background: rgba(250, 244, 232, .05);
}
.footer-contact-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 14px;
  color: rgba(250, 244, 232, .9);
}
.contact-key {
  min-width: 4.6em;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--teal-soft);
}
.contact-value { font-weight: 500; word-break: break-word; }
.copy-btn {
  padding: 2px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(250, 244, 232, .5);
  border-radius: 999px;
  cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.copy-btn:hover { background: rgba(250, 244, 232, .16); border-color: var(--paper); }
.copy-btn[data-state="copied"] {
  background: var(--teal-soft);
  color: var(--ink);
  border-color: var(--teal-soft);
}
.footer-contact-note {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(250, 244, 232, .6);
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  border-top: 2px solid rgba(250, 244, 232, .16);
  font-size: 12px;
  color: rgba(250, 244, 232, .6);
}
.footer-legal { margin: 0; letter-spacing: .04em; }
.footer-legal-links { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; margin: 0; padding: 0; }
.footer-legal-link { color: rgba(250, 244, 232, .68); text-decoration: none; }
.footer-legal-link:hover { color: var(--signal); }

/* ---------- 进入显现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
  .rail { display: flex; }
  .skip-link { left: calc(var(--rail-w) + 20px); }
}

@media (min-width: 1024px) and (max-width: 1200px) {
  .nav-note { display: none; }
  .nav-link { padding: 8px 9px; }
  .nav-actions { padding-left: 14px; }
}

@media (max-width: 1023px) {
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }

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

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px var(--gutter) 22px;
    background: var(--sand);
    border-bottom: var(--border);
    box-shadow: 0 14px 26px rgba(36, 30, 24, .18);
    max-height: calc(100vh - 140px);
    overflow-y: auto;
  }
  .site-nav[data-open] { display: flex; }

  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-item { border-bottom: 1px dashed rgba(36, 30, 24, .28); }
  .nav-link {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 6px;
    border: 0;
    border-radius: 0;
  }
  .nav-link:hover { background: rgba(250, 244, 232, .8); }
  .nav-link[aria-current="page"] { background: var(--loess); box-shadow: none; }
  .nav-note { margin: 0; }
  .nav-actions {
    padding: 18px 0 0;
    border-left: 0;
    border-top: 0;
  }
  .nav-actions .btn { width: 100%; }
}

@media (max-width: 900px) {
  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .footer-inner { padding: 42px var(--gutter) 24px; }
}

@media (max-width: 640px) {
  .strip-note { display: none; }
  .strip-inner { justify-content: flex-end; }
  .header-bar { padding: 10px var(--gutter); }
  .brand-mark { width: 38px; height: 38px; font-size: 17px; box-shadow: 3px 3px 0 var(--ink); }
  .brand-name { font-size: 17px; }
  .brand-tagline { font-size: 11px; letter-spacing: .06em; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .section { padding: 40px 0; }
  .lead { font-size: 16px; }
}

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