/* =============================================
   HOMEPAGE — Hero, brand trust, featured sections
   Used in addition to main.css
   ============================================= */

/* === Hero === */
.hero {
  position: relative;
  min-height: 75vh;
  display: flex;
  align-items: center;
  background: linear-gradient(105deg, #f0e8d8 0%, #e8dcc5 50%, #d8c8a8 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 30%, rgba(200, 116, 86, 0.12), transparent 50%),
    radial-gradient(circle at 20% 70%, rgba(138, 154, 123, 0.15), transparent 50%);
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
  width: 100%;
}

.hero-eyebrow {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 28px;
  font-weight: 500;
}

.hero h1 {
  font-size: clamp(48px, 7vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

.hero p {
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 480px;
  margin-bottom: 44px;
  font-weight: 300;
}

.hero-cta {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-image {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(44, 42, 38, 0.18);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* === Section bases for homepage === */
section.home-section { padding: 120px 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 60px;
  gap: 40px;
}

.section-head-left { max-width: 600px; }

.section-head p {
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 520px;
  margin-top: 12px;
}

/* === Shop section on homepage — dark ink CTA band === */
.shop {
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  padding: 100px 0;
}

.shop .section-eyebrow { color: var(--terracotta-soft); opacity: 0.9; }
.shop .section-title { color: var(--cream); }
.shop h2 em { color: var(--terracotta-soft); }

.shop .shop-intro {
  font-size: 18px;
  color: var(--cream);
  opacity: 0.75;
  max-width: 540px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

.shop-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 40px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: rgba(246, 241, 232, 0.6);
}

.shop-stats-dot { color: var(--terracotta-soft); }

/* Terracotta CTA button — for use on dark ink backgrounds */
.btn-terracotta {
  background: var(--terracotta);
  color: var(--cream);
}

.btn-terracotta:hover {
  background: var(--cream);
  color: var(--ink);
  transform: translateY(-2px);
}

/* Home-page featured grids (3-up, reserved for future product highlights) */
.product-grid.featured-3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
}

/* Center the "All Recipes" CTA below the recipe grid */
.shop-cta-row {
  display: flex;
  justify-content: center;
  margin-top: 56px;
}

@media (max-width: 900px) {
  .product-grid.featured-3 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .shop-cta-row { margin-top: 36px; }
  .shop .shop-cta-row { margin-top: 8px; margin-bottom: 40px; }
}

/* === Story section === */
.story {
  background: var(--cream-soft);
  border-top: 1px solid var(--line);
  position: relative;
  padding: 120px 0;
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 90px;
  align-items: center;
}

.story-image { position: relative; }

.story-image-main {
  aspect-ratio: 4/5;
  border-radius: 4px;
  overflow: hidden;
}

.story-image-small {
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 60%;
  aspect-ratio: 1/1;
  border-radius: 4px;
  overflow: hidden;
  border: 8px solid var(--cream-soft);
}

.story h2 {
  font-size: clamp(40px, 5vw, 64px);
  margin-bottom: 28px;
}

.story p {
  font-size: 18px;
  color: var(--ink-soft);
  margin-bottom: 24px;
  line-height: 1.7;
}

.story-sig {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 36px;
  color: var(--terracotta);
  margin-top: 32px;
  margin-bottom: 36px;
}

/* === Featured recipes section (homepage) === */
.recipes { background: var(--cream-soft); padding: 120px 0; }

.featured-recipe-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 24px;
}

.featured-recipe-card {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  display: block;
  aspect-ratio: 3/4;
  background: var(--ink);
}

.featured-recipe-card.featured {
  aspect-ratio: auto;
  min-height: 600px;
}

.featured-recipe-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s;
  opacity: 0.92;
}

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

.recipe-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.7) 100%);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--cream);
}

.recipe-tag-overlay {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 10px;
  opacity: 0.9;
}

.recipe-title-overlay {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 8px;
}

.featured-recipe-card.featured .recipe-title-overlay {
  font-size: 44px;
  line-height: 1.05;
}

.recipe-meta-overlay {
  font-size: 12px;
  letter-spacing: 0.1em;
  opacity: 0.85;
}

/* === Blog section (homepage) === */
.blog { background: var(--cream); padding: 120px 0; }

/* === Instagram section === */
.instagram {
  background: var(--cream-soft);
  padding: 100px 0 0;
}

.ig-head { text-align: center; margin-bottom: 60px; }
.ig-head .section-eyebrow { display: block; }

.ig-handle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--terracotta);
  margin-top: 16px;
  display: inline-block;
  text-decoration: none;
  transition: opacity 0.2s;
}
.ig-handle:hover { opacity: 0.7; }

.ig-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.ig-tile {
  display: block;
  aspect-ratio: 1/1;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--line);
}
.ig-tile:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}

.ig-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.ig-tile:hover img { transform: scale(1.08); }

/* === Newsletter section (homepage) === */
.newsletter {
  background: linear-gradient(180deg, var(--sage) 0%, var(--sage-dark) 100%);
  color: var(--cream);
  text-align: center;
  padding: 100px 0;
}

.newsletter-inner {
  max-width: 680px;
  text-align: center;
}

.newsletter .section-eyebrow { color: var(--cream); opacity: 0.7; }

.newsletter h2 {
  color: var(--cream);
  margin-bottom: 16px;
}

/* em inherits sage-dark from main.css — override so italic text is readable
   on the sage gradient background. Matches the .newsletter-strip treatment in archive.css. */
.newsletter h2 em { color: var(--terracotta-soft); }

.newsletter p {
  font-size: 17px;
  max-width: 540px;
  margin: 0 auto 36px;
  opacity: 0.9;
}

.newsletter-form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  background: var(--cream-soft);
  border-radius: 100px;
  padding: 6px;
}

.newsletter-form input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 14px 24px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}

.newsletter-form button {
  background: var(--ink);
  color: var(--cream);
  border: none;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.newsletter-form button:hover { background: var(--terracotta); color: var(--cream); }

/* === Responsive === */
@media (max-width: 1100px) {
  /* Bring down the oversized featured card on large tablets and smaller desktops */
  .featured-recipe-card.featured { min-height: 480px; }
}

@media (max-width: 960px) {
  /* Recipe grid: 2-col on tablet so cards don't get squeezed to tiny 3-col */
  .featured-recipe-grid { grid-template-columns: 1fr 1fr; }
  .featured-recipe-card.featured { grid-column: 1 / -1; min-height: 400px; }
  /* Flip smaller cards to landscape so they aren't absurdly tall at tablet width */
  .featured-recipe-card:not(.featured) { aspect-ratio: 4/3; }
}

@media (max-width: 900px) {
  .hero { min-height: auto; padding: 60px 0; }
  .hero-content { grid-template-columns: 1fr; gap: 40px; }
  /* Show Aneesa's photo before the text on mobile — face first, then copy */
  .hero-image { order: -1; aspect-ratio: 3/2; max-height: 380px; }
  .hero p { font-size: 17px; }
  section.home-section,
  .shop, .story, .recipes, .blog { padding: 70px 0; }
  .featured-recipe-grid { grid-template-columns: 1fr; }
  .featured-recipe-card.featured { min-height: 400px; }
  /* Widescreen portrait cards would be ~1000px tall at full width — use 16/9 instead */
  .featured-recipe-card:not(.featured) { aspect-ratio: 16/9; }
  .ig-grid { grid-template-columns: repeat(3, 1fr); }
  .story-grid { grid-template-columns: 1fr; gap: 60px; }
  /* Switch to a landscape ratio so the image fills the full column width
     instead of rendering at portrait proportions (272px wide) and sitting left */
  .story-image-main { aspect-ratio: 3/2; max-height: none; }
  .story-image-small { display: none; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head .view-all { margin-top: 20px; }

  /* Trust strip — slower scroll, smaller text on mobile */
  .trust { padding: 18px 0; }
  .trust-track {
    gap: 50px;
    font-size: 14px;
    animation: scroll 55s linear infinite;
  }
}

@media (max-width: 600px) {
  /* Featured-3 product grid — drop to single column on phones */
  .product-grid.featured-3 { grid-template-columns: 1fr; }
  /* Tighten section padding on small phones */
  section.home-section,
  .shop, .story, .recipes, .blog, .instagram, .newsletter { padding: 52px 0; }
  /* Hero CTAs — full-width stacked on tiny phones */
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .hero-cta .btn {
    justify-content: center;
    width: 100%;
  }
  /* Hero image — smaller shadow, less margin on tight screens */
  .hero h1 { line-height: 1.05; }
  /* Trust strip even smaller on phones */
  .trust-track { font-size: 13px; gap: 36px; }
  /* IG grid */
  .ig-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  /* Newsletter input + button stack vertically on small phones so the
     email field has room to type without the value overflowing. */
  .newsletter-form {
    flex-direction: column;
    background: transparent;
    padding: 0;
    gap: 10px;
    border-radius: 0;
  }
  .newsletter-form input {
    background: var(--cream-soft);
    padding: 16px 22px;
    border-radius: 100px;
    width: 100%;
  }
  .newsletter-form button {
    width: 100%;
    padding: 16px 28px;
  }
}
