/* ===========================================================
   京秋去哪儿 · 北京赏秋地清单
   纯 CSS / 手写 SVG 视觉，无位图资源
   =========================================================== */

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

:root {
  color-scheme: light dark;

  --paper:   #FAF5EC;
  --paper-2: #F2E8D9;
  --surface: #FFFDF9;
  --ink:     #241B14;
  --ink-2:   #5E5044;
  --ink-3:   #8C7C6D;
  --line:      rgba(36, 27, 20, .14);
  --line-soft: rgba(36, 27, 20, .08);
  --header-bg: rgba(250, 245, 236, .84);

  /* 秋色语义色：红叶 / 银杏 / 湖光 / 古建 / 山野 / 胡同 */
  --maple: #B23A2E;
  --gold:  #A96F06;
  --lake:  #35758D;
  --brick: #96542E;
  --pine:  #46604F;
  --plum:  #7E5A72;

  --shadow: 0 1px 2px rgba(60, 40, 25, .05), 0 14px 34px -20px rgba(60, 40, 25, .38);

  --radius: 18px;
  --wrap: 1120px;
  --header-h: 58px;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system,
               "Segoe UI", Roboto, sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "SimSun",
                Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:   #171210;
    --paper-2: #1F1815;
    --surface: #221A16;
    --ink:     #F1E8DC;
    --ink-2:   #BFB0A1;
    --ink-3:   #95867B;
    --line:      rgba(241, 232, 220, .15);
    --line-soft: rgba(241, 232, 220, .08);
    --header-bg: rgba(23, 18, 16, .84);

    --maple: #E5745F;
    --gold:  #DDA63A;
    --lake:  #6DAEC5;
    --brick: #CE8B55;
    --pine:  #8CAA92;
    --plum:  #BE90AF;

    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -24px rgba(0, 0, 0, .85);
  }
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.25; margin: 0; }
[hidden] { display: none !important; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

a { color: inherit; }

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  transition: top .18s ease;
}
.skip-link:focus { top: 0; }

.wrap {
  width: min(100% - 40px, var(--wrap));
  margin-inline: auto;
}
@media (max-width: 480px) {
  .wrap { width: min(100% - 28px, var(--wrap)); }
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 1.06rem;
  letter-spacing: .06em;
  white-space: nowrap;
}
.brand svg { width: 20px; height: 20px; flex: none; }
.brand em { font-style: normal; color: var(--ink-3); font-size: .82rem; letter-spacing: .12em; }

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  display: block;
  padding: 8px 11px;
  border-radius: 999px;
  text-decoration: none;
  font-size: .88rem;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background .16s ease, color .16s ease;
}
.site-nav a:hover { background: var(--paper-2); color: var(--ink); }
.site-nav a[aria-current="true"] {
  color: var(--maple);
  background: color-mix(in srgb, var(--maple) 12%, transparent);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: min(86vh, 720px);
  min-height: min(86svh, 720px);
  display: flex;
  align-items: flex-end;
  padding: clamp(56px, 12vw, 96px) 0 clamp(34px, 6vw, 54px);
  background:
    radial-gradient(120% 92% at 80% 6%, rgba(232, 158, 74, .50), transparent 62%),
    radial-gradient(96% 76% at 8% 92%, rgba(150, 44, 33, .55), transparent 64%),
    linear-gradient(162deg, #2B1811 0%, #46231A 46%, #1B120F 100%);
  color: #FBF4E9;
  isolation: isolate;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 8, 6, .34) 0%, transparent 34%, rgba(12, 8, 6, .46) 100%);
  z-index: -1;
}
.hero__inner { position: relative; z-index: 2; max-width: 44rem; }

.hero__kicker {
  font-size: .74rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(251, 244, 233, .72);
  margin-bottom: 14px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 8.2vw, 3.9rem);
  letter-spacing: .02em;
  text-wrap: balance;
}
.hero__lead {
  margin-top: 16px;
  font-size: clamp(.98rem, 3.6vw, 1.14rem);
  color: rgba(251, 244, 233, .88);
  max-width: 34rem;
}
.hero__facts {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero__facts li {
  font-size: .82rem;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(251, 244, 233, .28);
  background: rgba(20, 12, 9, .3);
  color: rgba(251, 244, 233, .94);
  white-space: nowrap;
}
.hero__actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #FBF4E9;
  color: #2B1811;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--ghost {
  background: rgba(251, 244, 233, .08);
  border-color: rgba(251, 244, 233, .42);
  color: #FBF4E9;
}
.btn--ghost:hover { background: rgba(251, 244, 233, .16); }

/* 飘落的叶子（纯装饰，尊重减弱动效偏好） */
.leaf {
  position: absolute;
  z-index: 1;
  width: 30px;
  height: 30px;
  opacity: .5;
  top: -8%;
  animation: fall linear infinite;
  will-change: transform;
  pointer-events: none;
}
@keyframes fall {
  0%   { transform: translate3d(0, -10vh, 0) rotate(0deg); }
  50%  { transform: translate3d(38px, 45vh, 0) rotate(200deg); }
  100% { transform: translate3d(-26px, 96vh, 0) rotate(420deg); }
}
.leaf--1 { left: 8%;  animation-duration: 17s; animation-delay: -2s;  }
.leaf--2 { left: 24%; animation-duration: 23s; animation-delay: -9s;  width: 22px; height: 22px; opacity: .38; }
.leaf--3 { left: 48%; animation-duration: 19s; animation-delay: -5s;  }
.leaf--4 { left: 68%; animation-duration: 26s; animation-delay: -14s; width: 26px; height: 26px; opacity: .34; }
.leaf--5 { left: 86%; animation-duration: 21s; animation-delay: -7s;  }
.leaf--6 { left: 36%; animation-duration: 29s; animation-delay: -18s; width: 20px; height: 20px; opacity: .3; }

/* ---------- 通用区块 ---------- */
.section { padding: clamp(52px, 9vw, 92px) 0; }
.section--tint { background: var(--paper-2); }
.section[id] { scroll-margin-top: calc(var(--header-h) + 14px); }

.section__head { max-width: 40rem; margin-bottom: clamp(26px, 5vw, 42px); }
.kicker {
  font-size: .72rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.section__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 5.4vw, 2.3rem);
  text-wrap: balance;
}
.section__note {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: .96rem;
}

/* ---------- 时节线 ---------- */
.season__grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .season__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .season__grid { grid-template-columns: repeat(4, 1fr); } }

.season__card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  box-shadow: var(--shadow);
}
.season__card::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 0;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--c, var(--maple));
  opacity: .8;
}
.season__when {
  font-family: var(--font-serif);
  font-size: 1.14rem;
  color: var(--c, var(--maple));
}
.season__phase {
  margin-top: 2px;
  font-size: .78rem;
  letter-spacing: .16em;
  color: var(--ink-3);
}
.season__desc {
  margin-top: 12px;
  font-size: .93rem;
  color: var(--ink-2);
}
.season__places {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.season__places span {
  font-size: .78rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c, var(--maple)) 13%, transparent);
  color: var(--ink);
}

/* ---------- 筛选 ---------- */
.filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.chip-set {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-row__label {
  font-size: .76rem;
  letter-spacing: .16em;
  color: var(--ink-3);
  min-width: 3.4em;
}
.chip {
  min-height: 40px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-size: .87rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.chip:hover { background: var(--paper-2); color: var(--ink); }
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.result-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  font-size: .88rem;
  color: var(--ink-2);
}
.result-bar strong { color: var(--ink); font-weight: 600; }
.link-btn {
  margin-left: auto;
  min-height: 40px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--ink-2);
  font-size: .84rem;
  cursor: pointer;
}
.link-btn:hover { border-color: var(--ink-3); color: var(--ink); }

/* ---------- 地点卡片 ---------- */
.spot-grid {
  display: grid;
  gap: 13px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .spot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .spot-grid { grid-template-columns: repeat(3, 1fr); } }

.spot-card {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding: 20px 18px 18px 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.spot-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--c, var(--maple));
  opacity: .85;
}
.spot-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--c, var(--maple)) 40%, var(--line));
  box-shadow: var(--shadow);
}
.spot-card__no {
  position: absolute;
  top: 12px;
  right: 14px;
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1;
  color: var(--c, var(--maple));
  opacity: .28;
}
.spot-card__name {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  padding-right: 2.8rem;
}
.spot-card__where {
  margin-top: 4px;
  font-size: .8rem;
  letter-spacing: .06em;
  color: var(--ink-3);
}
.spot-card__line {
  margin-top: 12px;
  font-size: .92rem;
  color: var(--ink-2);
}
.spot-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.tag {
  font-size: .75rem;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--c, var(--maple)) 34%, transparent);
  color: var(--c, var(--maple));
  background: color-mix(in srgb, var(--c, var(--maple)) 9%, transparent);
}
.spot-card__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: .82rem;
  color: var(--ink-2);
}
.spot-card__time { display: inline-flex; align-items: center; gap: 6px; }
.spot-card__time::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c, var(--maple));
  flex: none;
}
.spot-card__more {
  margin-left: auto;
  color: var(--ink-3);
  transition: color .16s ease, transform .16s ease;
}
.spot-card:hover .spot-card__more { color: var(--c, var(--maple)); }

.empty-state {
  padding: 44px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-2);
}

/* ---------- 方位示意图 ---------- */
.map-layout {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 900px) {
  .map-layout { grid-template-columns: 1.35fr 1fr; gap: 34px; }
}
.map-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px;
  box-shadow: var(--shadow);
}
.map-frame svg { display: block; width: 100%; height: auto; }

.map-ring { fill: none; stroke: var(--line); stroke-width: 1.4; }
.map-ring--dash { stroke-dasharray: 5 7; }
.map-axis { stroke: var(--line); stroke-width: 1.2; stroke-dasharray: 3 6; }
.map-cap {
  fill: var(--ink-3);
  font-size: 12px;
  letter-spacing: .16em;
  font-family: var(--font-sans);
}
.map-dot { cursor: pointer; }
.map-dot__halo {
  fill: color-mix(in srgb, var(--c, var(--maple)) 16%, transparent);
  transition: r .18s ease, fill .18s ease;
}
.map-dot__core {
  fill: var(--c, var(--maple));
  stroke: var(--surface);
  stroke-width: 2;
}
.map-dot__label {
  fill: var(--ink-2);
  font-size: 13px;
  font-family: var(--font-sans);
  text-anchor: middle;
  transition: fill .16s ease;
}
.map-dot:hover .map-dot__halo,
.map-dot:focus-visible .map-dot__halo { fill: color-mix(in srgb, var(--c, var(--maple)) 34%, transparent); }
.map-dot:hover .map-dot__label,
.map-dot:focus-visible .map-dot__label { fill: var(--c, var(--maple)); }
.map-dot:focus-visible { outline: none; }
.map-dot:focus-visible .map-dot__core { stroke: var(--c, var(--maple)); stroke-width: 4; }

.map-side h3 {
  font-family: var(--font-serif);
  font-size: 1.16rem;
  margin-bottom: 6px;
}
.map-side p { color: var(--ink-2); font-size: .92rem; }
.legend {
  margin-top: 18px;
  display: grid;
  gap: 9px;
}
.legend li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: .9rem;
  color: var(--ink-2);
}
.legend b {
  color: var(--ink);
  font-weight: 600;
  min-width: 4.6em;
  display: inline-block;
}
.legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
  flex: none;
  margin-right: -2px;
}

/* ---------- 贴士 ---------- */
.tips-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .tips-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tips-grid { grid-template-columns: repeat(3, 1fr); } }
.tip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.tip__no {
  font-family: var(--font-serif);
  font-size: .82rem;
  letter-spacing: .18em;
  color: var(--maple);
}
.tip h3 {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  margin: 8px 0 8px;
}
.tip p { font-size: .91rem; color: var(--ink-2); }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 44px;
  background: var(--paper-2);
}
.site-footer p {
  font-size: .85rem;
  color: var(--ink-3);
  max-width: 46rem;
}
.site-footer p + p { margin-top: 8px; }

/* ---------- 详情弹层 ---------- */
.spot-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  width: min(560px, 100% - 24px);
  max-height: min(88vh, 720px);
  max-height: min(88svh, 720px);
  color: var(--ink);
  overflow: visible;
}
.spot-dialog::backdrop {
  background: rgba(18, 12, 9, .58);
  backdrop-filter: blur(3px);
}
.sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 26px;
  max-height: min(88vh, 720px);
  max-height: min(88svh, 720px);
  overflow-y: auto;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .6);
}
.sheet__top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.sheet__tag {
  font-size: .75rem;
  padding: 4px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c, var(--maple)) 13%, transparent);
  color: var(--c, var(--maple));
  border: 1px solid color-mix(in srgb, var(--c, var(--maple)) 30%, transparent);
}
.sheet__close {
  margin-left: auto;
  min-height: 40px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-size: .84rem;
  cursor: pointer;
}
.sheet__close:hover { background: var(--paper-2); color: var(--ink); }
.sheet__title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 5vw, 1.75rem);
}
.sheet__meta {
  margin-top: 6px;
  font-size: .84rem;
  letter-spacing: .06em;
  color: var(--ink-3);
}
.sheet__peak {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c, var(--maple)) 10%, transparent);
  border-left: 3px solid var(--c, var(--maple));
  font-size: .9rem;
}
.sheet__peak span { color: var(--c, var(--maple)); font-weight: 600; letter-spacing: .08em; }
.sheet__line {
  margin-top: 16px;
  font-size: 1rem;
  color: var(--ink);
}
.sheet__block { margin-top: 20px; }
.sheet__block h3 {
  font-size: .78rem;
  letter-spacing: .2em;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: 8px;
}
.sheet__block ul { display: grid; gap: 6px; }
.sheet__block li {
  position: relative;
  padding-left: 16px;
  font-size: .93rem;
  color: var(--ink-2);
}
.sheet__block li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--c, var(--maple)) 70%, transparent);
}
.sheet__block p { font-size: .93rem; color: var(--ink-2); }

@media (max-width: 600px) {
  .spot-dialog {
    width: 100%;
    max-width: 100%;
    margin: auto auto 0;
  }
  .sheet {
    border-radius: 20px 20px 0 0;
    border-bottom: 0;
    padding-bottom: 34px;
  }
}

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .leaf { display: none; }
}
