/* ==========================================================================
   Hero — cinematic dark carousel (CSS-gradient placeholder art)
   ========================================================================== */

.hero {
  position: relative;
  background: #0a0a0c;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

/* all slides share one grid cell, so the tallest one sets the height */
.hero__track { display: grid; }

.hero__slide {
  grid-area: 1 / 1;
  position: relative;
  display: grid;
  align-items: end;
  padding-top: 260px;            /* mobile: bottles on top, copy below */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0s linear 0.9s;
}
.hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
  z-index: 1;
}

/* ---------- atmosphere ---------- */
.hero__bg {
  position: absolute;
  inset: 0;
  background: var(--bg);
  transform: scale(1.06);
  transition: transform 7s ease-out;
}
.hero__slide.is-active .hero__bg { transform: scale(1); }

/* vignette + bottom fade so the copy always reads */
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 8, 10, 0) 38%, rgba(8, 8, 10, 0.88) 100%),
    radial-gradient(120% 90% at 50% 40%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.55) 100%);
}

/* --gx / --hx place the two glows horizontally; the art stage moves to the other
   side in Arabic, so the glows are mirrored with it (see the RTL rules below) */
.hero__slide--midnight {
  --gx: 70%; --hx: 96%;
  --bg:
    radial-gradient(46% 52% at var(--gx) 34%, rgba(222, 172, 104, 0.34), rgba(222, 172, 104, 0) 70%),
    radial-gradient(60% 60% at var(--hx) 100%, rgba(140, 18, 30, 0.5), rgba(140, 18, 30, 0) 70%),
    linear-gradient(135deg, #070708 0%, #15151a 55%, #0b0b0e 100%);
}
.hero__slide--oud {
  --gx: 68%; --hx: 6%;
  --bg:
    radial-gradient(44% 50% at var(--gx) 38%, rgba(196, 140, 78, 0.38), rgba(196, 140, 78, 0) 70%),
    radial-gradient(55% 55% at var(--hx) 100%, rgba(110, 14, 24, 0.45), rgba(110, 14, 24, 0) 70%),
    linear-gradient(160deg, #0a0807 0%, #1a1310 55%, #0a0807 100%);
}
.hero__slide--noir {
  --gx: 70%; --hx: 100%;
  --bg:
    radial-gradient(46% 52% at var(--gx) 34%, rgba(160, 178, 208, 0.3), rgba(160, 178, 208, 0) 70%),
    radial-gradient(50% 50% at var(--hx) 100%, rgba(120, 20, 32, 0.38), rgba(120, 20, 32, 0) 70%),
    linear-gradient(145deg, #08090c 0%, #14161c 55%, #090a0d 100%);
}
:root[dir="rtl"] .hero__slide--midnight { --gx: 30%; --hx: 4%; }
:root[dir="rtl"] .hero__slide--oud       { --gx: 32%; --hx: 94%; }
:root[dir="rtl"] .hero__slide--noir      { --gx: 30%; --hx: 0%; }

/* drifting mist */
.hero__mist {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0));
  filter: blur(26px);
  pointer-events: none;
  animation: mist-drift 14s ease-in-out infinite alternate;
}
.hero__mist--1 { width: 360px; height: 220px; left: 38%; top: 6%; }
.hero__mist--2 { width: 300px; height: 200px; left: 62%; top: 38%; animation-delay: -5s; animation-duration: 18s; }
.hero__mist--3 { width: 420px; height: 240px; left: 8%;  top: 24%; animation-delay: -9s; opacity: 0.6; }

@keyframes mist-drift {
  from { transform: translate3d(-26px, 8px, 0) scale(1); }
  to   { transform: translate3d(34px, -16px, 0) scale(1.12); }
}

/* diagonal light beam */
.hero__beam {
  position: absolute;
  top: -20%;
  left: 50%;
  width: 28%;
  height: 150%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0));
  transform: rotate(18deg);
  pointer-events: none;
}

/* ---------- art stage (bottles) ---------- */
.hero__art {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: min(100%, 520px);
  height: 260px;
  margin-inline: auto;
  pointer-events: none;
}

.hero__art .bottle {
  bottom: 6%;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s ease 0.15s, transform 1.1s var(--ease) 0.15s;
}
.hero__slide.is-active .hero__art .bottle {
  opacity: 1;
  transform: none;
  animation: bottle-float 7s ease-in-out 1.2s infinite alternate;
}
.hero__art .bottle:nth-of-type(2) { animation-delay: 1.8s; animation-duration: 8.5s; }
.hero__art .bottle:nth-of-type(3) { animation-delay: 2.4s; animation-duration: 6.5s; }

@keyframes bottle-float {
  from { transform: translateY(0); }
  to   { transform: translateY(-10px); }
}

/* Placement: --x is the bottle's horizontal centre inside the art stage and
   --h its height as a share of the stage; width follows from the bottle's
   aspect ratio, so the group scales cleanly at every viewport width. */
.hero__art .bottle {
  left: var(--x, 50%);
  right: auto;
  width: auto;
  height: var(--h);
  margin: 0;
  translate: -50% 0;
}
.hero__art .bottle--main  { --h: 80%; }
.hero__art .bottle--side  { --h: 50%; }
.hero__art .bottle--small { --h: 36%; }
.hero__art .slot-l { --x: 20%; }
.hero__art .slot-c { --x: 50%; }
.hero__art .slot-r { --x: 80%; }

.hero__floor {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 3%;
  height: 8%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
}

/* ---------- photo variant ----------
   When a slide's photo (assets/images/hero-1.jpg, hero-2.jpg, hero-3.jpg) loads
   (js/images.js) it fills the slide and the drawn bottles and haze step aside.
   Without the file, the art above stays. */
.hero__img { object-position: 62% 50%; }

/* The hero photos leave their left half dark and empty for the copy, with the bottle on the
   right. In Arabic the copy sits on the right, so the photo is mirrored to keep the empty
   side under the text. Safe while the photos carry no readable lettering (they don't today);
   if you swap in a photo with text on it, delete this rule. */
:root[dir="rtl"] .hero__img { transform: scaleX(-1); }

.hero__bg.has-img ~ .hero__art,
.hero__bg.has-img ~ .hero__mist,
.hero__bg.has-img ~ .hero__beam {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}

/* a firmer shade keeps the copy readable over any photo */
.hero__bg.has-img::after {
  background: linear-gradient(180deg, rgba(8, 8, 10, 0.2) 0%, rgba(8, 8, 10, 0.55) 40%, rgba(8, 8, 10, 0.92) 100%);
}

/* ---------- copy ---------- */
.hero__inner {
  position: relative;
  z-index: 2;
  align-self: end;
  padding-bottom: 66px;
}

.hero__content { max-width: 560px; }

.hero__content > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.9s var(--ease);
}
.hero__slide.is-active .hero__content > * { opacity: 1; transform: none; }
.hero__slide.is-active .hero__content > :nth-child(2) { transition-delay: 0.12s; }
.hero__slide.is-active .hero__content > :nth-child(3) { transition-delay: 0.24s; }
.hero__slide.is-active .hero__content > :nth-child(4) { transition-delay: 0.36s; }

.hero__eyebrow {
  margin-bottom: 0.7rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.hero__title {
  font-size: clamp(1.85rem, 7vw, 3.6rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.hero__title em { font-style: normal; font-weight: 300; }

.hero__text {
  margin: 0.8rem 0 1.4rem;
  max-width: 44ch;
  font-size: 0.92rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.78);
}

/* ---------- arrows ---------- */
.hero__arrow {
  position: absolute;
  bottom: 14px;                  /* mobile: tucked beside the dots, clear of the art */
  z-index: 5;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, transform var(--t-fast) var(--ease);
}
.hero__arrow:hover { background: #fff; color: var(--ink); }
.hero__arrow:active { transform: scale(0.94); }
.hero__arrow svg { width: 18px; height: 18px; }
.hero__arrow--prev { inset-inline-start: 12px; }
.hero__arrow--next { inset-inline-end: 12px; }
:root[dir="rtl"] .hero__arrow svg { transform: scaleX(-1); }     /* chevrons point the other way in Arabic */

/* ---------- dots ---------- */
.hero__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.38);
  transition: width var(--t) var(--ease), background-color var(--t-fast) ease;
}
.hero__dot::before { content: ""; position: absolute; inset: -12px -5px; }
.hero__dot:hover { background: rgba(255, 255, 255, 0.7); }
.hero__dot.is-active { width: 28px; background: #fff; }

/* ---------- tablet / desktop ---------- */
@media (min-width: 900px) {
  .hero__slide {
    min-height: clamp(560px, 46vw, 720px);
    padding-top: 0;
    align-items: center;
  }

  .hero__bg::after {
    background:
      linear-gradient(90deg, rgba(8, 8, 10, 0.82) 0%, rgba(8, 8, 10, 0.25) 52%, rgba(8, 8, 10, 0) 70%),
      radial-gradient(120% 90% at 55% 45%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.55) 100%);
  }

  .hero__bg.has-img::after {
    background:
      linear-gradient(90deg, rgba(8, 8, 10, 0.88) 0%, rgba(8, 8, 10, 0.55) 42%, rgba(8, 8, 10, 0.1) 78%),
      linear-gradient(180deg, rgba(8, 8, 10, 0.25) 0%, rgba(8, 8, 10, 0) 30%, rgba(8, 8, 10, 0.35) 100%);
  }

  .hero__art {
    top: 0;
    bottom: 0;
    inset-inline: auto 3%;               /* the bottles sit at the end side, opposite the copy */
    width: 54%;
    height: 100%;
    margin: 0;
  }
  .hero__art .bottle { bottom: 12%; }
  .hero__art .bottle--main  { --h: 68%; }
  .hero__art .bottle--side  { --h: 44%; }
  .hero__art .bottle--small { --h: 31%; }
  .hero__art .slot-l { --x: 18%; }
  .hero__art .slot-c { --x: 46%; }
  .hero__art .slot-r { --x: 76%; }
  .hero__floor { bottom: 9%; }

  .hero__inner { padding-bottom: 0; align-self: center; }
  .hero__text { font-size: 1.02rem; }

  /* Below 1400px the copy starts closer to the screen edge than the arrows reach, so the
     arrows stay tucked beside the dots, clear of it (wider screens: see the next query) */
  .hero__arrow { bottom: 22px; width: 44px; height: 44px; }
  .hero__arrow--prev { inset-inline-start: 24px; }
  .hero__arrow--next { inset-inline-end: 24px; }
  .hero__dots { bottom: 30px; }

  /* Arabic: the copy sits on the right, so the dark shade comes from the right */
  :root[dir="rtl"] .hero__bg::after {
    background:
      linear-gradient(270deg, rgba(8, 8, 10, 0.82) 0%, rgba(8, 8, 10, 0.25) 52%, rgba(8, 8, 10, 0) 70%),
      radial-gradient(120% 90% at 45% 45%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.55) 100%);
  }
  :root[dir="rtl"] .hero__bg.has-img::after {
    background:
      linear-gradient(270deg, rgba(8, 8, 10, 0.88) 0%, rgba(8, 8, 10, 0.55) 42%, rgba(8, 8, 10, 0.1) 78%),
      linear-gradient(180deg, rgba(8, 8, 10, 0.25) 0%, rgba(8, 8, 10, 0) 30%, rgba(8, 8, 10, 0.35) 100%);
  }
}

/* wide enough for the copy to clear them: arrows go back to the middle of each side */
@media (min-width: 1400px) {
  .hero__arrow { top: 50%; bottom: auto; width: 48px; height: 48px; margin-top: -24px; }
  .hero__arrow--prev { inset-inline-start: 40px; }
  .hero__arrow--next { inset-inline-end: 40px; }
}

/* ---------- Arabic copy ---------- */
html[lang="ar"] .hero__title { line-height: 1.4; }
html[lang="ar"] .hero__title em { font-weight: 400; }
html[lang="ar"] .hero__text { font-weight: 400; line-height: 1.9; }
html[lang="ar"] .hero__eyebrow:not([lang="en"]) { font-size: 0.9rem; font-weight: 600; }
