/* GAS Executive v37.4.4 — faithful home imagery + reliable responsive Journey.
   Loaded after legacy theme layers. Hero and Journey retain original photographs. */

/* Native responsive hero uses browser srcset instead of forcing a huge PNG
   background on small phones. Preserve existing pan/zoom and editorial overlays. */
body.home .hero-story .hero-story__bg {
  background-image: none !important;
  overflow: hidden;
}
body.home .gas-hero-responsive-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
}

/* Native images have a real browser loading lifecycle. Avoid invisible cards
   when deferred background styles have not been initialized yet. */
body.home .gas-mission-panel__media,
body.home .gas-mission-panel__media::before,
body.home .gas-mission-panel__media::after {
  background-image: none !important;
}
body.home .gas-mission-panel__media::before,
body.home .gas-mission-panel__media::after { content: none !important; }
body.home .gas-mission-panel__photo {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  max-width: none;
  user-select: none;
  pointer-events: none;
}
body.home .gas-mission-panel__photo--backdrop {
  filter: blur(14px) brightness(.54) saturate(.9);
  transform: scale(1.12);
}
body.home .gas-mission-panel__photo--main {
  object-fit: cover;
  transition: transform .55s ease, opacity .35s ease;
}
@media (min-width: 1241px) {
  body.home .gas-mission-panel[data-mission-position="0"] .gas-mission-panel__photo--main {
    inset: 0 0 24%;
    height: 76%;
    object-fit: contain;
  }
}

/* Tablet, 1024px and mobile: no narrow slivers/circles covering all images. */
@media (max-width: 1240px) {
  body.home .gas-hero-responsive-photo { object-position: 69% center; }
  body.home .gas-mission-showcase__panels {
    position: relative;
    box-sizing: border-box;
    display: flex;
    gap: 14px;
    padding: 8px 14px 12px;
    margin: 0;
    scroll-padding-inline: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  body.home .gas-mission-panel,
  body.home .gas-mission-panel.is-active,
  body.home .gas-mission-panel:nth-child(n) {
    position: relative;
    left: auto;
    top: auto;
    bottom: auto;
    height: auto;
    flex: 0 0 min(78vw, 430px);
    min-width: 0;
    margin: 0;
    opacity: 1;
    transform: none;
    filter: none;
    scroll-snap-align: center;
  }
  body.home .gas-mission-panel__button,
  body.home .gas-mission-panel:first-child .gas-mission-panel__button,
  body.home .gas-mission-panel:last-child .gas-mission-panel__button {
    clip-path: none;
    border-radius: 18px;
    overflow: hidden;
    background: #211711;
  }
  body.home .gas-mission-panel__photo--backdrop { display: none; }
  body.home .gas-mission-panel__photo--main,
  body.home .gas-mission-panel.is-active .gas-mission-panel__photo--main {
    inset: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
    transform: none;
    filter: none;
  }
  body.home .gas-mission-panel__shade,
  body.home .gas-mission-panel.is-active .gas-mission-panel__shade {
    background: linear-gradient(180deg,
      rgba(16,10,8,0) 0%, rgba(16,10,8,.06) 42%,
      rgba(16,10,8,.60) 74%, rgba(16,10,8,.92) 100%);
  }
  body.home .gas-mission-panel:not(.is-active) { opacity: .75; }
  body.home .gas-mission-panel.is-active { opacity: 1; }
}
@media (max-width: 620px) {
  body.home .gas-hero-responsive-photo { object-position: 76% center; }
  body.home .gas-mission-showcase__inner { gap: 22px; }
  body.home .gas-mission-showcase__visual { min-width: 0; width: 100%; }
  body.home .gas-mission-showcase__panels {
    height: clamp(345px, 103vw, 435px);
    gap: 10px;
    padding-inline: 10px;
    scroll-padding-inline: 10px;
  }
  body.home .gas-mission-panel,
  body.home .gas-mission-panel.is-active,
  body.home .gas-mission-panel:nth-child(n) {
    flex-basis: min(86vw, 390px);
  }
  body.home .gas-mission-panel__button,
  body.home .gas-mission-panel:first-child .gas-mission-panel__button,
  body.home .gas-mission-panel:last-child .gas-mission-panel__button { border-radius: 16px; }
  body.home .gas-mission-panel__copy { left: 22px; right: 22px; bottom: 24px; }
  body.home .gas-mission-panel__copy strong { font-size: clamp(23px, 6.5vw, 29px); }
  body.home .gas-mission-panel__copy small { font-size: 11px; }
  body.home .gas-mission-showcase__progress { margin-top: 13px; }
  body.home .gas-mission-showcase__nav { width: 100%; flex-wrap: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  body.home .gas-mission-panel__photo,
  body.home .gas-mission-panel__photo--main { transition: none !important; }
}


/* GAS 37.4.7: selectable hero messages. No impact on the default layout. */
body.home .hero-panel--message-custom .hero-title.hero-title--editorial {
  font-size: clamp(47px, 5.5vw, 99px) !important;
  line-height: .99 !important;
  overflow-wrap: anywhere;
}
body.home .hero-panel--message-custom .hero-panel__copy {
  width: min(740px, 52vw) !important;
  max-width: 740px !important;
}
body.home .hero-panel--image-only .hero-panel__overlay {
  background: linear-gradient(180deg, rgba(20, 15, 12, .04) 0%, rgba(20, 15, 12, .02) 80%, rgba(20, 15, 12, .08) 100%) !important;
}
body.home .hero-panel--image-only .hero-story__bg {
  filter: none !important;
}
body.home .hero-panel--image-only.hero-story::before { display: none !important; }
@media (max-width: 1024px) {
  body.home .hero-panel--message-custom .hero-panel__copy {
    width: min(650px, 100%) !important;
  }
}
@media (max-width: 620px) {
  body.home .hero-panel--message-custom .hero-title.hero-title--editorial {
    font-size: clamp(39px, 10.5vw, 63px) !important;
    line-height: 1.01 !important;
  }
  body.home .hero-panel--message-custom .hero-panel__copy {
    max-width: 100% !important;
    width: 100% !important;
  }
  body.home .hero-panel--image-only .hero-panel__inner { min-height: 520px !important; }
}

/* GAS 37.4.8 — photo controls and custom-message mobile composition.
   No appearance changes on default settings or on inner pages. */
body.home .hero-story .hero-panel__overlay {
  opacity: var(--gas-home-veil, 1) !important;
  transition: opacity .2s ease;
}
body.home .hero-story .hero-story__bg {
  filter: saturate(calc(1 + var(--hero-p, 0) * .06))
          contrast(calc((1 + var(--hero-p, 0) * .025) * var(--gas-home-contrast, 1)))
          brightness(var(--gas-home-brightness, 1)) !important;
}

/* On a phone, editorial announcements must not cover the meaningful image.
   A letterboxed photograph above an ivory message works at 320–700px, including
   short screens and longer translated title lines. Default homepage unaffected. */
@media (max-width: 700px) {
  body.home .hero-panel--message-custom.hero-story {
    min-height: 0 !important;
    overflow: hidden !important;
    background: #f8f5ef !important;
    margin-bottom: 0 !important;
  }
  body.home .hero-panel--message-custom.hero-story::before,
  body.home .hero-panel--message-custom.hero-story::after { display: none !important; }
  body.home .hero-panel--message-custom .hero-story__bg {
    position: relative !important;
    display: block !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    transform: none !important;
    overflow: hidden !important;
    background: #eee8df !important;
  }
  body.home .hero-panel--message-custom .gas-hero-responsive-photo {
    object-fit: contain !important;
    object-position: center center !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    filter: none !important;
  }
  body.home .hero-panel--message-custom .hero-panel__overlay {
    display: none !important;
  }
  body.home .hero-panel--message-custom .hero-panel__inner {
    display: block !important;
    position: relative !important;
    width: min(100% - 36px, 660px) !important;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    padding: 28px 0 36px !important;
    margin-inline: auto !important;
    box-sizing: border-box !important;
  }
  body.home .hero-panel--message-custom .hero-panel__copy {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    transform: none !important;
    opacity: 1 !important;
    overflow-wrap: normal !important;
  }
  body.home .hero-panel--message-custom .hero-title.hero-title--editorial,
  body.home .hero-panel--message-custom .hero-title--luxury {
    font-size: clamp(34px, 10.7vw, 60px) !important;
    line-height: 1.03 !important;
    letter-spacing: -.045em !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: auto !important;
    margin-inline: 0 !important;
  }
  body.home .hero-panel--message-custom .hero-title.hero-title--editorial span {
    max-width: 100% !important;
  }
  body.home .hero-panel--message-custom .hero-panel__eyebrow {
    margin-bottom: 18px !important;
    max-width: 100% !important;
    font-size: 10px !important;
    letter-spacing: .13em !important;
    white-space: normal !important;
  }
  body.home .hero-panel--message-custom .hero-summary {
    width: 100% !important;
    max-width: 100% !important;
    line-height: 1.65 !important;
    font-size: clamp(14px, 3.8vw, 16px) !important;
    overflow-wrap: break-word !important;
  }
  body.home .hero-panel--message-custom .hero-actions {
    width: 100% !important;
    max-width: 100% !important;
  }
  body.home .hero-panel--message-custom .hero-mission-rail {
    position: relative !important;
    transform: none !important;
    left: auto !important;
    bottom: auto !important;
  }
}
@media (max-width: 359px) {
  body.home .hero-panel--message-custom .hero-title.hero-title--editorial,
  body.home .hero-panel--message-custom .hero-title--luxury {
    font-size: 33px !important;
    letter-spacing: -.04em !important;
  }
}

/* Photo-only mode remains clear of the original editorial filter. */
body.home .hero-panel--image-only .hero-story__bg {
  filter: brightness(var(--gas-home-brightness, 1)) contrast(var(--gas-home-contrast, 1)) !important;
}


/* GAS 37.4.9 — urgent memorial/mobile hardening + light text option. */
body.home .hero-panel--message-custom.hero-panel--tone-light .hero-panel__copy,
body.home .hero-panel--message-custom.hero-panel--tone-light .hero-panel__eyebrow,
body.home .hero-panel--message-custom.hero-panel--tone-light .hero-title.hero-title--editorial,
body.home .hero-panel--message-custom.hero-panel--tone-light .hero-title--luxury,
body.home .hero-panel--message-custom.hero-panel--tone-light .hero-summary {
  color: #fffdf8 !important;
}
body.home .hero-panel--message-custom.hero-panel--tone-light .hero-title__accent {
  color: #f0d392 !important;
}
body.home .hero-panel--message-custom.hero-panel--tone-light .hero-panel__copy {
  text-shadow: 0 2px 18px rgba(15,10,8,.32);
}
body.home .hero-panel--message-custom.hero-panel--tone-light .hero-panel__eyebrow {
  border-color: rgba(255,255,255,.44) !important;
  background: rgba(255,255,255,.08) !important;
}
body.home .hero-panel--message-custom.hero-panel--tone-light .hero-title-rule {
  background: linear-gradient(90deg, rgba(255,255,255,.78), rgba(255,255,255,0)) !important;
}
body.home .hero-panel--message-custom.hero-panel--tone-light .hero-actions .button-secondary {
  background: rgba(255,255,255,.12) !important;
  border-color: rgba(255,255,255,.26) !important;
  color: #fffdf8 !important;
}

@media (max-width: 860px) {
  body.home .hero-panel--message-custom.hero-story {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    background: #f8f5ef !important;
    overflow: hidden !important;
  }
  body.home .hero-panel--message-custom .hero-story__bg {
    order: 1 !important;
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: clamp(220px, 56vw, 420px) !important;
    min-height: 220px !important;
    aspect-ratio: auto !important;
    transform: none !important;
    overflow: hidden !important;
    background: #eee8df !important;
    filter: brightness(var(--gas-home-brightness, 1)) contrast(var(--gas-home-contrast, 1)) !important;
  }
  body.home .hero-panel--message-custom .gas-hero-responsive-photo {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    transform: none !important;
  }
  body.home .hero-panel--message-custom .hero-panel__overlay,
  body.home .hero-panel--message-custom .hero-story__lines,
  body.home .hero-panel--message-custom .hero-story__scroll {
    display: none !important;
  }
  body.home .hero-panel--message-custom .hero-panel__inner {
    order: 2 !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 26px 18px 34px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }
  body.home .hero-panel--message-custom .hero-panel__copy {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    transform: none !important;
    opacity: 1 !important;
  }
  body.home .hero-panel--message-custom .hero-panel__eyebrow {
    width: fit-content !important;
    max-width: 100% !important;
    margin: 0 0 16px !important;
  }
  body.home .hero-panel--message-custom .hero-title.hero-title--editorial,
  body.home .hero-panel--message-custom .hero-title--luxury {
    width: 100% !important;
    max-width: 100% !important;
    font-size: clamp(34px, 12vw, 58px) !important;
    line-height: 1.02 !important;
    letter-spacing: -.045em !important;
    margin: 0 0 12px !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  body.home .hero-panel--message-custom .hero-title.hero-title--editorial span {
    display: block !important;
  }
  body.home .hero-panel--message-custom .hero-summary {
    width: 100% !important;
    max-width: 100% !important;
    font-size: clamp(15px, 4.4vw, 18px) !important;
    line-height: 1.65 !important;
    margin: 0 !important;
  }
  body.home .hero-panel--message-custom .hero-title-rule,
  body.home .hero-panel--message-custom .hero-editorial-note,
  body.home .hero-panel--message-custom .hero-actions,
  body.home .hero-panel--message-custom .hero-mission-rail {
    display: none !important;
  }
}


/* GAS 37.4.10 — mobile message below image always gets an accessible, dark
   ink-on-ivory color scheme. The theme's selected "white" tone continues to
   work on desktop when the copy overlaps a dark photograph. */
@media (max-width: 860px) {
  body.home .hero-panel--message-custom.hero-story .hero-panel__inner,
  body.home .hero-panel--message-custom.hero-panel--tone-light.hero-story .hero-panel__inner {
    background: #f8f5ef !important;
    color: #352620 !important;
    text-shadow: none !important;
  }
  body.home .hero-panel--message-custom.hero-story .hero-panel__copy,
  body.home .hero-panel--message-custom.hero-panel--tone-light.hero-story .hero-panel__copy {
    color: #352620 !important;
    text-shadow: none !important;
    filter: none !important;
  }
  body.home .hero-panel--message-custom.hero-story .hero-title.hero-title--editorial,
  body.home .hero-panel--message-custom.hero-panel--tone-light.hero-story .hero-title.hero-title--editorial,
  body.home .hero-panel--message-custom.hero-story .hero-title--luxury,
  body.home .hero-panel--message-custom.hero-panel--tone-light.hero-story .hero-title--luxury,
  body.home .hero-panel--message-custom.hero-story .hero-title.hero-title--editorial span:not(.hero-title__accent),
  body.home .hero-panel--message-custom.hero-panel--tone-light.hero-story .hero-title.hero-title--editorial span:not(.hero-title__accent) {
    color: #352620 !important;
    text-shadow: none !important;
  }
  body.home .hero-panel--message-custom.hero-story .hero-title__accent,
  body.home .hero-panel--message-custom.hero-panel--tone-light.hero-story .hero-title__accent {
    color: #846124 !important;
    text-shadow: none !important;
  }
  body.home .hero-panel--message-custom.hero-story .hero-summary,
  body.home .hero-panel--message-custom.hero-panel--tone-light.hero-story .hero-summary {
    color: #514640 !important;
    text-shadow: none !important;
  }
  body.home .hero-panel--message-custom.hero-story .hero-panel__eyebrow,
  body.home .hero-panel--message-custom.hero-panel--tone-light.hero-story .hero-panel__eyebrow {
    color: #805f24 !important;
    background: #fffdf9 !important;
    border: 1px solid rgba(166,126,57,.28) !important;
    text-shadow: none !important;
    line-height: 1.45 !important;
  }
}


/* GAS 37.4.11 — distinct desktop/mobile hero images via native <picture>.
   Browser selects the correct source at 860px. Existing design remains unchanged
   unless a vertical attachment has been assigned in Appearance > Foto de portada. */
body.home .hero-story .gas-home-hero-picture {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
}
body.home .hero-story .gas-home-hero-picture .gas-hero-responsive-photo {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: 62% center;
}
/* The memorial photograph is already carefully framed. Don't zoom it needlessly. */
@media (min-width: 861px) {
  body.home .hero-panel--message-custom.hero-story .hero-story__bg {
    inset: 0 !important;
    transform: none !important;
  }
  body.home .hero-panel--message-custom .gas-home-hero-picture .gas-hero-responsive-photo {
    object-position: center center !important;
  }
}
@media (max-width: 860px) {
  body.home .hero-panel--message-custom.hero-panel--has-mobile-photo .hero-story__bg {
    height: auto !important;
    aspect-ratio: 4 / 5 !important;
    min-height: 0 !important;
    max-height: none !important;
  }
  body.home .hero-panel--message-custom.hero-panel--has-mobile-photo .gas-home-hero-picture .gas-hero-responsive-photo {
    object-fit: cover !important;
    object-position: 50% 50% !important;
  }
}


/* 37.4.12: Adjustable, independently saved mobile crop.
   Avoid the forced fixed 50% center from 37.4.11. No desktop changes. */
@media (max-width: 860px) {
  body.home .hero-story .gas-home-hero-picture .gas-hero-responsive-photo,
  body.home .hero-panel--message-custom.hero-panel--has-mobile-photo .gas-home-hero-picture .gas-hero-responsive-photo {
    object-fit: cover !important;
    object-position: var(--gas-home-mobile-frame-x, 50%) var(--gas-home-mobile-frame-y, 50%) !important;
    transform-origin: var(--gas-home-mobile-frame-x, 50%) var(--gas-home-mobile-frame-y, 50%) !important;
    transform: scale(var(--gas-home-mobile-frame-zoom, 1)) !important;
  }
}
