/* =========================================================
   Block: HERO (v0.1)
   The big first screen of a page: photo (or short video),
   label, headline, one line of support, one main button
   plus WhatsApp. Mobile-first: phone layout is the default,
   wider screens adjust further down.
   ========================================================= */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;                 /* text sits low, photo breathes above */
  min-height: 88vh;
  min-height: 88svh;                     /* "small viewport": ignores phone browser bars */
  overflow: hidden;
  color: var(--colour-on-image);
  background: rgb(var(--colour-image-shade));  /* shows while the photo loads */
}

/* ---------- Photo / video layer ---------- */
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img,
.hero__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-focus, 50% 50%);  /* per-page: keep the subject in frame */
}

/* Gentle slow zoom ("Ken Burns"). Runs once, very slowly.
   Switched off automatically for reduced-motion visitors (base.css). */
.hero--drift .hero__media img {
  animation: hero-drift 24s ease-out forwards;
  transform-origin: 60% 40%;
}
@keyframes hero-drift {
  from { transform: scale(1.0); }
  to   { transform: scale(var(--motion-hero-zoom, 1.08)); }   /* Motion level: 1 = still */
}

/* Dark fade over the bottom of the photo so white text is always readable */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to top,
    rgb(var(--colour-image-shade) / 0.85) 0%,
    rgb(var(--colour-image-shade) / 0.55) 35%,
    rgb(var(--colour-image-shade) / 0.0) 70%
  );
}

/* ---------- Text and buttons ---------- */
.hero__content {
  width: 100%;
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: var(--space-8) var(--space-4) var(--space-6);
  animation: hero-rise 700ms ease-out both;
}
@keyframes hero-rise {
  from { opacity: var(--motion-fade-from, 0); transform: translateY(calc(var(--motion-rise, 16px) * 0.75)); }
  to   { opacity: 1; transform: none; }
}

.hero__label {
  font-size: var(--text-small);
  font-weight: var(--weight-strong);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.hero__title {
  font-size: var(--text-h1);
  max-width: 16ch;                       /* short, punchy lines */
}

.hero__lead {
  font-size: var(--text-lead);
  max-width: 38ch;
  margin-top: var(--space-4);
  opacity: 0.92;
}

.hero__actions {
  display: flex;
  flex-direction: column;                /* phones: full-width stacked buttons */
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.hero__actions .btn { width: 100%; }

.hero__credit {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-2);
  font-size: 0.6875rem;
  opacity: 0.7;
}
.hero__credit a { color: inherit; }

/* ---------- Tablets and up ---------- */
@media (min-width: 48rem) {
  .hero {
    min-height: 80vh;
    max-height: 56rem;
  }
  .hero__content {
    padding: var(--space-9) var(--space-6) var(--space-8);
  }
  .hero__actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .hero__actions .btn { width: auto; }
  .hero__title { max-width: 18ch; }
}
