/* ============================================
   HunanFlavor.com — Design System
   Modern Food Magazine × Warm Glowing Dark Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=DM+Sans:wght@400;500;700&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  /* Color Palette — Hunan Spice */
  --bg: #0f0a08;
  --bg-2: #1a110d;
  --bg-3: #241813;
  --surface: rgba(255, 240, 230, 0.04);
  --surface-hover: rgba(255, 240, 230, 0.08);
  --ink: #f5ebe0;
  --ink-soft: #d4c5b9;
  --muted: #9a8b80;
  --rule: rgba(230, 126, 34, 0.15);

  /* Hunan Spice Colors */
  --chili: #e63946;
  --chili-glow: rgba(230, 57, 70, 0.25);
  --ember: #e87a35;
  --ember-glow: rgba(232, 122, 53, 0.2);
  --gold: #f4a261;
  --gold-glow: rgba(244, 162, 97, 0.18);
  --jade: #52b788;
  --jade-glow: rgba(82, 183, 136, 0.15);
  --plum: #7d2e3c;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-accent: 'Cormorant Garamond', Georgia, serif;

  /* Spacing */
  --max-w: 1200px;
  --max-w-narrow: 760px;
  --radius: 14px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

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

/* Atmospheric background — warm spice glow */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, var(--chili-glow) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 15%, var(--ember-glow) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 50% 100%, var(--gold-glow) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.container-narrow {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }

h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); letter-spacing: -0.01em; margin-bottom: 1rem; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; color: var(--ink-soft); }

a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--chili); }

strong { color: var(--ink); font-weight: 700; }
em { font-family: var(--font-accent); font-style: italic; font-size: 1.08em; color: var(--gold); }

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 10, 8, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-logo .pepper {
  color: var(--chili);
  font-size: 1.3rem;
  filter: drop-shadow(0 0 6px var(--chili-glow));
}

.nav-logo .flavor { color: var(--gold); font-weight: 400; font-style: italic; }

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

.nav-links a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  padding: 0.3rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--chili), var(--gold));
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

.nav-search {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 100px;
  padding: 0.5rem 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.nav-search:hover { border-color: var(--gold); color: var(--gold); }

.nav-toggle { display: none; background: none; border: none; color: var(--ink); font-size: 1.5rem; cursor: pointer; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-2);
    padding: 1.5rem;
    gap: 1.2rem;
    border-bottom: 1px solid var(--rule);
  }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 4rem 1.5rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 40%, var(--chili-glow) 0%, transparent 40%),
    radial-gradient(circle at 75% 60%, var(--ember-glow) 0%, transparent 45%),
    linear-gradient(180deg, transparent 0%, var(--bg) 95%);
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: contrast(1.1) saturate(1.2);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(230, 57, 70, 0.1);
  border: 1px solid rgba(230, 57, 70, 0.3);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--chili);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.8s ease both;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.8s ease 0.15s both;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--chili), var(--ember), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
}

.hero p {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 560px;
  margin-bottom: 2rem;
  animation: fadeUp 0.8s ease 0.3s both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeUp 0.8s ease 0.45s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--chili), var(--ember));
  color: #fff;
  box-shadow: 0 8px 30px rgba(230, 57, 70, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(230, 57, 70, 0.45);
  color: #fff;
}

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--rule);
  color: var(--ink);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--gold);
  color: var(--gold);
}

/* ============================================
   SECTION
   ============================================ */
section { padding: 5rem 0; position: relative; z-index: 1; }

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 0.75rem;
}

.section-header h2 { margin-bottom: 0.75rem; }

.section-header p {
  max-width: 560px;
  margin: 0 auto;
  color: var(--muted);
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.card:hover {
  background: var(--surface-hover);
  border-color: rgba(244, 162, 97, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Recipe Card Grid */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

.recipe-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.recipe-card:hover {
  transform: translateY(-6px);
  border-color: rgba(244, 162, 97, 0.35);
  box-shadow: 0 24px 60px rgba(230, 57, 70, 0.15);
}

.recipe-card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-3);
}

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

.recipe-card:hover .recipe-card-img img { transform: scale(1.08); }

.recipe-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15, 10, 8, 0.7) 100%);
}

.recipe-card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  padding: 0.25rem 0.7rem;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.badge-easy { background: rgba(82, 183, 136, 0.2); color: var(--jade); border: 1px solid rgba(82, 183, 136, 0.4); }
.badge-mid { background: rgba(244, 162, 97, 0.2); color: var(--gold); border: 1px solid rgba(244, 162, 97, 0.4); }
.badge-adv { background: rgba(230, 57, 70, 0.2); color: var(--chili); border: 1px solid rgba(230, 57, 70, 0.4); }

.recipe-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.recipe-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.recipe-card h3 a { color: var(--ink); }
.recipe-card h3 a:hover { color: var(--gold); }

.recipe-card-desc {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1rem;
  flex: 1;
}

.recipe-card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.recipe-card-meta span { display: inline-flex; align-items: center; gap: 0.3rem; }

/* ============================================
   CATEGORY PILLS
   ============================================ */
.category-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.category-card {
  position: relative;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--rule);
  overflow: hidden;
  transition: all 0.3s ease;
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--cat-glow, transparent);
  opacity: 0.5;
  z-index: 0;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--cat-color, var(--gold));
  box-shadow: 0 20px 50px var(--cat-glow, var(--gold-glow));
}

.category-card > * { position: relative; z-index: 1; }

.category-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 8px var(--cat-glow));
}

.category-card h3 { margin-bottom: 0.5rem; }

.category-card p { font-size: 0.88rem; color: var(--muted); margin-bottom: 0; }

/* ============================================
   RECIPE ARTICLE
   ============================================ */
.recipe-hero {
  padding: 6rem 0 3rem;
  text-align: center;
}

.recipe-hero h1 {
  margin-bottom: 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.recipe-hero .subtitle {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.recipe-meta-bar {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 1.5rem;
  margin: 2rem 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.recipe-meta-item {
  text-align: center;
}

.recipe-meta-item .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  display: block;
  margin-bottom: 0.3rem;
}

.recipe-meta-item .value {
  font-weight: 700;
  color: var(--gold);
  font-size: 1.05rem;
}

.recipe-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .recipe-content { grid-template-columns: 1fr; }
}

.recipe-body { font-size: 1.05rem; }

.recipe-body h2 {
  font-size: 1.6rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

.recipe-body h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--ember);
}

.recipe-body p { line-height: 1.8; margin-bottom: 1.2rem; }

.recipe-body ul, .recipe-body ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
.recipe-body li { margin-bottom: 0.5rem; color: var(--ink-soft); }
.recipe-body li::marker { color: var(--chili); }

/* Culture Box */
.culture-box {
  background: rgba(82, 183, 136, 0.06);
  border: 1px solid rgba(82, 183, 136, 0.2);
  border-left: 4px solid var(--jade);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin: 2rem 0;
}

.culture-box .box-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--jade);
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

/* Hunan Knowledge Box */
.knowledge-box {
  background: rgba(230, 57, 70, 0.06);
  border: 1px solid rgba(230, 57, 70, 0.2);
  border-left: 4px solid var(--chili);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin: 2rem 0;
}

.knowledge-box .box-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--chili);
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

/* Tip Box */
.tip-box {
  background: rgba(244, 162, 97, 0.06);
  border: 1px solid rgba(244, 162, 97, 0.2);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.tip-box .box-title {
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* Ingredients Sidebar */
.recipe-sidebar {
  position: sticky;
  top: 6rem;
}

.ingredients-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.ingredients-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}

.ingredients-card ul {
  list-style: none;
  padding: 0;
}

.ingredients-card li {
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.92rem;
}

.ingredients-card li:last-child { border-bottom: none; }

.ingredients-card .ing-name { color: var(--ink); }
.ingredients-card .ing-amount { color: var(--gold); font-weight: 600; white-space: nowrap; }

/* Step Images */
.step-img {
  border-radius: var(--radius-sm);
  margin: 1rem 0;
  width: 100%;
  border: 1px solid var(--rule);
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 0;
}

.faq-question {
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  margin-top: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--bg-2);
  border-top: 1px solid var(--rule);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

.footer-brand .nav-logo { margin-bottom: 1rem; }

.footer-brand p { font-size: 0.88rem; color: var(--muted); max-width: 320px; }

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ember);
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { color: var(--ink-soft); font-size: 0.9rem; }
.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Newsletter */
.newsletter {
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.08), rgba(244, 162, 97, 0.06));
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 3rem;
  text-align: center;
  margin: 3rem 0;
}

.newsletter h3 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.newsletter p { color: var(--muted); margin-bottom: 1.5rem; }

.newsletter-form {
  display: flex;
  max-width: 440px;
  margin: 0 auto;
  gap: 0.5rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.85rem 1.2rem;
  border-radius: 100px;
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.92rem;
  font-family: var(--font-body);
}

.newsletter-form input:focus { outline: none; border-color: var(--gold); }

@media (max-width: 500px) {
  .newsletter-form { flex-direction: column; }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px var(--chili-glow); }
  50% { box-shadow: 0 0 40px var(--chili-glow); }
}

.fade-in { animation: fadeUp 0.8s ease both; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.mt-4 { margin-top: 4rem; }
.mb-2 { margin-bottom: 2rem; }

.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--chili), var(--gold));
  border-radius: 100px;
  margin: 1rem auto 2rem;
}

.breadcrumb {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: var(--rule); }

/* Print recipe */
.print-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--chili), var(--ember));
  color: #fff;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(230, 57, 70, 0.4);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.print-btn:hover { transform: scale(1.1); }

@media print {
  .nav, footer, .print-btn, .newsletter, .recipe-sidebar { display: none; }
  body { background: #fff; color: #000; }
  body::before, body::after { display: none; }
}
