/* =====================================================================
   watershop · 水主题极简导航  —  样式
   设计语言：四季水墨长卷 / 深空底色 / 玻璃拟态 / 留白
   ===================================================================== */

/* 签名毛笔字体（本地自托管，国内访问零依赖） */
@font-face {
  font-family: "Ma Shan Zheng";
  src: url("/static/fonts/mashanzheng.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-deep: #050a12;
  --bg-mid: #0a1422;
  --bg-soft: #0e1a2b;
  --water-cyan: #5eead4;
  --water-teal: #2dd4bf;
  --water-blue: #38bdf8;
  --gold: #c9a96a;
  --text-strong: #eaf4f7;
  --text-main: #cdd9e0;
  --text-dim: #7d93a3;
  --glass: rgba(255, 255, 255, 0.045);
  --glass-line: rgba(150, 200, 220, 0.14);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif;
  --sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --brush: "Ma Shan Zheng", "Songti SC", "STKaiti", "KaiTi", serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--text-main);
  background:
    radial-gradient(1200px 700px at 50% -10%, #0c1c30 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 55%, #04080f 100%);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 背景画布 & 压暗层 ---------- */
#water-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(4, 8, 15, 0.30) 0%,
    rgba(4, 8, 15, 0.10) 22%,
    rgba(4, 8, 15, 0.16) 55%,
    rgba(4, 8, 15, 0.46) 82%,
    rgba(4, 8, 15, 0.66) 100%
  );
}

/* 让真实内容浮于画卷之上 */
.site-header, .hero, .collection, .philosophy, .site-footer, .season-dock {
  position: relative;
  z-index: 2;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px clamp(20px, 6vw, 80px);
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(5, 10, 18, 0.7), rgba(5, 10, 18, 0));
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-strong);
}
.brand-mark .drop { stroke-dasharray: 200; stroke-dashoffset: 200; animation: draw 3s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.brand-mark { filter: drop-shadow(0 0 10px rgba(45, 212, 191, 0.35)); }
.brand-text { font-family: var(--serif); font-size: 22px; letter-spacing: 1px; font-weight: 600; }
.brand-text em { color: var(--water-teal); font-style: normal; font-weight: 400; opacity: 0.8; }

.site-nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 38px); }
.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 2px;
  transition: color 0.3s ease;
}
.site-nav a:hover { color: var(--water-cyan); }
.nav-admin {
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  padding: 7px 18px !important;
  color: var(--text-main) !important;
}
.nav-admin:hover {
  border-color: var(--water-teal);
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.25);
  color: var(--water-cyan) !important;
}

/* ---------- 主视觉 ---------- */
.hero {
  text-align: center;
  padding: clamp(60px, 14vh, 150px) 20px clamp(50px, 9vh, 110px);
  max-width: 920px;
  margin: 0 auto;
}
.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 18px 0 78px;
}
.hero-sub-en {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: 16px;
  font-size: clamp(16px, 3vw, 24px);
  color: var(--text-dim);
  text-transform: lowercase;
  opacity: 0;
  animation: fadeUp 1.4s ease 0.6s forwards;
}
.hero-tagline {
  font-family: var(--serif);
  font-size: clamp(18px, 3.4vw, 26px);
  color: var(--text-strong);
  letter-spacing: 3px;
  margin-top: 8px;
  text-shadow: 0 2px 16px rgba(6, 14, 20, 0.75), 0 0 2px rgba(6, 14, 20, 0.6);
  opacity: 0;
  animation: fadeUp 1.4s ease 0.8s forwards;
}
/* 四季诗词 */
.poem {
  font-family: var(--serif);
  font-size: clamp(14px, 2.2vw, 19px);
  color: #eef6f4;
  letter-spacing: 5px;
  margin-top: 20px;
  text-shadow: 0 2px 14px rgba(6, 14, 20, 0.8);
  transition: opacity 0.6s ease, transform 0.6s ease;
  opacity: 0;
  animation: fadeUp 1.4s ease 1s forwards;
}
.poem.fade { opacity: 0 !important; transform: translateY(6px); }
.poem:not(.fade) { opacity: 1; }
.season-sub {
  font-size: 13px;
  color: rgba(238, 246, 244, 0.82);
  letter-spacing: 6px;
  margin-top: 10px;
  text-shadow: 0 1px 10px rgba(6, 14, 20, 0.8);
  opacity: 0;
  animation: fadeUp 1.4s ease 1.05s forwards;
}
.hero-hint {
  font-size: 12px;
  letter-spacing: 3px;
  color: rgba(215, 227, 233, 0.66);
  margin-bottom: 26px;
  text-shadow: 0 1px 10px rgba(6, 14, 20, 0.85);
  opacity: 0;
  animation: fadeUp 1.4s ease 1.25s forwards;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 30px;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  color: var(--water-cyan);
  text-decoration: none;
  letter-spacing: 3px;
  font-size: 15px;
  background: var(--glass);
  transition: all 0.35s ease;
  opacity: 0;
  animation: fadeUp 1.4s ease 1.2s forwards;
}
.hero-cta svg { transition: transform 0.35s ease; }
.hero-cta:hover {
  border-color: var(--water-teal);
  box-shadow: 0 0 26px rgba(45, 212, 191, 0.3);
  transform: translateY(-2px);
}
.hero-cta:hover svg { transform: translateY(3px); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 四季印章 ---------- */
.season-dock {
  position: fixed;
  right: clamp(10px, 2.4vw, 30px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 10;
}
.season-dock button {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(200, 220, 228, 0.35);
  background: rgba(8, 16, 24, 0.42);
  backdrop-filter: blur(6px);
  color: #e8f0f2;
  font-family: var(--brush);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.35s ease;
  position: relative;
}
.season-dock button::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 1px solid rgba(200, 220, 228, 0.18);
  transition: border-color 0.35s ease;
}
.season-dock button:hover {
  transform: scale(1.1);
  border-color: var(--water-cyan);
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.3);
}
.season-dock button.active {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 22px rgba(201, 169, 106, 0.35);
  background: rgba(20, 16, 8, 0.5);
}
.season-dock button.active::after { border-color: rgba(201, 169, 106, 0.45); }

@media (max-width: 560px) {
  .season-dock {
    flex-direction: row;
    top: auto;
    bottom: 14px;
    right: 50%;
    transform: translateX(50%);
    gap: 10px;
  }
  .season-dock button { width: 42px; height: 42px; font-size: 19px; }
}

/* ---------- 收藏导航 ---------- */
.collection {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(40px, 8vh, 90px) clamp(20px, 5vw, 60px) 40px;
}
.section-head { text-align: center; margin-bottom: 50px; }
.section-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(26px, 5vw, 40px);
  letter-spacing: 12px;
  color: var(--text-strong);
  padding-left: 12px;
  text-shadow: 0 2px 18px rgba(6, 14, 20, 0.85);
}
.section-sub {
  color: rgba(215, 227, 233, 0.8);
  font-size: 14px;
  letter-spacing: 4px;
  margin-top: 12px;
  text-shadow: 0 1px 12px rgba(6, 14, 20, 0.8);
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 24px;
  border: 1px solid rgba(200, 220, 228, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(10, 18, 26, 0.72), rgba(8, 14, 22, 0.58));
  backdrop-filter: blur(10px);
  text-decoration: none;
  color: var(--text-main);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1), border-color 0.4s ease, box-shadow 0.4s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: cardIn 0.7s ease forwards;
}
@keyframes cardIn { to { opacity: 1; transform: translateY(0); } }
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 200px at var(--mx, 50%) var(--my, 0%), rgba(45,212,191,0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(45, 212, 191, 0.5);
  box-shadow: var(--shadow), 0 0 30px rgba(45, 212, 191, 0.12);
}
.card:hover::before { opacity: 1; }
.card-top { display: flex; align-items: center; gap: 14px; }
.card-icon {
  font-size: 26px;
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid var(--glass-line);
  flex-shrink: 0;
}
.card-cat {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--water-teal);
  border: 1px solid rgba(45,212,191,0.25);
  border-radius: 999px;
  padding: 3px 12px;
  margin-left: auto;
}
.card-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: 1px;
}
.card-desc { font-size: 13.5px; color: var(--text-dim); line-height: 1.65; }
.card-url {
  margin-top: auto;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  display: flex; align-items: center; gap: 6px;
  opacity: 0.75;
}
.card-url svg { width: 13px; height: 13px; }
.card.featured { border-color: rgba(201, 169, 106, 0.35); }
.card.featured .card-icon { background: rgba(201,169,106,0.12); }
.card.featured .card-cat { color: var(--gold); border-color: rgba(201,169,106,0.4); }

/* 骨架屏 */
.skeleton-card {
  height: 168px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-line);
  background: linear-gradient(100deg, rgba(255,255,255,0.03) 30%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
  font-family: var(--serif);
  letter-spacing: 3px;
}

/* ---------- 水之道 ---------- */
.philosophy {
  max-width: 1100px;
  margin: 40px auto 0;
  padding: clamp(50px, 9vh, 100px) clamp(20px, 5vw, 60px);
  text-align: center;
}
.quote {
  font-family: var(--brush);
  font-size: clamp(24px, 5vw, 44px);
  color: var(--text-strong);
  line-height: 1.6;
  opacity: 0.92;
  max-width: 760px;
  margin: 0 auto 60px;
}
.philo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.philo-item {
  padding: 30px 22px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  background: var(--glass);
  transition: transform 0.4s ease, border-color 0.4s ease;
}
.philo-item:hover { transform: translateY(-5px); border-color: rgba(45,212,191,0.4); }
.philo-num { font-family: var(--serif); color: var(--gold); letter-spacing: 2px; font-size: 14px; }
.philo-item h3 { font-family: var(--brush); font-size: 40px; color: var(--water-cyan); margin: 8px 0 10px; }
.philo-item p { color: var(--text-dim); font-size: 14px; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--glass-line);
  margin-top: 40px;
  padding: 50px 20px 40px;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(4, 8, 15, 0.6));
}
.footer-brand { font-family: var(--brush); font-size: 32px; color: var(--text-strong); }
.footer-note { color: var(--text-dim); font-size: 13px; margin: 10px 0 18px; letter-spacing: 1px; }
.footer-meta { font-size: 13px; color: var(--text-dim); display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.footer-meta a { color: var(--water-teal); text-decoration: none; }
.footer-meta a:hover { text-decoration: underline; }
.placeholder { color: var(--gold); opacity: 0.8; border-bottom: 1px dashed rgba(201,169,106,0.5); }
.gap { opacity: 0.4; }
.footer-links { margin-top: 16px; font-size: 13px; color: var(--text-dim); display: flex; gap: 10px; justify-content: center; }
.footer-links a { color: var(--text-dim); text-decoration: none; }
.footer-links a:hover { color: var(--water-cyan); }
.copyright { margin-top: 22px; font-size: 12px; color: rgba(125,147,163,0.6); letter-spacing: 1px; }

/* ---------- 响应式 ---------- */
@media (max-width: 560px) {
  .site-header { padding: 16px 18px; }
  .brand-text { font-size: 18px; }
  .brand-mark svg { width: 26px; height: 26px; }
  .site-nav { gap: 12px; }
  .site-nav a { font-size: 13px; letter-spacing: 1px; white-space: nowrap; }
  .nav-admin { padding: 5px 12px !important; }
  .hero { padding-top: 40px; }
  .hero-sub-en { letter-spacing: 8px; }
  .hero-title { margin-bottom: 66px; }
  .poem { letter-spacing: 2px; }
  .season-sub { letter-spacing: 3px; }
  .hero-hint { font-size: 11px; letter-spacing: 1px; }
  .links-grid { grid-template-columns: 1fr; }
  .site-footer { padding-bottom: 96px; }
}

/* 尊重减少动态偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.05s !important; }
}
