/* ============ 辟谷-辟谷官网 · 简约大气风格 ============ */
:root {
  --bg: #faf9f5;
  --surface: #ffffff;
  --ink: #26251f;
  --muted: #7a776c;
  --primary: #31503f;
  --primary-dark: #243c2f;
  --accent: #b08d57;
  --accent-soft: #f3ead9;
  --line: #e8e4da;
  --shadow: 0 10px 40px rgba(38, 37, 31, 0.08);
  --radius: 14px;
  --serif: "Songti SC", "STSong", "NSimSun", "SimSun", "Noto Serif SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.serif { font-family: var(--serif); letter-spacing: 0.06em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 249, 245, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--primary); color: #f5efe2;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 22px; font-weight: 700;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.25; }
.logo-text b { font-family: var(--serif); font-size: 19px; letter-spacing: 0.12em; }
.logo-text span { font-size: 11px; color: var(--muted); letter-spacing: 0.28em; }
.main-nav { display: flex; gap: 6px; }
.main-nav a {
  padding: 8px 14px; border-radius: 8px; font-size: 15px; color: var(--ink);
  transition: all 0.2s;
}
.main-nav a:hover { background: var(--accent-soft); color: var(--primary-dark); }
.main-nav a.active { color: var(--primary); font-weight: 600; position: relative; }
.main-nav a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px; background: var(--accent); border-radius: 2px;
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.menu-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 620px;
  display: flex; align-items: center;
  color: #fff; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url("../images/hero.jpg") center/cover no-repeat;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(20, 30, 24, 0.72) 0%, rgba(20, 30, 24, 0.42) 55%, rgba(20, 30, 24, 0.25) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 90px 0; max-width: 640px; }
.hero-tag {
  display: inline-block; border: 1px solid rgba(255, 255, 255, 0.55);
  padding: 5px 16px; border-radius: 999px; font-size: 13px; letter-spacing: 0.35em;
  margin-bottom: 26px;
}
.hero h1 {
  font-family: var(--serif); font-size: 52px; line-height: 1.3;
  letter-spacing: 0.1em; margin-bottom: 20px;
}
.hero p { font-size: 17px; color: rgba(255, 255, 255, 0.88); margin-bottom: 36px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 30px; border-radius: 999px; font-size: 15px;
  cursor: pointer; border: none; transition: all 0.2s; font-family: var(--sans);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #997847; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.65); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ---------- Section ---------- */
.section { padding: 84px 0; }
.section.alt { background: var(--surface); }
.section-head { text-align: center; margin-bottom: 52px; }
.section-head .eyebrow {
  display: inline-block; color: var(--accent); font-size: 13px;
  letter-spacing: 0.4em; margin-bottom: 12px;
}
.section-head h2 { font-family: var(--serif); font-size: 34px; letter-spacing: 0.1em; }
.section-head .sub { color: var(--muted); margin-top: 12px; font-size: 15px; }
.section-head .rule {
  width: 46px; height: 2px; background: var(--accent);
  margin: 18px auto 0; border-radius: 2px;
}

/* ---------- Stats ---------- */
.stats { background: var(--primary); color: #fff; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  padding: 44px 0; text-align: center;
}
.stat b { font-family: var(--serif); font-size: 38px; display: block; }
.stat b i { font-style: normal; font-size: 18px; margin-left: 4px; color: #e5cf9f; }
.stat span { font-size: 14px; color: rgba(255, 255, 255, 0.75); letter-spacing: 0.15em; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 26px; }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .card-grid.cols-3 { grid-template-columns: 1fr; } }
.course-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s; cursor: pointer;
}
.course-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.course-card .thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--accent-soft); }
.course-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.course-card:hover .thumb img { transform: scale(1.05); }
.course-card .body { padding: 22px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.course-card .cat {
  color: var(--accent); font-size: 12px; letter-spacing: 0.25em; margin-bottom: 8px;
}
.course-card h3 { font-family: var(--serif); font-size: 20px; margin-bottom: 10px; }
.course-card p { font-size: 14px; color: var(--muted); flex: 1; }
.course-card .meta {
  display: flex; gap: 14px; margin-top: 16px; padding-top: 14px;
  border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted);
}
.course-card .meta i { font-style: normal; color: var(--primary); }

/* quote card */
.quote-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; position: relative;
}
.quote-card .stars { color: var(--accent); letter-spacing: 3px; font-size: 15px; margin-bottom: 12px; }
.quote-card p { font-size: 14.5px; color: #4d4a40; }
.quote-card .who {
  display: flex; align-items: center; gap: 10px; margin-top: 18px;
  padding-top: 16px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted);
}
.quote-card .who .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 16px;
}
.quote-card::before {
  content: "\201C"; position: absolute; top: 6px; right: 20px;
  font-family: var(--serif); font-size: 64px; color: var(--accent-soft); line-height: 1;
}

/* news */
.news-card {
  display: grid; grid-template-columns: 200px 1fr; gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: box-shadow 0.25s, transform 0.25s;
}
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.news-card .thumb { overflow: hidden; background: var(--accent-soft); }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card .body { padding: 20px 24px; }
.news-card .tag { color: var(--accent); font-size: 12px; letter-spacing: 0.2em; }
.news-card h3 { font-family: var(--serif); font-size: 18px; margin: 6px 0 8px; }
.news-card p { font-size: 14px; color: var(--muted); }
.news-card .date { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.news-list { display: flex; flex-direction: column; gap: 20px; }

/* ---------- Feature / about blocks ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 28px; text-align: center; transition: transform 0.25s, box-shadow 0.25s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature .icon {
  width: 60px; height: 60px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.feature h3 { font-family: var(--serif); font-size: 19px; margin-bottom: 10px; }
.feature p { font-size: 14px; color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split .pic { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.split h2 { font-family: var(--serif); font-size: 30px; letter-spacing: 0.08em; margin-bottom: 18px; }
.split p { color: #55523f; font-size: 15.5px; margin-bottom: 14px; }
.split .lead { color: var(--accent); font-size: 14px; letter-spacing: 0.3em; margin-bottom: 10px; }

.value-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 26px; margin-top: 22px; }
.value-list li { list-style: none; display: flex; gap: 10px; font-size: 14.5px; color: #4d4a40; }
.value-list li::before { content: "·"; color: var(--accent); font-weight: 700; font-size: 20px; line-height: 1.2; }

.teacher-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.teacher {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 22px; text-align: center;
}
.teacher .avatar {
  width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #4c7a61); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 28px;
}
.teacher h3 { font-family: var(--serif); font-size: 18px; }
.teacher .role { color: var(--accent); font-size: 12.5px; margin: 4px 0 10px; letter-spacing: 0.12em; }
.teacher p { font-size: 13px; color: var(--muted); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--primary-dark), var(--primary));
  border-radius: 20px; color: #fff; text-align: center; padding: 60px 32px;
}
.cta-banner h2 { font-family: var(--serif); font-size: 30px; letter-spacing: 0.1em; margin-bottom: 12px; }
.cta-banner p { color: rgba(255, 255, 255, 0.8); margin-bottom: 28px; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px; box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; margin-bottom: 8px; color: #4d4a40; }
.field label em { color: #c0392b; font-style: normal; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; font-family: var(--sans); background: #fcfbf8; color: var(--ink);
  transition: border-color 0.2s; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); }
.field textarea { min-height: 130px; resize: vertical; }
.star-picker { display: flex; gap: 6px; font-size: 26px; color: #ddd5c2; cursor: pointer; user-select: none; }
.star-picker .on { color: var(--accent); }
.form-msg { margin-top: 16px; font-size: 14px; display: none; padding: 12px 16px; border-radius: 10px; }
.form-msg.ok { display: block; background: #eef5ee; color: #2f6b3c; border: 1px solid #cfe4cf; }
.form-msg.err { display: block; background: #fbeeec; color: #a8402f; border: 1px solid #eed3cd; }

/* contact info */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.info-item { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px dashed var(--line); }
.info-item .icon {
  width: 46px; height: 46px; flex: none; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.info-item b { display: block; font-size: 15px; margin-bottom: 2px; }
.info-item span { font-size: 14px; color: var(--muted); }

/* ---------- Filter chips ---------- */
.chips { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 40px; }
.chip {
  padding: 8px 22px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-size: 14px; color: var(--muted);
  transition: all 0.2s; font-family: var(--sans);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Call widget (立即呼叫插件) ---------- */
.call-fab {
  position: fixed; right: 26px; bottom: 30px; z-index: 300;
  display: flex; align-items: center; gap: 9px;
  background: var(--primary); color: #fff; border: none; cursor: pointer;
  padding: 14px 24px; border-radius: 999px; font-size: 15px; font-family: var(--sans);
  box-shadow: 0 8px 26px rgba(36, 60, 47, 0.42);
  animation: fabPulse 2.4s infinite; transition: background 0.2s;
}
.call-fab:hover { background: var(--primary-dark); }
.call-fab .phone-icon {
  width: 20px; height: 20px; flex: none;
}
@keyframes fabPulse {
  0% { box-shadow: 0 8px 26px rgba(36, 60, 47, 0.42), 0 0 0 0 rgba(49, 80, 63, 0.45); }
  70% { box-shadow: 0 8px 26px rgba(36, 60, 47, 0.42), 0 0 0 16px rgba(49, 80, 63, 0); }
  100% { box-shadow: 0 8px 26px rgba(36, 60, 47, 0.42), 0 0 0 0 rgba(49, 80, 63, 0); }
}
.modal-mask {
  position: fixed; inset: 0; z-index: 400; background: rgba(20, 22, 18, 0.55);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask.open { display: flex; }
.modal {
  background: var(--surface); border-radius: 18px; padding: 40px 36px 32px;
  max-width: 420px; width: 100%; text-align: center; position: relative;
  animation: pop 0.25s ease;
}
@keyframes pop { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal .close {
  position: absolute; top: 14px; right: 16px; border: none; background: none;
  font-size: 22px; color: var(--muted); cursor: pointer; line-height: 1;
}
.modal .ring {
  width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.modal h3 { font-family: var(--serif); font-size: 22px; margin-bottom: 6px; }
.modal .tip { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.modal .hotline {
  font-family: var(--serif); font-size: 34px; color: var(--primary);
  letter-spacing: 0.06em; margin-bottom: 22px;
}
.modal .modal-actions { display: flex; flex-direction: column; gap: 10px; }
.modal .modal-actions .btn { justify-content: center; }

/* ---------- Modal detail (course/news) ---------- */
.detail-modal .modal { max-width: 680px; text-align: left; max-height: 82vh; overflow-y: auto; }
.detail-modal .cover { border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.detail-modal h3 { font-size: 24px; margin-bottom: 8px; }
.detail-modal .meta-line { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }
.detail-modal .content p { margin-bottom: 14px; font-size: 15px; color: #4d4a40; }
.detail-modal .actions { margin-top: 24px; display: flex; gap: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: #22261f; color: rgba(255, 255, 255, 0.72); margin-top: 40px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 60px 0 40px;
}
.footer-grid h4 {
  font-family: var(--serif); color: #fff; font-size: 17px; margin-bottom: 18px; letter-spacing: 0.1em;
}
.footer-grid p, .footer-grid a { font-size: 14px; line-height: 2.1; }
.footer-grid a:hover { color: #e5cf9f; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand .logo-mark { background: #e5cf9f; color: #3a3323; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 20px 0;
  text-align: center; font-size: 13px; color: rgba(255, 255, 255, 0.45);
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(115deg, #243c2f 0%, #31503f 60%, #47694f 100%);
  color: #fff; padding: 76px 0 66px; text-align: center;
}
.page-hero .crumb { font-size: 13px; color: rgba(255, 255, 255, 0.65); letter-spacing: 0.3em; margin-bottom: 14px; }
.page-hero h1 { font-family: var(--serif); font-size: 38px; letter-spacing: 0.14em; }
.page-hero p { color: rgba(255, 255, 255, 0.8); margin-top: 14px; font-size: 15px; }

/* ---------- States ---------- */
.loading { text-align: center; color: var(--muted); padding: 46px 0; font-size: 14.5px; }
.loading::after {
  content: ""; display: block; width: 28px; height: 28px; margin: 14px auto 0;
  border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty, .load-error { text-align: center; color: var(--muted); padding: 46px 0; font-size: 14.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .main-nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    background: var(--surface); flex-direction: column; padding: 12px 20px 18px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .main-nav.open { display: flex; }
  .menu-toggle { display: block; }
  .hero h1 { font-size: 36px; }
  .hero-inner { padding: 70px 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .teacher-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .news-card { grid-template-columns: 1fr; }
  .news-card .thumb { aspect-ratio: 16/7; }
  .form-row { grid-template-columns: 1fr; }
  .value-list { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .btn-call-top { display: none; }
}
