/* ============================================================
 * 高维智慧教练 · PPT 通用样式（一舟暖纸版 · 杭州诚慧 / 哈尔滨 共用）
 * author: 影子 / 供寂照法师
 * 功能：
 *   1. 修原版"中间一块、四周留白"bug（改用 dvw/dvh + 可缩放）
 *   2. 修 --ink 颜色 bug（深棕字 #2a1d12，不再隐形）
 *   3. 修原版无 mobile 适配（响应式字号 + 移动单列）
 *   4. 桌面 16:9 + 手机 9:16 都整页显示
 * ============================================================ */

/* 设计 token（深棕 + 暖米色，一舟杂志风 · 暖纸叙事） */
:root {
  /* 暖纸 */
  --paper:#f4ecdc;          /* 主背景 */
  --paper-deep:#ede2cc;     /* 副背景 */
  --paper-warm:#e8dcc1;     /* 卡片背景 */

  /* 墨色 */
  --ink:#2a1d12;            /* ✅ 主字色：深棕，背景上的标题 */
  --ink-soft:#5a3e25;       /* 次要文字：暖棕 */
  --ink-mute:#8b6f4e;       /* 灰色标签 */
  --ink-faint:#b8a385;      /* 极淡提示 */

  /* 强调 */
  --accent:#b8451f;         /* 主强调：砖红 */
  --accent-deep:#8d2f12;    /* 深砖红 */
  --accent-warm:#d97706;    /* 琥珀 */
  --accent-purple:#8b5cf6;  /* 紫（链接） */

  /* 边线 */
  --line:#c9b896;
  --line-soft:#ddcfb1;
}

/* 字体：衬线主导，宋体回退 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;600;800;900&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* ---------- 全局重置 ---------- */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  /* dvw/dvh = dynamic viewport，处理 iOS Safari 地址栏弹跳 */
  min-height: 100dvh;
  overflow: hidden;
  font-family: 'Noto Serif SC','Songti SC','Source Han Serif SC', serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- 纸张纹理（一舟·暖纸叙事） ---------- */
.paper-texture {
  position: fixed; inset: 0; pointer-events: none; opacity: 0.4; z-index: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(184,69,31,0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(42,29,18,0.05) 0%, transparent 50%);
}
.grain {
  position: fixed; inset: 0; pointer-events: none; opacity: 0.08; z-index: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 2px,
                              rgba(42,29,18,0.05) 2px, rgba(42,29,18,0.05) 3px);
}

/* ---------- 容器：整页填满 ---------- */
.slide-container {
  position: relative;
  width: 100dvw;
  height: 100dvh;             /* 用 dvh 不用 vh（移动浏览器适配） */
  overflow: hidden;
}

/* ---------- slide 本体：整页填满 ---------- */
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;   /* ✅ 保持垂直居中（左右小动），靠 .content 自身高度撑满 */
  align-items: center;
  padding: clamp(1.5rem, 3vh, 3rem) clamp(2rem, 4vw, 5rem);   /* ✅ 减少上下 padding（之前 4vw 太重），让内容上下都有空间 */
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  background: var(--paper);
  z-index: 1;
}
.slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

/* ---------- content 容器：可缩放，不再 max-width 卡死 ---------- */
.content {
  position: relative;
  z-index: 5;
  text-align: center;
  width: min(96vw, 1500px);   /* ✅ 撑满：原 92vw/1200px → 96vw/1500px（1440 屏从 1200 → 1382，缩小留白） */
  max-width: 96vw;
  min-height: 90vh;           /* ✅ 撑满：内容少时也至少占 90% 屏幕高度 */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;   /* ✅ 上下均布（中心/center 会让内容 "悬浮中间"） */
  /* 用 cqi/cqh 自适应字号（slide 太大就 font 跟着大） */
  font-size: clamp(1rem, 1.6cqi + 0.5rem, 2.5rem);
}

/* ---------- 文字层级（用 cqh 让标题跟着高度自适应） · 整体放大 1.25x (2026-07-10 2nd 撑满） ---------- */
h1 {
  color: var(--ink);          /* ✅ 修复原 --ink = #ede2cc（隐形）的 bug */
  font-weight: 900;
  font-size: clamp(3rem, 11cqh, 8rem);      /* 2.4→3, 9→11, 6.5→8 */
  line-height: 1.2;
  margin-bottom: 1.8rem;
  letter-spacing: 0.02em;
}
h2 {
  color: var(--ink);
  font-weight: 900;
  font-size: clamp(2.5rem, 8.5cqh, 5.5rem); /* 2→2.5, 7→8.5, 4.5→5.5 */
  line-height: 1.25;
  margin-bottom: 1.2rem;
}
h3 {
  color: var(--accent);
  font-weight: 700;
  font-size: clamp(1.7rem, 5cqh, 3.2rem);   /* 1.4→1.7, 4.2→5, 2.6→3.2 */
  line-height: 1.3;
  margin-bottom: 0.9rem;
}
.subtitle {
  color: var(--ink-mute);
  font-size: clamp(1.4rem, 3.4cqh, 2.5rem); /* 1.1→1.4, 2.8→3.4, 2→2.5 */
  font-weight: 300;
  letter-spacing: 2px;
}
.body-text {
  color: var(--ink-soft);
  font-size: clamp(1.4rem, 3.2cqh, 2.5rem); /* 1.1→1.4, 2.6→3.2, 2→2.5 */
  line-height: 1.8;
  font-weight: 300;
  margin-left: auto; margin-right: auto;
}
.quote-text {
  color: var(--ink-soft);
  font-size: clamp(1.6rem, 4cqh, 3rem);     /* 1.3→1.6, 3.2→4, 2.4→3 */
  line-height: 1.7;
  font-weight: 300;
  font-style: italic;
  margin-left: auto; margin-right: auto;
}

/* ---------- 修饰元素 ---------- */
.tag {
  display: inline-block;
  padding: 0.5rem 1.7rem;                   /* 0.4→0.5, 1.4→1.7 */
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-mute);
  font-size: clamp(1.25rem, 2.7cqh, 1.85rem); /* 1→1.25, 2.2→2.7, 1.5→1.85 */
  letter-spacing: 2px;
  margin-bottom: 1.8rem;
}
.highlight     { color: var(--accent); }
.highlight-g   { color: var(--accent); }
.highlight-b   { color: var(--accent); }
.highlight-p   { color: var(--accent); }
.highlight-warm{ color: #fb7185; }
.highlight-o   { color: #fb923c; }

.divider {
  width: clamp(1.5rem, 3vw, 3.5rem);
  height: 2px;
  background: var(--accent);
  margin: 0.8rem auto;
  border-radius: 1px;
}
.big-quote {
  font-size: clamp(1.2rem, 4cqh, 2.6rem);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
}
.footer-note {
  position: absolute; bottom: 3.5rem; left: 0; width: 100%;
  text-align: center; font-size: 0.75rem; color: var(--ink-faint);
  font-weight: 300; z-index: 5; letter-spacing: 1px;
}
.student-name {
  color: var(--accent);
  font-size: clamp(0.7rem, 1.5cqh, 1rem);
  font-weight: 400;
  letter-spacing: 1px;
  margin-top: 0.6rem;
}
.quote-attrib {
  font-size: clamp(0.65rem, 1.3cqh, 0.95rem);
  color: var(--accent);
  margin-top: 0.4rem;
  font-weight: 300;
  letter-spacing: 1px;
}
.small-note {
  font-size: clamp(0.7rem, 1.3cqh, 0.95rem);
  color: var(--ink-mute);
  margin-top: 0.6rem;
  font-weight: 300;
}

/* ---------- 卡片 ---------- */
.card {
  padding: clamp(0.8rem, 2cqh, 1.5rem);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
  background: var(--paper-warm);
}
.card p {
  color: var(--ink-soft);
  font-size: clamp(0.75rem, 1.6cqh, 1.1rem);
  line-height: 1.7;
  font-weight: 300;
}
.card .name {
  color: var(--ink-mute);
  font-size: clamp(0.65rem, 1.3cqh, 0.85rem);
  margin-top: 0.5rem;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(0.8rem, 1.5vw, 1.5rem); width: 100%; margin-left: auto; margin-right: auto; }   /* ✅ 显式水平居中，避免被 inline style margin 覆盖 */
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: clamp(0.6rem, 1vw, 1rem); width: 100%; margin-left: auto; margin-right: auto; }
.grid-item { padding: clamp(1.4rem, 2.8cqh, 2.5rem); border: 1px solid var(--line); border-radius: 12px; text-align: center; }   /* ✅ 1.25x */
.grid-item h3 { color: var(--ink); font-weight: 700; font-size: clamp(1.7rem, 5cqh, 3.2rem); margin-bottom: 0.9rem; }
.grid-item p { color: var(--ink-mute); font-size: clamp(1.2rem, 2.2cqh, 1.8rem); line-height: 1.7; }
.icon-em { font-size: clamp(1.2rem, 3cqh, 2rem); margin-bottom: 0.4rem; }

.split-2 { display: flex; width: 100%; max-width: 680px; gap: 1.5rem; align-items: center; justify-content: center; }
.split-box { flex: 1; padding: clamp(0.8rem, 2cqh, 1.5rem); border-radius: 12px; }
.split-old { border: 1px solid var(--line); text-align: center; }
.split-new { border: 1px solid var(--accent); text-align: center; background: rgba(184,69,31,0.08); }
.split-arrow { font-size: clamp(1.5rem, 3cqh, 2.5rem); color: var(--accent); flex-shrink: 0; }

.arrow-down { font-size: clamp(1rem, 2cqh, 1.5rem); color: var(--accent); font-weight: 300; margin: 0.3rem 0; }

.keyword-tag {
  display: inline-block;
  padding: clamp(0.3rem, 1.2cqh, 0.6rem) clamp(0.6rem, 1.5vw, 1.2rem);
  border-radius: 999px;
  font-size: clamp(0.7rem, 1.5cqh, 1.1rem);
  font-weight: 300;
  margin: 0.3rem;
}

.number-block { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); max-width: 600px; margin: 0 auto; text-align: left; }
.big-number { font-size: clamp(4rem, 17cqh, 9rem); font-weight: 900; color: var(--accent); line-height: 1; }
.number-right { color: var(--ink-soft); font-size: clamp(1.2rem, 2.2cqh, 1.8rem); line-height: 1.7; font-weight: 300; }

.hammer-text {
  color: var(--ink);
  font-weight: 900;
  font-size: clamp(2rem, 7.5cqh, 3.8rem);
  line-height: 1.3;
}
.hammer-sub {
  color: var(--ink-mute);
  font-size: clamp(0.85rem, 1.8cqh, 1.2rem);
  font-weight: 300;
  margin-top: 0.8rem;
  max-width: 600px;
  margin-left: auto; margin-right: auto;
}

/* ---------- 进度 + 页码 ---------- */
.page-num {
  position: absolute;
  bottom: clamp(0.8rem, 2vh, 1.5rem);
  right: clamp(1rem, 2vw, 2rem);
  font-size: clamp(0.7rem, 1.3cqh, 0.95rem);
  color: var(--ink-mute);
  letter-spacing: 2px;
  z-index: 10;
}
.progress-dots {
  position: absolute;
  bottom: clamp(0.8rem, 2vh, 1.5rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  padding: 0;
}
.dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

/* ============================================================
 * 📱 响应式：手机竖屏（重点修：抬头字号太小 / grid 单列后扁 / min-height 占空间）
 * ============================================================ */
@media (max-width: 768px) {
  .slide {
    padding: clamp(1rem, 3vh, 1.8rem) clamp(1rem, 4vw, 1.5rem);
    /* 竖屏允许垂直滚动（页面变高时不被截断） */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .content {
    width: 96vw;
    min-height: 75vh !important;        /* ✅ 手机强制 75vh 撑高 */
    padding: 1.5rem 0 3rem !important;  /* ✅ 上下加 padding，避开页码 */
    justify-content: space-between !important;   /* ✅ 不用 center，让内容贴顶 + 自然分散 */
    font-size: clamp(1.1rem, 3.8vw, 1.4rem);
  }
  h1 { font-size: clamp(2.4rem, 10vw, 3.6rem) !important; line-height: 1.3; }   /* ✅ 上限 3.2→3.6（手机再大） */
  h2 { font-size: clamp(2rem, 8.5vw, 3.2rem) !important; line-height: 1.35; }  /* ✅ 上限 2.8→3.2 */
  h3 { font-size: clamp(1.5rem, 6vw, 2.3rem) !important; line-height: 1.35; }    /* ✅ 上限 2→2.3 */
  .subtitle { font-size: clamp(1.2rem, 4.5vw, 1.7rem) !important; }              /* ✅ 1.4→1.7 */
  .body-text { font-size: clamp(1.2rem, 4vw, 1.7rem) !important; line-height: 1.7; }
  .quote-text { font-size: clamp(1.4rem, 4.5vw, 1.9rem) !important; line-height: 1.6; }
  .tag { font-size: clamp(1.05rem, 3.6vw, 1.3rem) !important; padding: 0.4rem 1.2rem !important; letter-spacing: 1.5px; font-weight: 500; }   /* ✅ 字号 1.2→1.3 + font-weight */
  .big-quote { font-size: clamp(1.5rem, 7vw, 2.5rem) !important; }

  /* ✅ 单列后 box 内的 <br> 强制换行变丑——改用堆叠 (display: block) */
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 1rem !important; }
  .grid-item { padding: 1.2rem 1rem !important; }
  .grid-item p { line-height: 1.5 !important; }
  .grid-item p br { display: none; }   /* ✅ 隐藏 <br>，让句子自然换行 */
  .grid-item h3 { margin-bottom: 0.5rem !important; }

  .split-2 { flex-direction: column; gap: 0.8rem; }

  .number-block { flex-direction: column !important; text-align: center !important; gap: 0.5rem !important; }
  .big-number { font-size: clamp(3rem, 16vw, 6rem) !important; }

  /* ✅ 桌面 75vh 在手机太占空间 */
  [style*="min-height: 75vh"] { min-height: auto !important; }

  .page-num { font-size: 0.8rem; right: 0.8rem; bottom: 0.6rem; }
  .progress-dots { bottom: 0.6rem; gap: 5px; }
  .dot { width: 6px; height: 6px; }
  .dot.active { width: 18px; }

  .hammer-text { font-size: clamp(1.6rem, 7vw, 2.6rem) !important; }
  .hammer-sub { font-size: clamp(1rem, 3.5vw, 1.4rem) !important; }

  /* 移动端隐藏脚注（占空间） */
  .footer-note { display: none; }
}

/* 平板：横屏但非 16:9 */
@media (min-width: 769px) and (max-width: 1200px) {
  .content { width: 95vw; }
}
