/* ============================================
   烘焙备忘录 - Main Stylesheet
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary: #F5E6D3;
  --secondary: #8B5A2B;
  --accent: #D4A574;
  --bg: #FFF8F0;
  --text: #3D2914;
  --text-light: #6B5344;
}

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

html {
  scroll-behavior: smooth;
}

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

/* ---------- Navigation ---------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 5%;
  background: rgba(255,248,240,0.97);
  box-shadow: 0 2px 20px rgba(139,90,43,0.08);
  transition: background 0.3s ease;
}

header.scrolled {
  background: rgba(255,248,240,0.98);
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--secondary);
  text-decoration: none;
  flex-shrink: 0;
}

#clock {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-links a:hover {
  color: var(--secondary);
  background: rgba(139,90,43,0.06);
}

.nav-links a.active {
  color: var(--secondary);
  background: rgba(212,165,116,0.15);
  font-weight: 600;
}

/* ---------- Hero Section ---------- */
.hero {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 0;
  background: linear-gradient(135deg, #F5E6D3 0%, #D4A574 50%, #8B5A2B 100%);
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 600;
  color: var(--secondary);
  letter-spacing: 0.15em;
  text-shadow: 2px 4px 8px rgba(139,90,43,0.15);
  margin-bottom: 1rem;
}

.hero-content p {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: var(--text-light);
  font-weight: 300;
  letter-spacing: 0.2em;
}

.hero-image {
  display: none;
}

body.home main {
  max-width: 100%;
  padding: 80px 0 0;
}

body.home main section.hero {
  padding: 80px 0 0;
}

body.home .hero-image {
  display: none;
}

/* ---------- Section Styles ---------- */
main {
  max-width: 1920px;
  margin: 0 auto;
  padding: 80px 5% 0;
}

main section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--secondary);
  margin-bottom: 1rem;
}

.section-title p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- Recipes Section ---------- */
.recipes {
  background: var(--bg);
}

.recipe-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1100px;
  margin: 0 auto 5rem;
  align-items: center;
}

.recipe-item:nth-child(even) {
  direction: rtl;
}

.recipe-item:nth-child(even) > * {
  direction: ltr;
}

.recipe-image {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(139,90,43,0.12);
}

.recipe-image img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  display: block;
}

.recipe-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.recipe-content p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.recipe-tags {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.tag {
  padding: 0.4rem 1rem;
  background: var(--primary);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--secondary);
}

/* ---------- About Section ---------- */
.about {
  background: linear-gradient(rgba(245,230,211,0.9), rgba(245,230,211,0.95)),
              url('../images/about-bg.jpg') center/cover no-repeat fixed;
}

.about-content {
  max-width: 1920px;
  margin: 0 auto;
  text-align: center;
}

.about-content p {
  font-size: 1.15rem;
  line-height: 2;
  color: var(--text);
}

.about-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}

.feature {
  padding: 2rem;
  background: rgba(255,255,255,0.8);
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature h4 {
  font-family: 'Playfair Display', serif;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

/* ---------- Footer ---------- */
footer {
  background: var(--secondary);
  color: var(--primary);
  padding: 4rem 5% 2rem;
  text-align: center;
}

.footer-content {
  max-width: 1920px;
  margin: 0 auto;
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-links a {
  color: var(--primary);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.footer-links a:hover {
  opacity: 1;
}

.copyright {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
  opacity: 0.7;
}

.copyright p {
  margin-bottom: 0.5rem;
}

.copyright-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  line-height: 1;
}

.copyright-links img {
  vertical-align: middle;
}

.copyright-links a {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
}

/* ---------- Scroll Animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Mobile Menu ---------- */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}

.menu-toggle span {
  width: 25px;
  height: 2px;
  background: var(--secondary);
  transition: all 0.3s ease;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.3s ease;
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
  }

  .nav-links.active {
    right: 0;
  }

  .recipe-item {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .recipe-item:nth-child(even) {
    direction: ltr;
  }

  .about-features {
    grid-template-columns: 1fr;
  }
}

/* ---------- Guide Page ---------- */
.guide-hero {
  height: 40vh;
  min-height: 280px;
  background: linear-gradient(rgba(139,90,43,0.6), rgba(139,90,43,0.7)),
              url('../images/hero-bg.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding-top: 80px;
}

.guide-hero-content {
  max-width: 1920px;
  width: 100%;
  padding: 0 5%;
}

.guide-hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin-bottom: 1rem;
}

.guide-hero-content p {
  font-size: 1.2rem;
  opacity: 0.9;
  font-weight: 300;
}

.guide-body {
  max-width: 1920px;
  margin: 0 auto;
  padding: 4rem 5%;
}

.guide-section {
  margin-bottom: 5rem;
}

.guide-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--secondary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}

.guide-section > p {
  color: var(--text-light);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.guide-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.guide-card {
  background: var(--bg);
  border: 1px solid var(--primary);
  border-radius: 12px;
  padding: 1.5rem;
  transition: box-shadow 0.3s ease;
}

.guide-card:hover {
  box-shadow: 0 4px 20px rgba(139,90,43,0.12);
}

.guide-card h3 {
  font-family: 'Playfair Display', serif;
  color: var(--secondary);
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}

.guide-card-subtitle {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.8rem;
  font-weight: 500;
}

.guide-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---------- About Page ---------- */
.about-hero {
  height: 40vh;
  min-height: 280px;
  background: linear-gradient(rgba(139,90,43,0.6), rgba(139,90,43,0.7)),
              url('../images/hero-bg.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding-top: 80px;
}

.about-hero-content {
  max-width: 1920px;
  width: 100%;
  padding: 0 5%;
}

.about-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin-bottom: 1rem;
}

.about-tagline {
  font-size: 1.2rem;
  opacity: 0.9;
  font-weight: 300;
}

.about-content {
  max-width: 1920px;
  margin: 0 auto;
  padding: 4rem 5%;
}

.about-section {
  margin-bottom: 4rem;
}

.about-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--secondary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}

.about-section p {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 2;
  margin-bottom: 1rem;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.principle-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--primary);
  border-radius: 16px;
}

.principle-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.principle-card h3 {
  font-family: 'Playfair Display', serif;
  color: var(--secondary);
  margin-bottom: 0.8rem;
}

.principle-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem;
  background: var(--bg);
  border: 2px solid var(--primary);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
}

.category-card:hover {
  background: var(--primary);
  transform: translateY(-4px);
}

.category-icon {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
}

.category-card h3 {
  font-family: 'Playfair Display', serif;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.category-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.5;
}

/* ---------- Homepage Header & Footer with Welcome Image ---------- */
body.home header {
  background: rgba(245,230,211,0.97);
  box-shadow: 0 2px 20px rgba(139,90,43,0.08);
}

body.home header .logo {
  color: var(--secondary);
}

body.home header .nav-links a {
  color: var(--text);
}

body.home header .nav-links a:hover {
  color: var(--secondary);
  background: rgba(139,90,43,0.06);
}

body.home header .nav-links a.active {
  color: var(--secondary);
  background: rgba(212,165,116,0.15);
}



