/* ==========================================================
   成都 · 天府之国 —— 静态网页样式
   配色：锦官红 / 竹影青 / 米白
   ========================================================== */

:root {
  --red: #c0392b;
  --red-dark: #96281b;
  --red-light: #fdf3f0;
  --gold: #d4a017;
  --green: #2e7d5b;
  --ink: #2b2b2b;
  --gray: #6b6b6b;
  --bg: #faf7f2;
  --bg-alt: #f3eee4;
  --white: #ffffff;
  --shadow: 0 6px 24px rgba(44, 32, 20, 0.10);
  --shadow-hover: 0 14px 36px rgba(44, 32, 20, 0.18);
  --radius: 14px;
  --serif: "STSong", "SimSun", "Noto Serif SC", "Songti SC", Georgia, serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; }
a { text-decoration: none; color: inherit; }

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* ---------- 导航栏 ---------- */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s, border-color 0.3s;
}

.navbar.scrolled {
  box-shadow: 0 4px 20px rgba(44, 32, 20, 0.10);
  border-bottom-color: rgba(44, 32, 20, 0.08);
}

.nav-inner {
  width: min(1100px, 92%);
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 2px;
}

.nav-logo span { margin-left: 2px; }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  position: relative;
  font-size: 0.98rem;
  color: var(--ink);
  padding: 4px 0;
  transition: color 0.25s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--red);
  transform: translateX(-50%);
  transition: width 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--red);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* 汉堡按钮（移动端） */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero 首页 ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

/* 纯 CSS 背景：远山 + 霞光渐变 */
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, #f7d9c4 0%, #f3c1a0 35%, #e89a76 60%, #c96f52 100%);
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 118%, rgba(120, 46, 30, 0.55) 0%, transparent 62%);
}

/* 层层远山剪影 */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, transparent 46%, rgba(80, 52, 40, 0.28) 46.5%, rgba(80, 52, 40, 0.28) 55%, transparent 55.5%),
    linear-gradient(150deg, transparent 30%, rgba(62, 40, 30, 0.42) 30.5%, rgba(62, 40, 30, 0.42) 42%, transparent 42.5%),
    linear-gradient(170deg, transparent 58%, rgba(110, 64, 42, 0.35) 58.5%, rgba(110, 64, 42, 0.35) 74%, transparent 74.5%);
  filter: blur(0.5px);
}

/* 飘浮的竹叶点缀 */
.hero-leaves {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 1rem;
  animation: fadeUp 1.2s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-subtitle {
  font-family: var(--serif);
  letter-spacing: 0.45em;
  font-size: 0.95rem;
  color: rgba(255, 250, 242, 0.92);
  margin-bottom: 1.2rem;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(4rem, 14vw, 8.5rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.3em;
  margin-left: 0.3em; /* 抵消最后一个字的字距 */
  text-shadow: 0 6px 30px rgba(96, 34, 20, 0.45);
  line-height: 1.15;
}

.hero-slogan {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  color: #fff7ee;
  letter-spacing: 0.2em;
  margin: 1.4rem 0 1.8rem;
  text-shadow: 0 2px 12px rgba(96, 34, 20, 0.4);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin-bottom: 2.6rem;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(6px);
  color: #fff;
  padding: 0.45rem 1.15rem;
  border-radius: 999px;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
}

.hero-btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  padding: 0.85rem 2.6rem;
  border-radius: 999px;
  font-size: 1.05rem;
  letter-spacing: 0.15em;
  box-shadow: 0 10px 26px rgba(150, 40, 27, 0.4);
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}

.hero-btn:hover {
  background: var(--red-dark);
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(150, 40, 27, 0.5);
}

/* ---------- 通用 Section ---------- */

.section {
  padding: 5.5rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  text-align: center;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.section-sub {
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  color: var(--gray);
  margin: 0.6rem 0 3.2rem;
}

/* ---------- 关于成都 ---------- */

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.6rem;
}

.about-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--red);
  transition: transform 0.3s, box-shadow 0.3s;
}

.about-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.about-icon {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
}

.about-card h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.7rem;
  color: var(--red-dark);
}

.about-card p {
  font-size: 0.94rem;
  color: var(--gray);
  text-align: justify;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.2rem;
  margin-top: 3rem;
  text-align: center;
}

.stat {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff;
  padding: 1.6rem 0.8rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat strong {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  letter-spacing: 0.04em;
}

.stat span {
  font-size: 0.85rem;
  opacity: 0.92;
  letter-spacing: 0.05em;
}

/* ---------- 景点卡片 ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.8rem;
}

.attr-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.35s, box-shadow 0.35s;
}

.attr-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

/* 景点"头图"：纯 CSS 渐变 + emoji 氛围图 */
.attr-visual {
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.8rem;
  position: relative;
  overflow: hidden;
}

.attr-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 120%, rgba(0, 0, 0, 0.30), transparent 65%);
}

.attr-visual .emoji {
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.28));
  transition: transform 0.4s;
}

.attr-card:hover .attr-visual .emoji {
  transform: scale(1.15) rotate(-4deg);
}

.attr-body {
  padding: 1.3rem 1.4rem 1.5rem;
}

.attr-tag {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--red);
  background: var(--red-light);
  border: 1px solid rgba(192, 57, 43, 0.25);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.attr-body h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.attr-body p {
  font-size: 0.88rem;
  color: var(--gray);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.3s;
}

.attr-body.expanded p {
  -webkit-line-clamp: unset;
}

.attr-more {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--red);
  cursor: pointer;
}

/* ---------- 美食 ---------- */

.food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.6rem;
}

.food-card {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.food-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.food-emoji {
  font-size: 2.6rem;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--red-light);
  transition: transform 0.35s;
}

.food-card:hover .food-emoji {
  transform: rotate(-10deg) scale(1.12);
}

.food-info h3 {
  font-family: var(--serif);
  font-size: 1.08rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
  color: var(--red-dark);
}

.food-spicy {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}

.food-info p {
  font-size: 0.87rem;
  color: var(--gray);
}

/* ---------- 文化 ---------- */

.culture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.6rem;
}

.culture-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.2rem 1.6rem;
  text-align: center;
  box-shadow: var(--shadow);
  border-bottom: 4px solid var(--gold);
  transition: transform 0.3s, box-shadow 0.3s;
}

.culture-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.culture-face {
  font-size: 3rem;
  margin-bottom: 0.9rem;
  display: inline-block;
  animation: float 3.4s ease-in-out infinite;
}

.culture-card:nth-child(2) .culture-face { animation-delay: 0.6s; }
.culture-card:nth-child(3) .culture-face { animation-delay: 1.2s; }
.culture-card:nth-child(4) .culture-face { animation-delay: 1.8s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.culture-card h3 {
  font-family: var(--serif);
  font-size: 1.18rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.7rem;
}

.culture-card p {
  font-size: 0.9rem;
  color: var(--gray);
  text-align: justify;
}

/* ---------- 页脚 ---------- */

.footer {
  background: linear-gradient(135deg, #2c1d16 0%, #3d2a1f 100%);
  color: rgba(255, 248, 240, 0.85);
  padding: 3rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: center;
  justify-content: space-between;
}

.footer h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
  color: #fff;
}

.footer p {
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

.footer-note {
  opacity: 0.7;
}

/* ---------- 返回顶部 ---------- */

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--red);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(150, 40, 27, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s, background 0.3s;
  z-index: 99;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top:hover {
  background: var(--red-dark);
}

/* ---------- 滚动出现动画 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 响应式 ---------- */

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

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(250, 247, 242, 0.98);
    border-bottom: 1px solid rgba(44, 32, 20, 0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  .nav-links.open {
    max-height: 320px;
  }

  .nav-links li {
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 1rem 0;
  }

  .section { padding: 4rem 0; }

  .food-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
