/* section: hero → ACF layout `hero` */

/* 1.2.3: the hero fills what is left of the first screen under the bars above it,
   and its words and buttons are sized from that height as well as from the width,
   so on a laptop, a tablet or a phone they all finish above the fold.
   --hero-top  how far down the page the hero starts. The small script in hero.php
               measures it before the hero paints (announcement bar or none, admin
               bar or none); 116px is the usual figure until it has.
   --fit       the hero's height: the room left on screen, within sensible limits.
               Sizes below are fractions of it. */
.hero {
  --hero-top: 116px;
  --hero-floor: 380px;
  --hero-room: calc(100vh - var(--hero-top));
  --fit: clamp(var(--hero-floor), var(--hero-room), 940px);
  position: relative;
  min-height: var(--fit);
  display: flex;
  align-items: flex-end;
  background: var(--bg-ink);
  color: var(--text-on-ink);
  overflow: hidden;
  isolation: isolate;
}
/* svh = the screen with a phone's address bar showing, which is how a page arrives */
@supports (height: 100svh) {
  .hero { --hero-room: calc(100svh - var(--hero-top)); }
}
.hero__media, .hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(12,10,6,0.55) 0%, rgba(12,10,6,0.12) 40%, rgba(12,10,6,0.78) 88%),
    linear-gradient(90deg, rgba(12,10,6,0.42) 0%, rgba(12,10,6,0) 55%);
}

.hero__inner {
  width: 100%;
  padding-top: clamp(24px, calc(var(--fit) * 0.06), 64px);
  padding-bottom: clamp(28px, calc(var(--fit) * 0.085), 90px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
}

.hero__kicker {
  color: var(--gold);
  margin-bottom: clamp(10px, calc(var(--fit) * 0.028), 18px);
  text-wrap: balance; /* on a phone it takes two lines: keep them even */
}
/* three stacked lines: as big as the width allows, unless the screen is too short for that */
.hero__title {
  font-size: clamp(40px, min(max(64px, 11.5vw), calc(var(--fit) * 0.18)), 168px);
  max-width: 10ch;
  text-wrap: balance;
}
.hero__title em {
  font-style: normal;
  color: var(--accent);
}
.hero__sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(16px, min(max(18px, 2.2vw), calc(var(--fit) * 0.034)), 24px);
  color: rgba(245, 240, 230, 0.85);
  max-width: 44ch;
  margin-top: clamp(10px, calc(var(--fit) * 0.03), 20px);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(16px, calc(var(--fit) * 0.045), 34px);
}

/* est. badge column */
.hero__badge {
  text-align: right;
  display: grid;
  gap: 10px;
  justify-items: end;
}
.hero__badge img { width: clamp(90px, 10vw, 132px); filter: drop-shadow(0 12px 30px rgba(0,0,0,0.45)); }
.hero__badge-note {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(245, 240, 230, 0.7);
}

@media (max-width: 760px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__badge { display: none; }
  /* on a phone the small line, the subtitle and the buttons take a bigger share of
     the screen, so the headline gives way a little sooner than it does on a desktop */
  .hero__title { font-size: clamp(40px, min(max(64px, 11.5vw), calc(var(--fit) * 0.125)), 168px); }
}
/* narrow phones: the two buttons share a row instead of stacking */
@media (max-width: 520px) {
  .hero__actions { gap: 8px; }
  .hero__actions .btn {
    flex: 1 1 auto;
    padding: 15px 12px 13px;
    font-size: 11px;
    letter-spacing: 0.1em;
    white-space: nowrap;
  }
}

/* Wide but short — most laptops, a tablet on its side: the headline takes two
   lines instead of three (so it can stay big) and the subtitle runs wider. */
@media (min-aspect-ratio: 4/3) and (max-height: 860px) {
  .hero { --hero-floor: 250px; }
  .hero__title {
    font-size: clamp(40px, min(11.5vw, calc(var(--fit) * 0.25)), 168px);
    max-width: 15ch;
  }
  .hero__sub { max-width: 62ch; }
}
/* a phone on its side: one line of headline and the buttons are what fit */
@media (min-aspect-ratio: 4/3) and (max-height: 480px) {
  .hero { --hero-floor: 180px; }
  .hero__title {
    font-size: clamp(34px, min(8vw, calc(var(--fit) * 0.2)), 168px);
    max-width: none;
  }
  .hero__sub { display: none; }
}
