/*
 * ============================================================
 * HERO SECTION  —  hero.css
 * ============================================================
 * Full-width background photo (or gradient fallback) with a
 * dark scrim so left-aligned white text stays readable on top.
 *
 * To adjust hero height   →  .hero-section min-height
 * To adjust scrim darkness →  .hero-scrim background
 * To adjust text size      →  .hero-headline font-size
 * To swap the photo         →  see section-hero.php for the path
 * ============================================================
 */

.hero-section {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* --- Background layer: real photo or gradient fallback ------ */
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-bg--fallback {
  background-image: linear-gradient(135deg, var(--rg-green-dark), var(--rg-green-mid) 55%, var(--rg-gold));
}

/* Dark scrim so white text stays legible over any photo -------
   Stronger at the bottom (where the text sits), lighter at the
   top so the upper part of the photo still reads through. */
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 20, 12, 0.50) 0%,
    rgba(10, 20, 12, 0.22) 45%,
    rgba(10, 20, 12, 0.05) 100%
  );
  z-index: 1;
}

/* --- Foreground content --------------------------------------- */
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--rg-max);
  margin: 0 auto;
  padding: 32px 24px 56px;
  width: 100%;
}

/* Logo — left of the text panel, vertically centered, sized to hold its own */
.hero-logo-badge {
  display: block;
  width: 210px;
  height: 210px;
  flex: 0 0 auto;
  align-self: center;
  margin: 0;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.4));
}

/* --- Text block: left-aligned, no longer centered -------------
   Sits on a frosted-glass panel (blur + translucent fill) so the
   text stays readable no matter how busy the photo behind it is,
   independent of the .hero-scrim gradient above. */
.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 14px;
  max-width: 620px;
  padding: 28px 32px;
  border-radius: var(--rg-radius-card);
  background: rgba(10, 20, 12, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Light button style for the hero only — the default .btn-cta is
   dark-on-transparent, which disappears against the photo/scrim. */
.hero-ctas .btn-cta {
  color: #ffffff;
  border-color: #ffffff;
}

.hero-ctas .btn-cta:hover,
.hero-ctas .btn-cta:focus-visible {
  background: #ffffff;
  color: #1a1a16;
  border-color: #ffffff;
}

/* Row that holds the text panel and the logo side by side */
.hero-row {
  display: flex;
  align-items: flex-end;
  gap: 36px;
}

/* Backdrop-filter isn't supported in every older browser — fall
   back to a slightly darker solid fill so text is still legible
   even without the blur effect. */
@supports not (backdrop-filter: blur(1px)) {
  .hero-text {
    background: rgba(10, 20, 12, 0.55);
  }
}

/* Eyebrow — two stacked lines */
.hero-eyebrow {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.eyebrow-line-1 {
  font-family: var(--rg-font-body);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--rg-green-lime);
}

.eyebrow-line-2 {
  font-family: var(--rg-font-body);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.7);
}

/* Headline — white/lime on the dark photo scrim, not charcoal */
.hero-headline {
  font-family: var(--rg-font-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
  color: var(--rg-invert);
}

/* Two-tone word colours inside the headline */
.hero-headline .re      { color: var(--rg-green-lime); }
.hero-headline .green   { color: var(--rg-green-lime); }
.hero-headline .neutral { color: var(--rg-invert);      }
.hero-headline em       { font-style: italic; }

/*
 * Line reveal  —  each line is an overflow:hidden mask.
 * .reveal-inner starts offscreen and slides up when JS
 * adds the .show class (see assets/js/reveal.js).
 */
.reveal-line {
  overflow: hidden;
  line-height: 1.2;
  display: block;
}

.reveal-inner {
  display: block;
  transform: translateY(110%);
  transition: transform 0.7s var(--rg-ease-reveal);
}

.reveal-inner.show {
  transform: translateY(0);
}

/* Body copy — light text on the dark photo, not the usual muted body colour */
.hero-body {
  font-family: var(--rg-font-body);
  font-size: 15.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
  max-width: 460px;
  margin: 0;
}

/* CTA button row */
.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 6px;
}

/*
 * Fade-in elements (eyebrow, body, ctas).
 * JS adds .show after a short delay so they appear
 * after the headline has started its reveal.
 */
.hero-fade-in {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity   0.5s ease 0.5s,
    transform 0.5s ease 0.5s;
}

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

/* --- Mobile ------------------------------------------------ */
@media (max-width: 640px) {
  .hero-section { min-height: 460px; }
  .hero-inner   { padding: 24px 20px 40px; }
  .hero-row     { flex-direction: column; align-items: center; gap: 16px; }
  .hero-logo-badge { width: 110px; height: 110px; }
  .hero-text    { max-width: 100%; padding: 20px 22px; }
}
