/* XP Expanding Panels v3 — Frontend — Fully Responsive */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700&display=swap');

.xp {
  --gap: 6px;
  --speed: 0.55s;
  --ease: cubic-bezier(0.42, 0, 0.12, 1);
  width: 100%; max-width: 100vw; margin: 0 auto; padding: 0;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.xp *, .xp *::before, .xp *::after { box-sizing: border-box; margin: 0; padding: 0; }

.xp-stage {
  position: relative; width: 100vw;
  display: flex; gap: var(--gap); overflow: hidden;
}

/* ═══ FULLBLEED ═══ */
.xp-fullbleed {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden; border-radius: 6px;
}
.xp-fullbleed__img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 0.5s ease;
}
.xp-fullbleed__img.is-active { opacity: 1; }
.xp-fullbleed__overlay {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 0.5s ease; pointer-events: none;
}
.xp-fullbleed__overlay.is-active { opacity: 1; }
.xp-fullbleed__overlay--left {
  background: linear-gradient(to right,
    rgba(0,0,0,0.02) 0%, rgba(0,0,0,0.2) 33%, rgba(0,0,0,0.4) 100%);
}
.xp-fullbleed__overlay--right {
  background: linear-gradient(to left,
    rgba(0,0,0,0.02) 0%, rgba(0,0,0,0.2) 33%, rgba(0,0,0,0.6) 100%);
}

/* ═══ SLOTS ═══ */
.xp-slot {
  position: relative; height: 100%; overflow: hidden;
  border-radius: 0px; min-width: 0; z-index: 1;
  transition: opacity var(--speed) var(--ease);
}
.xp-stage.has-expand .xp-slot { opacity: 0; pointer-events: none; }
.xp-stage.has-expand .xp-slot.is-expanded { opacity: 1; pointer-events: auto; }

/* ═══ PANEL ═══ */
.xp-panel {
  position: absolute; inset: 0; overflow: hidden;
  cursor: pointer; border-radius: 4px;
  transition: opacity 0.45s ease, transform 0.5s var(--ease);
}
.xp-panel.is-hidden { opacity: 0; pointer-events: none; z-index: 0; }
.xp-slot--left .xp-panel.is-hidden  { transform: translateX(-100%); }
.xp-slot--right .xp-panel.is-hidden { transform: translateX(100%); }
.xp-panel.is-visible { opacity: 1; pointer-events: auto; transform: translateX(0); z-index: 1; }

.xp-panel__bg {
  position: absolute; inset: -20px;
  background-size: cover; background-position: center;
  transition: transform 1s var(--ease), filter 0.6s ease;
  z-index: 0; filter: brightness(0.95);
}
.xp-panel:hover .xp-panel__bg { transform: scale(1.03); filter: brightness(0.95); }
.xp-slot.is-expanded .xp-panel__bg { opacity: 0; transition: opacity 0.3s ease; }

.xp-panel__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top,
    rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.18) 45%, rgba(0,0,0,0.04) 100%);
  transition: opacity var(--speed) var(--ease);
}
.xp-slot--left .xp-panel__overlay,
.xp-slot--right .xp-panel__overlay {
  background: linear-gradient(to top,
    rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.45) 50%, rgba(0,0,0,0.35) 100%);
}
.xp-slot.is-expanded .xp-panel__overlay { opacity: 0; }

/* ═══ SIDE TITLE ═══ */
.xp-panel__side-title {
  position: absolute; bottom: 28px; left: 22px; right: 22px; z-index: 3;
  font-size: 1.25rem; font-weight: 600; color: #fff; line-height: 1.3;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
  transition: opacity 0.3s ease, transform 0.3s ease; pointer-events: none;
}
.xp-slot.is-expanded .xp-panel__side-title { opacity: 0; transform: translateY(12px); }

/* ═══ CENTER CONTENT ═══ */
.xp-panel__center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  text-align: center; z-index: 3; width: 84%; max-width: 580px;
  pointer-events: none; transition: opacity 0.35s ease;
}
.xp-stage.has-expand .xp-panel__center { opacity: 0; }
.xp-panel__center h2 {
  font-size: 2.1rem; font-weight: 600; color: #fff; line-height: 1.2;
  margin-bottom: 14px; text-shadow: 0 2px 14px rgba(0,0,0,0.45);
}
.xp-panel__center p {
  font-size: 0.88rem; font-weight: 300; color: rgba(255,255,255,0.85);
  line-height: 1.65; text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}

/* ═══ BRACKETS ═══ */
.xp-panel__brackets {
  position: absolute; inset: 20px; z-index: 4;
  opacity: 0; transition: opacity 0.35s ease; pointer-events: none;
}
.xp-slot.is-expanded .xp-panel.is-visible .xp-panel__brackets {
  opacity: 1; transition: opacity 0.4s ease 0.15s;
}
.xp-bracket {
  position: absolute; width: 24px; height: 24px;
  border-color: rgba(255,255,255,1); border-style: solid;
}
.xp-bracket--tl { top: 0; left: 0; border-width: 2px 0 0 2px; }
.xp-bracket--tr { top: 0; right: 0; border-width: 2px 2px 0 0; }
.xp-bracket--bl { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.xp-bracket--br { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

/* ═══ STATIC CIRCLE ═══ */
.xp-panel__circle {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 50px; height: 50px;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 50%; z-index: 4;
  opacity: 0; transition: opacity 0.4s ease; pointer-events: none;
}
.xp-slot.is-expanded .xp-panel.is-visible .xp-panel__circle {
  opacity: 1; transition: opacity 0.4s ease 0.15s;
}

/* ═══ BORDER SEPARATOR ═══ */
.xp-slot--left.is-expanded::after,
.xp-slot--right.is-expanded::after {
  content: ''; position: absolute; top: 0; bottom: 0;
  width: 2px; background: rgba(255,255,255,1); z-index: 5;
}
.xp-slot--left.is-expanded::after { right: 0; }
.xp-slot--right.is-expanded::after { left: 0; }

/* ═══ EXPANDED TEXT (over center area) ═══ */
.xp-exp-text {
  position: absolute; z-index: 6; opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: 50px;
}
.xp-exp-text.is-active {
  opacity: 1; pointer-events: auto; transition: opacity 0.45s ease 0.18s;
}
.xp-exp-text__title {
  font-size: 2.2rem; font-weight: 600; color: #fff; line-height: 1.15;
  margin-bottom: 18px; text-shadow: 0 2px 14px rgba(0,0,0,0.4);
}
.xp-exp-text__desc {
  font-size: 0.88rem; font-weight: 300; color: rgba(255,255,255,0.85);
  line-height: 1.7; max-width: 520px;
}

/* ═══ MOUSE-FOLLOWING CTA ═══ */
.xp-cursor-cta {
  position: absolute; width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.22);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; z-index: 10; opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
  transition: opacity 0.35s ease, transform 0.35s var(--ease);
  text-decoration: none; color: #fff;
  font-size: 0.76rem; font-weight: 500; letter-spacing: 0.02em;
  will-change: left, top;
}
a.xp-cursor-cta { color: #fff !important; }
.xp-slot.is-expanded .xp-cursor-cta {
  opacity: 1; transform: translate(-50%, -50%) scale(1);
  pointer-events: auto; cursor: pointer;
}
.xp-cursor-cta:hover {
  background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.38);
}

/* ═══ DOTS ═══ */
.xp-dots {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; justify-content: center; align-items: center;
  gap: 10px; z-index: 5; transition: opacity 0.3s ease;
}
.xp-stage.has-expand .xp-dots { opacity: 0; pointer-events: none; }
.xp-dot {
  width: 30px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.3); border: none; cursor: pointer;
  transition: background 0.3s ease, width 0.35s var(--ease); padding: 0; display: block;
}
.xp-dot.is-active { background: #fff; width: 40px; }
.xp-dot:hover:not(.is-active) { background: rgba(255,255,255,0.55); }


/* ══════════════════════════════════════════════
   RESPONSIVE — TABLET  (≤ 1024px)
   ══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .xp-stage { height: 460px !important; }
  .xp-exp-text__title { font-size: 1.8rem; }
  .xp-panel__center h2 { font-size: 1.7rem; }
  .xp-cursor-cta { width: 120px; height: 120px; }
  .xp-panel__circle { width: 44px; height: 44px; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — SMALL TABLET  (≤ 768px)
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .xp-stage { height: 400px !important; }
  .xp-panel__center h2 { font-size: 1.4rem; }
  .xp-panel__center p { font-size: 0.8rem; }
  .xp-panel__side-title { font-size: 1rem; bottom: 20px; left: 16px; }
  .xp-exp-text__title { font-size: 1.4rem; }
  .xp-exp-text__desc { font-size: 0.8rem; }
  .xp-exp-text { padding-bottom: 30px; }
  .xp-panel__brackets { inset: 14px; }
  .xp-cursor-cta { width: 100px; height: 100px; font-size: 0.7rem; }
  .xp-panel__circle { width: 38px; height: 38px; }
}


/* ══════════════════════════════════════════════
   RESPONSIVE — MOBILE  (≤ 600px)
   Stacked vertical layout with tap interactions
   ══════════════════════════════════════════════ */
@media (max-width: 600px) {

  .xp-stage {
    flex-direction: column !important;
    height: auto !important;
    gap: 4px;
    width: 100%;
  }

  /* Hide fullbleed system on mobile */
  .xp-fullbleed { display: none; }

  /* All slots become full-width stacked blocks */
  .xp-slot {
    position: relative;
    width: 100% !important;
    flex: none;
    border-radius: 6px;
    overflow: hidden;
    /* Reset desktop expand behavior — all slots always visible */
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Fixed heights for stacked panels */
  .xp-slot--left,
  .xp-slot--right {
    height: 220px;
    transition: height 0.45s var(--ease);
  }

  /* Expanded slot grows taller to fit content */
  .xp-slot--left.is-expanded,
  .xp-slot--right.is-expanded {
    height: 300px;
  }

  .xp-slot--center {
    height: 200px;
    order: -1; /* Center panel at top */
  }

  /* Override desktop expand/collapse opacity for mobile */
  .xp-stage.has-expand .xp-slot {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Border separators hidden on mobile */
  .xp-slot--left.is-expanded::after,
  .xp-slot--right.is-expanded::after {
    display: none;
  }

  /* Panel rounded corners */
  .xp-panel { border-radius: 6px; }

  /* Keep panel bg visible in expanded state on mobile */
  .xp-slot.is-expanded .xp-panel__bg {
    opacity: 1 !important;
    filter: brightness(0.85);
  }

  /* Side title */
  .xp-panel__side-title {
    font-size: 1rem;
    bottom: 16px;
    left: 16px;
    right: 16px;
  }
  .xp-slot.is-expanded .xp-panel__side-title {
    opacity: 0;
    transform: translateY(8px);
  }

  /* Slide transitions: vertical on mobile */
  .xp-slot--left .xp-panel.is-hidden,
  .xp-slot--right .xp-panel.is-hidden {
    transform: translateY(100%);
  }

  /* ─── Mobile Expanded Text: overlay on the panel itself ─── */
  .xp-exp-text {
    position: absolute;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 20px 20px 60px 20px;
    justify-content: flex-end;
    z-index: 6;
    border-radius: 6px;
  }
  .xp-exp-text__title {
    font-size: 1.15rem;
    margin-bottom: 8px;
  }
  .xp-exp-text__desc {
    font-size: 0.78rem;
    line-height: 1.5;
    max-width: 100%;
  }

  /* ─── Mobile exp-text positioning: inside the slot ─── */
  .xp-exp-text[id^="expText-left"] {
    /* Positioned inside the left slot via JS */
  }
  .xp-exp-text[id^="expText-right"] {
    /* Positioned inside the right slot via JS */
  }

  /* Center panel */
  .xp-panel__center h2 {
    font-size: 1.15rem;
    margin-bottom: 8px;
  }
  .xp-panel__center p {
    font-size: 0.75rem;
    line-height: 1.5;
  }
  .xp-panel__center { width: 90%; }

  /* Keep center heading visible on mobile even when expanded */
  .xp-stage.has-expand .xp-panel__center { opacity: 1; }

  /* Brackets */
  .xp-panel__brackets { inset: 10px; }
  .xp-bracket { width: 18px; height: 18px; }

  /* Circle */
  .xp-panel__circle { width: 34px; height: 34px; }

  /* Overlay when expanded on mobile */
  .xp-slot.is-expanded .xp-panel__overlay {
    opacity: 1 !important;
    background: linear-gradient(to top,
      rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.15) 100%) !important;
  }

  /* ─── Mobile CTA: static pill button, not mouse-follow ─── */
  .xp-cursor-cta {
    width: auto !important;
    height: auto !important;
    border-radius: 24px;
    padding: 10px 24px;
    bottom: 14px;
    left: 50% !important;
    top: auto !important;
    transform: translateX(-50%) !important;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    pointer-events: none;
    opacity: 0;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.3);
    will-change: auto;
    transition: opacity 0.3s ease;
  }
  .xp-slot.is-expanded .xp-cursor-cta {
    opacity: 1;
    transform: translateX(-50%) scale(1) !important;
    pointer-events: auto;
  }

  /* ─── Dots: below the panels ─── */
  .xp-dots {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    padding: 14px 0 6px;
    justify-content: center;
  }
  .xp-stage.has-expand .xp-dots {
    opacity: 1;
    pointer-events: auto;
  }
  .xp-dot { width: 24px; height: 4px; }
  .xp-dot.is-active { width: 32px; }

  /* Tap hint (inserted by JS) */
  .xp-tap-hint {
    position: absolute; bottom: 8px; left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    font-size: 0.62rem;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .xp-slot.is-expanded .xp-tap-hint { opacity: 0; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — VERY SMALL  (≤ 380px)
   ══════════════════════════════════════════════ */
@media (max-width: 380px) {
  .xp-slot--left,
  .xp-slot--right {
    height: 180px;
  }
  .xp-slot--left.is-expanded,
  .xp-slot--right.is-expanded {
    height: 260px;
  }
  .xp-slot--center {
    height: 160px;
  }
  .xp-panel__center h2 { font-size: 1.05rem; }
  .xp-exp-text__title { font-size: 1.05rem; }
  .xp-exp-text__desc { font-size: 0.72rem; }
  .xp-cursor-cta { padding: 8px 18px; font-size: 0.68rem; }
  .xp-panel__side-title { font-size: 0.9rem; bottom: 12px; left: 12px; }
}
