/* =============================================
   RESET & ROOT VARIABLES
   Clears browser default styles and defines
   our color palette as reusable variables
   ============================================= */

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

:root {
  --cream:       #FBF5EC;
  --light-tan:   #F2E8D8;
  --tan:         #E0CDAF;
  --terracotta:  #C4623A;
  --terra-dark:  #A34E2C;
  --brown:       #2C1A0F;
  --mid-brown:   #6B4C38;
  --sage:        #7A9E7E;
  --sage-dark:   #5A7A5E;
  --white:       #FFFDF9;
}

html {
  scroll-behavior: smooth; /* makes anchor links scroll nicely */
}

body {
  background: var(--cream);
  color: var(--brown);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  overflow-x: hidden; /* prevents horizontal scroll */
}


/* =============================================
   NAVIGATION
   ============================================= */

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 5rem;
  background: var(--cream);
  border-bottom: 1px solid var(--tan);
  position: sticky;  /* sticks to top when you scroll */
  top: 0;
  z-index: 200;      /* stays on top of everything */
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  color: var(--terracotta);
  text-decoration: none;
}

.nav-logo span {
  font-style: italic;
}

.nav-links {
  display: flex;
  gap: 2.8rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--mid-brown);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s;
}

/* Animated underline on hover */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--terracotta);
  transition: width 0.3s ease;
}

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

/* Subscribe button in nav */
.nav-cta {
  padding: 0.6rem 1.6rem;
  background: var(--terracotta);
  color: #fff !important;
}

.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--terra-dark) !important; }


/* =============================================
   BUTTONS
   ============================================= */

.btn-primary {
  padding: 0.9rem 2.2rem;
  background: var(--terracotta);
  color: #fff;
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-block;
  transition: background 0.25s, transform 0.2s;
}

.btn-primary:hover {
  background: var(--terra-dark);
  transform: translateY(-2px); /* lifts up slightly on hover */
}

.btn-ghost {
  padding: 0.9rem 2.2rem;
  border: 1px solid var(--tan);
  color: var(--mid-brown);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: border-color 0.2s, color 0.2s;
}

.btn-ghost:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}


/* =============================================
   HERO SECTION
   Two-column grid: text left, image right
   ============================================= */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr; /* two equal columns */
  min-height: 88vh;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 4.5rem 5rem 5rem;
  background: var(--light-tan);
  position: relative;
}

/* Decorative border inside the left panel */
.hero-left::after {
  content: '';
  position: absolute;
  top: 3rem;
  left: 3rem;
  right: 3rem;
  bottom: 3rem;
  border: 1px solid var(--tan);
  pointer-events: none;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 1.6rem;
}

.hero-tag::before {
  content: '';
  display: inline-block;
  width: 30px;
  height: 1px;
  background: var(--sage-dark);
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 5vw, 5rem); /* scales with screen size */
  line-height: 1.08;
  color: var(--brown);
  margin-bottom: 1.8rem;
}

.hero-title em {
  font-style: italic;
  color: var(--terracotta);
}

.hero-desc {
  font-family: 'Lora', serif;
  font-size: 1rem;
  color: var(--mid-brown);
  line-height: 1.8;
  max-width: 380px;
  margin-bottom: 2.8rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.hero-right {
  position: relative;
  overflow: hidden;
}

.hero-right img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* fills the box without stretching */
  display: block;
  transition: transform 0.6s ease;
}

.hero-right:hover img {
  transform: scale(1.03); /* subtle zoom on hover */
}

/* Small floating box over the image */
.hero-badge {
  position: absolute;
  bottom: 2.5rem;
  right: 2.5rem;
  background: var(--cream);
  padding: 1.2rem 1.8rem;
  text-align: right;
}

.hero-badge-num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--terracotta);
  line-height: 1;
}

.hero-badge-label {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mid-brown);
  margin-top: 0.3rem;
}


/* =============================================
   SHARED SECTION HEADER STYLES
   Used above both Recipes and Featured sections
   ============================================= */

.section-intro {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.7rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  color: var(--brown);
  line-height: 1.2;
}

.section-title em {
  font-style: italic;
  color: var(--terracotta);
}


/* =============================================
   RECIPE CARDS SECTION
   ============================================= */

.recipes-section {
  padding: 6rem 5rem;
  background: var(--cream);
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 equal columns */
  gap: 2rem;
}

.recipe-card {
  background: var(--white);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.recipe-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(44, 26, 15, 0.12);
}

.card-img-wrap {
  position: relative;
  overflow: hidden;
  height: 230px;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

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

/* Time badge overlaid on card image */
.card-time-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--cream);
  padding: 0.35rem 0.7rem;
  font-size: 0.7rem;
  color: var(--mid-brown);
}

.card-body {
  padding: 1.6rem;
}

.card-cat {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 0.5rem;
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--brown);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--mid-brown);
  line-height: 1.6;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--light-tan);
}

/* Difficulty dots (filled = hard) */
.card-diff {
  display: flex;
  gap: 4px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tan);
}

.dot.filled {
  background: var(--terracotta);
}

.card-servings {
  font-size: 0.72rem;
  color: #9C7C6A;
}


/* =============================================
   FEATURED RECIPE
   Wide horizontal card, image left, info right
   ============================================= */

.featured-section {
  padding: 0 5rem 6rem;
}

.featured-card {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  background: var(--light-tan);
  overflow: hidden;
  min-height: 420px;
}

.featured-img-wrap {
  overflow: hidden;
}

.featured-img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.featured-card:hover .featured-img {
  transform: scale(1.04);
}

.featured-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.5rem;
}

.featured-badge {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: var(--terracotta);
  color: #fff;
  padding: 0.35rem 0.8rem;
  margin-bottom: 1.3rem;
  width: fit-content;
}

.featured-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  line-height: 1.2;
  color: var(--brown);
  margin-bottom: 1rem;
}

.featured-title em {
  font-style: italic;
  color: var(--terracotta);
}

.featured-desc {
  font-family: 'Lora', serif;
  font-size: 0.95rem;
  color: var(--mid-brown);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.featured-meta {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

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

.meta-val {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--terracotta);
  display: block;
}

.meta-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mid-brown);
}


/* =============================================
   STATS STRIP
   Terracotta bar with 4 big numbers
   ============================================= */

.stats-strip {
  background: var(--terracotta);
  display: flex;
  justify-content: center;
  gap: 6rem;
  padding: 3rem 5rem;
}

.stat {
  text-align: center;
  color: #fff;
}

.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-style: italic;
  line-height: 1;
}

.stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-top: 0.4rem;
}


/* =============================================
   ABOUT SECTION
   Dark background, image + text side by side
   ============================================= */

.about-section {
  background: var(--brown);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 380px;
}

.about-img-wrap {
  overflow: hidden;
}

.about-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.85;
  transition: transform 0.5s;
}

.about-img-wrap:hover img {
  transform: scale(1.04);
}

.about-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4.5rem 5rem;
  color: var(--cream);
}

.about-tag {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 1rem;
}

.about-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  line-height: 1.25;
  margin-bottom: 1.4rem;
}

.about-title em {
  font-style: italic;
  color: var(--terracotta);
}

.about-text {
  font-family: 'Lora', serif;
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--tan);
  margin-bottom: 2rem;
}


/* =============================================
   FOOTER
   ============================================= */

footer {
  background: var(--brown);
  color: var(--tan);
  padding: 3rem 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #4A2E1A;
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--terracotta);
  font-style: italic;
}

.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.footer-links a {
  text-decoration: none;
  color: var(--tan);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--terracotta);
}

.footer-copy {
  font-size: 0.78rem;
  opacity: 0.5;
}


/* =============================================
   SCROLL FADE-IN ANIMATION
   JS adds the .visible class when element
   enters the viewport — this CSS does the rest
   ============================================= */

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Stagger the 3 cards so they appear one after another */
.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.2s; }