/* ================================================================
   PURPOSEJOY — upgrades.css
   Visual Upgrades 1, 2, 4  |  surgical, no redesign
   ================================================================ */

/* ──────────────────────────────────────────────────────────────
   UPGRADE 1 — Kinetic Hero Typography
   ────────────────────────────────────────────────────────────── */

.pj-hero-word {
  display: inline-block;
  will-change: transform, opacity;
}

.pj-hero-char {
  display: inline-block;
  will-change: transform, opacity;
}

/* Scroll indicator (GSAP-controlled, separate from existing .hero-scroll-hint) */
#pj-scroll-indicator {
  position: absolute;
  bottom: 3.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  opacity: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: rgba(212, 175, 55, 0.65);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  pointer-events: auto;
  user-select: none;
}

#pj-scroll-indicator svg {
  width: 20px;
  height: 20px;
}

/* Hide the original CSS-animated scroll hint so GSAP indicator takes over */
.hero-scroll-hint {
  display: none;
}

/* Reduced-motion overrides */
@media (prefers-reduced-motion: reduce) {
  .pj-hero-word,
  .pj-hero-char {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


/* ──────────────────────────────────────────────────────────────
   UPGRADE 2 — Four Pillars Pinned Scroll
   BUG FIX: opacity 0 (not 0.15) on inactive pillars.
   Discrete switch — only ONE pillar visible at a time.
   ────────────────────────────────────────────────────────────── */

/* Outer container carries 400vh scroll real estate on desktop */
.pj-pillars-pinned {
  position: relative;
}

/* Sticky panel — 100vh viewport, full-bleed, dark default bg */
.pj-pillars-sticky {
  height: 100vh;
  background-color: #0B0B0F;
  position: relative;
  overflow: hidden;
  transition: background-color 0.6s ease;
}

/* Each pillar: fills container via inset:0, centers content with flex.
   Default opacity:0 + pointer-events:none — GSAP manages active state. */
.pj-pillar {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 2.5rem clamp(3rem, 10vw, 10rem);
  text-align: left;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
  z-index: 1;
}

.pj-pillar .pillar-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 1.2rem;
}

.pj-pillar .pillar-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 900;
  color: #D4AF37;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.pj-pillar .pillar-desc {
  font-family: 'Open Sans', sans-serif;
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.78);
  max-width: 580px;
}

/* Side progress dots */
.pj-pillars-progress {
  position: fixed;
  right: 1.8rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.pj-pillars-progress.visible {
  opacity: 1;
  pointer-events: auto;
}

.pj-progress-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.28);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.pj-progress-dot.active {
  width: 10px;
  height: 10px;
  background: #D4AF37;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.55);
  border-color: #D4AF37;
}

/* ── Mobile fallback: stacked cards, no pinning ── */
@media (max-width: 767px) {
  .pj-pillars-pinned {
    height: auto !important;
  }

  .pj-pillars-sticky {
    height: auto !important;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 3rem 1.5rem;
    background-color: #0B0B0F !important;
    position: static;
    overflow: visible;
  }

  /* Mobile: reset absolute stacking, use normal flow */
  .pj-pillar {
    position: static;
    inset: auto;
    display: block;
    width: 100%;
    max-width: none;
    opacity: 0;
    pointer-events: auto;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
    background: rgba(20, 10, 5, 0.55);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    padding: 1.8rem 1.5rem;
  }

  .pj-pillar.pj-pillar-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }

  .pj-pillars-progress {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pj-pillar {
    transition: none !important;
  }
}


/* ──────────────────────────────────────────────────────────────
   UPGRADE 4 — "Where Are You Right Now?" Section
   ────────────────────────────────────────────────────────────── */

.pj-where-are-you {
  padding: 5rem 1.5rem 5.5rem;
  text-align: center;
  background: #0B0B0F;
  border-bottom: 1px solid rgba(212, 175, 55, 0.08);
}

.pj-where-are-you h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 0.55rem;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.pj-where-are-you > p {
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  color: rgba(240, 220, 160, 0.65);
  margin-bottom: 2.8rem;
  font-style: italic;
  letter-spacing: 0.03em;
}

.pj-state-chooser {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
  max-width: 680px;
  margin: 0 auto;
}

.pj-state-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.25rem 1.5rem;
  background: rgba(20, 10, 5, 0.65);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.88);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.25s ease, background 0.25s ease,
              transform 0.25s ease, box-shadow 0.25s ease;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}

.pj-state-btn:hover,
.pj-state-btn:focus-visible {
  border-color: rgba(212, 175, 55, 0.58);
  background: rgba(212, 175, 55, 0.07);
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.38);
  outline: none;
}

.pj-state-btn .pj-btn-icon {
  font-size: 1.6rem;
  color: #D4AF37;
  opacity: 0.85;
  flex-shrink: 0;
  line-height: 1;
}

.pj-state-btn.skip {
  grid-column: 1 / -1;
  justify-content: center;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.75rem;
  padding: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  box-shadow: none;
}

.pj-state-btn.skip:hover,
.pj-state-btn.skip:focus-visible {
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.14);
  transform: none;
  box-shadow: none;
}

@media (max-width: 600px) {
  .pj-state-chooser {
    grid-template-columns: 1fr;
    max-width: 380px;
  }
  .pj-state-btn.skip {
    grid-column: 1;
  }
}

.pj-mode-indicator {
  display: none;
  text-align: center;
  padding: 0.55rem 1rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.28);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pj-mode-indicator a {
  color: rgba(212, 175, 55, 0.45);
  text-decoration: underline;
  cursor: pointer;
  margin-left: 0.4rem;
}

.pj-mode-indicator a:hover {
  color: rgba(212, 175, 55, 0.7);
}

@media (prefers-reduced-motion: reduce) {
  .pj-state-btn,
  .pj-state-btn:hover {
    transform: none !important;
    transition: none !important;
  }
}


/* ──────────────────────────────────────────────────────────────
   HERO V3 — Centered cinematic hero
   Cormorant Garamond title + YouTube embed over ocean sunrise.
   ────────────────────────────────────────────────────────────── */

.pj-hero-v2 {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* Layer 1 — Ocean sunrise background image */
.pjh-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: brightness(0.55) saturate(1.2);
  z-index: 0;
}

/* Layer 2 — Radial vignette: transparent center, dark edges */
.pjh-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at center,
    transparent 30%,
    rgba(11, 11, 15, 0.55) 85%,
    rgba(11, 11, 15, 0.85) 100%
  );
  pointer-events: none;
}

/* Content block: centered, starts below nav */
.pjh-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 7rem 2rem 3rem;
  text-align: center;
}

/* Headline: Cormorant Garamond, cream/gold split */
.pjh-headline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: #FAF7F0;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
  margin: 0 0 1.2rem 0;
}

.pjh-line-1,
.pjh-line-2 {
  display: block;
  opacity: 0; /* GSAP will animate in */
}

/* "And" — warm gold, italic, slightly heavier */
.pjh-and {
  font-style: italic;
  font-weight: 400;
  color: #E8C87A;
  font-size: 1em; /* inherits headline size */
}

/* Tagline: Cormorant italic, smaller, open tracking */
.pjh-tagline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 300;
  letter-spacing: 0.08em;
  color: rgba(250, 247, 240, 0.88);
  margin: 0 0 2.4rem 0;
  line-height: 1.5;
  opacity: 0; /* GSAP will animate in */
}

/* YouTube video embed container */
.pjh-video-wrap {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  opacity: 0; /* GSAP will animate in */
}

.pjh-video-inner {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(232, 200, 122, 0.25);
}

.pjh-video-inner iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
}

.pjh-video-caption {
  margin-top: 0.85rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1rem;
  color: rgba(250, 247, 240, 0.60);
  text-align: center;
  letter-spacing: 0.04em;
}

/* @PurposeJoy badge: top-right, subtle */
.pjh-badge {
  position: absolute;
  top: 1.6rem;
  right: 2rem;
  z-index: 5;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: rgba(200, 162, 75, 0.65);
  text-decoration: none;
  opacity: 0; /* GSAP controls */
  transition: color 0.2s ease;
}

.pjh-badge:hover { color: #C8A24B; }

/* ── Mobile overrides ── */
@media (max-width: 767px) {
  .pjh-content {
    padding: 6rem 1.5rem 2.5rem;
  }

  .pjh-badge {
    top: 1rem;
    right: 1rem;
    font-size: 0.65rem;
  }

  .pjh-video-wrap {
    max-width: 100%;
  }
}

/* ── prefers-reduced-motion: show everything instantly ── */
@media (prefers-reduced-motion: reduce) {
  .pjh-line-1,
  .pjh-line-2,
  .pjh-tagline,
  .pjh-video-wrap,
  .pjh-badge {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ── Override: #hero ID in styles.css — center for new hero ── */
#hero.pj-hero-v2 {
  justify-content: center;
  align-items: flex-start;
}
