/* =====================================================
   HERO SLIDESHOW — Jakis Promotions
   Slide images sit as the full-bleed background at every
   breakpoint; content overlays on top, centered. Height is
   set per screen size/height using svh (no calc()
   subtraction), with a px fallback for browsers without svh
   support and a safety net for very short viewports.
   ===================================================== */

/* ── Container ─────────────────────────────────────── */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  background: var(--color-ink);

  /* px fallback first (older browsers stop here), then the
     svh value overrides it in browsers that support svh.
     No calc()/nav-height subtraction — just screen size. */
  min-height: 640px;
  min-height: 100svh;
}

/* ── Slides track ───────────────────────────────────── */
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* ── Individual slide ───────────────────────────────── */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1000ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
  z-index: 0;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-slide.is-prev {
  opacity: 0;
  z-index: 0;
}

/* ── Slide image ────────────────────────────────────── */
/* A plain, responsive <img> — no <picture>/webp source.
   object-fit + object-position keep it filling the slide
   and looking sharp at every viewport size. */
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transform: scale(1);
  transition: transform 8000ms ease-out;
  will-change: transform;
  display: block;
}

.hero-slide.is-active img {
  transform: scale(1.07);
}

/* ── Dark scrim ─────────────────────────────────────── */
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to top,
      rgba(10, 10, 12, 0.92) 0%,
      rgba(10, 10, 12, 0.68) 35%,
      rgba(10, 10, 12, 0.42) 60%,
      rgba(10, 10, 12, 0.55) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(10, 10, 12, 0.35) 0%,
      rgba(10, 10, 12, 0.05) 30%,
      rgba(10, 10, 12, 0.05) 60%,
      rgba(10, 10, 12, 0.35) 100%
    );
  z-index: 1;
}

/* ── Content layer ───────────────────────────────────
   Always absolute over the slides (background + overlay),
   at every breakpoint. Height comes from .hero above, so
   this just centers content — both vertically AND
   horizontally — inside whatever space exists. */
.hero-inner {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding-top: 3rem;
  padding-bottom: 6.5rem;
  text-align: center;
}

.hero-content {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Eyebrow ────────────────────────────────────────── */
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: clamp(0.68rem, 1.4vw, 0.8rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-gold-bright);
  margin-bottom: 1rem;
  opacity: 0;
  animation: heroReveal 700ms var(--ease) 100ms both;
}

/* ── Headline ───────────────────────────────────────── */
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6.4vw, 4.6rem);
  font-weight: 500;
  line-height: 1.08;
  color: #ffffff;
  margin: 0 0 1rem;
  text-shadow: 0 2px 28px rgba(0,0,0,0.65);
  opacity: 0;
  animation: heroReveal 700ms var(--ease) 250ms both;
}

/* ── Rotating word line ──────────────────────────────
   Replaces the old typewriter effect: the changing word
   crossfades and slides upward inside a fixed-height
   window, like a premium departure-board flip — calmer
   and more polished than a blinking-cursor typewriter. */
.hero-rotator-line {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 2.6vw, 1.65rem);
  color: rgba(251, 247, 241, 0.9);
  margin-bottom: 1rem;
  text-shadow: 0 1px 12px rgba(0,0,0,0.5);
  opacity: 0;
  animation: heroReveal 700ms var(--ease) 380ms both;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.4em;
  flex-wrap: wrap;
}

.hero-rotator {
  position: relative;
  display: inline-block;
  overflow: hidden;
  height: 1.35em;
  vertical-align: -0.05em;
  color: var(--color-gold-bright);
}

.hero-rotator-word {
  display: inline-block;
  white-space: nowrap;
  transform: translateY(0);
  opacity: 1;
  transition: transform 520ms var(--ease), opacity 420ms var(--ease);
}

.hero-rotator-word.is-leaving {
  transform: translateY(-115%);
  opacity: 0;
}

.hero-rotator-word.is-entering {
  transform: translateY(115%);
  opacity: 0;
}

/* ── Sub text ───────────────────────────────────────── */
.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(0.92rem, 1.6vw, 1.08rem);
  line-height: 1.75;
  color: rgba(251, 247, 241, 0.82);
  max-width: 52ch;
  margin: 0 auto;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
  opacity: 0;
  animation: heroReveal 700ms var(--ease) 480ms both;
}

/* ── CTA buttons ────────────────────────────────────── */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 1.6rem;
  opacity: 0;
  animation: heroReveal 700ms var(--ease) 580ms both;
}

.hero-actions .btn-primary {
  background: var(--color-gold);
  color: #fff;
  padding: 0.9rem 1.85rem;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 20px rgba(184, 134, 59, 0.35);
  transition: background var(--dur-med) var(--ease),
              box-shadow var(--dur-med) var(--ease),
              transform 200ms var(--ease);
}

.hero-actions .btn-primary:hover {
  background: var(--color-gold-dark);
  box-shadow: 0 6px 28px rgba(184, 134, 59, 0.50);
  transform: translateY(-2px);
}

/* Border/color for .btn-ghost--light live globally in buttons.css.
   Here we just match sizing and hover-lift to its btn-primary sibling. */
.hero-actions .btn-ghost--light {
  padding: 0.9rem 1.85rem;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  transition: border-color var(--dur-med) var(--ease),
              color var(--dur-med) var(--ease),
              transform 200ms var(--ease);
}

.hero-actions .btn-ghost--light:hover {
  transform: translateY(-2px);
}

/* ── Entrance animation ─────────────────────────────── */
@keyframes heroReveal {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Dot navigation ─────────────────────────────────── */
.hero-dots {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: clamp(46px, 8vh, 70px);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(251, 247, 241, 0.80);
  background: transparent;
  cursor: pointer;
  transition:
    background var(--dur-med) var(--ease),
    border-color var(--dur-med) var(--ease),
    width var(--dur-med) var(--ease),
    transform 200ms var(--ease);
  -webkit-tap-highlight-color: transparent;
  padding: 0;
  flex-shrink: 0;
}

.hero-dot.is-active {
  width: 28px;
  border-radius: 99px;
  background: var(--color-gold);
  border-color: var(--color-gold);
}

.hero-dot:not(.is-active):hover {
  background: rgba(251, 247, 241, 0.5);
  border-color: rgba(251, 247, 241, 0.9);
  transform: scale(1.2);
}

/* ── Diagonal bottom edge ────────────────────────────
   A confident angled cut (instead of the soft wave used
   elsewhere) — it reads as more editorial/fashion-forward,
   adds momentum toward the next section, and finishes with
   a thin foil-gold seam line for a premium, on-brand touch. */
.hero-edge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 15;
  line-height: 0;
  pointer-events: none;
}

.hero-edge svg {
  display: block;
  width: 100%;
  height: clamp(46px, 6.5vw, 96px);
}

.hero-edge-fill { fill: var(--color-ivory); }

.hero-edge-line {
  stroke: var(--color-gold-bright);
  stroke-width: 2.5;
  opacity: 0.85;
  vector-effect: non-scaling-stroke;
}

/* ════════════════════════════════════════════════════
   MOBILE  ≤ 767px
   ════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  .hero {
    min-height: 600px;
    min-height: 100svh;
  }

  .hero-inner {
    padding-top: 2.5rem;
    padding-bottom: 6rem;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-headline {
    font-size: clamp(2.15rem, 9.5vw, 2.85rem);
    margin-bottom: 0.75rem;
  }

  .hero-eyebrow { margin-bottom: 0.75rem; }

  .hero-rotator-line {
    font-size: clamp(1.05rem, 5vw, 1.3rem);
    margin-bottom: 0.85rem;
  }

  .hero-sub {
    font-size: 0.92rem;
    max-width: 40ch;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1.2rem;
    width: 100%;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-ghost--light {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 0.95rem 1.25rem;
  }

  .hero-dots {
    bottom: clamp(40px, 8vh, 56px);
  }
}

/* ════════════════════════════════════════════════════
   TABLET  768px – 959px
   ════════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 959px) {
  .hero {
    min-height: 660px;
    min-height: 100svh;
  }

  .hero-inner {
    padding-top: 2.5rem;
    padding-bottom: 6.5rem;
  }

  .hero-content {
    max-width: 640px;
  }

  .hero-headline {
    font-size: clamp(2.6rem, 6vw, 3.4rem);
  }

  .hero-rotator-line {
    font-size: clamp(1.2rem, 3vw, 1.45rem);
  }

  .hero-dots {
    bottom: clamp(48px, 7vh, 72px);
  }
}

/* ════════════════════════════════════════════════════
   DESKTOP  ≥ 960px
   ════════════════════════════════════════════════════ */
@media (min-width: 960px) {
  .hero {
    min-height: 680px;
    min-height: calc(100svh - var(--nav-height));
    max-height: 980px;
  }

  .hero-inner {
    padding-top: 2rem;
    padding-bottom: 9.5rem;
    overflow-y: visible;
  }

  /* Bumped up from the shared base clamp — on real desktop
     browsers and on "Request Desktop Site" mobile views alike,
     the hero has plenty of room, so the type should read as
     confidently large rather than just "not small". */
  .hero-headline {
    font-size: clamp(3.4rem, 6.2vw, 5.2rem);
  }

  .hero-rotator-line {
    font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  }

  .hero-sub {
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    max-width: 56ch;
  }

  .hero-dots {
    bottom: clamp(60px, 8vh, 92px);
  }
}

/* ════════════════════════════════════════════════════
   SHORT-HEIGHT SAFETY NET
   For landscape phones / short viewports where 100svh
   would be too small to fit the content, let the hero
   grow with its content instead of clipping it.
   ════════════════════════════════════════════════════ */
@media (max-height: 480px) and (max-width: 900px) {
  .hero {
    min-height: 0;
  }

  .hero-inner {
    position: relative;
    padding-top: 4.5rem;
    padding-bottom: 4rem;
  }

  .hero-dots {
    position: static;
    transform: none;
    justify-content: center;
    margin-top: 1.5rem;
  }

  .hero-edge {
    position: relative;
  }
}