.homepage {
  background: var(--bg);
}

.home-hero {
  width: min(1180px, calc(100% - (var(--gutter) * 2)));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, .76fr) minmax(0, 1.24fr);
  gap: 48px;
  align-items: start;
  padding: 72px 0 80px;
}

.home-intro {
  max-width: 470px;
  min-width: 0;
}

.home-hero > * {
  min-width: 0;
}

.home-kicker {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 18px;
  text-transform: uppercase;
}

.home-intro h1 {
  margin-bottom: 24px;
  font-size: 56px;
  line-height: 60px;
}

.home-intro h1 span {
  display: block;
}

.home-intro .large-body span {
  display: block;
}

.home-intro .large-body {
  color: var(--text-muted);
}

.home-intro-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.home-intro-links a {
  color: var(--primary);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.home-section {
  width: min(var(--max-content), calc(100% - (var(--gutter) * 2)));
  margin: 0 auto;
  padding: 80px 0 0;
}

.home-steps,
.home-value {
  padding-top: 32px;
}

.home-section-heading {
  max-width: 620px;
  margin-bottom: 32px;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.step-grid article {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.step-grid span {
  display: block;
  margin-bottom: 16px;
  color: var(--accent);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 32px;
}

.step-grid h3 {
  margin-bottom: 10px;
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 26px;
}

.step-grid p {
  color: var(--text-muted);
}

.home-value {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  border-top: 1px solid var(--border);
}

.home-value p:last-child {
  color: var(--text-muted);
  font-size: 18px;
  line-height: 29px;
}

.cookie-banner {
  position: fixed;
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: 1200;
  display: flex;
  max-width: 520px;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow-floating);
}

.cookie-banner p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 18px;
}

.cookie-banner a {
  color: var(--primary);
  font-weight: 800;
}

.cookie-banner button {
  flex: 0 0 auto;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 1023px) {
  .home-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 48px;
  }

  .home-intro {
    max-width: 760px;
  }

  .home-intro-links {
    display: none;
  }

  .home-value {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 767px) {
  .home-hero {
    height: 110vh;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    padding: 12px 0 10px;
    align-items: stretch;
  }

  .home-hero > .ingredient-composer-card {
    height: 100%;
    min-height: 0;
  }

  .home-intro h1 {
    margin-bottom: 0;
    font-size: 34px;
    line-height: 37px;
  }

  .home-kicker {
    margin-bottom: 6px;
  }

  .home-intro .large-body {
    display: none;
  }

  .home-section {
    padding-top: 56px;
  }

  .home-steps,
  .home-value {
    padding-top: 24px;
  }

  .step-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .home-value p:last-child {
    font-size: 17px;
    line-height: 27px;
  }

  .cookie-banner {
    right: var(--gutter);
    bottom: calc(var(--gutter) + env(safe-area-inset-bottom));
    left: var(--gutter);
    max-width: none;
  }
}

@media (max-width: 379px) {
  .home-intro h1 {
    font-size: 32px;
    line-height: 35px;
  }
}

/* Not flex: the ad inside fills this row at width:100% via its own inline
   style anyway, so centering it did nothing visually - but it left the
   <ins> as a flex item with no definite main-axis width, which is a
   documented AdSense gotcha ("No slot size for availableWidth=0"). */
