/* ============================================================================
   SECTION 01 — HERO  (Figma node 169:6451 "01-hero")
   Plus the floating site header (169:6244) that sits over the hero image.
   ========================================================================== */

/* ------------------------------------------------------------------ SHELL -- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;                            /* copy anchored to the bottom */
  min-height: clamp(600px, 100svh, 880px);
  padding-block: var(--space-6) var(--section-pad-y);
  background-color: var(--monarca-green);               /* fallback behind photo */
  color: var(--color-text-on-inverse);
}

/* Background photograph + layered scrim -------------------------------------- */
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}
.hero__media::after {                 /* gradient scrim, mirrors the Figma fill */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, var(--monarca-green) 0%,          rgba(19, 50, 43, 0) 23%),
    linear-gradient(0deg, rgba(20, 25, 22, 0.50) 9%, rgba(20, 25, 22, 0.39) 32%, rgba(20, 25, 22, 0) 69%),
    linear-gradient(0deg, rgba(19, 50, 43, 1)   9%, rgba(19, 50, 43, 0.78) 32%, rgba(19, 50, 43, 0) 69%);
}

.hero__content-wrap {
  position: relative;
  z-index: 10;
  width: 100%;
}

/* ====================================================== SITE HEADER (banner) ==
   Absolutely positioned so it floats over the hero and scrolls away with the
   page (not sticky — matches the design).
   ------------------------------------------------------------------------------ */
.site-header-outer {
  position: absolute;
  top: var(--space-6);
  left: 0;
  right: 0;
  z-index: 30;
}

.site-header {
  position: relative;
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);

  padding: 12px 12px 12px var(--space-7);   /* 28px optical left / 12px right */
  background-color: var(--color-surface);
  box-shadow: var(--shadow-header);
}

.site-header__logo {
  flex-shrink: 0;
  display: block;
  line-height: 0;
}
.site-header__logo img {
  width: 183px;
  height: auto;
}

.site-header__nav-group {
  display: flex;
  align-items: center;
  gap: var(--space-15);            /* 60px between menu and CTA */
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);             /* 32px between links */
}

.site-nav__link {
  position: relative;
  display: inline-block;
  padding-block: var(--space-1);
  font-size: var(--text-b3-size);
  line-height: var(--text-b3-lh);
  letter-spacing: -0.04em;         /* nav uses the tighter -4% tracking */
  color: var(--color-text-primary);
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-fast) var(--ease-out);
}
.site-nav__link:hover::after,
.site-nav__link:focus-visible::after { transform: scaleX(1); }

/* Hamburger toggle — hidden on desktop ------------------------------------- */
.site-header__toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}
.site-header__toggle-box {
  position: relative;
  width: 22px;
  height: 12px;
}
.site-header__toggle-bar,
.site-header__toggle-bar::before,
.site-header__toggle-bar::after {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background-color: var(--color-text-primary);
  transition: transform var(--transition-fast) var(--ease-out), background-color var(--transition-fast);
}
.site-header__toggle-bar { top: 50%; transform: translateY(-50%); }
.site-header__toggle-bar::before { content: ""; top: -5px; }
.site-header__toggle-bar::after  { content: ""; top: 5px; }

.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar { background-color: transparent; }
.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar::before { transform: translateY(5px) rotate(45deg); }
.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar::after  { transform: translateY(-5px) rotate(-45deg); }

/* ============================================================ HERO CONTENT == */
.hero__content {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-10);
}

.hero__lead {
  display: flex;
  flex-direction: column;
  gap: var(--space-9);              /* 36px */
  width: 100%;
  max-width: 656px;
}
.hero__lead .button { align-self: flex-start; }   /* hug content, don't fill the column */

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-7);             /* 28px */
}

.hero__title {
  font-size: var(--text-h1-size);
  line-height: var(--text-h1-lh);
  letter-spacing: var(--text-h1-tr);
  color: var(--color-text-on-inverse);
  text-wrap: balance;
}

.hero__description {
  font-size: var(--text-b1-size);
  line-height: var(--text-b1-lh);
  letter-spacing: var(--text-b1-tr);
  color: var(--color-text-on-inverse-muted);
}

/* Vertical label + rule on the right --------------------------------------- */
.hero__aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding-inline: var(--space-2);
  flex-shrink: 0;
}
.hero__aside-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--text-b5-size);
  letter-spacing: var(--text-eyebrow-tr);
  text-transform: uppercase;
  color: var(--color-text-on-inverse);
  opacity: 0.8;
}
.hero__aside-rule {
  width: 1px;
  height: 72px;
  background-color: var(--monarca-white);
  opacity: 0.5;
}

/* ================================================================ TABLET === */
@media (max-width: 1024px) {
  .hero { min-height: clamp(560px, 100svh, 760px); }

  .site-header { gap: var(--space-3); }
  .site-header__toggle { display: inline-flex; }

  /* Nav collapses into a drop panel under the bar */
  .site-header__nav-group {
    position: absolute;
    top: calc(100% + var(--space-2));
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-4) var(--space-6) var(--space-6);
    background-color: var(--color-surface);
    box-shadow: var(--shadow-header);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  }
  .site-header[data-open="true"] .site-header__nav-group {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .site-nav__link {
    display: block;
    padding-block: var(--space-4);
    border-bottom: 1px solid var(--color-border);
    letter-spacing: var(--text-b2-tr);
    font-size: var(--text-b2-size);
  }
  .site-nav__link::after { display: none; }
  .site-nav li:last-child .site-nav__link { border-bottom: 0; }

  .site-header__nav-group .button {
    margin-top: var(--space-5);
    width: 100%;
  }

  .hero__title { font-size: 3.25rem; }   /* 52px */
  .hero__aside { display: none; }
}

/* ================================================================ MOBILE === */
@media (max-width: 640px) {
  .hero {
    min-height: 100svh;
  }

  .site-header { padding: 12px 12px 12px var(--space-5); }
  .site-header__logo img { width: 150px; }

  .hero__content { align-items: stretch; }
  .hero__lead { gap: var(--space-7); max-width: none; }
  .hero__copy { gap: var(--space-5); }

  .hero__title { font-size: 2.25rem; }   /* 36px */
  .hero__description { font-size: var(--text-b2-size); }

  .hero__lead .button { width: 100%; }
}

@media (max-width: 360px) {
  .hero__title { font-size: 2rem; }      /* 32px */
}
