/* SmartChoice Hub V6 production hardening.
   Progressive enhancement only: preserves the V5 design, content, URLs, product catalogue,
   Soro integration, commerce logic, SEO metadata and reduced-motion behavior. */

:root {
  --sch-v6-gold: #e1bd69;
  --sch-v6-ivory: #fffaf0;
  --sch-v6-black: #070908;
  --sch-v6-ease: cubic-bezier(.23,1,.32,1);
}

/* Brand contrast: header, sticky header, mobile drawer and footer. */
body.sch-cinematic header a[aria-label*="Home"] > span:last-child,
body.sch-cinematic #mobile-menu a[aria-label*="Home"] > span:last-child,
body.sch-cinematic footer a[href="/"] > span:last-child {
  color: #fff !important;
  text-shadow: 0 1px 14px rgba(0,0,0,.42);
}
body.sch-cinematic header a[aria-label*="Home"] > span:last-child > span,
body.sch-cinematic #mobile-menu a[aria-label*="Home"] > span:last-child > span,
body.sch-cinematic footer a[href="/"] > span:last-child > span {
  color: var(--sch-v6-gold) !important;
}
body.sch-cinematic header a[aria-label*="Home"] > span:first-child,
body.sch-cinematic #mobile-menu a[aria-label*="Home"] > svg,
body.sch-cinematic footer a[href="/"] > span:first-child {
  color: var(--sch-v6-gold) !important;
}
body.sch-cinematic footer a[href="/"] > span:first-child {
  background: rgba(225,189,105,.12) !important;
  border: 1px solid rgba(225,189,105,.3);
}

/* The footer brand plate remains refined but can no longer disappear into black. */
body.sch-cinematic footer::before {
  color: rgba(255,250,240,.095) !important;
  -webkit-text-stroke: 1px rgba(225,189,105,.52) !important;
  text-shadow: 0 0 70px rgba(225,189,105,.08);
}

/* Hero media: poster stays until actual playback, and always survives failure. */
body.sch-page-home .sch-v6-hero {
  isolation: isolate;
  background: var(--sch-v6-black) !important;
}
body.sch-page-home .sch-v6-hero::before {
  background:
    linear-gradient(90deg, transparent 11%, rgba(225,189,105,.2) 11%, rgba(225,189,105,.2) calc(11% + 1px), transparent calc(11% + 1px), transparent 89%, rgba(225,189,105,.2) 89%, rgba(225,189,105,.2) calc(89% + 1px), transparent calc(89% + 1px)),
    linear-gradient(180deg, rgba(7,9,8,.08), rgba(7,9,8,.16) 48%, rgba(7,9,8,.56)) !important;
}
body.sch-page-home .sch-v6-hero .sch-hero-video {
  z-index: 0;
  opacity: 0 !important;
  visibility: visible !important;
  filter: saturate(.9) contrast(1.04) brightness(.94) !important;
  object-position: center center;
  transform: scale(1.035) translate3d(0,var(--sch-hero-shift,0px),0) !important;
  transition: opacity 900ms var(--sch-v6-ease), transform 8s linear !important;
}
body.sch-page-home .sch-v6-hero.sch-v6-video-ready .sch-hero-video {
  opacity: 1 !important;
}
body.sch-page-home .sch-v6-hero-poster {
  z-index: 0;
  opacity: 1 !important;
  visibility: visible !important;
  transition: opacity 900ms var(--sch-v6-ease) !important;
}
body.sch-page-home .sch-v6-hero-poster picture,
body.sch-page-home .sch-v6-hero-poster img {
  display: block;
  width: 100%;
  height: 100%;
}
body.sch-page-home .sch-v6-hero-poster img {
  object-fit: cover;
  object-position: center center;
  filter: saturate(.92) contrast(1.04) brightness(.96) !important;
}
body.sch-page-home .sch-v6-hero.sch-v6-video-ready .sch-v6-hero-poster {
  opacity: 0 !important;
  pointer-events: none;
}
body.sch-page-home .sch-v6-hero .sch-v6-legacy-overlay {
  display: none !important;
}
body.sch-page-home .sch-v6-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7,9,8,.52) 0%, rgba(7,9,8,.34) 37%, rgba(7,9,8,.12) 72%, rgba(7,9,8,.22) 100%),
    linear-gradient(180deg, rgba(7,9,8,.10) 0%, rgba(7,9,8,.05) 55%, rgba(7,9,8,.44) 100%);
}
body.sch-page-home .sch-v6-hero > .relative.z-10 {
  z-index: 10;
}
body.sch-page-home .sch-v6-hero h1,
body.sch-page-home .sch-v6-hero p,
body.sch-page-home .sch-v6-hero a,
body.sch-page-home .sch-v6-hero span {
  text-shadow: 0 3px 30px rgba(0,0,0,.46);
}
body.sch-page-home .sch-v6-hero .sch-v6-hero-stats > span {
  color: rgba(255,255,255,.72) !important;
}
body.sch-page-home .sch-v6-hero .sch-v6-hero-stats strong {
  color: #fff !important;
}

/* Desktop mega menus: remain open across the trigger-to-panel path and sit above the hero. */
@media (min-width: 1024px) {
  body.sch-cinematic header nav[aria-label="Main navigation"] > div {
    position: relative;
  }
  body.sch-cinematic header [id^="dropdown-"] {
    z-index: 10020 !important;
    visibility: hidden;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translate(-50%,-6px) !important;
    transition: opacity 180ms var(--sch-v6-ease), transform 180ms var(--sch-v6-ease), visibility 0s linear 180ms !important;
  }
  body.sch-cinematic header [id^="dropdown-"].sch-v6-menu-open {
    visibility: visible;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translate(-50%,0) !important;
    transition-delay: 0s !important;
  }
  body.sch-cinematic header [id^="dropdown-"] > div {
    width: min(32rem,calc(100vw - 2rem)) !important;
    overflow: visible !important;
    border-radius: 0 !important;
    border-color: rgba(225,189,105,.42) !important;
    background: rgba(255,252,245,.985) !important;
  }
  body.sch-cinematic header [id^="dropdown-"] > div > div:nth-child(2) {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: .15rem .5rem;
    padding: .8rem !important;
  }
  body.sch-cinematic header [id^="dropdown-"] a {
    min-height: 2.7rem;
    border-radius: 0 !important;
    color: #26302a !important;
  }
  body.sch-cinematic header [id^="dropdown-"] a:hover,
  body.sch-cinematic header [id^="dropdown-"] a:focus-visible {
    color: #0c2118 !important;
    background: #efe8d7 !important;
  }
}

/* Search always layers over page media and remains large enough on narrow screens. */
body.sch-cinematic #search-dropdown {
  z-index: 10030 !important;
}
body.sch-cinematic #search-dropdown .sch-v6-search-article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .78rem 1rem;
  color: #18201c;
  background: #fff;
  border-top: 1px solid rgba(24,32,28,.08);
  font-size: .86rem;
  line-height: 1.35;
}
body.sch-cinematic #search-dropdown .sch-v6-search-article:hover,
body.sch-cinematic #search-dropdown .sch-v6-search-article:focus-visible {
  color: #146b4f;
  background: #f4f1e9;
  outline: none;
}
body.sch-cinematic #search-dropdown .sch-v6-search-article small {
  flex: 0 0 auto;
  color: #9a6b2f;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .13em;
}

/* Mobile off-canvas menu: high contrast, scroll-safe, and fully above the header. */
@media (max-width: 1023px) {
  body.sch-page-home .sch-v6-hero .animate-fade-up {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  body.sch-cinematic #search-dropdown {
    position: fixed !important;
    top: 4.35rem !important;
    right: .5rem !important;
    left: .5rem !important;
    width: auto !important;
    max-width: none !important;
    transform: translateY(0) !important;
  }
  body.sch-v6-menu-active {
    overflow: hidden !important;
    overscroll-behavior: none;
  }
  body.sch-v6-menu-active header button[aria-controls="mobile-menu"] {
    visibility: hidden !important;
    pointer-events: none !important;
  }
  body.sch-cinematic #mobile-menu {
    z-index: 11000 !important;
    color: var(--sch-v6-ivory) !important;
  }
  body.sch-cinematic #mobile-menu > div:first-child {
    background: rgba(0,0,0,.66) !important;
    backdrop-filter: blur(9px);
  }
  body.sch-cinematic #mobile-menu > .sch-v6-mobile-panel,
  body.sch-cinematic #mobile-menu > div:last-child {
    width: min(100%,32rem) !important;
    margin-left: auto;
    color: var(--sch-v6-ivory) !important;
    background:
      radial-gradient(circle at 100% 0%, rgba(225,189,105,.13), transparent 30%),
      var(--sch-v6-black) !important;
    border-left: 1px solid rgba(225,189,105,.28) !important;
    box-shadow: -30px 0 90px rgba(0,0,0,.42);
  }
  body.sch-cinematic #mobile-menu > div:last-child > div:first-child,
  body.sch-cinematic #mobile-menu > .sch-v6-mobile-panel > div:first-child {
    min-height: 4.25rem;
    border-color: rgba(255,255,255,.12) !important;
  }
  body.sch-cinematic #mobile-menu a,
  body.sch-cinematic #mobile-menu button,
  body.sch-cinematic #mobile-menu p {
    color: rgba(255,250,240,.88) !important;
  }
  body.sch-cinematic #mobile-menu nav > div {
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  body.sch-cinematic #mobile-menu nav > div > div:first-child > a {
    min-height: 3.25rem;
    display: flex;
    align-items: center;
    color: #fff !important;
    font-family: var(--cin-display);
    font-size: 1.18rem !important;
  }
  body.sch-cinematic #mobile-menu nav button[aria-expanded] {
    color: var(--sch-v6-gold) !important;
    border-color: rgba(225,189,105,.25) !important;
    background: rgba(225,189,105,.08) !important;
  }
  body.sch-cinematic #mobile-menu nav [data-sch-v6-submenu="true"] {
    margin: 0 0 .6rem .75rem;
    padding-left: .75rem;
    border-left: 1px solid rgba(225,189,105,.3);
  }
  body.sch-cinematic #mobile-menu nav [data-sch-v6-submenu="true"] a {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
  }
  body.sch-cinematic #mobile-menu [aria-label="Close menu"] {
    color: #fff !important;
    background: rgba(255,255,255,.07) !important;
    border: 1px solid rgba(225,189,105,.3) !important;
  }
}

/* Secondary cinematic moment in Ingredient Intelligence. */
body.sch-cinematic.sch-page-home main > section.sch-v6-ingredient-section {
  background: #17352b !important;
}
body.sch-page-home .sch-v6-ingredient-section > .absolute.inset-0 > .absolute.inset-y-0.left-0 {
  display: none !important;
}
body.sch-cinematic.sch-page-home main > section.sch-v6-ingredient-section > .sch-v6-ingredient-media {
  position: absolute !important;
  inset: 0 auto 0 0 !important;
  z-index: 1 !important;
  width: 35% !important;
  height: auto !important;
  display: block !important;
  overflow: hidden;
  background: #e7e1d4;
  box-shadow: inset -1px 0 rgba(225,189,105,.24);
}
body.sch-page-home .sch-v6-ingredient-media video,
body.sch-page-home .sch-v6-ingredient-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
body.sch-page-home .sch-v6-ingredient-media video {
  opacity: 0;
  transition: opacity 700ms var(--sch-v6-ease);
}
body.sch-page-home .sch-v6-ingredient-media.sch-v6-media-ready video {
  opacity: 1;
}
body.sch-page-home .sch-v6-ingredient-media.sch-v6-media-ready img {
  opacity: 0;
}
body.sch-page-home .sch-v6-ingredient-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(7,9,8,.08), transparent 55%, rgba(238,241,234,.94));
}
body.sch-page-home .sch-v6-ingredient-section .stagger-target {
  position: relative;
  z-index: 2;
}
body.sch-page-home .sch-v6-ingredient-section .stagger-target h2,
body.sch-page-home .sch-v6-ingredient-section .stagger-target > div > div:first-child > p:last-child {
  color: #fffaf0 !important;
}
body.sch-page-home .sch-v6-ingredient-section .stagger-target .eyebrow {
  color: var(--sch-v6-gold) !important;
}

@media (max-width: 1023px) {
  body.sch-page-home .sch-v6-ingredient-section {
    padding-top: 22rem !important;
  }
  body.sch-cinematic.sch-page-home main > section.sch-v6-ingredient-section > .sch-v6-ingredient-media {
    inset: 0 0 auto 0;
    width: 100% !important;
    height: 19rem;
  }
  body.sch-page-home .sch-v6-ingredient-media video {
    display: none !important;
  }
  body.sch-page-home .sch-v6-ingredient-media img {
    opacity: 1 !important;
  }
  body.sch-page-home .sch-v6-ingredient-media::after {
    background: linear-gradient(180deg, rgba(7,9,8,.04), transparent 55%, #eef1ea 100%);
  }
}

@media (max-width: 767px) {
  body.sch-page-home .sch-v6-hero .sch-hero-video {
    display: none !important;
  }
  body.sch-page-home .sch-v6-hero .sch-v6-hero-poster {
    opacity: 1 !important;
  }
  body.sch-page-home .sch-v6-hero-poster img {
    object-position: 64% center;
    filter: saturate(.92) contrast(1.04) brightness(.84) !important;
  }
  body.sch-page-home .sch-v6-hero-overlay {
    background:
      linear-gradient(90deg, rgba(7,9,8,.54), rgba(7,9,8,.16) 90%),
      linear-gradient(180deg, rgba(7,9,8,.18), rgba(7,9,8,.12) 45%, rgba(7,9,8,.58));
  }
  body.sch-page-home .sch-v6-hero .sch-v6-hero-stats {
    width: 100%;
    margin-top: 2rem !important;
    padding: .8rem .45rem;
    display: grid !important;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: .35rem !important;
    border-top: 1px solid rgba(225,189,105,.28);
    border-bottom: 1px solid rgba(225,189,105,.18);
    background: rgba(7,9,8,.28);
    backdrop-filter: blur(5px);
  }
  body.sch-page-home .sch-v6-hero .sch-v6-hero-stats > span:not([class*="w-px"]) {
    display: block;
    padding: 0 .2rem;
    font-size: .62rem !important;
    line-height: 1.35;
    text-align: center;
  }
  body.sch-page-home .sch-v6-hero .sch-v6-hero-stats strong {
    display: block;
    margin-bottom: .12rem;
    font-size: .88rem;
  }
  body.sch-page-home .sch-v6-hero .sch-v6-hero-stats > span[class*="w-px"] {
    display: none !important;
  }
  body.sch-cinematic footer::before {
    color: rgba(255,250,240,.12) !important;
    -webkit-text-stroke-color: rgba(225,189,105,.56) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.sch-page-home .sch-v6-hero .sch-hero-video,
  body.sch-page-home .sch-v6-ingredient-media video {
    display: none !important;
  }
  body.sch-page-home .sch-v6-hero .sch-v6-hero-poster,
  body.sch-page-home .sch-v6-ingredient-media img {
    opacity: 1 !important;
  }
  body.sch-cinematic [id^="dropdown-"] {
    transition: none !important;
  }
}
