/* ============================================================
   PowerHaus Fitness - Shared Stylesheet
   Brand colors, typography, buttons, nav, cards, animations
   ============================================================ */

/* ============================================================
   MAGENTA GLOW SYSTEM — CSS VARIABLES
   Used exclusively for button glow animations.
   All values are magenta tones derived from brand color #D6006E.
   ============================================================ */
:root {
  --mg-base:   rgba(214,  0, 110, 1);
  --mg-hi:     rgba(232,  0, 124, 1);   /* slightly lighter/brighter magenta */
  --mg-lo:     rgba(184,  0,  94, 1);   /* slightly darker magenta */
  --mg-amb-a:  rgba(214,  0, 110, 0.32); /* ambient glow — resting low */
  --mg-amb-b:  rgba(232,  0, 124, 0.52); /* ambient glow — pulse peak */
  --mg-amb-c:  rgba(184,  0,  94, 0.28); /* ambient glow — pulse trough */
  --mg-drop-a: rgba(214,  0, 110, 0.28); /* directional drop — resting */
  --mg-drop-b: rgba(232,  0, 124, 0.44); /* directional drop — peak */
  --mg-drop-c: rgba(184,  0,  94, 0.24); /* directional drop — trough */
}

/* --- Base typography --- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.7;
  color: #0D0D0D;
  background-color: #FFFFFF;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

h4, .label-text, .caption-text {
  font-family: 'Raleway', sans-serif;
  font-weight: 500;
}

p { line-height: 1.7; }

/* --- Eyebrow labels (e.g. "MEET ANDREA") --- */
.eyebrow {
  font-family: 'Raleway', sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

#navbar.nav-transparent {
  background-color: transparent;
}

#navbar.nav-scrolled {
  background-color: #FFFFFF;
  box-shadow:
    0 1px 0 #E5E5E3,
    0 4px 20px rgba(0, 0, 0, 0.07);
}

/* Logo switching */
.nav-logo-dark  { display: block; }  /* white version - on dark bg */
.nav-logo-light { display: none;  }  /* magenta version - on light bg */

#navbar.nav-scrolled .nav-logo-dark  { display: none;  }
#navbar.nav-scrolled .nav-logo-light { display: block; }

/* Nav links — premium hover box */
.nav-link {
  font-family: 'Raleway', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  color: #FFFFFF;
  position: relative;
  padding: 6px 10px;
  transition: color 0.3s ease-in-out;
}

/* Hover/active box: top + bottom magenta borders + bg fill, scales in from top */
.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  border-top: 1px solid rgba(214, 0, 110, 0.75);
  border-bottom: 1px solid rgba(214, 0, 110, 0.75);
  background: rgba(214, 0, 110, 0.07);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.3s ease-in-out;
  pointer-events: none;
}

.nav-link:hover::before  { transform: scaleY(1); }
.nav-link.active::before { transform: scaleY(1); }

.nav-link:hover  { color: #D6006E !important; }
.nav-link.active { color: #D6006E !important; }

#navbar.nav-scrolled .nav-link              { color: #0D0D0D; }
#navbar.nav-scrolled .nav-link.active       { color: #D6006E !important; }
#navbar.nav-scrolled .nav-link::before      { background: rgba(214, 0, 110, 0.05); }

#mobile-menu a.active {
  color: #D6006E;
}

/* Hamburger icon */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #FFFFFF;
  border-radius: 2px;
  transition: background 0.2s ease, transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}
#navbar.nav-scrolled .hamburger span { background: #0D0D0D; }

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
#mobile-menu {
  display: none;
  background-color: #0D0D0D;
  border-top: 1px solid #2A2A2A;
}
#mobile-menu.open { display: block; }

#mobile-menu a {
  display: block;
  font-family: 'Raleway', sans-serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  color: #FFFFFF;
  padding: 16px 24px;
  border-bottom: 1px solid #2A2A2A;
  position: relative;
  overflow: hidden;
  transition: color 0.3s ease-in-out;
}

/* Mobile hover/active: left magenta border + bg fill scales in from left */
#mobile-menu a::before {
  content: '';
  position: absolute;
  inset: 0;
  border-left: 2px solid #D6006E;
  background: rgba(214, 0, 110, 0.07);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease-in-out;
  pointer-events: none;
}

#mobile-menu a:hover         { color: #D6006E; }
#mobile-menu a:hover::before { transform: scaleX(1); }
#mobile-menu a.active::before { transform: scaleX(1); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-block;
  background-color: #D6006E;
  color: #FFFFFF;
  font-family: 'Raleway', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 36px;
  border-radius: 4px;
  border: 2px solid #D6006E;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
/* btn-primary hover defined in BUTTON GLOW ANIMATION SYSTEM below */
.btn-primary:focus {
  outline: 2px solid #00E5D1;
  outline-offset: 3px;
}
.btn-primary:active {
  transform: translateY(1px);
  box-shadow: none;
}

.btn-secondary {
  display: inline-block;
  background-color: transparent;
  color: #D6006E;
  font-family: 'Raleway', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 34px;
  border-radius: 4px;
  border: 2px solid #D6006E;
  cursor: pointer;
  /* transition overridden in BUTTON GLOW ANIMATION SYSTEM below */
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
/* btn-secondary hover defined in BUTTON GLOW ANIMATION SYSTEM below */
.btn-secondary:focus {
  outline: 2px solid #00E5D1;
  outline-offset: 3px;
}
.btn-secondary:active { transform: translateY(1px); }

/* Ghost button (dark bg variant - white border) */
.btn-ghost {
  display: inline-block;
  background-color: transparent;
  color: #FFFFFF;
  font-family: 'Raleway', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 34px;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}
/* btn-ghost hover defined in BUTTON GLOW ANIMATION SYSTEM below */
.btn-ghost:focus { outline: 2px solid #00E5D1; outline-offset: 3px; }
.btn-ghost:active { transform: translateY(1px); }

/* ============================================================
   BUTTON GLOW ANIMATION SYSTEM
   Keyframes + bloom + ambient glow for all button types.
   Only opacity and transform are animated on ::before (GPU composited).
   box-shadow animates on btn-primary only (paint, acceptable for small elements).
   ============================================================ */

/* Ambient box-shadow pulse — cycles lighter → peak → darker magenta */
@keyframes magenta-glow-pulse {
  0%   {
    box-shadow:
      0 0 14px var(--mg-amb-a),
      0 6px 26px var(--mg-drop-a);
  }
  40%  {
    box-shadow:
      0 0 24px var(--mg-amb-b),
      0 6px 36px var(--mg-drop-b);
  }
  70%  {
    box-shadow:
      0 0 10px var(--mg-amb-c),
      0 6px 20px var(--mg-drop-c);
  }
  100% {
    box-shadow:
      0 0 14px var(--mg-amb-a),
      0 6px 26px var(--mg-drop-a);
  }
}

/* Bloom beneath — opacity + transform only, no filter animation */
@keyframes magenta-bloom-pulse {
  0%   { opacity: 0.52; transform: translateX(-50%) scale(1);    }
  40%  { opacity: 0.72; transform: translateX(-50%) scale(1.12); }
  70%  { opacity: 0.40; transform: translateX(-50%) scale(0.92); }
  100% { opacity: 0.52; transform: translateX(-50%) scale(1);    }
}

/* ---  btn-primary: continuous ambient glow + bloom beneath --- */

.btn-primary {
  animation: magenta-glow-pulse 3s ease-in-out infinite;
  will-change: box-shadow;
  /* widen transition for glow intensity changes on hover */
  transition:
    background-color 0.2s ease,
    border-color     0.2s ease,
    transform        0.2s ease,
    box-shadow       0.3s ease;
}

/* Bloom element: positioned below the button, behind its background */
.btn-primary::before {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%) scale(1);
  width: 75%;
  height: 24px;
  background: #D6006E;
  filter: blur(18px);
  border-radius: 50%;
  opacity: 0.52;
  z-index: -1;
  pointer-events: none;
  animation: magenta-bloom-pulse 3s ease-in-out infinite;
  will-change: opacity, transform;
}

.btn-primary:hover {
  background-color: #B8005E;
  border-color: #B8005E;
  transform: translateY(-2px);
  /* stop cycling animation — hold the intensified state */
  animation: none;
  box-shadow:
    0 0 30px rgba(214,  0, 110, 0.65),
    0 8px 44px rgba(214,  0, 110, 0.60),
    0 18px 64px rgba(214,  0, 110, 0.22);
}

.btn-primary:hover::before {
  animation: none;
  opacity: 0.88;
  transform: translateX(-50%) scale(1.3);
  filter: blur(22px);
}

/* --- btn-secondary: no glow at rest, fill + glow on hover --- */

.btn-secondary {
  transition:
    background-color 0.3s ease,
    color            0.3s ease,
    border-color     0.3s ease,
    transform        0.2s ease,
    box-shadow       0.3s ease;
}

/* Bloom hidden at rest */
.btn-secondary::before {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%) scale(0.7);
  width: 75%;
  height: 24px;
  background: #D6006E;
  filter: blur(18px);
  border-radius: 50%;
  opacity: 0;
  z-index: -1;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  will-change: opacity, transform;
}

.btn-secondary:hover {
  background-color: #D6006E;
  color: #FFFFFF;
  border-color: #D6006E;
  transform: translateY(-2px);
  box-shadow:
    0 0 28px rgba(214,  0, 110, 0.55),
    0 8px 36px rgba(214,  0, 110, 0.50);
}

.btn-secondary:hover::before {
  opacity: 0.72;
  transform: translateX(-50%) scale(1);
}

/* --- btn-ghost: no glow at rest, fill + glow on hover --- */

.btn-ghost {
  transition:
    background-color 0.3s ease,
    color            0.3s ease,
    border-color     0.3s ease,
    transform        0.2s ease,
    box-shadow       0.3s ease;
}

/* Bloom hidden at rest */
.btn-ghost::before {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%) scale(0.7);
  width: 75%;
  height: 24px;
  background: #D6006E;
  filter: blur(18px);
  border-radius: 50%;
  opacity: 0;
  z-index: -1;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  will-change: opacity, transform;
}

.btn-ghost:hover {
  background-color: #D6006E;
  border-color: #D6006E;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow:
    0 0 28px rgba(214,  0, 110, 0.55),
    0 8px 36px rgba(214,  0, 110, 0.50);
}

.btn-ghost:hover::before {
  opacity: 0.72;
  transform: translateX(-50%) scale(1);
}

/* ============================================================
   CARDS
   ============================================================ */
.service-card {
  background-color: #FFFFFF;
  border: 1px solid #E5E5E3;
  border-radius: 8px;
  padding: 44px 40px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 6px 24px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease;
}
.service-card:hover {
  transform: translateY(-7px);
  border-color: rgba(214, 0, 110, 0.15);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.05),
    0 20px 56px rgba(214, 0, 110, 0.11),
    0 0 0 1px rgba(214, 0, 110, 0.06);
}

.testimonial-card {
  background-color: #1A1A1A;
  border: 1px solid #2A2A2A;
  border-radius: 8px;
  padding: 40px 36px;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.3),
    0 16px 40px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease;
}
.testimonial-card:hover {
  transform: translateY(-6px);
  border-color: rgba(214, 0, 110, 0.2);
  box-shadow:
    0 6px 24px rgba(0, 0, 0, 0.35),
    0 24px 56px rgba(0, 0, 0, 0.28),
    0 0 40px rgba(214, 0, 110, 0.06);
}

/* ============================================================
   SECTION SPACING
   ============================================================ */
.section-dark  { padding-top: 120px; padding-bottom: 120px; }
.section-light { padding-top: 96px;  padding-bottom: 96px;  }

@media (max-width: 768px) {
  .section-dark  { padding-top: 72px;  padding-bottom: 72px;  }
  .section-light { padding-top: 64px;  padding-bottom: 64px;  }
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ============================================================
   DIVIDERS
   ============================================================ */
.stat-divider-v {
  width: 1px;
  height: 44px;
  background: #2A2A2A;
  flex-shrink: 0;
}

/* ============================================================
   GRAIN TEXTURE OVERLAY
   ============================================================ */
.grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ============================================================
   ANIMATION SYSTEM — PREMIUM EDITION
   Luxury easing: cubic-bezier(0.16, 1, 0.3, 1) = expo out
   Smooth easing: cubic-bezier(0.25, 0.46, 0.45, 0.94) = ease-out quart
   ============================================================ */

/* --- Fade up (upgraded easing + will-change) --- */
.fade-up {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity  0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-up.delay-1 { transition-delay: 0.12s; }
.fade-up.delay-2 { transition-delay: 0.24s; }
.fade-up.delay-3 { transition-delay: 0.36s; }

/* --- Slide from left (images, left-column content) --- */
.slide-left {
  opacity: 0;
  transform: translateX(-52px);
  transition:
    opacity  0.95s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.95s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.slide-left.visible { opacity: 1; transform: translateX(0); }

/* --- Slide from right (right-column content) --- */
.slide-right {
  opacity: 0;
  transform: translateX(52px);
  transition:
    opacity  0.95s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.95s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.slide-right.visible { opacity: 1; transform: translateX(0); }

/* --- Scale-in (cards, grid items) --- */
.scale-in {
  opacity: 0;
  transform: scale(0.93) translateY(20px);
  transition:
    opacity  0.85s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.scale-in.visible { opacity: 1; transform: scale(1) translateY(0); }

/* --- Cinematic heading (starts oversized → settles to final size) --- */
/* The heading scales down from 1.32× into its final resting size.
   transform-origin left for left-aligned, center for centered. */
.cinematic-heading {
  opacity: 0;
  transform: scale(1.32) translateY(14px);
  transform-origin: left center;
  transition:
    opacity  1.25s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.25s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.cinematic-heading.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}
/* Centered variant (for hero / CTA headings) */
.cinematic-heading.center-origin { transform-origin: center center; }

/* --- Eyebrow label reveal (drifts in from the left) --- */
.eyebrow-reveal {
  opacity: 0;
  transform: translateX(-20px);
  transition:
    opacity  0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}
.eyebrow-reveal.visible { opacity: 1; transform: translateX(0); }

/* Centered eyebrow (fades in from below, not from left) */
.eyebrow-reveal.center-in {
  transform: translateY(-12px);
}
.eyebrow-reveal.center-in.visible { transform: translateY(0); }

/* --- Accent line width reveal --- */
.accent-line,
.accent-line-center {
  transition: width 0.85s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.accent-line-anim         { width: 0 !important; }
.accent-line-anim.visible { width: 40px !important; }

/* --- Stagger delay overrides (for grid children) --- */
.stagger-1 { transition-delay: 0.08s  !important; }
.stagger-2 { transition-delay: 0.18s  !important; }
.stagger-3 { transition-delay: 0.28s  !important; }
.stagger-4 { transition-delay: 0.38s  !important; }
.stagger-5 { transition-delay: 0.48s  !important; }
.stagger-6 { transition-delay: 0.58s  !important; }
.stagger-7 { transition-delay: 0.68s  !important; }

/* --- Parallax image wrapper --- */
.parallax-img {
  will-change: transform;
  /* JS drives transform — no CSS transition so it follows scroll in real time */
}

/* --- Card shine micro-interaction (light sweep on hover) --- */
.card-shine {
  position: relative;
  overflow: hidden;
}
.card-shine::before {
  content: '';
  position: absolute;
  top: 0; left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255,255,255,0.055) 50%,
    transparent 100%
  );
  transform: skewX(-15deg);
  z-index: 1;
  pointer-events: none;
  transition: left 0s;
}
.card-shine:hover::before {
  left: 125%;
  transition: left 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Button stacking context + overflow --- */
/* overflow: visible allows the external bloom ::before to render outside
   the button boundary. The inner ::after highlight uses inset: 0 so it
   does not need clipping. z-index: 0 creates a stacking context so that
   the ::before bloom at z-index: -1 stays behind the button background
   but does not fall below page-level elements. */
.btn-primary,
.btn-secondary,
.btn-ghost {
  position: relative;
  overflow: visible;
  z-index: 0;
}

/* --- Button inner highlight on hover --- */
.btn-primary::after,
.btn-secondary::after,
.btn-ghost::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.13) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.btn-primary:hover::after,
.btn-secondary:hover::after,
.btn-ghost:hover::after { opacity: 1; }

/* --- Mobile: tone down scale animations --- */
@media (max-width: 768px) {
  .cinematic-heading { transform: scale(1.16) translateY(8px); }
  .slide-left  { transform: translateX(0) translateY(32px); }
  .slide-right { transform: translateX(0) translateY(32px); }
}

/* --- Respect prefers-reduced-motion --- */
@media (prefers-reduced-motion: reduce) {
  .fade-up, .slide-left, .slide-right, .scale-in,
  .cinematic-heading, .eyebrow-reveal {
    transition: opacity 0.3s ease !important;
    transform: none !important;
  }

  /* Disable continuous button glow animation — show a static subtle glow instead */
  .btn-primary {
    animation: none !important;
    box-shadow:
      0 0 14px rgba(214, 0, 110, 0.32),
      0 6px 26px rgba(214, 0, 110, 0.28);
  }
  .btn-primary::before {
    animation: none !important;
    opacity: 0.48;
    transform: translateX(-50%) scale(1);
  }
}

/* ============================================================
   STEP PROCESS ITEMS
   ============================================================ */
.step-number {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 56px;
  letter-spacing: -0.03em;
  line-height: 1;
  color: rgba(214, 0, 110, 0.15);
}

/* ============================================================
   ACCENT LINE  (thin magenta rule under section headings)
   ============================================================ */
.accent-line {
  display: block;
  width: 40px;
  height: 3px;
  background: #D6006E;
  margin-top: 16px;
}
.accent-line-center {
  display: block;
  width: 40px;
  height: 3px;
  background: #D6006E;
  margin: 16px auto 0;
}
