/* ─────────────────────────────────────────────────────
   SAVE.AG HOMEPAGE — Hope + action + trust
   Header/footer styles: header.css, footer.css
   Accessibility/resets: inherited from public.css
   Brand variables: saveag-ui.css (loaded before this file)
───────────────────────────────────────────────────── */

html { scroll-behavior: smooth; }

/* Homepage-specific focus indicators */
.example-chip:focus-visible,
.search-input:focus-visible,
.search-submit:focus-visible {
  outline: 3px solid var(--color-accent-3, #6bafb2);
  outline-offset: 2px;
}

/* ── SECTION 1: HERO ────────────────────────────────
   Full viewport. Search box at natural eye level.
   Image: JPEG fallback (239KB), WebP for modern browsers (185KB).
───────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(rgba(31,67,50,0.72), rgba(31,67,50,0.78)),
              url('../graphics/hero-soil-hands.jpg') center/cover no-repeat;
  padding: 7rem 2.5rem 3.5rem;
}
@supports (background-image: url('x.webp')) {
  .hero {
    background-image: linear-gradient(rgba(31,67,50,0.72), rgba(31,67,50,0.78)),
                      url('../graphics/hero-soil-hands.webp');
  }
}
.hero-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}
.hero-inner .search-wrap {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero-h1 {
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  font-weight: 700; line-height: 1.4;
  color: var(--color-text-light);
  margin-bottom: 1.2rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35);
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero-sub {
  font-size: 0.95rem; line-height: 1.8;
  font-weight: 500;
  color: rgba(247,247,237,0.95);
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  max-width: 580px;
  margin: 0 auto 2rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.4s forwards;
}

/* Search box */
.search-wrap {
  position: relative;
  margin-bottom: 1.3rem;
  box-shadow: 0 3px 18px rgba(31,67,50,0.09);
  border-radius: 6px;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.5s forwards;
}
.search-input {
  box-sizing: border-box;
  width: 100%;
  padding: 0.95rem 3.4rem 0.95rem 1.3rem;
  font-size: 0.9rem;
  font-family: 'Poppins', sans-serif; font-weight: 300;
  background: var(--color-text-light);
  border: 2px solid transparent;
  border-radius: 6px; outline: none;
  color: var(--color-secondary);
  text-overflow: ellipsis;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--color-primary); }
.search-input::placeholder { color: #bbb; }
.search-submit {
  position: absolute; right: 0.55rem; top: 50%;
  transform: translateY(-50%);
  background: var(--color-secondary);
  border: none; border-radius: 4px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.2s;
}
.search-submit:hover { background: var(--color-primary); }
.search-submit svg { width: 13px; height: 13px; stroke: var(--color-text-light); fill: none; stroke-width: 2.5; }

/* Chip label */
.chip-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(247,247,237,0.65);
  letter-spacing: 0.02em;
  margin: 0 0 0.4rem;
  text-align: center;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.55s forwards;
}

/* Example query chips */
.example-chips {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  justify-content: center;
  max-width: 960px;
  margin: 0 auto 1.5rem;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.6s forwards;
}
.example-chip {
  background: transparent;
  border: 1px solid rgba(247,247,237,0.35);
  border-radius: 100px;
  padding: 0.26rem 0.6rem;
  font-size: 0.72rem; font-weight: 400;
  font-family: 'Poppins', sans-serif;
  color: rgba(247,247,237,0.9); cursor: pointer;
  text-shadow: 0 1px 3px rgba(0,0,0,0.25);
  text-decoration: none;
  transition: border-color 0.18s, color 0.18s;
}
.example-chip:hover { border-color: var(--color-accent-3); color: var(--color-text-light); }


/* ── BEATS 1–3: Below-fold narrative ─────────────────
   Generous vertical spacing. Clear typographic hierarchy.
───────────────────────────────────────────────────── */
.beat {
  padding: 1.25rem 2.5rem;
  border-bottom: 1px solid rgba(31,67,50,0.12);
}
.beat:first-of-type {
  padding-top: 3rem;
}
.beat-inner {
  max-width: 840px;
  margin: 0 auto;
}
.beat-headline {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-secondary);
  margin: 0 0 0.4rem;
  text-align: center;
}
.beat-body {
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin: 0 0 0.5rem;
  text-align: center;
}
.beat-body:last-child {
  margin-bottom: 0;
}

/* Corpus stats — typographically prominent */
.corpus-stats {
  margin: 1.5rem 0;
  text-align: center;
}
.corpus-stat {
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-right: 0.6rem;
}

/* Beat CTA (Learn guides link) */
.beat-cta-wrap {
  margin-top: 1.5rem;
  text-align: center;
}
.beat-cta {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}
.beat-cta:hover {
  color: var(--color-secondary);
}
.beat-cta:focus-visible {
  outline: 3px solid var(--color-accent-3, #6bafb2);
  outline-offset: 2px;
}


/* ── BEAT 4: CLOSING STATEMENT ───────────────────────
   Centered, slightly larger type. Emotional conclusion.
───────────────────────────────────────────────────── */
.closing {
  padding: 1.75rem 2.5rem 3rem;
}
.closing-inner {
  max-width: 840px;
  margin: 0 auto;
}
.closing-headline {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-secondary);
  margin: 0 0 1.2rem;
  text-align: center;
}
.closing-body {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin: 0 0 1rem;
  text-align: center;
}
.closing-body:last-child {
  margin-bottom: 0;
}


/* ── ANIMATIONS ──────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}


/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero { padding: 5.5rem 1.2rem 3rem; }
  .hero-h1 { font-size: 1.6rem; }

  .beat { padding: 1.5rem 1.2rem; }
  .beat-headline { font-size: 1.15rem; }

  .closing { padding: 1.5rem 1.2rem 2.5rem; }
  .closing-headline { font-size: 1.25rem; }
}
