/* w11.cool —— 静谧疗愈：暖灰底 × 鼠尾草绿 */
:root {
  --bg: #eceae4;
  --card: #f4f2ec;
  --card-alt: #f0efe7;

  --ink: #37352f;
  --ink-strong: #2f2d28;
  --ink-2: #736f63;
  --ink-3: #8b877b;
  --ink-4: #a09c8f;

  --sage: #5c6b5e;
  --sage-hover: #4c5a4e;
  --sage-soft: #96a297;
  --sage-line: #8a9a8b;
  --sage-num: #3f4c41;
  --sphere: radial-gradient(circle at 38% 32%, #c3cfbd, #93a394 62%, #7d8d7e);

  --btn: #e0ddd4;
  --btn-hover: #d4d0c4;
  --btn-ink: #514f47;

  --kraft: #e9e2d0;
  --kraft-line: #c9bd9e;
  --kraft-ink: #4a4234;
  --kraft-ink-2: #8b8371;

  --gold: #d8c48f;
  --gold-deep: #b39a5e;

  --sans: "Albert Sans", "Noto Sans SC", 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.8;
  min-height: 100vh;
}

a { color: var(--sage); }
a:hover { color: #3d4a3f; }

.mono { font-variant-numeric: tabular-nums; }

/* ---- 顶栏 ---- */
.top {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 920px; width: 100%; margin: 0 auto; padding: 30px 28px 0;
}
.wordmark { font-weight: 500; font-size: 17px; letter-spacing: .04em; color: var(--ink); text-decoration: none; }
.nav-btn {
  text-decoration: none; font-size: 14px; color: var(--btn-ink);
  background: var(--btn); border-radius: 999px; padding: 9px 20px;
  transition: background .25s;
}
.nav-btn:hover { background: var(--btn-hover); color: var(--btn-ink); }

/* ---- 版心 ---- */
.wrap { max-width: 920px; margin: 0 auto; padding: 0 28px 90px; }
.wrap-md { max-width: 680px; }
.wrap-sm { max-width: 620px; }

/* ---- 胶囊按钮 ---- */
.btn {
  display: inline-block; text-decoration: none;
  border-radius: 999px; padding: 14px 32px;
  font-size: 14.5px; font-weight: 500; font-family: inherit;
  border: 0; cursor: pointer;
  transition: background .25s, transform .25s;
}
.btn-primary { background: var(--sage); color: var(--card); }
.btn-primary:hover { background: var(--sage-hover); color: var(--card); transform: translateY(-2px); }
.btn-ghost { background: var(--btn); color: var(--btn-ink); }
.btn-ghost:hover { background: var(--btn-hover); color: var(--btn-ink); }
.btn-row { margin-top: 36px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* ---- 首页 · 呼吸圆 ---- */
.hero { text-align: center; padding-top: 72px; }

.breath { position: relative; width: 190px; height: 190px; margin: 0 auto 40px; }
.breath .ring {
  position: absolute; inset: -22px; border-radius: 50%;
  border: 1px solid #8a9a8b3d;
  animation: ringFade 6s ease-in-out infinite;
}
.breath .ring-out { inset: -46px; border-color: #8a9a8b1c; animation-delay: .8s; }
.breath .ball {
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--sphere);
  box-shadow: 0 28px 64px #7d8d7e4d, inset 0 -14px 30px #5c6b5e33, inset 0 10px 24px #ffffff40;
  animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.055); } }
@keyframes ringFade { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }

.eyebrow { font-size: 13.5px; color: var(--ink-3); letter-spacing: .18em; }
.big-line { margin: 12px 0 16px; font-weight: 300; }
.big-line .num {
  font-size: clamp(80px, 15vw, 148px); letter-spacing: -.03em; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--ink-strong);
}
.big-line .unit {
  font-size: clamp(19px, 3vw, 26px); color: var(--sage); margin-left: 12px;
  border-bottom: 2px solid #8a9a8b59; padding-bottom: 3px;
}
.sub { color: var(--ink-2); font-size: 15.5px; font-weight: 300; }
.sub-dim { margin-top: 6px; font-size: 13.5px; color: var(--ink-3); font-weight: 300; }

/* ---- 首页 · 成长数据 ---- */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 14px; margin-top: 88px;
}
.stat { background: var(--card); border-radius: 22px; padding: 26px 24px 22px; }
.stat:nth-child(even) { background: var(--card-alt); }
.stat-label { font-size: 12.5px; color: var(--sage-soft); font-weight: 500; letter-spacing: .1em; }
.stat-num {
  font-size: 27px; font-weight: 400; color: var(--sage-num);
  font-variant-numeric: tabular-nums; margin-top: 10px;
}
.stat-num .unit { font-size: 14px; color: var(--ink-3); }
.stat-note { font-size: 13px; color: var(--ink-3); margin-top: 2px; }

/* ---- 首页 · 胶囊入口 ---- */
.capsule { margin-top: 72px; display: flex; justify-content: center; }
.capsule-card {
  display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap;
  text-align: center; text-decoration: none;
  background: var(--sage); color: var(--card);
  border-radius: 999px; padding: 20px 34px;
  transition: background .25s, transform .25s;
}
.capsule-card:hover { background: var(--sage-hover); color: var(--card); transform: translateY(-2px); }
.capsule-card strong { font-size: 15.5px; font-weight: 500; }
.capsule-card span { font-size: 13px; color: #cdd5cb; }

.site-foot { margin-top: 100px; text-align: center; color: var(--ink-4); font-size: 12.5px; font-weight: 300; }
.site-foot .love { margin-top: 8px; color: var(--ink-3); }

/* ---- 信箱 ---- */
.page-head { text-align: center; padding-top: 64px; }
.page-head h1 { font-weight: 400; font-size: clamp(28px, 5vw, 36px); letter-spacing: .02em; }
.page-head .intro { margin: 14px auto 0; color: var(--ink-2); max-width: 30em; font-size: 15px; font-weight: 300; }
.countdown {
  margin: 28px auto 0; width: fit-content;
  background: var(--card); border-radius: 999px; padding: 9px 24px;
  color: var(--sage); font-size: 14px;
}
.countdown .num { font-variant-numeric: tabular-nums; font-weight: 500; }

.letter-list { display: flex; flex-direction: column; gap: 14px; margin-top: 52px; }
.envelope {
  display: flex; align-items: center; gap: 18px; position: relative;
  background: var(--kraft); border-radius: 22px; padding: 22px 26px;
  color: inherit; text-decoration: none;
}
.envelope::before {
  content: ""; position: absolute; inset: 7px; pointer-events: none;
  border: 1.5px dashed var(--kraft-line); border-radius: 16px;
}
.envelope .no {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums;
  color: var(--card); background: var(--sage);
}
.envelope .meta { display: flex; flex-direction: column; gap: 1px; }
.envelope .meta strong { font-size: 15.5px; font-weight: 500; color: var(--kraft-ink); }
.envelope .meta span { font-size: 13px; color: var(--kraft-ink-2); }
.envelope .lock { margin-left: auto; font-size: 17px; color: var(--kraft-ink-2); }
a.envelope { transition: transform .25s; }
a.envelope:hover { transform: translateY(-2px); }

.list-hint { text-align: center; color: var(--ink-4); font-size: 13px; margin-top: 44px; font-weight: 300; }
.back-line { text-align: center; margin-top: 32px; }
.back { text-decoration: none; font-size: 14px; }

/* ---- 单封信 ---- */
.letter-paper {
  background: var(--card); border-radius: 26px;
  padding: clamp(32px, 6vw, 56px); margin-top: 52px;
  box-shadow: 0 18px 44px #7d8d7e26;
  line-height: 1.9;
}
.letter-tag { font-size: 12.5px; color: var(--sage-soft); font-weight: 500; letter-spacing: .1em; }
.letter-paper h1 { margin: 10px 0 26px; font-size: 24px; font-weight: 500; letter-spacing: .01em; }
.letter-paper h2 { margin: 1.4em 0 .5em; font-size: 18px; font-weight: 500; }
.letter-paper h3, .letter-paper h4 { margin: 1.4em 0 .5em; font-size: 16px; font-weight: 500; }
.letter-paper p, .letter-paper li { font-size: 15.5px; font-weight: 300; }
.letter-paper p { margin: 0 0 1em; }
.letter-paper p:last-child { margin-bottom: 0; }
.letter-paper blockquote { border-left: 3px solid var(--kraft-line); padding-left: 1em; color: var(--ink-2); margin: 0 0 1em; }
.letter-paper ul { padding-left: 1.4em; margin: 0 0 1em; }

/* ---- 404 ---- */
.page-center { display: flex; flex-direction: column; min-height: 100vh; }
.main-center { flex: 1; display: grid; place-items: center; padding: 40px 28px 80px; }
.lost { text-align: center; }
.lost-visual { position: relative; width: 150px; height: 150px; margin: 0 auto 36px; }
.lost-visual .track {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px dashed #8a9a8b4d;
  animation: ringFade 6s ease-in-out infinite;
}
.lost-visual .stray {
  position: absolute; top: -8px; right: -14px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--sphere); box-shadow: 0 10px 24px #7d8d7e40;
  animation: drift 5s ease-in-out infinite;
}
.lost-visual .core {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 10px; height: 10px; border-radius: 50%; background: #cbc7b9;
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(10px, -14px) rotate(8deg); }
}
.lost h1 {
  font-weight: 300; font-size: clamp(72px, 14vw, 120px);
  letter-spacing: -.03em; line-height: 1; color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
}
.lost .lost-text { margin-top: 18px; color: var(--ink-2); font-size: 15.5px; font-weight: 300; }
.lost .lost-text-dim { margin-top: 4px; color: var(--ink-4); font-size: 13.5px; font-weight: 300; }

/* ---- 生日彩蛋（4-8 由 main.js 给 body 加 .birthday） ---- */
.birthday-view { display: none; }
body.birthday .birthday-view { display: block; }
body.birthday .hero,
body.birthday .stats,
body.birthday .capsule,
body.birthday .footnote { display: none; }
body.birthday .site-foot { margin-top: 110px; }

.cheer { text-align: center; padding-top: 68px; }
.breath-gold .ring { border-color: #d8c48f66; animation-duration: 5s; }
.breath-gold .ring-out { border-color: #d8c48f33; animation-delay: .7s; }
.breath-gold .ball {
  background: radial-gradient(circle at 38% 32%, #e8d9ac, var(--gold) 62%, #c5ad72);
  box-shadow: 0 28px 64px #c5ad7259, inset 0 -14px 30px #a8905233, inset 0 10px 24px #ffffff59;
  animation: breatheGold 5s ease-in-out infinite;
}
@keyframes breatheGold { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.breath .cake { position: absolute; inset: 0; display: grid; place-items: center; font-size: 52px; }
.age-line .num { font-size: clamp(64px, 12vw, 120px); }
.age-line .unit { color: var(--gold-deep); border-bottom-color: #d8c48f8c; }
.wish { margin-top: 24px; color: var(--ink-3); font-size: 14px; font-weight: 300; }

.confetti-layer { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.confetti-layer span {
  position: absolute; top: 0; width: 8px; height: 12px; border-radius: 2px;
  animation: confetti 7s linear infinite;
}
@keyframes confetti {
  0% { transform: translateY(-8vh) rotate(0deg); opacity: 0; }
  8% { opacity: 1; }
  100% { transform: translateY(108vh) rotate(340deg); opacity: .9; }
}
.confetti-layer span:nth-child(1) { left: 8%;  background: #93a394; animation-duration: 7s;   animation-delay: .2s; }
.confetti-layer span:nth-child(2) { left: 18%; background: #d8c48f; animation-duration: 8.5s; animation-delay: 1.4s; width: 7px; height: 7px; border-radius: 50%; }
.confetti-layer span:nth-child(3) { left: 29%; background: #c58f7f; animation-duration: 7.8s; animation-delay: 2.6s; height: 11px; }
.confetti-layer span:nth-child(4) { left: 41%; background: #93a394; animation-duration: 9s;   animation-delay: .9s; width: 6px; height: 6px; border-radius: 50%; }
.confetti-layer span:nth-child(5) { left: 52%; background: #d8c48f; animation-duration: 7.2s; animation-delay: 3.4s; }
.confetti-layer span:nth-child(6) { left: 63%; background: #c58f7f; animation-duration: 8.2s; animation-delay: 1.8s; width: 7px; height: 7px; border-radius: 50%; }
.confetti-layer span:nth-child(7) { left: 74%; background: #93a394; animation-duration: 7.6s; animation-delay: 4.2s; height: 11px; }
.confetti-layer span:nth-child(8) { left: 84%; background: #d8c48f; animation-duration: 8.8s; animation-delay: .5s; width: 6px; height: 6px; border-radius: 50%; }
.confetti-layer span:nth-child(9) { left: 93%; background: #c58f7f; animation-duration: 7.4s; animation-delay: 2.1s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; transition: none !important; }
  .confetti-layer { display: none; }
}
