/* ═══════════════════════════════════════════════════════════
   AIR FRYER MASTERY — Unified Design System
   Aesthetic: Warm editorial / cookbook magazine
   ═══════════════════════════════════════════════════════════ */

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

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  /* Palette — warm kitchen tones */
  --c-bg:        #faf7f2;
  --c-bg-alt:    #f3ede4;
  --c-bg-deep:   #1a1612;
  --c-surface:   #ffffff;
  --c-surface-warm: #fff8f0;
  --c-border:    #e8e0d4;
  --c-border-lt: #f0ebe3;

  --c-text:      #2c2520;
  --c-text-mid:  #6b5e52;
  --c-text-lt:   #9b8e82;
  --c-text-inv:  #faf7f2;

  --c-accent:    #c8553a;      /* terracotta */
  --c-accent-lt: #e8a48f;
  --c-accent-bg: #fdf0ec;
  --c-gold:      #b8860b;
  --c-gold-lt:   #f5e6c8;
  --c-green:     #4a7c59;
  --c-green-lt:  #e5f0e8;
  --c-blue:      #3d6b8e;
  --c-blue-lt:   #e3eef5;
  --c-purple:    #6b5b7b;
  --c-purple-lt: #f0ecf5;
  --c-red:       #b5403a;
  --c-red-lt:    #fce8e7;

  /* Week colors */
  --w1-color: #4a7c59;
  --w2-color: #c8553a;
  --w3-color: #3d6b8e;
  --w4-color: #b8860b;

  /* Type scale */
  --f-display:  'Playfair Display', Georgia, serif;
  --f-body:     'DM Sans', -apple-system, sans-serif;
  --f-mono:     'JetBrains Mono', monospace;

  --fs-hero:    clamp(2.8rem, 6vw, 4.5rem);
  --fs-h1:      clamp(2rem, 4vw, 3rem);
  --fs-h2:      clamp(1.5rem, 3vw, 2rem);
  --fs-h3:      clamp(1.15rem, 2vw, 1.4rem);
  --fs-body:    1rem;
  --fs-sm:      0.875rem;
  --fs-xs:      0.78rem;

  /* Spacing */
  --sp-page:    clamp(1rem, 4vw, 3rem);
  --sp-section: clamp(3rem, 8vw, 6rem);

  /* Radius */
  --r-sm:  6px;
  --r-md:  12px;
  --r-lg:  20px;
  --r-xl:  28px;

  /* Shadows */
  --sh-sm:  0 1px 3px rgba(44,37,32,.06), 0 1px 2px rgba(44,37,32,.04);
  --sh-md:  0 4px 16px rgba(44,37,32,.07), 0 2px 6px rgba(44,37,32,.04);
  --sh-lg:  0 12px 40px rgba(44,37,32,.1), 0 4px 12px rgba(44,37,32,.05);
  --sh-xl:  0 20px 60px rgba(44,37,32,.12), 0 8px 20px rgba(44,37,32,.06);

  /* Transitions */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::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: var(--f-body);
  font-size: var(--fs-body);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── Noise overlay on body ──────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ── Shared Navigation ──────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, .88);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid var(--c-border-lt);
  padding: 0 var(--sp-page);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--c-text);
  letter-spacing: -0.02em;
}
.nav-brand .brand-dot {
  width: 8px; height: 8px;
  background: var(--c-accent);
  border-radius: 50%;
  display: inline-block;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text-mid);
  transition: all .25s var(--ease-out);
  white-space: nowrap;
}
.nav-links a:hover {
  background: var(--c-accent-bg);
  color: var(--c-accent);
}
.nav-links a.active {
  background: var(--c-accent);
  color: white;
}
.nav-links .nav-emoji { font-size: 1rem; }

/* Mobile nav */
.nav-toggle { display: none; }
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
  }
  .nav-toggle span {
    width: 20px; height: 2px;
    background: var(--c-text);
    border-radius: 2px;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: var(--c-bg);
    padding: 12px var(--sp-page);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--sh-md);
  }
}

/* ── Shared page hero ───────────────────────────────────── */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 10vw, 7rem) var(--sp-page) clamp(3rem, 6vw, 5rem);
  background: var(--c-bg-deep);
  color: var(--c-text-inv);
  text-align: center;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(200,85,58,.15), transparent),
    radial-gradient(ellipse 60% 80% at 70% 80%, rgba(184,134,11,.1), transparent);
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--c-bg), transparent);
}

.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.06);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--c-accent-lt);
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
  animation: fadeSlideUp .8s var(--ease-out) both;
}

.hero-title {
  font-family: var(--f-display);
  font-size: var(--fs-hero);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: .5rem;
  position: relative;
  z-index: 1;
  animation: fadeSlideUp .8s var(--ease-out) .1s both;
}
.hero-title .accent {
  color: var(--c-accent-lt);
  font-style: italic;
}

.hero-subtitle-cn {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: rgba(255,255,255,.5);
  margin-bottom: 1.5rem;
  font-weight: 400;
  animation: fadeSlideUp .8s var(--ease-out) .2s both;
}

.hero-divider {
  width: 60px;
  height: 3px;
  background: var(--c-accent);
  margin: 0 auto 1.5rem;
  border-radius: 2px;
  animation: fadeSlideUp .8s var(--ease-out) .3s both;
}

.hero-desc {
  max-width: 600px;
  margin: 0 auto;
  color: rgba(255,255,255,.6);
  font-size: var(--fs-body);
  line-height: 1.7;
  position: relative;
  z-index: 1;
  animation: fadeSlideUp .8s var(--ease-out) .35s both;
}

.hero-floats {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-float {
  position: absolute;
  font-size: 2.5rem;
  opacity: .15;
  animation: floatSlow 8s ease-in-out infinite alternate;
}
.hf1 { top: 15%; left: 10%; animation-delay: 0s; }
.hf2 { top: 25%; right: 12%; animation-delay: -2s; }
.hf3 { bottom: 25%; left: 18%; animation-delay: -4s; }
.hf4 { bottom: 15%; right: 15%; animation-delay: -6s; }

/* ── Container ──────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--sp-page);
}

/* ── Section headings ───────────────────────────────────── */
.section-heading {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section-heading h2 {
  font-family: var(--f-display);
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--c-text);
}
.section-heading h2 span {
  color: var(--c-accent);
  font-style: italic;
}
.section-heading .zh {
  display: block;
  font-size: var(--fs-sm);
  color: var(--c-text-lt);
  margin-top: 6px;
  font-weight: 400;
}
.section-heading p:not(.zh) {
  max-width: 560px;
  margin: 10px auto 0;
  color: var(--c-text-mid);
  font-size: var(--fs-sm);
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--c-bg-deep);
  color: rgba(255,255,255,.4);
  text-align: center;
  padding: 2.5rem var(--sp-page);
  font-size: var(--fs-xs);
}
.site-footer strong {
  color: rgba(255,255,255,.7);
  font-family: var(--f-display);
}

/* ── Scroll-reveal ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Keyframes ──────────────────────────────────────────── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes floatSlow {
  from { transform: translateY(0) rotate(0deg); }
  to   { transform: translateY(-15px) rotate(5deg); }
}
@keyframes pulse {
  0%, 100% { opacity: .6; }
  50%      { opacity: 1; }
}

/* ── Back to top ────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--c-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--sh-md);
  opacity: 0;
  transform: translateY(12px);
  transition: all .3s var(--ease-out);
  z-index: 90;
}
.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
}
.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-lg);
}

/* ── Print ──────────────────────────────────────────────── */
@media print {
  .site-nav, .back-to-top, .page-hero::before, .page-hero::after,
  body::before { display: none !important; }
  body { background: white; }
  .page-hero { background: #333 !important; padding: 2rem 1rem; }
}
