/* ════════════════════════════════════════════════════════════════════
   HOTSPOTS · v2 (clean rebuild — April 2026)
   Cinematic, fully responsive category pin system.
   - Desktop / tablet : floating constellation with hover preview card
   - Mobile           : horizontal swipe carousel of editorial cards
   Self-contained namespace `hs2-*`. Loads AFTER all other CSS so its
   rules win without !important.
   ════════════════════════════════════════════════════════════════════ */

.hs2 {
  --hs2-bronze:   var(--bronze-pale, #c4a76c);
  --hs2-warm:     var(--warm-white, #e8e2d6);
  --hs2-ease:     cubic-bezier(0.22, 1, 0.36, 1);
  --hs2-pin:      44px;

  position: absolute;
  inset: 16% 6% 18% 6%;
  z-index: 5;
  pointer-events: none;
}

.hs2-stage {
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: transform 0.6s var(--hs2-ease);
  will-change: transform;
}

/* ── Pin (desktop / tablet) ─────────────────────────────────────── */
.hs2-pin {
  position: absolute;
  width: var(--hs2-pin);
  height: var(--hs2-pin);
  margin-left: calc(var(--hs2-pin) / -2);
  margin-top:  calc(var(--hs2-pin) / -2);
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
  color: var(--hs2-warm);
  font: inherit;

  opacity: 0;
  transform: scale(0.55);
  transition:
    opacity 0.7s var(--hs2-ease),
    transform 0.7s var(--hs2-ease),
    filter 0.4s var(--hs2-ease);

  animation: hs2Float 7s ease-in-out infinite;
  animation-delay: calc(var(--hs2-i, 0) * -0.4s);
  will-change: transform, opacity;
}
.hs2-pin.is-visible { opacity: 1; transform: scale(1); }
.hs2-pin:focus { outline: none; }

@keyframes hs2Float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -3px; }
}

/* Larger invisible hit area for forgiving hover */
.hs2-pin::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
}

/* Pin parts */
.hs2-pin-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(196, 167, 108, 0.55);
  background: rgba(10, 9, 8, 0.18);
  -webkit-backdrop-filter: blur(6px) saturate(1.05);
          backdrop-filter: blur(6px) saturate(1.05);
  transition:
    transform 0.5s var(--hs2-ease),
    border-color 0.4s var(--hs2-ease),
    background 0.4s var(--hs2-ease),
    box-shadow 0.5s var(--hs2-ease);
}
.hs2-pin-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hs2-bronze);
  box-shadow: 0 0 12px rgba(196, 167, 108, 0.55);
  transition: transform 0.4s var(--hs2-ease), box-shadow 0.4s var(--hs2-ease);
}
.hs2-pin-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--hs2-bronze);
  opacity: 0;
  pointer-events: none;
  animation: hs2Pulse 3.6s ease-out infinite;
  animation-delay: calc(var(--hs2-i, 0) * 0.3s);
}
@keyframes hs2Pulse {
  0%   { transform: scale(0.85); opacity: 0; }
  30%  { opacity: 0.45; }
  100% { transform: scale(2.1);  opacity: 0; }
}
.hs2-pin-num {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-sc, 'Cormorant SC', serif);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--hs2-bronze);
  white-space: nowrap;
  opacity: 0.86;
  transition: opacity 0.3s var(--hs2-ease), color 0.3s var(--hs2-ease);
}

/* Hover / focus / active states */
.hs2-pin:hover .hs2-pin-ring,
.hs2-pin:focus-visible .hs2-pin-ring,
.hs2-pin.is-active .hs2-pin-ring {
  transform: scale(1.18);
  border-color: var(--hs2-bronze);
  background: rgba(40, 30, 16, 0.42);
  box-shadow:
    0 0 0 4px rgba(196, 167, 108, 0.08),
    0 8px 30px -8px rgba(196, 167, 108, 0.4);
}
.hs2-pin:hover .hs2-pin-dot,
.hs2-pin:focus-visible .hs2-pin-dot,
.hs2-pin.is-active .hs2-pin-dot {
  transform: scale(1.4);
  box-shadow: 0 0 18px rgba(196, 167, 108, 0.85);
}
.hs2-pin:hover .hs2-pin-num,
.hs2-pin:focus-visible .hs2-pin-num,
.hs2-pin.is-active .hs2-pin-num {
  opacity: 1;
  color: var(--hs2-warm);
}
.hs2-pin.is-dim { opacity: 0.32; filter: saturate(0.4); }

/* ── Floating preview card (desktop) ────────────────────────────── */
.hs2-preview {
  position: absolute;
  z-index: 6;
  width: 280px;
  background: rgba(10, 9, 8, 0.78);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
          backdrop-filter: blur(20px) saturate(1.15);
  border: 1px solid rgba(196, 167, 108, 0.22);
  pointer-events: none;
  opacity: 0;
  transform: translate3d(0, 8px, 0) scale(0.98);
  transform-origin: top left;
  transition:
    opacity 0.42s var(--hs2-ease),
    transform 0.5s var(--hs2-ease);
  will-change: transform, opacity;
}
.hs2-preview.is-active {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
}
.hs2-preview-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ink, #0a0908);
}
.hs2-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 1.6s var(--hs2-ease);
}
.hs2-preview.is-active .hs2-preview-frame img { transform: scale(1.08); }

.hs2-preview-body { padding: 16px 18px 18px; }
.hs2-preview-kicker {
  display: block;
  font-family: var(--font-sc, 'Cormorant SC', serif);
  font-size: 9.5px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--hs2-bronze);
  margin-bottom: 6px;
}
.hs2-preview-title {
  margin: 0 0 8px;
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  color: var(--hs2-warm);
  line-height: 1.12;
}
.hs2-preview-rule {
  display: block;
  width: 30px;
  height: 1px;
  background: var(--hs2-bronze);
  opacity: 0.6;
  margin: 8px 0 10px;
}
.hs2-preview-meta {
  display: block;
  font-family: var(--font-body, serif);
  font-style: italic;
  font-size: 12.5px;
  color: rgba(232, 226, 214, 0.72);
}
.hs2-preview-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 14px;
  font-family: var(--font-sc, serif);
  font-size: 9.5px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--hs2-bronze);
  background: rgba(196, 167, 108, 0.08);
  border: 1px solid rgba(196, 167, 108, 0.32);
  cursor: pointer;
  transition:
    background 0.3s,
    border-color 0.3s,
    color 0.3s,
    gap 0.3s;
}
.hs2-preview-cta:hover {
  background: rgba(196, 167, 108, 0.22);
  border-color: var(--hs2-bronze);
  color: var(--hs2-warm);
  gap: 12px;
}
.hs2-preview-cta svg { width: 12px; height: 12px; }

/* Card-only sub-elements never appear on desktop */
@media (min-width: 769px) {
  .hs2-pin-title,
  .hs2-pin-cta,
  .hs2-pin-overlay,
  .hs2-dots { display: none; }
}

/* ── Reduced motion ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hs2-pin    { animation: none; }
  .hs2-stage  { transition: none; }
  .hs2-pin-pulse { display: none; }
  .hs2 { transition: none; }
  .hs2-dot { transition: none; }
}

/* ════════════════════════════════════════════════════════════════════
   MOBILE — Full-screen cinematic category showcase (≤ 768px)
   Each category fills the entire hero viewport. Swipe left / right
   to browse all categories. The intro title animation plays first;
   the carousel fades in once the hero reaches its "ready" state.
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Container: fills the full hero, hidden during intro ─────── */
  .hs2 {
    position: absolute;
    inset: 0;
    height: 100% !important;
    transform: none !important;
    pointer-events: none;
    opacity: 0;
    /* Below hero-title (z:5) and hero-chrome (z:5) during intro */
    z-index: 3;
    transition: opacity 1.2s var(--hs2-ease);
  }
  /* Reveal once intro title has faded */
  .hero[data-state="fade"]  .hs2,
  .hero[data-state="ready"] .hs2 {
    opacity: 1;
    pointer-events: auto;
  }
  /* No decorative side-edge fades */
  .hs2::before,
  .hs2::after { display: none !important; }

  /* ── Horizontal scroll track ─────────────────────────────────── */
  .hs2-stage {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    width: 100%;
    height: 100%;
    padding: 0;
    gap: 0;
    transform: none !important;
  }
  .hs2-stage::-webkit-scrollbar { display: none; }

  /* ── Each slide = full-screen editorial card ─────────────────── */
  .hs2-pin {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    top: auto !important;
    margin: 0 !important;
    flex: 0 0 100vw;
    width: 100vw;
    height: 100%;
    min-height: 100%;
    /* Category image background — CSS var injected by hotspots.js */
    background-image: var(--hs2-card-bg, none);
    background-size: cover;
    background-position: center;
    background-color: var(--ink-deep, #0a0908);
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    -webkit-backdrop-filter: none;
            backdrop-filter: none;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    /* Text in lower third */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding-bottom: max(
      calc(var(--nav-height, 76px) + 88px + env(safe-area-inset-bottom, 0px)),
      22vh
    );
    padding-left:  max(28px, env(safe-area-inset-left, 0px));
    padding-right: max(28px, env(safe-area-inset-right, 0px));
    /* Container opacity drives the entrance */
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
    color: var(--hs2-warm, #e8e2d6);
    text-align: left;
  }
  .hs2-pin:active { background-color: rgba(10, 9, 8, 0.08); }

  /* ── Cinematic gradient overlay ──────────────────────────────── */
  .hs2-pin-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
      180deg,
      rgba(10, 9, 8, 0.55) 0%,
      rgba(10, 9, 8, 0.05) 30%,
      rgba(10, 9, 8, 0.05) 52%,
      rgba(10, 9, 8, 0.78) 76%,
      rgba(10, 9, 8, 0.96) 100%
    );
    pointer-events: none;
    z-index: 0;
  }
  /* Text content rides above the overlay */
  .hs2-pin > *:not(.hs2-pin-overlay) {
    position: relative;
    z-index: 1;
  }

  /* Remove desktop pseudo-elements */
  .hs2-pin::before { display: none !important; }
  .hs2-pin::after  { display: none !important; }

  /* Hide circular desktop pin decorations */
  .hs2-pin-ring,
  .hs2-pin-pulse,
  .hs2-pin-dot { display: none !important; }

  /* ── Roman numeral kicker ────────────────────────────────────── */
  .hs2-pin-num {
    position: static;
    transform: none;
    display: block;
    font-family: var(--font-sc, 'Cormorant SC', serif);
    font-size: 10px;
    letter-spacing: 0.52em;
    text-transform: uppercase;
    color: var(--hs2-bronze, #c4a76c);
    opacity: 1;
    margin-bottom: 14px;
  }

  /* ── Category name — large cinematic italic ──────────────────── */
  .hs2-pin-title {
    display: block;
    font-family: var(--font-display, 'Cormorant Garamond', serif);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(2.4rem, 10vw, 3.4rem);
    line-height: 1.04;
    color: var(--hs2-warm, #e8e2d6);
    text-shadow: 0 2px 28px rgba(0, 0, 0, 0.65);
    margin-bottom: 20px;
    -webkit-line-clamp: unset !important;
    max-width: unset !important;
    overflow: visible !important;
    white-space: normal;
  }

  /* ── Open-category CTA label ─────────────────────────────────── */
  .hs2-pin-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-sc, serif);
    font-size: 9px;
    letter-spacing: 0.50em;
    text-transform: uppercase;
    color: rgba(232, 226, 214, 0.60);
    padding: 0;
    margin-top: 0;
    transition: color 0.3s;
  }
  .hs2-pin:active .hs2-pin-cta { color: var(--hs2-bronze, #c4a76c); }

  /* Desktop floating preview: hidden */
  .hs2-preview { display: none !important; }

  /* Scroll hint: replaced by swipe gesture */
  .hero-scroll { display: none !important; }

  /* Hero title: centred during intro (no hotspot rail below it) */
  .hero-title {
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
  }

  /* ── Navigation dots ─────────────────────────────────────────── */
  .hs2-dots {
    position: absolute;
    bottom: max(
      calc(var(--nav-height, 76px) + 16px + env(safe-area-inset-bottom, 0px)),
      112px
    );
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 7px;
    z-index: 4;
    pointer-events: none;
  }
  .hs2-dot {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 3px;
    background: rgba(232, 226, 214, 0.28);
    border: none;
    padding: 0;
    cursor: pointer;
    pointer-events: auto;
    min-height: 0;
    transition:
      width      0.4s var(--hs2-ease),
      background 0.4s var(--hs2-ease);
  }
  .hs2-dot.is-active {
    width: 22px;
    background: var(--hs2-bronze, #c4a76c);
  }
}

/* Tiny phones (≤ 380px) — slightly smaller text */
@media (max-width: 380px) {
  .hs2-pin-title {
    font-size: clamp(2rem, 11vw, 2.8rem);
    margin-bottom: 16px;
  }
  .hs2-pin-num {
    font-size: 9.5px;
    letter-spacing: 0.44em;
  }
}
