/* ==========================================================================
   蓝天保卫战 · 空气治理环保科普
   样式表：css/style.css（外部 CSS，由 index.html 的 link 标签引入）
   作者：张三  学号：425888888888
   --------------------------------------------------------------------------
   文件结构（对应作业「二、CSS 样式要求」七条）：
     01 设计变量        统一主色、字号、圆角、阴影
     02 基础重置        清除默认内外边距 + box-sizing: border-box
     03 全局排版        页面居中、字体统一、正文阅读节奏
     04 通用组件        版心、小标题、区块标题
     05 头部            背景色 + 内边距 + 居中
     06 导航与下拉      横向排列、去掉默认符号、悬停展开
     07 图片滑窗        轮播外观与过渡动画
     08 导语区
     09 污染来源卡片
     10 健康影响与 AQI 侧栏
     11 治理技术
     12 数据看板（深色带）
     13 个人行动
     14 表单与按钮
     15 页脚
     16 选择器用法小结
     17 响应式适配
   ========================================================================== */


/* ==========================================================================
   01 设计变量
   把颜色、圆角、阴影集中到 :root，改一处即可全局生效，
   也让整站配色保持统一（评分点 13：布局合理、配色调和）
   ========================================================================== */
:root {
  /* 主色：深青（比纯蓝更沉稳，接近环境类机构的视觉调性） */
  --teal-950: #071e24;
  --teal-900: #0b2b33;
  --teal-800: #0e3b41;
  --teal-700: #12655e;
  --jade: #17796f;
  --jade-light: #d9ece7;

  /* 点缀色：暖琥珀。冷色里放一点暖色，画面才不会“发闷” */
  --amber: #e8a33d;
  --amber-soft: #fdf2e1;

  /* 中性色 */
  --ink: #10222b;
  --ink-2: #40565f;
  --muted: #7c8f97;
  --paper: #ffffff;
  --paper-2: #f4f7f6;
  --line: rgba(16, 34, 43, 0.1);
  --line-light: rgba(255, 255, 255, 0.14);

  /* 圆角与阴影 */
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(7, 30, 36, 0.05);
  --shadow-md: 0 24px 48px -24px rgba(7, 30, 36, 0.3);
  --shadow-lg: 0 40px 80px -40px rgba(7, 30, 36, 0.45);
}


/* ==========================================================================
   02 基础重置（CSS 要求第 1 条）
   * 选中全部元素，清掉浏览器默认的 margin / padding，
   并统一 border-box 盒模型：设置的宽度已包含内边距与边框，布局更好计算
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;   /* 锚点跳转平滑滚动 */
}

/* 导航是吸顶的，锚点跳转时给目标区块预留 90px，避免标题被盖住 */
section[id],
body[id] {
  scroll-margin-top: 90px;
}

img {
  display: block;    /* 去掉行内图片底部的基线空隙 */
  max-width: 100%;
}

ul,
ol {
  list-style: none;  /* 去掉默认圆点与序号，需要时用伪元素重绘 */
}

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

/* 选中文字时用琥珀色底，细节处呼应主色（浏览器默认蓝会被打断调性） */
::selection {
  background-color: rgba(232, 163, 61, 0.32);
}


/* ==========================================================================
   03 全局排版（CSS 要求第 2 条）
   字体走一条字体栈：优先微软雅黑，其次苹方，最后回退系统无衬线字体
   ========================================================================== */
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB",
               "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.5px;
  color: var(--ink);
}

p {
  color: var(--ink-2);
}


/* ==========================================================================
   04 通用组件
   ========================================================================== */

/* 版心：最大宽度 1200px + 左右 auto 外边距 = 页面整体水平居中 */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 32px;
}

/* 小标题（英文眉标）：细字距 + 前面的短线，用来提示区块主题 */
.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--jade);
}

.kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background-color: var(--amber);
}

/* 区块标题组 */
.section-head {
  max-width: 780px;
  margin-bottom: 52px;
}

.section-head h2,
.intro-head h2,
.health-main h2,
.tech-text h2,
.action-text h2,
.survey-text h2 {
  font-size: clamp(26px, 2.4vw, 36px);
  margin-bottom: 14px;
}

.section-sub {
  font-size: 15px;
  color: var(--muted);
}

/* 深色区块里的标题组（数据看板用） */
.section-head--light h2 {
  color: #ffffff;
}

.section-head--light .kicker {
  color: var(--amber);
}

.section-head--light .section-sub {
  color: rgba(255, 255, 255, 0.6);
}


/* ==========================================================================
   05 头部（CSS 要求第 3 条：背景色 + 内边距 + 内容居中）
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(11, 43, 51, 0.97);
  border-bottom: 1px solid var(--line-light);
  backdrop-filter: blur(10px);   /* 毛玻璃：内容滚到下面时透出一点层次 */
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 78px;
}

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

/* 品牌标识：一枚青绿渐变圆点，右侧留一圈内发光，像一枚徽章 */
.brand-mark {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #56d6b4, var(--jade) 62%, #0d5a55);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28),
              0 6px 16px -6px rgba(23, 121, 111, 0.9);
}

.brand-text {
  font-size: 20px;
  letter-spacing: 4px;
  color: #ffffff;
}

.brand-text small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.5);
}


/* ==========================================================================
   06 导航与下拉菜单（CSS 要求第 4 条 + 评分点 10）
   父级 li 相对定位、子菜单绝对定位，
   默认透明隐藏，鼠标移入或键盘聚焦时滑入显示
   ========================================================================== */
.nav-list {
  display: flex;          /* 横向排列 */
  align-items: center;
  gap: 6px;
}

.nav-list > li {
  position: relative;     /* 子菜单的定位参照 */
}

.nav-list > li > a {
  position: relative;
  display: block;
  padding: 8px 16px;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  transition: color 0.25s ease;
}

/* 下划线用伪元素从中间向两侧展开 */
.nav-list > li > a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 2px;
  height: 1px;
  background-color: var(--amber);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.28s ease;
}

.nav-list > li > a:hover {
  color: #ffffff;
}

.nav-list > li > a:hover::after {
  transform: scaleX(1);
}

/* 最后一项做成胶囊按钮，形成“行动号召”的视觉重心 */
.nav-cta > a {
  padding: 9px 22px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.nav-cta > a::after {
  display: none;
}

.nav-cta > a:hover {
  background-color: var(--amber);
  border-color: var(--amber);
  color: var(--teal-950);
}

/* 下拉箭头：CSS 边框画的三角形 */
.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 7px;
  vertical-align: 2px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.25s ease;
}

.has-submenu:hover .caret {
  transform: rotate(180deg);
}

/* 二级菜单本体 */
.submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  min-width: 168px;
  padding: 8px;
  background-color: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 24px 48px -16px rgba(7, 30, 36, 0.35);
  /* 隐藏三件套：透明 + 不可见 + 下移，配合过渡形成下滑淡入 */
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

/* 上方补一块透明热区，填补 10px 缝隙，防止鼠标移动途中“脱靶”收起菜单 */
.submenu::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.submenu li + li {
  margin-top: 2px;
}

.submenu a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--ink-2);
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.submenu a:hover {
  background-color: var(--jade-light);
  color: var(--jade);
}

/* 父级悬停 或 子元素获得焦点时展开 */
.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}


/* ==========================================================================
   07 图片滑窗（评分点 11）
   外层 overflow: hidden 只露一屏；内层胶片横向排列，
   JS 修改 translateX 实现翻页；当前张的图片还有极缓慢的放大（电影感）
   ========================================================================== */
.hero {
  background-color: var(--teal-950);
}

.carousel {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  position: relative;
  flex: 0 0 100%;     /* 不收不放，每张正好占满一屏 */
}

.carousel-slide img {
  width: 100%;
  height: 620px;
  object-fit: cover;  /* 裁切填充，保证不变形 */
  transition: transform 8s ease-out;
}

/* 当前幻灯片缓慢推近，静态图也有呼吸感 */
.carousel-slide.is-active img {
  transform: scale(1.06);
}

/* 双层蒙版：左侧压暗保证文字可读，底部压暗托住页码与圆点 */
.carousel-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg,
      rgba(5, 22, 27, 0.9) 0%,
      rgba(5, 22, 27, 0.62) 42%,
      rgba(5, 22, 27, 0.12) 72%,
      rgba(5, 22, 27, 0.05) 100%),
    linear-gradient(0deg,
      rgba(5, 22, 27, 0.55) 0%,
      rgba(5, 22, 27, 0) 34%);
}

/* 文案与版心左边缘对齐：max() 保证窄屏时仍有 32px 边距 */
.slide-caption {
  position: absolute;
  left: max(32px, calc(50% - 568px));
  bottom: 108px;
  z-index: 2;
  max-width: 780px;
  color: #ffffff;
}

.slide-tag {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--amber);
}

.slide-tag::before {
  content: "";
  width: 34px;
  height: 1px;
  background-color: var(--amber);
}

.slide-title {
  margin-bottom: 18px;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.26;
  letter-spacing: 2px;
  color: #ffffff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
}

.slide-desc {
  max-width: 34em;
  font-size: 16px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

/* 左右切换按钮：细边框 + 毛玻璃，悬停反白 */
.carousel-btn {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 52px;
  height: 52px;
  font-size: 15px;
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transform: translateY(-50%);
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.carousel-btn:hover {
  background-color: #ffffff;
  border-color: #ffffff;
  color: var(--teal-900);
}

.prev { left: 36px; }
.next { right: 36px; }

/* 圆点指示器：短横线，当前项变长并转为琥珀色 */
.carousel-dots {
  position: absolute;
  right: max(32px, calc(50% - 568px));
  bottom: 52px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 26px;
  height: 3px;
  padding: 0;
  background-color: rgba(255, 255, 255, 0.55);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);   /* 落在浅色建筑上也能看清 */
  transition: width 0.3s ease, background-color 0.3s ease;
}

.dot.is-active {
  width: 46px;
  background-color: var(--amber);
}

/* 页码计数：01 / 03 */
.slide-count {
  position: absolute;
  left: max(32px, calc(50% - 568px));
  bottom: 34px;
  z-index: 3;
  font-size: 13px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.55);
}

.slide-count span {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.slide-count i {
  margin: 0 6px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.35);
}


/* ==========================================================================
   08 导语区（左标题 + 右正文的编辑式排版）
   ========================================================================== */
.intro {
  padding-block: 104px 96px;
}

.intro-inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 72px;
  align-items: start;
}

.intro-note {
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 1px;
}

/* 左栏下方的“标准限值”数据块：既补充关键信息，也平衡左右两栏的高度 */
.intro-fact {
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.fact-num {
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1px;
  color: var(--jade);
}

.fact-text {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--muted);
}

.intro-body .lead {
  margin-bottom: 20px;
  font-size: 19px;
  line-height: 1.95;
  color: var(--ink);
}

.intro-body p {
  font-size: 15.5px;
  line-height: 1.95;
}

.intro-body p + p {
  margin-top: 14px;
}


/* ==========================================================================
   09 污染来源卡片
   Grid 固定四列，在响应式里逐级降为两列、一列
   （不用 auto-fit，避免中等宽度出现「3 张 + 1 张落单」的孤儿排布）
   ========================================================================== */
.sources {
  padding-block: 104px;
  background-color: var(--paper-2);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.card {
  position: relative;
  overflow: hidden;
  padding: 34px 30px;
  background-color: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.32s ease, box-shadow 0.32s ease, border-color 0.32s ease;
}

/* 顶部渐变色条：悬停时从左向右生长 */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--jade), var(--amber));
  transition: width 0.45s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

.card:hover::before {
  width: 100%;
}

.card-index {
  margin-bottom: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(16, 34, 43, 0.26);
}

.card h3 {
  margin-bottom: 10px;
  font-size: 19px;
}

.card p {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink-2);
}


/* ==========================================================================
   10 健康影响 + AQI 侧栏
   ========================================================================== */
.health {
  padding-block: 104px;
}

.health-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 72px;
  align-items: start;
}

.health-main p {
  font-size: 15.5px;
  line-height: 1.95;
}

.health-main p + p {
  margin-top: 14px;
}

/* 重点防护人群：标签式呈现，比整段文字更易扫读 */
.risk-block {
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.risk-label {
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--muted);
}

.risk-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.risk-list li {
  padding: 8px 18px;
  font-size: 13.5px;
  color: var(--jade);
  background-color: var(--jade-light);
  border-radius: 999px;
}

/* 侧栏 sticky：滚动时“粘”在视口内，不被左侧长文甩开 */
.aqi-panel {
  position: sticky;
  top: 110px;
  padding: 30px 28px;
  background-color: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -40px rgba(7, 30, 36, 0.5);
}

.aqi-panel h3 {
  font-size: 16px;
  letter-spacing: 1px;
}

.aqi-table {
  width: 100%;
  margin-top: 18px;
  font-size: 13.5px;
  border-collapse: collapse;
}

.aqi-table th {
  padding: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-align: left;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.aqi-table td {
  padding: 11px 0;
  color: var(--ink-2);
  border-bottom: 1px solid rgba(16, 34, 43, 0.06);
}

.aqi-table tr:last-child td {
  border-bottom: none;
}

/* 等级前的彩色圆点，用 currentColor 跟着等级颜色走 */
.aqi-table td i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background-color: currentColor;
  vertical-align: 1px;
}

/* 六级空气质量：由绿到红的色阶，符合“优良—污染”的直觉 */
.lv-1 { color: #2e9e6e; font-weight: 700; }
.lv-2 { color: #7ab648; font-weight: 700; }
.lv-3 { color: #d9a400; font-weight: 700; }
.lv-4 { color: #e07b1a; font-weight: 700; }
.lv-5 { color: #d0453c; font-weight: 700; }
.lv-6 { color: #8f1d18; font-weight: 700; }

.aqi-note {
  margin-top: 18px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
}


/* ==========================================================================
   11 治理技术：左流程 + 右配图
   序号用 counter 自绘成圆形徽标，并用一条竖线把五步串成流程
   ========================================================================== */
.tech {
  padding-block: 104px;
  background-color: var(--paper-2);
}

.tech-inner {
  display: grid;
  grid-template-columns: 1.4fr 0.85fr;
  gap: 80px;
  align-items: start;
}

.tech-list {
  counter-reset: step;   /* 初始化计数器 */
  margin-top: 40px;
}

.tech-list > li {
  position: relative;
  padding: 0 0 30px 64px;
}

/* 步骤序号：圆形描边徽标 */
.tech-list > li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);   /* 输出 01、02…… */
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  font-size: 13px;
  font-weight: 700;
  line-height: 38px;
  text-align: center;
  color: var(--jade);
  background-color: var(--paper);
  border: 1px solid rgba(23, 121, 111, 0.35);
  border-radius: 50%;
}

/* 连接线：从徽标下方连到下一个步骤 */
.tech-list > li::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 48px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, rgba(23, 121, 111, 0.35),
              rgba(23, 121, 111, 0.05));
}

.tech-list > li:last-child::after {
  display: none;
}

.tech-list h3 {
  margin-bottom: 6px;
  font-size: 17.5px;
}

.tech-list p {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink-2);
}

/* 配图：宽度自适应、水平居中、统一圆角（CSS 要求第 5 条） */
.tech-figure {
  position: sticky;
  top: 110px;
  margin: 0;
}

.tech-figure img {
  width: 100%;
  margin-inline: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

figcaption {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted);
  text-align: center;
}


/* ==========================================================================
   12 数据看板（深色带）
   深色区在整页中起到“呼吸”的作用：打断连续的白底，让数字更突出
   ========================================================================== */
.data {
  position: relative;
  overflow: hidden;
  padding-block: 104px;
  background-color: var(--teal-900);
  background-image:
    radial-gradient(60% 120% at 85% 0%, rgba(23, 121, 111, 0.45) 0%, rgba(23, 121, 111, 0) 60%),
    linear-gradient(160deg, #0b2b33 0%, #0e3b41 58%, #0a262c 100%);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-light);
}

.stat {
  padding: 40px 32px 8px;
  border-left: 1px solid var(--line-light);
}

.stat:first-child {
  padding-left: 0;
  border-left: none;
}

.stat-num {
  font-size: clamp(38px, 4vw, 56px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1px;
  color: #ffffff;
}

.stat-num span {
  margin-left: 4px;
  font-size: 22px;
  color: var(--amber);
}

.stat-unit {
  margin-top: 16px;
  font-size: 11.5px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.5);
}

.stat-label {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
}

/* —— id 选择器示例（评分点 12）——
   id 在页面中唯一，权重高于 class，适合给“只有一个”的元素做精确控制 */
#hero {
  /* 建立独立的层叠上下文：轮播内部那些 z-index 较高的按钮、圆点
     就不会跑到页面其它元素上面去 */
  isolation: isolate;
}

/* #stat-days 是“优良天数”那一块，单独把数字换成青绿色，突出重点指标 */
#stat-days .stat-num {
  color: #7fd8bd;
}


/* ==========================================================================
   13 个人行动
   ========================================================================== */
.action {
  padding-block: 104px;
}

.action-inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 80px;
  align-items: center;
}

.action-figure {
  margin: 0;
}

.action-figure img {
  width: 100%;
  margin-inline: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.action-list {
  margin-top: 36px;
}

.action-list li {
  position: relative;
  padding: 16px 0 16px 26px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}

.action-list li:last-child {
  border-bottom: none;
}

/* 自绘小圆点，替代被重置掉的列表符号 */
.action-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 27px;
  width: 7px;
  height: 7px;
  background-color: var(--amber);
  border-radius: 50%;
}

.action-list strong {
  margin-right: 10px;
  font-weight: 700;
  color: var(--ink);
}


/* ==========================================================================
   14 表单与按钮（CSS 要求第 6 条：背景色 / 文字色 / 圆角 / 内边距）
   ========================================================================== */
.survey {
  padding-block: 104px;
  background-color: var(--paper-2);
}

.survey-inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 72px;
  align-items: center;
}

.survey-text p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink-2);
}

/* 表单左侧的三条说明，平衡左右两栏高度 */
.survey-meta {
  margin-top: 30px;
}

.survey-meta li {
  position: relative;
  padding: 7px 0 7px 22px;
  font-size: 14px;
  color: var(--ink-2);
}

.survey-meta li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 16px;
  width: 6px;
  height: 6px;
  background-color: var(--jade);
  border-radius: 50%;
}

.survey-form {
  display: grid;
  gap: 18px;
  padding: 38px;
  background-color: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.form-row {
  display: grid;
  gap: 8px;
}

.survey-form label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--ink);
}

/* —— 属性选择器 ——
   input[type="text"] 只选中文本框，
   以后新增 type="email" 时不会被误伤 */
input[type="text"],
select {
  width: 100%;
  padding: 13px 16px;
  font-family: inherit;   /* 表单控件默认不继承字体，需显式声明 */
  font-size: 15px;
  color: var(--ink);
  background-color: #f7faf9;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* :focus 时加一圈青色外发光，明确提示当前输入项 */
input[type="text"]:focus,
select:focus {
  outline: none;
  background-color: #ffffff;
  border-color: var(--jade);
  box-shadow: 0 0 0 4px rgba(23, 121, 111, 0.12);
}

input[type="text"]::placeholder {
  color: #a8bcc2;
}

/* 按钮：渐变底 + 白字 + 圆角 + 内边距 */
.btn-primary {
  margin-top: 6px;
  padding: 15px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #ffffff;
  background: linear-gradient(120deg, var(--teal-700), var(--jade));
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px -16px rgba(18, 101, 94, 0.85);
  filter: brightness(1.06);
}

.btn-primary:active {
  transform: translateY(0);
}

.form-tip {
  min-height: 22px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--jade);
}


/* ==========================================================================
   15 页脚（CSS 要求第 3 条：背景色 + 内边距 + 居中）
   ========================================================================== */
.site-footer {
  padding-top: 80px;
  background-color: var(--teal-950);
  color: rgba(255, 255, 255, 0.6);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1.2fr;
  gap: 56px;
  padding-bottom: 56px;
}

.footer-title {
  margin-bottom: 14px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #ffffff;
}

.footer-desc {
  max-width: 30em;
  font-size: 14px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.55);
}

.footer-col h3 {
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.45);
}

.footer-links li + li {
  margin-top: 10px;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-links a:hover {
  padding-left: 4px;
  color: var(--amber);
}

.footer-note {
  font-size: 13px;
  line-height: 1.95;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  font-size: 12.5px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.42);
}

.back-top {
  padding: 8px 20px;
  font-size: 12.5px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.back-top:hover {
  background-color: var(--amber);
  border-color: var(--amber);
  color: var(--teal-950);
}


/* ==========================================================================
   16 选择器用法小结（答辩时可对照讲解，评分点 12）
   --------------------------------------------------------------------------
   ① id 选择器        #carousel、#stat-days            页面上唯一，权重最高
   ② class 选择器     .card、.nav-list、.slide-title     可复用，最常用
   ③ 属性选择器       input[type="text"]、a[href^="#"]   按属性或属性前缀匹配
   ④ 伪类选择器       :hover、:focus、:focus-within      交互状态
   ⑤ 伪元素选择器     ::before、::after                  生成装饰内容
   ⑥ 后代 / 子代      .nav-list > li > a、.card h3        精确控制层级
   ========================================================================== */

/* 属性选择器示例：所有页内锚点链接统一使用同一条过渡曲线 */
a[href^="#"] {
  transition: color 0.2s ease;
}


/* ==========================================================================
   17 响应式适配：窄屏时多栏自动改为单栏，保证不错位、不重叠
   ========================================================================== */

/* 中等屏幕：四列降为两列，避免出现「3 + 1」的孤儿排布 */
@media (max-width: 1100px) {
  .card-grid,
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat:nth-child(3) {
    padding-left: 0;
    border-left: none;
  }

  .stat:nth-child(n + 3) {
    margin-top: 8px;
  }
}

@media (max-width: 980px) {
  .intro-inner,
  .health-inner,
  .tech-inner,
  .action-inner,
  .survey-inner {
    grid-template-columns: 1fr;   /* 两栏变一栏 */
    gap: 40px;
  }

  /* 单栏后取消“粘性”，否则侧栏会遮住后面的内容 */
  .aqi-panel,
  .tech-figure {
    position: static;
  }

  .carousel-slide img {
    height: 480px;
  }

  .slide-caption {
    left: 32px;
    right: 32px;
    bottom: 92px;
  }

  .carousel-dots {
    right: 32px;
    bottom: 48px;
  }

  .slide-count {
    left: 32px;
    bottom: 30px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

/* ==========================================================================
   17.2 手机端专项适配（860px 起）
   手机不是“把两栏变一行”这么简单，要解决三件事：
     ① 导航：横排在一行会挤成一团 → 改成汉堡菜单 + 纵向面板
     ② 首屏：竖屏下图片更高、字号更大，保证一眼能读清
     ③ 节奏：整体压缩留白，避免一屏只装得下半个区块
   ========================================================================== */

/* —— 汉堡按钮：桌面端隐藏，窄屏由下面的媒体查询打开 —— */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  background-color: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

/* 三条横线用绝对定位码好，展开时上下两条旋转成 × */
.nav-toggle span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  border-radius: 2px;
  background-color: #ffffff;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }

.site-header.is-open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header.is-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.is-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

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

  .header-inner {
    min-height: 66px;
  }

  /* 导航面板：从头部下方整块展开，像一个抽屉 */
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    max-height: calc(100vh - 66px);
    overflow-y: auto;
    padding: 4px 20px 20px;
    background-color: var(--teal-900);
    border-bottom: 1px solid var(--line-light);
    box-shadow: 0 28px 48px -24px rgba(0, 0, 0, 0.7);
  }

  .site-header.is-open .site-nav {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list > li > a {
    padding: 14px 4px;
    font-size: 16px;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
  }

  .nav-list > li > a::after {
    display: none;
  }

  /* 二级菜单在手机上不再“浮”出来，直接展开并缩进，形成分组 */
  .submenu {
    position: static;
    min-width: 0;
    padding: 2px 0 10px 12px;
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .submenu::before {
    display: none;
  }

  .submenu a {
    padding: 9px 10px;
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
  }

  .submenu a:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
  }

  .caret {
    display: none;
  }

  .nav-cta {
    margin-top: 14px;
  }

  .nav-cta > a {
    padding: 13px 20px;
    text-align: center;
    border-radius: 12px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15px;
    line-height: 1.8;
  }

  .container {
    padding-inline: 20px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .brand-text {
    font-size: 18px;
    letter-spacing: 3px;
  }

  .brand-text small {
    letter-spacing: 2px;
  }

  /* —— 首屏：竖屏下抬到 480px，让图片有呼吸空间 —— */
  .carousel-slide img {
    height: 480px;
  }

  /* 竖屏时文字横跨整幅图，左侧横向蒙版不够用，
     改成纵向蒙版：上部保留画面、下部压暗托住文字 */
  .carousel-slide::after {
    background: linear-gradient(180deg,
                rgba(5, 22, 27, 0.40) 0%,
                rgba(5, 22, 27, 0.14) 26%,
                rgba(5, 22, 27, 0.74) 62%,
                rgba(5, 22, 27, 0.95) 100%);
  }

  .slide-caption {
    left: 20px;
    right: 20px;
    bottom: 96px;
  }

  .slide-tag {
    margin-bottom: 14px;
    font-size: 11px;
    letter-spacing: 3px;
  }

  .slide-title {
    margin-bottom: 12px;
    font-size: 27px;
    line-height: 1.35;
    letter-spacing: 1px;
  }

  .slide-desc {
    font-size: 14px;
    line-height: 1.85;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 13px;
  }

  .prev { left: 10px; }
  .next { right: 10px; }

  .carousel-dots {
    right: 20px;
    bottom: 44px;
    gap: 8px;
  }

  .dot {
    width: 18px;
  }

  .dot.is-active {
    width: 30px;
  }

  .slide-count {
    left: 20px;
    bottom: 24px;
    font-size: 12px;
  }

  /* —— 区块节奏：手机上一屏要能看到完整的一段 —— */
  .intro,
  .sources,
  .health,
  .tech,
  .data,
  .action,
  .survey {
    padding-block: 64px;
  }

  .section-head {
    margin-bottom: 32px;
  }

  .section-head h2,
  .intro-head h2,
  .health-main h2,
  .tech-text h2,
  .action-text h2,
  .survey-text h2 {
    font-size: clamp(22px, 5.6vw, 30px);
  }

  .intro-body .lead {
    font-size: 17px;
    line-height: 1.9;
  }

  .intro-fact {
    margin-top: 32px;
  }

  .fact-num {
    font-size: 38px;
  }

  .card {
    padding: 26px 22px;
  }

  .aqi-panel {
    padding: 24px 20px;
  }

  .tech-list > li {
    padding-left: 56px;
    padding-bottom: 24px;
  }

  /* 数字看板改成 2×2，比竖着排四行更紧凑 */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 22px;
  }

  .stat {
    padding: 26px 0 2px;
    border-left: none;
    border-top: 1px solid var(--line-light);
  }

  .stat:nth-child(3) {
    padding-left: 0;
    border-left: none;
  }

  .stat:nth-child(n + 3) {
    margin-top: 0;
  }

  .stat-num {
    font-size: clamp(30px, 8.5vw, 42px);
  }

  .stat-unit {
    margin-top: 12px;
    letter-spacing: 1px;
  }

  .action-list li {
    padding: 14px 0 14px 24px;
    font-size: 14.5px;
  }

  .action-list li::before {
    top: 25px;
  }

  .action-list strong {
    display: inline-block;
    margin-right: 6px;
  }

  .survey-form {
    padding: 24px 20px;
  }

  /* iOS 上字号小于 16px 会自动放大页面，这里强制 16px */
  input[type="text"],
  select {
    font-size: 16px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

@media (max-width: 620px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .risk-list li {
    padding: 7px 14px;
    font-size: 13px;
  }
}

/* 超窄屏（老款小屏手机）：单列显示，保证不出横向滚动条 */
@media (max-width: 380px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .slide-title {
    font-size: 23px;
  }

  .carousel-slide img {
    height: 420px;
  }
}
