/*
 * Hero section layout.
 * Typography tokens (Fairplex, Geogrotesque, Maven Pro, olive) live in shared.css.
 *
 * Style 1 (below): mobile = olive text block stacked over image.
 * Desktop = olive left rail + full-height image on the right.
 * Style 2 (behind): full-bleed image with text overlaid.
 */

.fx-section--hero {
  --fx-hero-header-offset: 5.5rem;
  --fx-hero-min-height: 28rem;
  --fx-hero-title-size: 3rem;
  --fx-hero-subtitle-size: 1.75rem;
  --fx-hero-eyebrow-size: 0.875rem;
  --fx-hero-intro-size: 1.25rem;
  --fx-hero-panel-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  background-color: var(--fx-color-olive);
  color: #ffffff;
}

.fx-section--hero .fx-section__inner.fx-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  margin-right: 0;
  margin-left: 0;
  padding: 2.5rem var(--fx-content-pad-x) 2rem;
}

.fx-hero__media {
  position: relative;
  z-index: 0;
  flex: 0 0 auto;
  width: 100%;
  min-height: 16rem;
  overflow: hidden;
  pointer-events: none;
}

.fx-hero__img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

/* Beat shared .fx-section img { height: auto } so cover fills the frame */
.fx-section--hero .fx-hero__img {
  height: 100%;
  max-width: none;
}

.fx-hero__scrub {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.2);
}

.fx-hero__panel {
  display: none;
}

.fx-hero__eyebrow {
  margin: 0 0 0.75rem;
  color: #ffffff;
  font-family: var(--fx-font-eyebrow);
  font-size: var(--fx-hero-eyebrow-size);
  font-style: normal;
  font-weight: 600;
  line-height: 0.89;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* Ratio sets uppercase + light weight on all h1/h2; reset to Figma casing/type */
.fx-section--hero .fx-hero__title,
.fx-section--hero h1.fx-hero__title {
  margin: 0;
  color: #ffffff;
  font-family: var(--fx-font-display);
  font-size: var(--fx-hero-title-size);
  font-style: normal;
  font-weight: 400;
  line-height: 0.89;
  letter-spacing: 0.01em;
  text-transform: none;
}

.fx-section--hero .fx-hero__subtitle,
.fx-section--hero h2.fx-hero__subtitle {
  margin: 0.75rem 0 0;
  color: #ffffff;
  font-family: var(--fx-font-display);
  font-size: var(--fx-hero-subtitle-size);
  font-style: normal;
  font-weight: 400;
  line-height: 0.89;
  letter-spacing: 0.01em;
  text-transform: none;
}

.fx-section--hero .fx-hero__intro {
  margin: 1.25rem 0 0;
  /* Figma Style 2: 1240px wide at 45px Maven Pro (~27.55em) */
  max-width: 27.55em;
  color: #ffffff;
  font-family: var(--fx-font-intro);
  font-size: var(--fx-hero-intro-size);
  font-style: normal;
  font-weight: 400;
  line-height: 1.29;
  letter-spacing: 0.01em;
  text-transform: none;
}

.fx-hero__intro p {
  margin: 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-style: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-transform: none;
}

.fx-hero__intro a,
.fx-hero__intro u,
.fx-hero__intro span[style*="underline"] {
  text-decoration: underline solid;
  text-decoration-thickness: from-font;
  text-decoration-skip-ink: none;
  text-underline-position: from-font;
}

/* Style 1 mobile: text sits in the olive block; image stacks below */
.fx-section--hero-below {
  justify-content: flex-start;
}

.fx-section--hero-below .fx-hero__media {
  min-height: 18rem;
  aspect-ratio: 16 / 10;
}

/* Style 2: full-bleed image behind the nav.
 * Theme pads .edgtf-full-width-inner by 68px; that frame is what was showing
 * above the vc_row. Pull the Bakery row under the header instead of the
 * inner section, and zero the theme/Bakery gutters around it.
 */
.edgtf-content .edgtf-content-inner > .edgtf-full-width > .edgtf-full-width-inner:has(.fx-section--hero-behind) {
  padding-top: 0 !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

.vc_row.edgtf-section:has(.fx-section--hero-behind),
.vc_row.vc_custom_fx_hero_behind_row {
  --fx-hero-header-offset: 5.5rem;
  position: relative;
  margin-top: calc(-1 * var(--fx-hero-header-offset)) !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  overflow: visible;
}

.vc_row:has(.fx-section--hero-behind) .edgtf-full-section-inner,
.vc_row:has(.fx-section--hero-behind) .wpb_column,
.vc_row:has(.fx-section--hero-behind) .vc_column_container,
.vc_row:has(.fx-section--hero-behind) .vc_column-inner,
.vc_row:has(.fx-section--hero-behind) .vc_column-inner.vc_custom_fx_hero_behind_col,
.vc_row:has(.fx-section--hero-behind) .wpb_wrapper {
  width: 100%;
  max-width: none;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible;
}

.fx-section--hero-behind {
  --fx-hero-min-height: 32rem;
  justify-content: flex-end;
  width: 100%;
  min-height: var(--fx-hero-min-height);
  margin-top: 0;
  padding-top: calc(var(--fx-hero-header-offset) + 4rem);
  padding-bottom: 3rem;
}

.fx-section--hero-behind .fx-hero__media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  min-height: 0;
  aspect-ratio: auto;
  flex: none;
}

/* Absolute fill so cover always paints the full frame (incl. under nav). */
.fx-section--hero-behind .fx-hero__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center top;
}

.fx-section--hero-behind .fx-section__inner.fx-hero__content {
  padding-top: 0;
  padding-bottom: 0;
}

@media (min-width: 768px) {
  .fx-section--hero {
    --fx-hero-min-height: 36rem;
    --fx-hero-title-size: 4.5rem;
    --fx-hero-subtitle-size: 2.5rem;
    --fx-hero-eyebrow-size: 1rem;
    --fx-hero-intro-size: 1.75rem;
    --fx-hero-header-offset: 6.5rem;
    --fx-hero-panel-width: 22%;
    justify-content: flex-end;
    min-height: var(--fx-hero-min-height);
    padding-top: 5rem;
    padding-bottom: 3.5rem;
  }

  .fx-section--hero .fx-section__inner.fx-hero__content {
    padding-top: 0;
    padding-bottom: 0;
    padding-right: var(--fx-content-pad-x);
    padding-left: var(--fx-content-pad-x);
  }

  /* Side-by-side from tablet up: olive rail + image flush top/bottom */
  .fx-section--hero-below .fx-hero__panel {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: var(--fx-hero-panel-width);
    max-width: 14rem;
    height: 100%;
    background-color: var(--fx-color-olive);
  }

  .fx-section--hero-below .fx-hero__media {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: var(--fx-hero-panel-width);
    z-index: 0;
    width: auto;
    min-height: 0;
    aspect-ratio: auto;
  }

  .fx-section--hero-behind {
    --fx-hero-min-height: 42rem;
    padding-top: calc(var(--fx-hero-header-offset) + 6rem);
    padding-bottom: 4rem;
  }

  .vc_row.edgtf-section:has(.fx-section--hero-behind),
  .vc_row.vc_custom_fx_hero_behind_row {
    --fx-hero-header-offset: 6.5rem;
  }
}

@media (min-width: 1024px) {
  .fx-section--hero {
    --fx-hero-min-height: 45rem;
    --fx-hero-title-size: 6rem;
    --fx-hero-subtitle-size: 3.5rem;
    --fx-hero-eyebrow-size: 1.25rem;
    --fx-hero-intro-size: 2.25rem;
    --fx-hero-panel-width: 18%;
    padding-top: 6rem;
    padding-bottom: 4rem;
  }

  .fx-section--hero-below .fx-hero__panel {
    max-width: 18.5rem;
  }

  .fx-section--hero-behind {
    --fx-hero-min-height: 52rem;
    --fx-hero-header-offset: 7rem;
  }

  .vc_row.edgtf-section:has(.fx-section--hero-behind),
  .vc_row.vc_custom_fx_hero_behind_row {
    --fx-hero-header-offset: 7rem;
  }
}

@media (min-width: 1400px) {
  .fx-section--hero {
    --fx-hero-min-height: 59rem;
    --fx-hero-title-size: 9.6875rem;
    --fx-hero-subtitle-size: 4.6875rem;
    --fx-hero-eyebrow-size: 1.5rem;
    --fx-hero-intro-size: 2.8125rem;
    --fx-hero-panel-width: 296px;
  }

  .fx-section--hero-below .fx-hero__panel {
    max-width: none;
    width: 296px;
  }

  .fx-section--hero-below .fx-hero__media {
    left: 296px;
  }

  .fx-section--hero-behind {
    --fx-hero-min-height: 70rem;
  }

  .fx-hero__eyebrow {
    letter-spacing: 0.3em;
  }

  .fx-hero__title {
    max-width: 86rem;
  }

  .fx-hero__subtitle {
    max-width: 82rem;
  }
}
