/* ============================================================
   杏悦地址指南 · 共享样式 /assets/site.css
   暖纸色与深墨色体系 · 索引卡片、路网细线与版本印章语言
   ============================================================ */

/* ---------- 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;
}

ul, ol { padding: 0; list-style: none; }

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

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

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

table { border-collapse: collapse; border-spacing: 0; }

:focus-visible {
  outline: 2px solid #D9822B;
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: rgba(217, 130, 43, 0.28);
  color: #16302A;
}

/* ---------- 变量 ---------- */
:root {
  --apricot: #D9822B;
  --apricot-deep: #A85A16;
  --apricot-sand: #F3C77E;
  --ink-green: #16302A;
  --pine: #2C5348;
  --paper: #F6EFE3;
  --card: #FFFCF5;
  --slate: #4E6B68;
  --route: #C4BCAB;
  --seal: #9E3B2E;
  --ink: #17211E;
  --on-ink: #E6DFD0;

  --font-sans: "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 17px;
  --fs-md: 24px;
  --fs-lg: 40px;
  --fs-display: clamp(2.4rem, 5vw, 5rem);

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --shell: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --shadow-card: 0 20px 44px -32px rgba(22, 48, 42, 0.5);
  --shadow-float: 0 24px 50px -30px rgba(22, 48, 42, 0.55);
}

/* ---------- 基础排版 ---------- */
body {
  min-height: 100vh;
  padding-top: 88px;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 10% 4%, rgba(243, 199, 126, 0.22), transparent 40%),
    linear-gradient(180deg, rgba(255, 252, 245, 0.92), rgba(246, 239, 227, 0) 460px);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.75;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink-green);
}

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; color: var(--ink-green); }

.display {
  font-size: var(--fs-display);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink-green);
}

.section-title {
  font-size: clamp(1.55rem, 2.8vw, 2.5rem);
  font-weight: 500;
  line-height: 1.2;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink-green);
}

.lede {
  max-width: 68ch;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--slate);
}

.mono-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--apricot-deep);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 布局 ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(48px, 7vw, 96px); }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(20px, 3vw, 36px);
}

.grid {
  display: grid;
  gap: clamp(14px, 2vw, 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)); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}

.split--wide {
  grid-template-columns: minmax(0, 9fr) minmax(0, 3fr);
}

.stack {
  display: grid;
  gap: clamp(10px, 1.6vw, 18px);
}

.divider {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, rgba(196, 188, 171, 0), rgba(196, 188, 171, 0.9) 18%, rgba(196, 188, 171, 0.9) 82%, rgba(196, 188, 171, 0));
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  transition: background-color 0.12s var(--ease), color 0.12s var(--ease), border-color 0.12s var(--ease), transform 0.12s var(--ease);
}

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

.btn--primary {
  background: var(--apricot);
  border-color: var(--apricot-deep);
  color: #FFFCF5;
}

.btn--primary:hover { background: var(--apricot-deep); }

.btn--ghost {
  background: rgba(255, 252, 245, 0.72);
  border-color: rgba(44, 83, 72, 0.35);
  color: var(--ink-green);
}

.btn--ghost:hover {
  border-color: var(--apricot);
  color: var(--apricot-deep);
}

.btn--dark {
  background: var(--ink-green);
  border-color: var(--ink-green);
  color: var(--paper);
}

.btn--dark:hover { background: var(--pine); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- 卡片与索引件 ---------- */
.card {
  position: relative;
  padding: clamp(16px, 2.4vw, 28px);
  background: var(--card);
  border: 1px solid rgba(196, 188, 171, 0.65);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.card--sand {
  background: var(--apricot-sand);
  border-color: rgba(168, 90, 22, 0.3);
}

.card--ink {
  background: var(--ink-green);
  border-color: rgba(243, 199, 126, 0.3);
  color: var(--on-ink);
}

.card--ink .card-title,
.card--ink .section-title { color: var(--paper); }

.card--ink .lede { color: rgba(230, 223, 208, 0.82); }

.card--flat { box-shadow: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(168, 90, 22, 0.28);
  background: rgba(243, 199, 126, 0.42);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  line-height: 1.4;
  color: var(--apricot-deep);
}

.pill--ink {
  background: rgba(22, 48, 42, 0.07);
  border-color: rgba(44, 83, 72, 0.28);
  color: var(--pine);
}

.stamp {
  display: inline-grid;
  place-items: center;
  width: 92px;
  height: 92px;
  padding: 8px;
  border-radius: 50%;
  border: 2px solid var(--seal);
  background: rgba(158, 59, 46, 0.06);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-align: center;
  color: var(--seal);
  transform: rotate(-6deg);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  color: var(--slate);
}

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

.breadcrumb li + li::before {
  content: "/";
  color: var(--route);
}

.breadcrumb a { color: var(--apricot-deep); }
.breadcrumb a:hover { color: var(--seal); }
.breadcrumb [aria-current="page"] { color: var(--ink-green); }

/* ---------- 图片容器（页面阶段放 img） ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--media-ratio, 4 / 3);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(196, 188, 171, 0.6);
  background: linear-gradient(140deg, #F1E6D3, #E5D9C3);
}

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

.media-frame--wide { --media-ratio: 16 / 9; }
.media-frame--tall { --media-ratio: 3 / 4; }
.media-frame--square { --media-ratio: 1 / 1; }
.media-frame--sm { border-radius: var(--radius-md); }

.media-frame--map::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(22, 48, 42, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(22, 48, 42, 0.07) 1px, transparent 1px);
  background-size: 30px 30px;
}

.media-frame__tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(168, 90, 22, 0.3);
  background: rgba(255, 252, 245, 0.92);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  color: var(--apricot-deep);
}

/* ============================================================
   悬浮胶囊页头
   ============================================================ */
.skip-link {
  position: fixed;
  top: 12px;
  left: var(--gutter);
  z-index: 90;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--ink-green);
  color: var(--paper);
  font-size: var(--fs-sm);
  transform: translateY(-180%);
  transition: transform 0.18s var(--ease);
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  padding: 10px var(--gutter) 0;
}

.header-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 7px 10px 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(196, 188, 171, 0.7);
  background: rgba(255, 252, 245, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 34px -30px rgba(22, 48, 42, 0.55);
  transition: padding 0.25s var(--ease), background-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.site-header.is-condensed .header-shell {
  padding: 4px 8px 4px 12px;
  background: rgba(255, 252, 245, 0.96);
  box-shadow: 0 18px 38px -28px rgba(22, 48, 42, 0.7);
}

/* 品牌 */
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 2px;
  border-radius: var(--radius-pill);
}

.brand-mark__seal {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--apricot);
  color: #FFFCF5;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: inset 0 0 0 3px rgba(255, 252, 245, 0.35);
}

.brand-mark__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--ink-green);
  white-space: nowrap;
}

.brand-domain {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: var(--slate);
  white-space: nowrap;
}

/* 栏目胶囊 */
.site-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav__link {
  display: block;
  padding: 7px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--pine);
  white-space: nowrap;
  transition: background-color 0.12s var(--ease), color 0.12s var(--ease), border-color 0.12s var(--ease);
}

.site-nav__link:hover {
  background: rgba(243, 199, 126, 0.5);
  border-color: rgba(168, 90, 22, 0.25);
  color: var(--apricot-deep);
}

.site-nav__link[aria-current="page"] {
  background: var(--apricot);
  border-color: var(--apricot-deep);
  color: #FFFCF5;
}

.site-nav__utility { display: none; }

/* 右侧边缘 */
.header-edge {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: 8px;
}

.version-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  border: 1px dashed rgba(168, 90, 22, 0.5);
  background: rgba(243, 199, 126, 0.4);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  line-height: 1.4;
  color: var(--apricot-deep);
  white-space: nowrap;
}

.version-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--seal);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(44, 83, 72, 0.35);
  background: var(--card);
  color: var(--ink-green);
  font-size: var(--fs-sm);
  line-height: 1.4;
  transition: border-color 0.12s var(--ease), color 0.12s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--apricot);
  color: var(--apricot-deep);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: background-color 0.2s var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s var(--ease);
}

.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

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

/* ============================================================
   深墨绿页脚
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 110px);
  padding: clamp(40px, 6vw, 76px) 0 28px;
  background: var(--ink-green);
  border-top: 3px solid var(--apricot);
  color: rgba(230, 223, 208, 0.85);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 300px;
  pointer-events: none;
  background: radial-gradient(circle at 84% 0%, rgba(217, 130, 43, 0.22), transparent 62%);
}

.footer-shell {
  position: relative;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 44px);
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand__seal {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(243, 199, 126, 0.55);
  color: var(--apricot-sand);
  font-size: 18px;
  font-weight: 500;
}

.footer-brand__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.footer-brand__name {
  font-size: var(--fs-base);
  font-weight: 500;
  line-height: 1.5;
  color: var(--paper);
}

.footer-brand__line {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  line-height: 1.5;
  color: var(--apricot-sand);
}

.footer-note {
  max-width: 54ch;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(230, 223, 208, 0.75);
}

.footer-route {
  height: 6px;
  margin: clamp(24px, 3vw, 36px) 0;
  opacity: 0.6;
  background-image: radial-gradient(circle, rgba(217, 130, 43, 0.9) 0 2px, transparent 2.2px);
  background-size: 44px 6px;
  background-position: 0 50%;
  background-repeat: repeat-x;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr;
  gap: clamp(24px, 3.6vw, 52px);
}

.footer-block { min-width: 0; }

.footer-block__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.5;
  color: var(--apricot-sand);
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a {
  display: inline-block;
  font-size: 15px;
  color: rgba(230, 223, 208, 0.78);
  transition: color 0.12s var(--ease), transform 0.12s var(--ease);
}

.footer-links a:hover {
  color: var(--apricot-sand);
  transform: translateX(3px);
}

.footer-contact {
  display: grid;
  gap: 10px;
}

.footer-contact li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-size: 15px;
}

.footer-contact__key {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  line-height: 1.9;
  color: rgba(243, 199, 126, 0.75);
}

.footer-contact__val {
  line-height: 1.7;
  color: rgba(230, 223, 208, 0.88);
  word-break: break-word;
}

.footer-contact__note {
  max-width: 48ch;
  margin-top: 14px;
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: rgba(230, 223, 208, 0.6);
}

.footer-base {
  position: relative;
  margin-top: clamp(28px, 4vw, 46px);
  border-top: 1px solid rgba(243, 199, 126, 0.2);
}

.footer-base__shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 18px var(--gutter) 0;
}

.footer-base__copy {
  font-size: var(--fs-sm);
  color: rgba(230, 223, 208, 0.7);
}

.footer-base__mono {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  color: rgba(243, 199, 126, 0.8);
}

/* ============================================================
   滚动显现（错峰进入）
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  html.js-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
  }

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

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1180px) {
  .version-chip { display: none; }
}

@media (max-width: 980px) {
  body { padding-top: 76px; }

  .header-shell { padding: 6px 8px 6px 12px; }

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

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-left: 0;
    padding: 12px;
    max-height: min(70vh, 520px);
    overflow-y: auto;
    border-radius: 26px;
    border: 1px solid rgba(196, 188, 171, 0.8);
    background: var(--card);
    box-shadow: 0 30px 60px -34px rgba(22, 48, 42, 0.6);
  }

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

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

  .site-nav__link {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 15px;
  }

  .site-nav__utility {
    display: block;
    padding: 4px 8px 2px;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.06em;
    line-height: 1.6;
    color: var(--slate);
  }
}

@media (max-width: 900px) {
  .grid--2,
  .grid--3,
  .grid--4,
  .split,
  .split--wide { grid-template-columns: minmax(0, 1fr); }

  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .brand-domain { display: none; }

  .footer-grid { grid-template-columns: minmax(0, 1fr); }

  .footer-contact li { grid-template-columns: 44px minmax(0, 1fr); }

  .btn { width: 100%; }

  .btn-row { flex-direction: column; align-items: stretch; }
}

/* ============================================================
   无障碍：减少动效
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  html.js-reveal [data-reveal],
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
