/* ==========================================
   指印咖啡 · 全站核心样式表 v4
   项目主管：小马仕（MBP）
   日期：2026-08-06
   三源融合：经方一号骨架 + 钦天监动画 + 爱马仕色彩
   ========================================== */

/* === 一、CSS 变量体系 === */
:root {
  /* ── 爱马仕三主色（实景提取）── */
  --zhiyin-green: #3D6947;    /* 爬山虎绿：Header/Hero/Logo */
  --zhiyin-lotus: #F5F0E8;    /* 睡莲白：页面背景/卡片底色 */
  --zhiyin-wood: #8B6E4F;     /* 廊桥木：分隔线/Footer/次要文字 */

  /* ── 经方一号深烘焙 9 级色阶 ── */
  --roast-900: #1A1A1A;
  --roast-800: #2A2A2A;
  --roast-700: #3D3D3D;
  --roast-600: #555555;
  --roast-500: #6B6B6B;
  --roast-400: #888888;
  --roast-300: #A3A3A3;
  --roast-200: #C5C5C5;
  --roast-100: #E5E5E5;

  /* ── 经方一号铜金强调色 ── */
  --copper: #C8976E;
  --copper-light: #D4AD86;
  --copper-dark: #A87A54;

  /* ── 钦天监动画变量 ── */
  --shimmer-duration: 4s;
  --glow-duration: 3s;
  --sway-duration: 6s;

  /* ── 间距与圆角 ── */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* ── 卡片阴影（Airbnb 暖调）── */
  --card-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  --card-shadow-hover: 0 4px 24px rgba(0, 0, 0, 0.12);

  /* ── 布局 ── */
  --max-width: 1200px;
  --header-height: 64px;
}

/* === 二、全局 Reset & 排版 === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Noto Serif SC', 'Source Han Serif SC', 'STSong', serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--roast-900);
  background-color: var(--zhiyin-lotus);
}

/* === 三、字体系统 === */

/* 霞鹜文楷 - 标题 */

/* Noto Serif SC - 正文（钦天监一号指定） */

/* DM Sans - 英文/数字 */

h1, h2, h3, h4, h5, h6 {
  font-family: 'LXGW WenKai', 'STKaiti', 'KaiTi', serif;
  font-weight: 700;
  line-height: 1.4;
  color: var(--roast-900);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--zhiyin-green);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--copper);
}

/* === 四、全站 Layout === */

.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* === 五、Header === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--zhiyin-wood);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.site-logo {
  font-family: 'LXGW WenKai', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--zhiyin-lotus);
  letter-spacing: 0.05em;
}

.site-nav {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.site-nav a {
  font-family: 'DM Sans', 'LXGW WenKai', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--zhiyin-lotus);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--copper);
}

/* 移动端汉堡菜单 */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--zhiyin-lotus);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--zhiyin-wood);
    padding: var(--space-md);
    gap: var(--space-sm);
  }
  .site-nav.open { display: flex; }
}

/* === 六、Hero 通用样式 === */
.hero {
  padding-top: var(--header-height);
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(61,105,71,.65) 0%, rgba(45,90,55,.7) 50%, rgba(26,26,26,.8) 100%),
    url('/cafe/assets/photos/generated/hero-courtyard.webp') center/cover no-repeat;
  position: relative;
  overflow: hidden;
}

.hero-title {
  font-family: 'LXGW WenKai', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--zhiyin-lotus);
  line-height: 1.3;
  margin-bottom: var(--space-lg);
}

.hero-subtitle {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--zhiyin-lotus);
  opacity: 0.85;
  margin-bottom: var(--space-xl);
}

/* ── 品牌灵魂 Slogan ── */
.hero-slogan {
  font-family: var(--kaiti), 'LXGW WenKai', serif;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--copper, #C4A265);
  letter-spacing: 2px;
  margin-bottom: var(--space-xl);
}

/* === 七、CTA 按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-xl);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--copper), var(--copper-dark));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(200, 151, 110, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--zhiyin-lotus);
  border: 1px solid var(--zhiyin-lotus);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* === 八、卡片系统（Airbnb 暖调）=== */
.card {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}

.card-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--roast-100);
}

.card-body {
  padding: var(--space-md);
}

.card-title {
  font-family: 'LXGW WenKai', serif;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.card-text {
  font-size: 0.875rem;
  color: var(--roast-500);
  line-height: 1.6;
}

/* === 九、骨架屏 === */
.skeleton {
  background: linear-gradient(90deg, var(--roast-100) 25%, var(--roast-200) 50%, var(--roast-100) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 1rem;
  margin-bottom: var(--space-sm);
}
.skeleton-text:last-child { width: 60%; }

.skeleton-image {
  aspect-ratio: 4/3;
  width: 100%;
}

.skeleton-card {
  padding: var(--space-md);
}

/* === 十、Toast 通知 === */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  background: var(--roast-900);
  color: white;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  animation: toast-in 0.3s ease;
}

.toast-undo {
  color: var(--copper);
  cursor: pointer;
  font-weight: 700;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* === 十一、资江水波纹分隔 === */
.wave-divider {
  border: none;
  height: 24px;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 6px,
    var(--zhiyin-wood) 6px,
    var(--zhiyin-wood) 7px,
    transparent 7px,
    transparent 13px,
    var(--zhiyin-wood) 13px,
    var(--zhiyin-wood) 14px
  );
  opacity: 0.3;
  margin: var(--space-2xl) 0;
}

/* === 十二、Footer === */
.site-footer {
  background: var(--zhiyin-wood);
  color: var(--zhiyin-lotus);
  padding: var(--space-2xl) 0;
  position: relative;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  justify-content: space-between;
}

.footer-col h4 {
  color: var(--zhiyin-lotus);
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
}

.footer-col p,
.footer-col a {
  font-size: 0.8rem;
  color: rgba(245, 240, 232, 0.7);
  line-height: 1.8;
}

/* 指纹圆（右下角 fixed） */
.fingerprint-marker {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--zhiyin-lotus);
  opacity: 0.15;
  z-index: 900;
  pointer-events: none;
}


/* === 页面淡入动画 === */
.site-main {
  animation: pageFadeIn 0.3s ease-out;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === Header 滚动阴影 === */
.site-header.scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* === 十三、响应式影格 === */
@media (max-width: 1024px) {
  .container { padding: 0 var(--space-md); }
}

@media (max-width: 768px) {
  :root { --header-height: 56px; }
  .hero { min-height: 50vh; }
  .site-footer .container { flex-direction: column; gap: var(--space-md); }
}

@media (max-width: 375px) {
  .container { padding: 0 var(--space-sm); }
}

/* === 十五、SVG 辅助图形 === */
/* ivy-pattern.svg — 爬山虎藤蔓背景纹 */
.bg-ivy {
  background-image: url('/cafe/assets/svg/ivy-pattern.svg');
  background-repeat: repeat;
  background-size: 400px 400px;
}
.bg-ivy--light {
  background-image: url('/cafe/assets/svg/ivy-pattern.svg');
  background-repeat: repeat;
  background-size: 400px 400px;
  opacity: .15;
}

/* river-wave.svg — 资江水波纹分隔线 */
.wave-divider {
  border: none;
  height: 60px;
  background: url('/cafe/assets/svg/river-wave.svg') center center no-repeat;
  background-size: auto 60px;
  margin: var(--space-lg) 0;
}

/* fingerprint-ring.svg — 指纹圆品牌印记 */
.fingerprint-ring {
  width: 120px;
  height: 120px;
  background: url('/cafe/assets/svg/fingerprint-ring.svg') center/contain no-repeat;
  opacity: .6;
}
.fingerprint-ring--large {
  width: 200px;
  height: 200px;
}
.fingerprint-ring--watermark {
  position: absolute;
  right: var(--space-lg);
  top: 50%;
  transform: translateY(-50%);
  opacity: .12;
}

/* === 十四、无障碍 === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
