/* =============================================================================
   FP Enhancements — v1.2.0
   Preloader · Cursor · Page Transitions (3 styles)
   Colours driven by CSS variables set via wp_localize_script + inline style.
   ============================================================================= */

/* ── Global brand variable fallbacks ──────────────────────────────────────── */
:root {
  --fp-magenta:        #C32DCD;
  --fp-cream:          #FAF7F2;
  --fp-charcoal:       #1A1A1A;
  --fp-trans-bg:       #1A1A1A;   /* set per-element by fp-transitions.js */
  --fp-trans-accent:   #C32DCD;   /* set per-element by fp-transitions.js */
}


/* =============================================================================
   PRELOADER
   ============================================================================= */

.fp-preloader {
  position: fixed;
  z-index: 99999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--fp-cream, #FAF7F2);
  pointer-events: all;
}

.fp-preloader .fp-preloader-animation {
  opacity: 0;
  position: relative;
  height: 100vh;
}

.fp-preloader .fp-preloader-animation .fp-pos-abs {
  position: absolute;
  height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.fp-preloader .fp-preloader-animation .fp-pos-abs p {
  opacity: 0;
  margin-right: 15px;
  margin-bottom: 0;
}

.fp-preloader .fp-preloader-animation .fp-pos-abs p:last-child {
  margin-right: 0;
}

@media screen and (max-width: 1024px) {
  .fp-preloader .fp-preloader-animation .fp-pos-abs p {
    font-size: 24px;
  }
}

.fp-preloader .fp-preloader-animation .fp-pos-abs .fp-reveal-frame {
  position: relative;
  padding: 0 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.fp-preloader .fp-preloader-animation .fp-pos-abs .fp-reveal-frame .fp-reveal-box {
  z-index: 4;
  position: absolute;
  opacity: 0;
  height: 100%;
  width: 0;
  top: 0;
  left: 30px;
  background-color: var(--fp-magenta, #C32DCD);
  margin: 0;
}

.fp-preloader.fp-hidden {
  pointer-events: none;
  display: none;
}

/* Typography */
.fp-preloader .fp-h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(28px, 5vw, 60px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--fp-charcoal, #1A1A1A);
  letter-spacing: -0.01em;
  margin: 0;
}

.fp-preloader .fp-muted {
  color: var(--fp-charcoal, #1A1A1A);
}

.fp-preloader .fp-thin {
  opacity: 0.45;
}

/* Logo inside preloader */
.fp-preloader-logo {
  opacity: 0;           /* GSAP fades in */
  display: block;
  max-width: 100%;
  height: auto;
}

.fp-preloader-end-word {
  margin: 0;
}


/* =============================================================================
   CURSOR FOLLOWER
   ============================================================================= */

.fp-ball {
  width: 20px;
  height: 20px;
  position: fixed;
  z-index: 10000;
  background-color: var(--fp-charcoal, #1A1A1A);
  border-radius: 50%;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.1;
  top: 0;
  left: 0;
  will-change: transform;
}

.fp-ball .fp-icon-1 {
  position: absolute;
  width: 40px;
  height: 40px;
  transform: scale(0);
}

.fp-ball .fp-icon-1 svg {
  fill: rgba(255, 255, 255, 0.9);
  width: 100%;
  height: 100%;
}

.fp-ball .fp-more-text,
.fp-ball .fp-choose-text {
  position: absolute;
  width: 100%;
  text-align: center;
  display: block;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  transform: scale(0);
  white-space: nowrap;
}

.fp-ball.fp-accent {
  background-color: var(--fp-magenta, #C32DCD);
}

.fp-ball.fp-accent .fp-icon-1 svg { fill: #fff; }
.fp-ball.fp-accent .fp-more-text,
.fp-ball.fp-accent .fp-choose-text { color: #fff; }

@media screen and (max-width: 1200px) {
  .fp-ball { display: none; }
}


/* =============================================================================
   PAGE TRANSITIONS — shared curtain base
   Colours injected as CSS custom properties by fp-transitions.js:
     --fp-trans-bg      → overlay fill colour
     --fp-trans-accent  → ring / line accent colour
   ============================================================================= */

.fp-curtain {
  position: fixed;
  pointer-events: none !important;
  z-index: 9998;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  opacity: 0;
  background-color: var(--fp-trans-bg, #1A1A1A);
}

/* ── Style: Fade ─────────────────────────────────────────────────────────── */
/* Default — simple opacity crossfade */

html.fp-trans-fade .fp-curtain {
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

html.fp-trans-fade.is-animating .fp-curtain {
  opacity: 1;
  pointer-events: all;
}

/* Fade the main content out slightly during transition */
html.fp-trans-fade.is-animating #swupMain {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}


/* ── Style: Circle Wipe ──────────────────────────────────────────────────── */
/*
 * A circle expands from the centre of the screen.
 * The accent colour forms the ring/outline of the circle.
 * Invert colours: bg=#FAF7F2 accent=#C32DCD → cream circle with pink ring.
 * Or dramatic: bg=#1A1A1A accent=#C32DCD → dark circle with pink ring.
 */

html.fp-trans-circle .fp-curtain {
  border-radius: 50%;
  clip-path: circle(0% at 50% 50%);
  transition: clip-path 0.75s cubic-bezier(0.76, 0, 0.24, 1);
  /* Accent ring — drawn as an inset box-shadow so it scales with the circle */
  box-shadow: inset 0 0 0 4px var(--fp-trans-accent, #C32DCD);
}

html.fp-trans-circle.is-animating .fp-curtain {
  clip-path: circle(100vmax at 50% 50%);
  pointer-events: all;
  /* Fade ring as circle fills the screen */
  box-shadow: inset 0 0 0 2px var(--fp-trans-accent, #C32DCD);
}

/* Content fades during circle expand */
html.fp-trans-circle.is-animating #swupMain {
  opacity: 0;
  transition: opacity 0.3s ease 0.1s;
}


/* ── Style: Bar Sweep ────────────────────────────────────────────────────── */
/*
 * A horizontal bar slides in from the left, then out to the right.
 * The accent colour is the leading edge line of the bar.
 * Invert: bg=#fff + accent=#C32DCD → white bar with magenta leading line.
 * Or dark + accent: black bar with magenta edge.
 */

html.fp-trans-bar .fp-curtain {
  /* Leading edge accent line */
  border-right: 3px solid var(--fp-trans-accent, #C32DCD);
  transform: translateX(-100%);
  transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1);
  opacity: 1; /* Bar is always visible when present — opacity controlled by transform */
}

html.fp-trans-bar.is-animating .fp-curtain {
  transform: translateX(0);
  pointer-events: all;
}

/* Content covered by bar */
html.fp-trans-bar.is-animating #swupMain {
  opacity: 0;
  transition: opacity 0.25s ease;
}


/* =============================================================================
   FP-WIDGETS COMPATIBILITY
   CSS variables + utility classes so fp-widgets render correctly in any theme.
   ============================================================================= */

.fp-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Lato", "Helvetica Neue", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 28px;
  border: 2px solid var(--fp-magenta, #C32DCD);
  color: var(--fp-magenta, #C32DCD);
  background: transparent;
  transition: background 0.3s ease, color 0.3s ease;
  cursor: pointer;
}

.fp-btn:hover,
.fp-btn:focus {
  background: var(--fp-magenta, #C32DCD);
  color: #fff;
  text-decoration: none;
}

.fp-btn--solid {
  background: var(--fp-magenta, #C32DCD);
  color: #fff;
}

.fp-btn--solid:hover,
.fp-btn--solid:focus {
  background: transparent;
  color: var(--fp-magenta, #C32DCD);
}

.fp-btn--text {
  border-color: transparent;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fp-btn--text:hover,
.fp-btn--text:focus {
  background: transparent;
  color: var(--fp-magenta, #C32DCD);
  text-decoration: none;
}

/* Scroll-reveal (fp-up class used by fp-widgets animations)
   IMPORTANT: Elements are VISIBLE by default.
   GSAP sets opacity/transform just-in-time before animating — this ensures
   content is never permanently hidden if GSAP CDN is slow or blocked. */
.fp-up {
  opacity: 1;
  transform: none;
}


/* =============================================================================
   SCROLL PROGRESS BAR (optional)
   ============================================================================= */

.fp-progress-track {
  position: fixed;
  z-index: 10;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.08);
  pointer-events: none;
}

.fp-progress-track .fp-progress {
  width: 3px;
  height: 0;
  background-color: var(--fp-magenta, #C32DCD);
}

@media screen and (max-width: 768px) {
  .fp-progress-track { display: none; }
}
