/* ============================================================
   雲 · 我们的日记 — 设计令牌
   ============================================================ */
:root {
  /* 底色与表面 */
  --bg: #FBFAF7;
  --surface: #FFFFFF;
  --surface-soft: #F7F4EE;

  /* 文字 */
  --ink: #3A352F;
  --ink-2: #857C71;
  --ink-3: #B7AEA3;

  /* 可爱色板（低饱和，克制） */
  --cloud: #E9F1F8;
  --cloud-2: #D6E6F3;
  --blue: #7FA8CA;
  --pink: #F6D2D9;
  --pink-deep: #E7A0B0;
  --amber: #F7DEAC;
  --mint: #CDE7D9;

  --line: rgba(58, 53, 47, 0.07);
  --line-2: rgba(58, 53, 47, 0.12);

  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 16px;
  --r-full: 999px;

  --shadow-sm: 0 1px 2px rgba(58, 53, 47, 0.04), 0 4px 14px rgba(58, 53, 47, 0.035);
  --shadow-md: 0 2px 6px rgba(58, 53, 47, 0.045), 0 14px 40px rgba(58, 53, 47, 0.06);

  --font: 'Quicksand', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============================================================
   天空 · 漂浮的云
   ============================================================ */
.sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.cloud {
  position: absolute;
  color: var(--cloud);
  opacity: 0.85;
  will-change: transform;
}

.cloud-a {
  width: 200px;
  top: 8vh;
  left: -60px;
  animation: drift 34s var(--ease) infinite;
}

.cloud-b {
  width: 130px;
  top: 30vh;
  right: -30px;
  color: var(--cloud-2);
  opacity: 0.5;
  animation: drift-rev 46s var(--ease) infinite;
}

.cloud-c {
  width: 96px;
  bottom: 12vh;
  left: 12vw;
  color: var(--pink);
  opacity: 0.32;
  animation: drift 52s var(--ease) infinite 3s;
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(46px, -14px, 0); }
}

@keyframes drift-rev {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-38px, 10px, 0); }
}

/* ============================================================
   头部
   ============================================================ */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: rgba(251, 250, 247, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.site-head.is-scrolled { border-bottom-color: var(--line); }

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

.brand-mark {
  width: 26px;
  height: 26px;
  color: var(--blue);
  transition: transform 0.5s var(--ease);
}

.brand:hover .brand-mark { transform: translateY(-3px) scale(1.06); }

.brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.nav { display: flex; gap: 6px; }

.nav-link {
  padding: 7px 14px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.22s var(--ease), background 0.22s var(--ease);
}

.nav-link:hover { color: var(--ink); background: var(--surface-soft); }

.nav-link.is-active { color: var(--ink); background: var(--cloud); }

/* ============================================================
   Hero · 在一起的天数
   ============================================================ */
main { position: relative; z-index: 1; }

.hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 76px 28px 56px;
  text-align: center;
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-days {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.days-num {
  font-size: clamp(72px, 16vw, 132px);
  background: linear-gradient(170deg, #6E93B4 0%, #A9C6DE 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}

.days-unit {
  font-size: clamp(20px, 4.4vw, 30px);
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

.hero-since {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-2);
}

.hero-line {
  margin-top: 26px;
  font-size: 15px;
  color: var(--ink-2);
  font-weight: 300;
}

/* ============================================================
   主视觉照片
   ============================================================ */
.feature {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 28px 72px;
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 16px;
}

.feature-main {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.ph {
  background:
    radial-gradient(120% 100% at 20% 0%, var(--cloud) 0%, var(--surface-soft) 55%, #F2EEE6 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ph::after {
  content: attr(data-label);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.16em;
}

.feature-main .ph { aspect-ratio: 4 / 3; }

.feature-main figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 22px 18px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(to top, rgba(58, 53, 47, 0.55), transparent);
}

.feature-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
}

.ph-s { border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.ph-a { background: radial-gradient(120% 100% at 80% 0%, var(--pink) 0%, var(--surface-soft) 60%, #F2EEE6 100%); }
.ph-b { background: radial-gradient(120% 100% at 20% 100%, var(--amber) 0%, var(--surface-soft) 60%, #F2EEE6 100%); }

/* ============================================================
   日记列表
   ============================================================ */
.diary,
.wish {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 28px 88px;
}

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 26px;
}

.sec-head h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.sec-count {
  font-size: 13px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* 朋友圈式信息流 */
.feed {
  display: flex;
  flex-direction: column;
  max-width: 760px;
}

.post {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.post:first-child { padding-top: 4px; }
.post:last-child { border-bottom: none; }

.post-avatar {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: var(--r-full);
  background: var(--cloud);
  color: var(--blue);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}

.post-avatar svg { width: 27px; height: 27px; }

.post-main { min-width: 0; }

.post-name {
  font-size: 14.5px;
  font-weight: 600;
  color: #4A6E8C;
  line-height: 1.4;
}

.post-text {
  margin-top: 7px;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.85;
  color: #4A433B;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-media {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  max-width: 420px;
}

.post-media[data-count="1"] { grid-template-columns: 1fr; max-width: 250px; }
.post-media[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 330px; }
.post-media[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-media[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 330px; }
.post-media[data-count="5"],
.post-media[data-count="6"],
.post-media[data-count="7"],
.post-media[data-count="8"],
.post-media[data-count="9"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.post-img {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 11px;
  overflow: hidden;
  padding: 0;
  background:
    radial-gradient(120% 100% at 25% 0%, var(--cloud) 0%, var(--surface-soft) 55%, #F2EEE6 100%);
  transition: transform 0.4s var(--ease), filter 0.3s var(--ease);
  background-size: cover;
  background-position: center;
}

.post-media[data-count="1"] .post-img { aspect-ratio: 4 / 3; }

.post-img:hover { filter: brightness(0.97); }
.post-img:active { transform: scale(0.985); }

.post-img::after {
  content: attr(data-label);
  position: absolute;
  inset: auto 0 8px 0;
  text-align: center;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
}

.post-img.has-src::after { content: none; }

.post-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
}

.post-time {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.post-tag {
  font-size: 11.5px;
  font-weight: 500;
  color: #6E93B4;
  background: var(--cloud);
  padding: 2px 9px;
  border-radius: var(--r-full);
}

/* ============================================================
   愿望清单
   ============================================================ */
.wish {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 38px 34px 34px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  max-width: 1040px;
}

.wish h2 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 22px;
}

.wish-list { list-style: none; display: grid; gap: 2px; }

.wish-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--ink-2);
  transition: color 0.22s var(--ease);
}

.wish-item:last-child { border-bottom: none; }

.wish-item:hover { color: var(--ink); }

.tick {
  flex: none;
  width: 21px;
  height: 21px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--line-2);
  display: grid;
  place-items: center;
  transition: all 0.3s var(--ease);
}

.tick svg { width: 11px; height: 11px; opacity: 0; transform: scale(0.6); transition: all 0.28s var(--ease); }

.wish-item.is-done .tick {
  background: var(--mint);
  border-color: transparent;
}

.wish-item.is-done .tick svg { opacity: 1; transform: scale(1); color: #3F6B52; }

.wish-item.is-done .wish-text {
  text-decoration: line-through;
  text-decoration-color: var(--ink-3);
  color: var(--ink-3);
}

/* ============================================================
   页脚
   ============================================================ */
.site-foot {
  text-align: center;
  padding: 16px 28px 64px;
  color: var(--ink-3);
  font-size: 13px;
}

.foot-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-3);
  opacity: 0.7;
}

/* ============================================================
   图片放大
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 28px;
}

.lightbox[hidden] { display: none; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(46, 42, 37, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fade 0.3s var(--ease);
}

.lightbox-frame {
  position: relative;
  width: min(880px, 100%);
  animation: rise 0.4s var(--ease);
}

.lightbox-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 82vh;
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 100% at 25% 0%, var(--cloud) 0%, var(--surface-soft) 55%, #F2EEE6 100%);
  background-size: cover;
  background-position: center;
  box-shadow: 0 24px 80px rgba(46, 42, 37, 0.3);
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.14em;
}

.lightbox-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink-2);
  box-shadow: var(--shadow-md);
  transition: transform 0.22s var(--ease), color 0.22s var(--ease);
}

.lightbox-close:hover { transform: scale(1.08); color: var(--ink); }
.lightbox-close svg { width: 17px; height: 17px; }

.tag {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 13px;
  border-radius: var(--r-full);
  background: var(--cloud);
  color: #5A7E9C;
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   进场动效
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.72s var(--ease), transform 0.72s var(--ease);
}

.reveal.is-in { opacity: 1; transform: translateY(0); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 860px) {
  .feature {
    grid-template-columns: 1fr;
    padding-bottom: 56px;
  }
  .feature-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .ph-s { aspect-ratio: 1 / 1; }
}

@media (max-width: 640px) {
  .site-head { padding: 14px 18px; }
  .hero { padding: 52px 20px 44px; }
  .feature { padding: 0 18px 52px; gap: 12px; }
  .diary, .wish { padding-left: 18px; padding-right: 18px; }
  .diary { padding-bottom: 64px; }
  .wish { padding: 28px 22px 24px; border-radius: var(--r-lg); }
  .feed { max-width: 100%; }
  .post { grid-template-columns: 40px 1fr; gap: 12px; padding: 20px 0; }
  .post-avatar { width: 40px; height: 40px; }
  .post-avatar svg { width: 23px; height: 23px; }
  .post-text { font-size: 14.5px; }
  .post-media { max-width: 100%; }
  .post-media[data-count="2"] { max-width: 100%; }
  .lightbox { padding: 18px; }
  .lightbox-close { top: -12px; right: -6px; }
  .brand-name { font-size: 18px; }
  .nav-link { padding: 6px 11px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
