/* Homepage hero (Apple TV style top 10 carousel). Loaded only on the homepage, after custom.css.
   Spec: ai/specs/2026-09-27-homepage-apple-tv-hero-design.md */

/* ---- header over the image ----
   custom.css keeps .app-header static (it scrolls away). On the homepage the Netflix header
   (nh-header.css, categories inside the header) sits absolutely on top of the hero. */
body.home-hero-page .app-header { position: absolute !important; left: 0; right: 0; top: 0 !important; margin-left: 0; margin-right: 0; z-index: 1120; }
body.home-hero-page .app-header.-pane { background-color: transparent !important; box-shadow: none !important; }

/* once the reels reach it the header sticks to the top as a normal bar (home-hero.js toggles .home-header-stuck) */
body.home-hero-page.home-header-stuck .app-header,
body.home-hero-page.home-header-stuck .app-header.-pane {
  position: fixed !important; top: 0 !important;
  background-color: var(--bs-body-bg) !important; box-shadow: 0 6px 20px rgba(0, 0, 0, .08) !important;
  animation: hh-drop .22s ease-out;
}
@keyframes hh-drop { from { transform: translateY(-100%); } to { transform: none; } }

/* ---- hero ---- */
.home-hero {
  --hh-w: min(calc(100vw - var(--hh-scrollbar, 0px)), var(--site-max, 1800px));
  --hh-dark: #000;
  --hh-band-pad: 24px;
  position: relative; width: var(--hh-w); margin-left: calc(50% - var(--hh-w) / 2);
  padding-bottom: var(--hh-band-pad); isolation: isolate;
}
/* dark band edge to edge (light mode too) behind the stage and the thumbnails; it ends in a straight line */
.home-hero::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: calc(100vw - var(--hh-scrollbar, 0px)); transform: translateX(-50%); pointer-events: none;
  background: var(--hh-dark);
}
.home-hero__stage { position: relative; height: clamp(500px, 52vw, 700px); overflow: hidden; background: #000; color: #fff; outline: none; }
.home-hero__stage:focus-visible { box-shadow: inset 0 0 0 3px rgba(255,255,255,.6); }
.home-hero__top-shade { position: absolute; left: 0; right: 0; top: 0; height: 230px; z-index: 5; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.45) 45%, rgba(0,0,0,0) 100%); }
.home-hero__track { display: flex; height: 100%; transition: transform 720ms cubic-bezier(.16, 1, .3, 1); will-change: transform; }
.home-hero__slide { position: relative; flex: 0 0 100%; height: 100%; }
.home-hero__glow { position: absolute; inset: -40px; z-index: 0; filter: blur(50px); opacity: .55; pointer-events: none; }
.home-hero__glow img { width: 100%; height: 100%; object-fit: cover; }
.home-hero__media { position: absolute; inset: 0; z-index: 1; display: block; }
.home-hero__media picture,
.home-hero__media img { display: block; width: 100%; height: 100%; }
.home-hero__media img { object-fit: cover; object-position: center; }
.home-hero__shade { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(32deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.72) 22%, rgba(0,0,0,.35) 42%, rgba(0,0,0,0) 58%); }
.home-hero__shade::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 170px; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, var(--hh-dark) 100%); }
.home-hero__info { position: absolute; left: 56px; bottom: 112px; z-index: 3; max-width: 660px; display: grid; gap: 12px; }
.home-hero__slide.is-active .home-hero__info > * { animation: hh-rise .6s cubic-bezier(.2,.8,.2,1) both; }
.home-hero__slide.is-active .home-hero__info > :nth-child(2) { animation-delay: .06s; }
.home-hero__slide.is-active .home-hero__info > :nth-child(3) { animation-delay: .12s; }
.home-hero__slide.is-active .home-hero__info > :nth-child(4) { animation-delay: .18s; }
.home-hero__slide.is-active .home-hero__info > :nth-child(5) { animation-delay: .24s; }
.home-hero__slide.is-active .home-hero__info > :nth-child(6) { animation-delay: .3s; }
@keyframes hh-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.home-hero__vendor { display: inline-flex; align-items: center; gap: 6px; width: max-content; max-width: 100%; background: rgba(255,255,255,.18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; }
.home-hero .home-hero__title { margin: 0; font-family: var(--chilli-font, sans-serif); font-weight: 800; font-size: clamp(28px, 3vw, 42px); line-height: 1.05; letter-spacing: -.03em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 2px 20px rgba(0,0,0,.35); text-wrap: balance; }
.home-hero .home-hero__title a { color: #fff; text-decoration: none; }
/* long titles step down (Chilli_Model_HomeHero::titleSize: >50 long, >70 xlong, >95 xxlong) so they show whole */
.home-hero .home-hero__title--long { font-size: clamp(26px, 2.6vw, 36px); }
.home-hero .home-hero__title--xlong { font-size: clamp(24px, 2.2vw, 32px); -webkit-line-clamp: 4; }
.home-hero .home-hero__title--xxlong { font-size: clamp(22px, 1.9vw, 28px); -webkit-line-clamp: 4; }
.home-hero .home-hero__desc { margin: 0; font-size: 17px; line-height: 1.4; color: rgba(255,255,255,.9); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 560px; }
.home-hero__proof { font-size: 13px; color: rgba(255,255,255,.75); display: inline-flex; align-items: center; gap: 6px; }
.home-hero__price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.home-hero__price-now { font-family: var(--chilli-font, sans-serif); font-weight: 800; font-size: 34px; line-height: 1; letter-spacing: -.02em; }
.home-hero__price-now small { font-size: 16px; font-weight: 700; margin-right: 4px; letter-spacing: 0; }
.home-hero__price-was { color: rgba(255,255,255,.62); text-decoration: line-through; font-size: 18px; font-weight: 500; }
.home-hero__disc { background: #DC251E; color: #fff; font-weight: 800; font-size: 26px; line-height: 1; padding: 8px 16px; border-radius: 12px; align-self: center; }
.home-hero__cta { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.home-hero .home-hero__view { padding: 0 40px; min-width: 167px; justify-content: center; text-align: center; font-size: 18px; font-weight: 700; letter-spacing: 0; text-transform: none; box-shadow: 0 8px 24px rgba(24,174,0,.3); text-decoration: none; }
.home-hero .favourite-heart--hero { position: static; width: 60px; height: 60px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #fff; display: inline-flex; align-items: center; justify-content: center; line-height: 1; cursor: pointer; transition: transform .15s, background-color .15s; }
.home-hero .favourite-heart--hero:hover { background: rgba(255,255,255,.3); transform: none; }
.home-hero .favourite-heart--hero i { font-size: 1.5rem; filter: none; }
.home-hero .favourite-heart--hero.is-favourited { background: rgba(255,255,255,.92); transform: scale(1.06); }
.home-hero__nav { position: absolute; bottom: 84px; z-index: 4; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 0; background: rgba(0,0,0,.35); -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%); box-shadow: inset 0 1px 0 rgba(255,255,255,.22); color: #fff; cursor: pointer; opacity: 0; transition: opacity .2s, background-color .2s; display: inline-flex; align-items: center; justify-content: center; }
.home-hero__nav:hover { background: rgba(0,0,0,.5); }
.home-hero__nav svg { width: 18px; height: 18px; flex: none; display: block; }
/* bottom right, side by side, above the thumbnail strip */
.home-hero__nav--prev { right: 80px; } /* 4px apart, same as the rail arrows below */
.home-hero__nav--next { right: 32px; }
.home-hero__stage:hover .home-hero__nav,
.home-hero__nav:focus-visible { opacity: 1; }
.home-hero__nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---- strip ---- */
.home-hero__strip { position: relative; z-index: 7; margin-top: -74px; padding-left: 32px; padding-right: 32px; }
/* padding gives the scaled active thumb and its shadow room (overflow-x: auto clips both axes); negative margins keep the cards aligned with the title */
.home-hero__strip-row { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 20px; padding: 16px 20px 26px; margin: 0 -20px -12px; scrollbar-width: none; }
.home-hero__strip-row::-webkit-scrollbar { display: none; }
/* the row fades out on the side(s) where more thumbs wait (home-hero.js sets fade-l / fade-r), like the reels row below */
.home-hero__strip-row.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 72px), transparent 100%); mask-image: linear-gradient(90deg, #000 calc(100% - 72px), transparent 100%); }
.home-hero__strip-row.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 72px); mask-image: linear-gradient(90deg, transparent 0, #000 72px); }
.home-hero__strip-row.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 72px, #000 calc(100% - 72px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 72px, #000 calc(100% - 72px), transparent 100%); }
.home-hero .home-hero__card { flex: none; width: 222px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; position: relative; background: #222; color: #fff; text-decoration: none; scroll-snap-align: start; transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
.home-hero__card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; display: block; }
.home-hero__card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.78) 100%); }
.home-hero__card-title { position: absolute; left: 10px; right: 10px; bottom: 8px; z-index: 2; font-size: 12.5px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: bottom .25s; }
/* same badge as the listing cards below (.listing-card .price): flush left tab, 700, 1.5rem / 1.25rem under 1400 / 1rem under 576 */
.home-hero__card-price { position: absolute; top: .75rem; left: 0; z-index: 5; background: #DC251E; color: #fff; font-weight: 700; font-size: 1.35rem; line-height: 1.2; padding: .45rem .9rem; border-radius: 0 .45rem .45rem 0; white-space: nowrap; }
@media (max-width: 1399.98px) { .home-hero__card-price { font-size: 1.125rem; } }
@media (max-width: 575.98px) { .home-hero__card-price { top: .5rem; padding: .225rem .45rem; font-size: .9rem; } }

/* glass (Apple style): frosted ring on the active thumb, frosted track with a bright fill for the timer (thumbs sit on the dark band in both themes) */
.home-hero {
  --hh-glass-ring: rgba(255,255,255,.26);
  --hh-glass-edge: rgba(255,255,255,.55);
  --hh-glass-halo: 0 0 0 1px rgba(255,255,255,.14), 0 14px 30px rgba(0,0,0,.55), 0 3px 10px rgba(0,0,0,.4);
}
.home-hero__card::before {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; border-radius: inherit;
  padding: 3px; background: var(--hh-glass-ring);
  -webkit-backdrop-filter: blur(14px) saturate(180%); backdrop-filter: blur(14px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--hh-glass-edge), inset 0 0 0 1px rgba(255,255,255,.22);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  opacity: 0; transition: opacity .3s;
}
.home-hero__card.is-active::before { opacity: 1; }
.home-hero__card-bar {
  position: absolute; left: 10px; right: 10px; bottom: 7px; height: 5px; z-index: 3; border-radius: 999px; opacity: 0; transition: opacity .25s;
  background: linear-gradient(90deg, rgba(255,255,255,.85), #fff) left center / 0% 100% no-repeat, rgba(255,255,255,.24);
  -webkit-backdrop-filter: blur(10px) saturate(180%); backdrop-filter: blur(10px) saturate(180%);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.45), 0 1px 6px rgba(0,0,0,.25);
}
.home-hero__card:hover img { transform: scale(1.05); }
.home-hero .home-hero__card.is-active { z-index: 2; transform: translateY(-4px) scale(1.1); box-shadow: var(--hh-glass-halo); }
.home-hero__card.is-active .home-hero__card-title { bottom: 18px; }
.home-hero__card.is-active .home-hero__card-bar { opacity: 1; animation: hh-fill var(--hh-interval, 5s) linear forwards; }
.home-hero.is-hover .home-hero__card.is-active .home-hero__card-bar { animation-play-state: paused; }
.home-hero.is-stopped .home-hero__card.is-active .home-hero__card-bar { animation: none; opacity: 0; }
.home-hero.is-stopped .home-hero__card.is-active .home-hero__card-title { bottom: 8px; }
@keyframes hh-fill { from { background-size: 0% 100%, auto; } to { background-size: 100% 100%, auto; } }
.home-hero__card:focus-visible { outline: 2px solid #DC251E; outline-offset: 2px; }
.home-hero--single .home-hero__strip { display: none; }

/* ---- wider than the 1800 px site: the picture fades into the dark band at its sides; text, arrows, thumbs and header keep their place ---- */
@media (min-width: 1830px) {
  .home-hero__shade::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--hh-dark) 0, rgba(0,0,0,0) 120px, rgba(0,0,0,0) calc(100% - 120px), var(--hh-dark) 100%); }
}

/* ---- mobile ---- */
@media (max-width: 767.98px) {
  .home-hero__stage { height: clamp(520px, 150vw, 660px); }
  .home-hero__top-shade { height: 240px; }
  .home-hero__shade { background: linear-gradient(8deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.75) 28%, rgba(0,0,0,.3) 52%, rgba(0,0,0,0) 70%); }
  .home-hero__shade::after { height: 90px; }
  .home-hero { --hh-band-pad: 16px; }
  .home-hero__info { left: 16px; right: 16px; bottom: 64px; max-width: none; gap: 9px; }
  /* phones: up to 4 lines (5 for the longest), smaller steps for long titles instead of an ellipsis */
  .home-hero .home-hero__title { font-size: 26px; line-height: 1.08; -webkit-line-clamp: 4; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
  .home-hero .home-hero__title--long { font-size: 23px; }
  .home-hero .home-hero__title--xlong { font-size: 20px; }
  .home-hero .home-hero__title--xxlong { font-size: 18px; -webkit-line-clamp: 5; }
  .home-hero__disc { font-size: 22px; padding: 7px 13px; border-radius: 10px; }
  .home-hero .home-hero__desc { font-size: 14px; }
  .home-hero__price-now { font-size: 28px; }
  .home-hero__price-was { font-size: 15px; }
  .home-hero .home-hero__view { flex: 1; min-height: 54px; padding: 0 26px; font-size: 17px; justify-content: center; }
  .home-hero .favourite-heart--hero { width: 54px; height: 54px; flex: none; }
  .home-hero__nav { display: none; }
  .home-hero__strip { margin-top: -12px; padding-left: 16px; padding-right: 0; }
  .home-hero .home-hero__card { width: 150px; border-radius: 10px; }
  .home-hero__card-title { font-size: 11.5px; }
  .home-hero__strip-row { padding-left: 16px; padding-right: 16px; margin-left: -16px; margin-right: 0; scroll-padding-inline: 16px; }
  .home-hero__card-bar { left: 8px; right: 8px; bottom: 6px; height: 4px; }
  .home-hero__card.is-active .home-hero__card-title { bottom: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__track { transition: none; }
  .home-hero__slide.is-active .home-hero__info > * { animation: none; }
  .home-hero__card,
  .home-hero__card img,
  .home-hero__card::before,
  .home-hero__card-title { transition: none; }
}
