/* ============================================
   果王图鉴 — Durian Encyclopedia
   深色热带风格 · 金色/绿色主调
   ============================================ */

:root {
  --bg-deep: #0d140b;
  --bg-base: #141d12;
  --bg-card: #1a2618;
  --bg-elev: #21301e;
  --gold: #d4a73c;
  --gold-bright: #e8c44d;
  --gold-dim: #9a7b2a;
  --green-leaf: #4a7c3a;
  --green-deep: #2d4a25;
  --amber: #c97e1e;
  --cream: #f0e8d4;
  --text-primary: #e8e2d0;
  --text-secondary: #b0a890;
  --text-muted: #7a7560;
  --border: rgba(212, 167, 60, 0.15);
  --border-strong: rgba(212, 167, 60, 0.3);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

i[class*="ph ph-"] {
  vertical-align: middle;
  line-height: 1;
}

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 20, 11, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Noto Serif SC', serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--gold);
  text-decoration: none;
}

.nav-logo i {
  font-size: 1.4rem;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--gold-bright);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('images/hero-durian.jpg');
  background-size: cover;
  background-position: center;
  filter: brightness(0.4) contrast(1.2) saturate(1.1);
  transform: scale(1.05);
  animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  from { transform: scale(1.05); }
  to { transform: scale(1.15); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(13, 20, 11, 0.3) 0%, rgba(13, 20, 11, 0.85) 70%, rgba(13, 20, 11, 0.98) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  max-width: 800px;
}

.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeInUp 0.8s 0.2s forwards;
}

.hero-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 900;
  color: var(--cream);
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeInUp 0.8s 0.4s forwards;
}

.hero-title .accent {
  color: var(--gold);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.8;
  opacity: 0;
  animation: fadeInUp 0.8s 0.6s forwards;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.8s 0.8s forwards;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--gold);
  color: var(--bg-deep);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover {
  background: var(--gold-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 167, 60, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-weight: 400;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  z-index: 2;
  animation: bounce 2s ease-in-out infinite;
}

.hero-scroll-hint i {
  font-size: 1.2rem;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

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

/* ============ SECTIONS ============ */
section {
  position: relative;
}

.section-head {
  text-align: center;
  padding: 80px 24px 48px;
  max-width: 680px;
  margin: 0 auto;
}

.section-head h2 {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 12px;
}

.section-head p {
  font-size: 1rem;
  color: var(--text-secondary);
}

.section-head-light h2 { color: var(--cream); }
.section-head-light p { color: var(--text-secondary); }

/* ============ GRADES ============ */
.grades {
  background: var(--bg-base);
  padding-bottom: 80px;
}

.grade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.grade-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 32px 24px;
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.grade-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.grade-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 2px;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.grade-s .grade-badge { background: var(--gold); color: var(--bg-deep); }
.grade-a .grade-badge { background: var(--amber); color: var(--cream); }
.grade-b .grade-badge { background: var(--green-leaf); color: var(--cream); }
.grade-c .grade-badge { background: var(--bg-elev); color: var(--text-muted); border: 1px solid var(--border); }

.grade-card h3 {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 12px;
}

.grade-s h3 { color: var(--gold-bright); }

.grade-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.grade-examples {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* ============ VARIETIES ============ */
.varieties {
  background: var(--bg-deep);
  padding-bottom: 80px;
}

.variety-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1100px;
  margin: 0 auto 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.variety-card.reveal {
  opacity: 1;
  transform: translateY(0);
}

.variety-card.reverse {
  direction: rtl;
}

.variety-card.reverse > * {
  direction: ltr;
}

.variety-image {
  position: relative;
  min-height: 280px;
  overflow: hidden;
}

.variety-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.variety-card:hover .variety-image img {
  transform: scale(1.05);
}

.variety-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 2px;
  letter-spacing: 0.05em;
}

.grade-tag-s { background: var(--gold); color: var(--bg-deep); }
.grade-tag-a { background: var(--amber); color: var(--cream); }
.grade-tag-b { background: var(--green-leaf); color: var(--cream); }

.variety-info {
  padding: 32px;
}

.variety-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.variety-header h3 {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--cream);
}

.variety-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--gold-dim);
  background: var(--bg-elev);
  padding: 2px 8px;
  border-radius: 2px;
}

.variety-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.variety-meta i {
  color: var(--gold);
  margin-right: 4px;
}

.variety-spec {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 0.85rem;
}

.variety-spec td {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.variety-spec td:first-child {
  width: 100px;
  color: var(--gold-dim);
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

.variety-spec td:last-child {
  color: var(--text-primary);
}

.variety-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ============ GUIDE ============ */
.guide {
  background: var(--bg-base);
  padding-bottom: 80px;
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.guide-step {
  position: relative;
  padding: 32px 24px;
  border-top: 2px solid var(--gold);
  background: var(--bg-card);
  border-radius: 0 0 4px 4px;
}

.step-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--gold-dim);
  margin-bottom: 12px;
}

.step-icon {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 16px;
  display: block;
}

.guide-step h3 {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 10px;
}

.guide-step p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============ ORIGIN ============ */
.origin {
  position: relative;
  overflow: hidden;
  padding-bottom: 80px;
}

.origin-bg {
  position: absolute;
  inset: 0;
  background-image: url('images/plantation.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  filter: brightness(0.3) saturate(0.8);
}

.origin-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg-deep) 0%, rgba(13, 20, 11, 0.7) 50%, var(--bg-deep) 100%);
}

.origin-content {
  position: relative;
  z-index: 1;
}

.origin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.origin-card {
  background: rgba(26, 38, 24, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 28px 24px;
}

.origin-card h3 {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold-bright);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.origin-card h3 i {
  color: var(--green-leaf);
}

.origin-regions {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--gold-dim);
  margin-bottom: 12px;
}

.origin-card p:last-child {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============ FOOTER ============ */
.footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  padding: 48px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Noto Serif SC', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
}

.footer-tag {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.footer-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .variety-card {
    grid-template-columns: 1fr;
  }

  .variety-card.reverse {
    direction: ltr;
  }

  .variety-image {
    min-height: 220px;
  }

  .variety-info {
    padding: 24px;
  }

  .grade-grid,
  .guide-steps,
  .origin-grid {
    grid-template-columns: 1fr;
  }

  .origin-bg {
    background-attachment: scroll;
  }

  .section-head {
    padding: 60px 20px 36px;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .variety-meta {
    flex-direction: column;
    gap: 8px;
  }
}
