/* ============================================================
   TEMPLATE 08 — Sage Well
   象牙白+鼠尾草绿+陶土橘,呼吸感留白,健康编辑风。
   适用:健康 / 习惯 / 生活方式 / 家居 niche。
   字体:Lora(display serif)+ DM Sans(body)。
   ============================================================ */

:root {
  --bg: #f6f5ef;
  --card: #fffefa;
  --ink: #26302a;
  --muted: #5c685e;
  --faint: #68736a;
  --sage: #5f7d63;
  --sage-deep: #47614b;
  --sage-tint: #e9efe6;
  --clay: #c4704f;
  --clay-tint: #f7e8e0;
  --line: #e2e0d2;
  --line-strong: #cbc9b8;
  --font-head: "Lora", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-padding-top: 80px; }
body {
  font-family: var(--font-body); background: var(--bg); color: var(--ink);
  line-height: 1.7; font-size: 16.5px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--sage-deep); text-decoration: none; }
a:hover { color: var(--clay); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 500; line-height: 1.22; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
h2 { font-size: 1.7rem; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 750px; }

/* ---------- 顶栏:叶形标 + 柔和底 ---------- */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; }
.brand { font-family: var(--font-head); font-size: 1.25rem; color: var(--sage-deep); display: flex; align-items: center; gap: 9px; }
.brand-leaf { width: 26px; height: 26px; border-radius: 50% 0 50% 50%; background: var(--sage); display: inline-block; }
.brand:hover { color: var(--clay); }
.topnav { display: flex; gap: 24px; font-size: 0.92rem; font-weight: 500; color: var(--muted); }
.topnav a { color: var(--muted); }
.topnav a:hover { color: var(--sage-deep); }
@media (max-width: 720px) { .topnav { display: none; } }

/* ---------- Hero:大留白 + 有机弧形装饰 ---------- */
.hero { padding: 64px 0 48px; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; right: -140px; top: -80px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--sage-tint), transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; }
.over { color: var(--clay); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 16px; }
.hero h1 em { font-style: italic; color: var(--sage-deep); }
.hero .lede { color: var(--muted); max-width: 58ch; font-size: 1.1rem; margin-top: 14px; }
.hero-meta { margin-top: 20px; font-size: 0.87rem; color: var(--faint); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dot-sep { color: var(--sage); }

/* ---------- 排名卡:柔和有机圆角 ---------- */
.grove { padding: 28px 0 36px; display: grid; gap: 20px; }
.leafcard {
  display: grid; grid-template-columns: 84px 1fr 180px; gap: 22px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 24px 28px; transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.leafcard:hover { transform: translateY(-3px); box-shadow: 0 18px 44px -22px rgba(71, 97, 75, 0.35); border-color: var(--line-strong); }
@media (max-width: 860px) { .leafcard { grid-template-columns: 60px 1fr; } .leafcard .pods { grid-column: 2; } }
.pod {
  width: 62px; height: 62px; border-radius: 50% 50% 50% 4px;
  display: grid; place-items: center;
  font-family: var(--font-head); font-size: 1.6rem; color: #fff; background: var(--sage);
}
.leafcard:nth-child(2) .pod { background: var(--clay); }
.leafcard:nth-child(3) .pod { background: var(--sage-deep); }
.lc-body h3 { font-size: 1.35rem; margin-bottom: 6px; }
.lc-body h3 .honor { font-family: var(--font-body); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sage-deep); background: var(--sage-tint); padding: 4px 12px; border-radius: 999px; margin-left: 10px; vertical-align: 3px; }
.lc-body p { color: var(--muted); font-size: 0.96rem; }
.pods { text-align: center; }
.pods .score { font-family: var(--font-head); font-size: 2.2rem; color: var(--sage-deep); line-height: 1.1; }
.pods .lbl { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.pods a { display: inline-block; margin-top: 8px; font-size: 0.86rem; font-weight: 600; }

/* ---------- 表格 ---------- */
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; margin: 24px 0; font-variant-numeric: tabular-nums; }
.compare-table th, .compare-table td { border-bottom: 1px solid var(--line); padding: 12px 14px; text-align: left; }
.compare-table th { font-family: var(--font-body); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sage-deep); background: var(--sage-tint); }
.compare-table th:first-child { border-radius: 10px 0 0 0; }
.compare-table td:first-child { font-weight: 500; }

/* ---------- 正文 ---------- */
.prose { padding: 44px 0 62px; }
.prose h2 { margin: 36px 0 14px; }
.prose p { margin-bottom: 16px; color: #33403a; }
.grow-note { background: var(--clay-tint); border-radius: 16px; padding: 20px 24px; margin: 26px 0; }
.grow-note .g-label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--clay); margin-bottom: 8px; }

/* ---------- 页脚 ---------- */
.footer { background: var(--sage-deep); color: #dce6da; margin-top: 48px; border-radius: 24px 24px 0 0; font-size: 0.88rem; }
.footer-inner { padding: 36px 0; display: grid; gap: 12px; }
.footer a { color: #fff; }
.related-note { border-top: 1px solid rgba(255,255,255,0.2); padding-top: 12px; font-size: 0.8rem; color: #b9cbb7; }

/* ---- micro-interactions / a11y / motion ---- */
:focus-visible { outline: 2px solid var(--sage-deep); outline-offset: 3px; }
::selection { background: rgba(95, 125, 99, 0.22); }
a { text-underline-offset: 3px; }
.back-top { position: fixed; right: 18px; bottom: 18px; z-index: 30; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; background: var(--sage-deep); color: #fff; font-size: 1.05rem;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 18px; font-weight: 600; }
.skip-link:focus { left: 8px; }
[data-animate] { opacity: 0; transform: translateY(14px); transition: opacity 0.65s cubic-bezier(0.22,1,0.36,1), transform 0.65s cubic-bezier(0.22,1,0.36,1); transition-delay: inherit; will-change: opacity, transform; }
[data-animate].in { opacity: 1; transform: none; }
.pods a::after { content: " →"; display: inline-block; transition: transform 0.2s ease; }
.pods a:hover::after { transform: translateX(4px); }
.pod { transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.leafcard:hover .pod { transform: rotate(-8deg) scale(1.07); }
.topbar.scrolled { box-shadow: 0 8px 30px -14px rgba(38, 48, 42, 0.3); }
.topbar { transition: box-shadow 0.25s ease; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  [data-animate] { opacity: 1; transform: none; transition: none; }
}

/* R4 hero specialization */
.brand-leaf { animation: leafsway 5s ease-in-out infinite; transform-origin: 90% 10%; }
@keyframes leafsway { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(8deg); } }
.hero::after { animation: drift 12s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(-30px, 20px) scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .brand-leaf, .hero::after { animation: none; } }

/* R8 score underline growth */
.pods .score { position: relative; display: inline-block; margin-bottom: 8px; }
.pods .score::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--sage); transform: scaleX(0); transform-origin: center;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.35s; }
[data-animate].in .pods .score::after, .in .pods .score::after { transform: scaleX(1); }

/* R9 tables on narrow screens */
@media (max-width: 640px) {
  .compare-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .compare-table tbody { display: table; width: 100%; min-width: 480px; }
}

/* R10 mobile rhythm */
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .sheet { padding: 28px 22px; }
  .hero { padding-top: 48px; }
}

/* R13 hover signature */
.leafcard:hover .honor { background: var(--clay-tint); color: var(--clay); transition: background 0.25s ease, color 0.25s ease; }
.honor { transition: background 0.25s ease, color 0.25s ease; }

/* R1 typography features */
body { font-feature-settings: "kern" 1, "liga" 1, "calt" 1; -webkit-tap-highlight-color: transparent; }

/* R2 editorial measure */
.prose p { text-wrap: pretty; orphans: 3; widows: 3; }
.prose { hyphens: auto; }

/* R4 hero load sequence */
.hero .over, .hero-meta { animation: heroRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.hero .over, .hero-meta { animation-delay: 0.15s; }
@media (prefers-reduced-motion: reduce) { .hero .over, .hero-meta { animation: none; } }

/* R5 hover inner response */
.leafcard:hover .pod { transform: rotate(-8deg) scale(1.07); }

/* R6 prose link underline grow */
.prose p a {
  background: linear-gradient(currentColor, currentColor) bottom left / 0% 1px no-repeat;
  transition: background-size 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: 2px;
}
.prose p a:hover { background-size: 100% 1px; }

/* R7 themed scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #47614b55; border-radius: 5px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #47614b; border: 2px solid transparent; background-clip: content-box; }

/* R8 touch feedback */
.leafcard:active { transform: scale(0.995); }

/* R9 back-top smooth elevator */
.back-top { transform: translateY(10px); transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.back-top[style*="opacity: 1"], .back-top:hover { transform: translateY(0); }
.back-top:active { transform: translateY(2px); }

/* R4b keyframes */
@keyframes heroRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* R3 footer two-column */
@media (min-width: 860px) {
  .footer-inner { grid-template-columns: 1fr auto; align-items: start; }
  .footer-inner > div:first-child { order: 1; }
  .related-note { order: 2; max-width: 56ch; border-top: 0; padding-top: 0; text-align: right; }
}

/* R4 current page nav state */
.topnav a[aria-current='page'] { background: var(--sage-tint); color: var(--sage-deep); border-radius: 999px; }
