/* ==========================================
   USA Dog Parks · 全球顶级宠物站设计系统 V2.0
   维克托·周手写 CSS 宪法
   设计哲学：国家公园的杂志封面
   每一行代码都为了赚钱，每一个像素都为了信任
   ========================================== */

/* --- 1. 设计变量 --- */
:root {
  --forest-deep: #1a3a1a;      /* 最深绿 - 标题和强调 */
  --forest-green: #2D5A27;     /* 主绿 - 品牌色 */
  --forest-light: #4a7c4a;     /* 浅绿 - 悬停态 */
  --earth-brown: #8B5E3C;      /* 大地棕 - 温暖点缀 */
  --earth-light: #f5f0eb;      /* 沙色背景 - 替代纯白 */
  --sun-orange: #e8652f;       /* CTA橙 - 更克制的暖调 */
  --sun-gold: #f4a340;         /* 强调金 - 评分星标 */
  --cream-white: #FFFDF7;      /* 奶油白 - 页面基底 */
  --charcoal: #1c1c1c;         /* 正文黑 */
  --soft-gray: #5c5c5c;        /* 次要文字 */
  --muted: #8a8a8a;            /* 更淡的文字 */
  --border-light: #e8e0d5;     /* 卡片边框 */
  --border-subtle: #f0ebe3;    /* 更淡的边框 */

  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);
  
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- 2. 全局重置与基调 --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background-color: var(--cream-white);
  line-height: 1.75;
  letter-spacing: -0.003em;
}

/* --- 3. 排版体系 --- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--forest-deep);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  margin-bottom: 0.4em;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-top: 2.5em;
  margin-bottom: 0.5em;
  position: relative;
}

h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--sun-orange);
  margin-top: 12px;
  border-radius: 2px;
}

h3 {
  font-size: 1.4rem;
  margin-top: 1.5em;
  color: var(--forest-green);
}

p {
  margin-bottom: 1.5em;
  color: var(--charcoal);
}

a {
  color: var(--forest-green);
  text-decoration: none;
  transition: color var(--transition-fast);
  font-weight: 500;
}

a:hover {
  color: var(--sun-orange);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

/* --- 4. 容器 --- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.content-narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

.content-wide {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- 5. 导航栏 --- */
.site-header {
  background: rgba(255, 253, 247, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all var(--transition-smooth);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(255, 253, 247, 0.95);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--forest-deep);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo img {
  height: 52px;
  width: auto;
  border-radius: var(--radius-xs);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--charcoal);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--forest-green);
  border-bottom-color: var(--sun-orange);
}

/* --- 6. Hero 磁吸首屏 --- */
.hero {
  padding: clamp(80px, 12vh, 140px) 24px;
  text-align: center;
  background: linear-gradient(175deg, #f8f4ec 0%, var(--cream-white) 40%, #faf7f1 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -180px;
  right: -120px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(45,90,39,0.04) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -80px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(139,94,60,0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  margin-bottom: 0.3em;
  color: var(--forest-deep);
  position: relative;
  z-index: 1;
  line-height: 1.1;
}

.hero p {
  font-size: 1.25rem;
  color: var(--soft-gray);
  max-width: 600px;
  margin: 0 auto 2.5em;
  position: relative;
  z-index: 1;
  line-height: 1.6;
}

.hero .btn-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* --- 7. 卡片系统 --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-smooth);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transition: transform var(--transition-smooth);
}

.card:hover img {
  transform: scale(1.03);
}

.card-content {
  padding: 1.5rem 1.8rem 1.8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-content h3 {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.card-content h3 a {
  color: var(--forest-deep);
  font-weight: 700;
}

.card-content h3 a:hover {
  color: var(--forest-green);
}

.card-content p {
  font-size: 0.95rem;
  color: var(--soft-gray);
  margin-bottom: 1.2rem;
  flex: 1;
}

.card-content .card-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--sun-orange);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition-fast);
}

.card-content .card-link:hover {
  gap: 10px;
}

/* --- 8. 产品评分组件 --- */
.rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0.6rem 0 1rem;
  background: var(--earth-light);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
}

.rating-stars {
  color: var(--sun-gold);
  font-size: 1.1rem;
  letter-spacing: 2px;
}

/* --- 9. 产品对比表格 --- */
.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  font-size: 0.95rem;
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-subtle);
}

.compare-table thead th {
  background: var(--forest-deep);
  color: white;
  padding: 16px 18px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.compare-table thead th:first-child {
  border-radius: var(--radius-md) 0 0 0;
}

.compare-table thead th:last-child {
  border-radius: 0 var(--radius-md) 0 0;
}

.compare-table tbody td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-table tbody tr:hover {
  background: var(--cream-white);
}

.compare-table .highlight-row {
  background: #f9f7f2;
  font-weight: 600;
}

.compare-table .btn-small {
  display: inline-block;
  background: var(--sun-orange);
  color: white;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.compare-table .btn-small:hover {
  background: #d15522;
  color: white;
  transform: translateY(-1px);
}

/* --- 10. CTA 按钮系统 --- */
.btn-cta {
  display: inline-block;
  background: var(--sun-orange);
  color: white !important;
  padding: 16px 36px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(232, 101, 47, 0.3);
  border: none;
  cursor: pointer;
  letter-spacing: -0.01em;
}

.btn-cta:hover {
  background: #d15522;
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 101, 47, 0.4);
}

.btn-cta:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(232, 101, 47, 0.3);
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--forest-green);
  border: 2px solid var(--forest-green);
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-outline:hover {
  background: var(--forest-green);
  color: white;
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--forest-green);
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
}

.btn-ghost:hover {
  background: rgba(45,90,39,0.06);
}

/* --- 11. 徽章与标签 --- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-green {
  background: #e8f0e4;
  color: var(--forest-green);
}

.badge-orange {
  background: #fef0e8;
  color: var(--sun-orange);
}

.badge-brown {
  background: #f5ede5;
  color: var(--earth-brown);
}

/* --- 12. 引用块 --- */
blockquote {
  border-left: 4px solid var(--sun-orange);
  padding: 20px 28px;
  margin: 2rem 0;
  background: var(--earth-light);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--soft-gray);
}

blockquote cite {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-weight: 600;
  color: var(--charcoal);
  font-size: 0.9rem;
}

/* --- 13. 邮箱订阅区 --- */
.newsletter-section {
  background: linear-gradient(160deg, var(--forest-deep) 0%, #1a3018 100%);
  color: white;
  padding: 5rem 24px;
  margin-top: 5rem;
  position: relative;
  overflow: hidden;
}

.newsletter-section::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.newsletter-section h2 {
  color: white;
}

.newsletter-section h2::after {
  background: var(--sun-gold);
}

.newsletter-section p {
  color: rgba(255,255,255,0.85);
}

.newsletter-form {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.newsletter-form input[type="email"] {
  padding: 16px 24px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: white;
  min-width: 280px;
  font-size: 1rem;
  font-family: var(--font-body);
  transition: all var(--transition-fast);
  backdrop-filter: blur(4px);
}

.newsletter-form input[type="email"]::placeholder {
  color: rgba(255,255,255,0.5);
}

.newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: var(--sun-gold);
  background: rgba(255,255,255,0.14);
}

.newsletter-form .btn-cta {
  background: white;
  color: var(--forest-deep) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

.newsletter-form .btn-cta:hover {
  background: var(--sun-gold);
  color: white !important;
}

/* --- 14. 页脚 --- */
.site-footer {
  background: var(--forest-deep);
  color: rgba(255,255,255,0.8);
  padding: 4rem 24px 2rem;
  margin-top: 0;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 3rem;
}

.footer-content h4 {
  color: white;
  margin-top: 0;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.footer-content a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-content a:hover {
  color: var(--sun-gold);
}

.footer-content ul {
  list-style: none;
  padding: 0;
}

.footer-content ul li {
  margin-bottom: 8px;
}

.footer-bottom {
  max-width: 1280px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* --- 15. 工具类 --- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* --- 16. 响应式 --- */
@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  html { font-size: 16px; }
  
  .navbar {
    flex-direction: column;
    gap: 12px;
  }
  
  .nav-links {
    gap: 1.5rem;
  }
  
  .hero {
    padding: 60px 20px;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .compare-table {
    font-size: 0.8rem;
  }
  
  .compare-table thead th,
  .compare-table tbody td {
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .nav-links {
    gap: 1rem;
  }
  
  .nav-links a {
    font-size: 0.8rem;
  }
}