/*
 * HERO — OFFICIAL SINGLE LAYOUT
 *
 * Desktop (>= 1024px):
 *   left  = title + four actions
 *   right = featured box only
 *
 * Phone / tablet (< 1024px):
 *   title -> four actions -> featured box
 *
 * This file owns the resting Hero layout. Docked action states are owned by
 * 30-primary-actions.css after the action group is moved outside the Hero.
 */

[data-home-section="hero"] {
  --hero-inline: clamp(14px, 3vw, 58px);
  --hero-block-gap: clamp(14px, 2.2vh, 28px);
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0;
}

[data-home-section="hero"] > .hero-background,
[data-home-section="hero"] > .hero-noise {
  position: absolute;
  inset: 0;
}

[data-home-section="hero"] .hero-content.hero-content-premium {
  position: relative;
  z-index: 2;
  width: min(calc(100% - (2 * var(--hero-inline))), 1500px);
  height: 100%;
  min-width: 0;
  margin-inline: auto;
  box-sizing: border-box;
}

[data-home-section="hero"] .hero-copy,
[data-home-section="hero"] .hero-daily-feature,
[data-home-section="hero"] [data-primary-actions] {
  min-width: 0;
  margin: 0;
  box-sizing: border-box;
}

[data-home-section="hero"] .hero-main-title,
[data-home-section="hero"] .hero-main-title > span {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif !important;
  font-weight: 400 !important;
  font-style: normal !important;
  text-transform: uppercase !important;
}

[data-home-section="hero"] .hero-main-title {
  margin: 0;
  letter-spacing: .005em;
}

[data-home-section="hero"] .hero-main-title > span {
  white-space: nowrap;
}

[data-home-section="hero"] .hero-daily-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 520px);
  max-width: 100%;
  overflow: hidden;
}

[data-home-section="hero"] .hero-daily-feature > h2,
[data-home-section="hero"] .hero-featured-card {
  grid-column: 1;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

[data-home-section="hero"] .hero-daily-feature > h2 {
  margin: 0 0 clamp(6px, 1vh, 10px);
  padding: 0;
  color: #e8c878;
  text-align: center;
  font-size: clamp(.52rem, .7vw, .78rem);
  line-height: 1.15;
  letter-spacing: clamp(.06em, .18vw, .18em);
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
}

[data-home-section="hero"] .hero-featured-card {
  aspect-ratio: 16 / 9;
  border-radius: clamp(12px, 1.3vw, 20px);
  overflow: hidden;
}

[data-home-section="hero"] .hero-featured-card video,
[data-home-section="hero"] .hero-featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

[data-home-section="hero"] .hero-scroll-cue {
  display: none !important;
}

/* Desktop: title and actions form the left column; featured stays alone right. */
@media (min-width: 1024px) {
  [data-home-section="hero"] .hero-content.hero-content-premium {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr);
    grid-template-rows: auto auto;
    column-gap: clamp(42px, 6vw, 96px);
    row-gap: clamp(22px, 3vh, 38px);
    align-content: center;
    align-items: center;
    padding: clamp(14px, 2.4vh, 28px) 0;
  }

  [data-home-section="hero"] .hero-copy {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    justify-self: stretch;
    padding-left: clamp(38px, 5.8vw, 112px);
  }

  [data-home-section="hero"] .hero-main-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    width: fit-content;
    max-width: 100%;
    font-size: clamp(2.7rem, 5.4vw, 6.8rem);
    line-height: .88;
    white-space: normal;
  }

  [data-home-section="hero"] .hero-main-title > span {
    display: block;
    width: auto;
  }

  [data-home-section="hero"] [data-primary-actions]:not(.is-group-transition):not(.is-mobile-refined-transition):not(.is-mobile-logo-dock) {
    position: static !important;
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    justify-self: stretch;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: min(100%, 760px) !important;
    max-width: 760px !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: clamp(8px, .9vw, 12px) !important;
  }

  [data-home-section="hero"] [data-primary-actions]:not(.is-group-transition):not(.is-mobile-refined-transition):not(.is-mobile-logo-dock) .primary-actions-dock-group {
    display: contents !important;
  }

  [data-home-section="hero"] [data-primary-actions]:not(.is-group-transition):not(.is-mobile-refined-transition):not(.is-mobile-logo-dock) .button,
  [data-home-section="hero"] [data-primary-actions]:not(.is-group-transition):not(.is-mobile-refined-transition):not(.is-mobile-logo-dock) .stay-button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 9px clamp(10px, 1vw, 16px) !important;
    box-sizing: border-box !important;
  }

  [data-home-section="hero"] .hero-daily-feature {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: end;
  }

  [data-home-section="hero"] .hero-featured-card {
    max-height: min(36vh, 330px);
  }
}

/* Phone and tablet: exact visual order title -> actions -> featured. */
@media (max-width: 1023px) {
  [data-home-section="hero"] {
    --hero-inline: clamp(10px, 3vw, 24px);
  }

  [data-home-section="hero"] .hero-content.hero-content-premium {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    row-gap: clamp(8px, 1.6vh, 15px);
    align-content: center;
    align-items: start;
    padding: clamp(8px, 1.6vh, 16px) 0 clamp(10px, 1.8vh, 18px);
  }

  [data-home-section="hero"] .hero-copy {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    align-self: end;
    justify-self: stretch;
    padding-inline: clamp(2px, 1vw, 8px);
    text-align: left;
  }

  [data-home-section="hero"] .hero-main-title {
    display: grid;
    grid-template-columns: max-content max-content;
    grid-template-rows: repeat(3, auto);
    column-gap: .18em;
    row-gap: 0;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 0 0;
    align-items: baseline;
    justify-content: start;
    font-size: clamp(2.35rem, 10.8vw, 4.35rem);
    line-height: .88;
    white-space: normal;
  }

  [data-home-section="hero"] .hero-main-title > span {
    display: block;
    width: auto;
  }

  [data-home-section="hero"] .hero-main-title > span:nth-child(1) { grid-column: 1 / -1; grid-row: 1; }
  [data-home-section="hero"] .hero-main-title > span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  [data-home-section="hero"] .hero-main-title > span:nth-child(3) { grid-column: 1; grid-row: 3; }
  [data-home-section="hero"] .hero-main-title > span:nth-child(4) { grid-column: 2; grid-row: 3; }

  [data-home-section="hero"] [data-primary-actions]:not(.is-mobile-logo-dock):not(.is-group-transition):not(.is-mobile-refined-transition) {
    position: static !important;
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    justify-self: stretch;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  [data-home-section="hero"] [data-primary-actions]:not(.is-mobile-logo-dock):not(.is-group-transition):not(.is-mobile-refined-transition) .primary-actions-dock-group {
    display: contents !important;
  }

  [data-home-section="hero"] [data-primary-actions]:not(.is-mobile-logo-dock):not(.is-group-transition):not(.is-mobile-refined-transition) .button,
  [data-home-section="hero"] [data-primary-actions]:not(.is-mobile-logo-dock):not(.is-group-transition):not(.is-mobile-refined-transition) .stay-button {
    width: 100% !important;
    min-width: 0 !important;
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 6px 3px !important;
    font-size: clamp(.53rem, 2.35vw, .7rem) !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  [data-home-section="hero"] .hero-daily-feature {
    grid-column: 1;
    grid-row: 3;
    align-self: center;
    justify-self: center;
    width: min(100%, 620px);
    max-height: 100%;
  }

  [data-home-section="hero"] .hero-daily-feature > h2 {
    font-size: clamp(.54rem, 2.3vw, .76rem);
    letter-spacing: clamp(.06em, .5vw, .18em);
  }

  [data-home-section="hero"] .hero-featured-card {
    max-height: min(31vh, 260px);
  }
}

/* Very narrow phones. */
@media (max-width: 420px) {
  [data-home-section="hero"] .hero-content.hero-content-premium {
    row-gap: 8px;
  }

  [data-home-section="hero"] .hero-main-title {
    column-gap: .13em;
    font-size: clamp(2rem, 10.2vw, 2.75rem);
  }

  [data-home-section="hero"] [data-primary-actions]:not(.is-mobile-logo-dock):not(.is-group-transition):not(.is-mobile-refined-transition) .button,
  [data-home-section="hero"] [data-primary-actions]:not(.is-mobile-logo-dock):not(.is-group-transition):not(.is-mobile-refined-transition) .stay-button {
    height: 36px !important;
    min-height: 36px !important;
    font-size: clamp(.49rem, 2.25vw, .61rem) !important;
  }

  [data-home-section="hero"] .hero-featured-card {
    max-height: min(29vh, 205px);
  }
}

/* Short mobile screens, including landscape phones. */
@media (max-width: 1023px) and (max-height: 620px) {
  [data-home-section="hero"] .hero-content.hero-content-premium {
    row-gap: 6px;
    padding-top: 6px;
    padding-bottom: 7px;
  }

  [data-home-section="hero"] .hero-main-title {
    font-size: clamp(1.75rem, 7.2vh, 2.8rem);
    line-height: .86;
  }

  [data-home-section="hero"] [data-primary-actions]:not(.is-mobile-logo-dock):not(.is-group-transition):not(.is-mobile-refined-transition) .button,
  [data-home-section="hero"] [data-primary-actions]:not(.is-mobile-logo-dock):not(.is-group-transition):not(.is-mobile-refined-transition) .stay-button {
    height: 34px !important;
    min-height: 34px !important;
  }

  [data-home-section="hero"] .hero-daily-feature > h2 {
    margin-bottom: 4px;
  }

  [data-home-section="hero"] .hero-featured-card {
    max-height: min(25vh, 170px);
  }
}

/* Short desktop windows: preserve the two-column composition without overflow. */
@media (min-width: 1024px) and (max-height: 700px) {
  [data-home-section="hero"] .hero-content.hero-content-premium {
    row-gap: 14px;
    padding-block: 8px;
  }

  [data-home-section="hero"] .hero-main-title {
    font-size: clamp(2.3rem, 7.6vh, 4.8rem);
  }

  [data-home-section="hero"] .hero-featured-card {
    max-height: min(42vh, 270px);
  }
}
