/**
 * CyprusRealReturns v2 — WOW Animation Layer
 * Premium scroll reveals, micro-interactions, kinetic UI
 */

/* ===== ANIMATION TOKENS ===== */
:root {
  --ease-bounce:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth:  cubic-bezier(0.4, 0, 0.2, 1);
  --ease-reveal:  cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast:     0.25s;
  --dur-mid:      0.55s;
  --dur-slow:     0.85s;
  --dur-xslow:    1.2s;
}

/* ===== HERO — ANIMATED GRADIENT TITLE ===== */
.hero h1 {
  color: #ffffff;
  animation: title-shimmer 6s ease-in-out infinite;
}
@keyframes title-shimmer {
  0%   { color: #ffffff; }
  50%  { color: #f0e6c8; }
  100% { color: #ffffff; }
}

/* ===== HERO — TYPED CURSOR ===== */
.hero-typed-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--gold);
  margin-left: 3px;
  vertical-align: middle;
  animation: blink-cursor 0.8s step-end infinite;
}
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ===== SCROLL REVEAL VARIANTS ===== */
.fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity var(--dur-slow) var(--ease-reveal),
              transform var(--dur-slow) var(--ease-reveal);
}
.fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity var(--dur-slow) var(--ease-reveal),
              transform var(--dur-slow) var(--ease-reveal);
}
.scale-in {
  opacity: 0;
  transform: scale(0.88);
  transition: opacity var(--dur-mid) var(--ease-bounce),
              transform var(--dur-mid) var(--ease-bounce);
}
.zoom-in {
  opacity: 0;
  transform: scale(0.75) translateY(20px);
  transition: opacity var(--dur-slow) var(--ease-reveal),
              transform var(--dur-slow) var(--ease-reveal);
}
.fade-left.visible,
.fade-right.visible,
.scale-in.visible,
.zoom-in.visible {
  opacity: 1;
  transform: none;
}

/* Stagger delays for direction variants */
.fade-left:nth-child(2), .fade-right:nth-child(2), .scale-in:nth-child(2) { transition-delay: 0.08s; }
.fade-left:nth-child(3), .fade-right:nth-child(3), .scale-in:nth-child(3) { transition-delay: 0.16s; }
.fade-left:nth-child(4), .fade-right:nth-child(4), .scale-in:nth-child(4) { transition-delay: 0.24s; }
.fade-left:nth-child(5), .fade-right:nth-child(5), .scale-in:nth-child(5) { transition-delay: 0.32s; }

/* ===== SECTION LINE REVEAL ===== */
.section-title::after {
  content: '';
  display: block;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--blue));
  border-radius: 2px;
  margin: 12px auto 0;
  transition: width 0.9s var(--ease-reveal);
}
.section-title.visible::after { width: 80px; }

/* ===== STAT CARDS — GLOW PULSE ===== */
.stat-card {
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: conic-gradient(from 0deg, var(--gold), var(--blue), var(--gold));
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 0;
  animation: spin-border 4s linear infinite;
}
.stat-card > * { position: relative; z-index: 1; }
.stat-card.visible::before { opacity: 0.35; }

@keyframes spin-border {
  to { transform: rotate(360deg); }
}

/* ===== CARD 3D TILT ===== */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
  will-change: transform;
}
.tilt-card:hover {
  box-shadow: 0 24px 64px rgba(0,0,0,0.18);
}

/* ===== SHIMMER HOVER EFFECT ===== */
.shimmer-card {
  position: relative;
  overflow: hidden;
}
.shimmer-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255,255,255,0.25) 50%,
    transparent 100%
  );
  transform: skewX(-15deg);
  transition: none;
  pointer-events: none;
}
.shimmer-card:hover::after {
  left: 130%;
  transition: left 0.6s var(--ease-smooth);
}

/* ===== MAGNETIC BUTTON WRAPPER ===== */
.btn-magnetic {
  display: inline-block;
  transition: transform 0.2s var(--ease-bounce);
}

/* ===== BUTTON RIPPLE ===== */
.btn { position: relative; overflow: hidden; }
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transform: scale(0);
  animation: ripple-expand 0.55s linear;
  pointer-events: none;
}
@keyframes ripple-expand {
  to { transform: scale(4); opacity: 0; }
}

/* ===== ANIMATED BACKGROUND GRADIENT ===== */
.section-navy {
  background-size: 200% 200%;
  animation: navy-shift 12s ease-in-out infinite;
}
@keyframes navy-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===== FLOATING BADGE ===== */
.trust-badge, .tier-badge-top {
  animation: float-badge 3s ease-in-out infinite;
}
.trust-badge:nth-child(2) { animation-delay: 0.5s; }
.trust-badge:nth-child(3) { animation-delay: 1s; }
@keyframes float-badge {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

/* ===== GOLD ACCENT UNDERLINE (hover links) ===== */
.nav-link {
  background-image: linear-gradient(var(--gold), var(--gold));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.35s var(--ease-smooth), color var(--dur-fast);
}
.nav-link:hover, .nav-link.active {
  background-size: 100% 2px;
}

/* ===== NUMBER GLOW ON REVEAL ===== */
.stat-number {
  transition: text-shadow 0.6s ease;
}
.stat-card.visible .stat-number {
  text-shadow: 0 0 32px rgba(212,175,55,0.6), 0 0 8px rgba(212,175,55,0.3);
}

/* ===== PROGRESS RING (SVG) ===== */
.progress-ring-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.progress-ring-circle {
  transition: stroke-dashoffset 1.4s var(--ease-reveal);
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

/* ===== PAGE TRANSITION OVERLAY ===== */
#page-transition {
  position: fixed;
  inset: 0;
  background: var(--dark);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
#page-transition.leaving { opacity: 1; }

/* ===== HERO SCROLL INDICATOR BOUNCE ===== */
.scroll-indicator span {
  display: inline-block;
  animation: bounce-arrow 1.8s ease-in-out infinite;
  font-size: 2rem;
  color: var(--gold);
  text-shadow: 0 0 16px rgba(212,175,55,0.6);
}
@keyframes bounce-arrow {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%       { transform: translateY(10px); opacity: 0.6; }
}

/* ===== SECTION ACCENT DIVIDER ===== */
.section::before {
  content: none;
}
.section-accent-top {
  position: relative;
}
.section-accent-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
}

/* ===== TIER CARD — FEATURED GLOW ===== */
.tier-card-featured {
  animation: featured-glow 3s ease-in-out infinite;
}
@keyframes featured-glow {
  0%, 100% { box-shadow: 0 8px 32px rgba(212,175,55,0.2), 0 0 0 1px rgba(212,175,55,0.15); }
  50%       { box-shadow: 0 16px 64px rgba(212,175,55,0.35), 0 0 0 2px rgba(212,175,55,0.3); }
}

/* ===== TEAM CARD — PHOTO ZOOM ===== */
.team-card .team-photo img {
  transition: transform 0.5s var(--ease-smooth), filter 0.4s ease;
  filter: grayscale(15%);
}
.team-card:hover .team-photo img {
  transform: scale(1.08);
  filter: grayscale(0%);
}

/* ===== WHY CARD IMAGE PARALLAX ===== */
.why-card img {
  transition: transform 0.6s var(--ease-smooth);
}
.why-card:hover img {
  transform: scale(1.06) translateY(-4px);
}

/* ===== FOOTER LINK HOVER ===== */
.footer a {
  position: relative;
  transition: color var(--dur-fast);
}
.footer a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s var(--ease-smooth);
}
.footer a:hover::after { width: 100%; }

/* ===== HERO SUBTITLE TYPED CONTAINER ===== */
#hero-typed { min-height: 2em; }


/* ============================================
   MOBILE-FIRST WOW EFFECTS
   CyprusRealReturns v2 — Touch-Optimised Layer
   All animations: GPU-only (transform + opacity)
   Target: 60fps on mid-range phones (Snapdragon 665+)
   ============================================ */


/* ============================================
   === Mobile Touch States ===
   ============================================ */

/* Active/tap feedback — scale down on press (haptic visual hint) */
@media (hover: none) and (pointer: coarse) {
  /* Buttons */
  .btn:active,
  .btn-primary:active,
  .btn-secondary:active,
  .btn-lg:active {
    transform: scale(0.96);
    transition: transform 0.08s ease;
  }

  /* Cards — light press feel */
  .tier-card:active,
  .feature-card:active,
  .testimonial-card:active,
  .why-card:active,
  .stat-card:active,
  .overview-card:active,
  .trust-card:active,
  .team-card:active,
  .lang-flag-card:active {
    transform: scale(0.985);
    transition: transform 0.1s ease;
  }

  /* Nav links — immediate feedback */
  .nav-link:active {
    opacity: 0.65;
    transition: opacity 0.08s;
  }

  /* Lang flags */
  .lang-flag-card:active {
    transform: scale(0.92);
    transition: transform 0.1s ease;
  }
}

/* Disable desktop-only hover 3D tilt on touch devices */
@media (hover: none) and (pointer: coarse) {
  .tilt-card {
    transform: none !important;
    will-change: auto;
  }
  /* Let shimmer auto-play on mobile instead of hover */
  .shimmer-card::after {
    animation: shimmer-auto 3.5s ease-in-out infinite;
  }
}

@keyframes shimmer-auto {
  0%   { left: -75%; }
  45%  { left: 130%; }
  100% { left: 130%; }
}


/* ============================================
   === Mobile Button Ripple (tap, not hover) ===
   ============================================ */

/* CSS-only ripple for touch — activated via :active pseudo */
@media (hover: none) and (pointer: coarse) {
  .btn {
    position: relative;
    overflow: hidden;
  }

  /* Ripple ring that expands from center on tap */
  .btn::after {
    content: '';
    position: absolute;
    inset: 50% 50% 50% 50%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: none;
  }

  .btn:active::after {
    inset: -100%;
    opacity: 1;
    transition: inset 0.45s var(--ease-smooth), opacity 0.45s ease;
  }
}


/* ============================================
   === Mobile Loading States ===
   ============================================ */

/* Skeleton shimmer — for deferred content */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(24, 99, 220, 0.06) 25%,
    rgba(24, 99, 220, 0.14) 50%,
    rgba(24, 99, 220, 0.06) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-sweep 1.6s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton-sweep {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Dot-pulse loading indicator (mobile-friendly size) */
.loading-dots {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 4px;
}
.loading-dots span {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue, #1863DC);
  animation: dot-pulse 1.4s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-pulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%            { transform: scale(1);   opacity: 1; }
}

/* Pull-to-refresh visual indicator */
.pull-refresh-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  background: var(--blue, #1863DC);
  color: #fff;
  border-radius: 0 0 24px 24px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 9998;
  transition: transform 0.35s var(--ease-bounce);
  will-change: transform;
}
.pull-refresh-indicator.visible {
  transform: translateX(-50%) translateY(0);
}
.pull-refresh-indicator .ptr-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ============================================
   === Mobile Navigation Animations ===
   ============================================ */

/* Hamburger → X morph */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s;
}
.hamburger:active { background: rgba(24,99,220,0.1); }

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark, #0d1b2a);
  border-radius: 2px;
  transform-origin: center;
  transition: transform 0.35s var(--ease-bounce),
              opacity 0.25s ease,
              width 0.25s ease;
}

/* Open state — drawn from HTML via .nav-open class on body/header */
.nav-open .hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-open .hamburger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-open .hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu slide-down */
.mobile-nav,
.nav-menu {
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.38s var(--ease-reveal),
              opacity 0.3s ease;
}
.nav-open .mobile-nav,
.nav-open .nav-menu {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Stagger nav items entry */
.mobile-nav .nav-link,
.nav-menu .nav-link {
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease-reveal);
}
.nav-open .mobile-nav .nav-link:nth-child(1),
.nav-open .nav-menu .nav-link:nth-child(1) { opacity:1; transform:none; transition-delay:0.05s; }
.nav-open .mobile-nav .nav-link:nth-child(2),
.nav-open .nav-menu .nav-link:nth-child(2) { opacity:1; transform:none; transition-delay:0.10s; }
.nav-open .mobile-nav .nav-link:nth-child(3),
.nav-open .nav-menu .nav-link:nth-child(3) { opacity:1; transform:none; transition-delay:0.15s; }
.nav-open .mobile-nav .nav-link:nth-child(4),
.nav-open .nav-menu .nav-link:nth-child(4) { opacity:1; transform:none; transition-delay:0.20s; }
.nav-open .mobile-nav .nav-link:nth-child(5),
.nav-open .nav-menu .nav-link:nth-child(5) { opacity:1; transform:none; transition-delay:0.25s; }
.nav-open .mobile-nav .nav-link:nth-child(6),
.nav-open .nav-menu .nav-link:nth-child(6) { opacity:1; transform:none; transition-delay:0.30s; }


/* ============================================
   === Mobile Card Interactions ===
   ============================================ */

/* Swipe-hint pulse on horizontal scroll containers */
.swipe-hint {
  position: relative;
}
.swipe-hint::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 48px;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.7));
  pointer-events: none;
  animation: swipe-fade 2.2s ease-in-out infinite;
}
@keyframes swipe-fade {
  0%, 100% { opacity: 0.8; }
  50%       { opacity: 0; }
}

/* Swipe arrow indicator */
.swipe-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-light);
  animation: swipe-bounce 1.8s ease-in-out infinite;
}
@keyframes swipe-bounce {
  0%, 100% { transform: translateX(0); opacity: 1; }
  50%       { transform: translateX(8px); opacity: 0.5; }
}

/* Mobile card entry — optimised scale+fade (no translateY for performance) */
@media (max-width: 768px) {
  .scale-in,
  .fade-left,
  .fade-right {
    /* Simplify: use only opacity + small translateY for fewer composite layers */
    transform: translateY(20px);
    opacity: 0;
    transition: opacity 0.5s var(--ease-reveal),
                transform 0.5s var(--ease-reveal);
  }
  .scale-in.visible,
  .fade-left.visible,
  .fade-right.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* Reduce stagger on mobile (faster perceived load) */
  .fade-left:nth-child(2), .fade-right:nth-child(2), .scale-in:nth-child(2) { transition-delay: 0.05s; }
  .fade-left:nth-child(3), .fade-right:nth-child(3), .scale-in:nth-child(3) { transition-delay: 0.10s; }
  .fade-left:nth-child(4), .fade-right:nth-child(4), .scale-in:nth-child(4) { transition-delay: 0.15s; }
  .fade-left:nth-child(5), .fade-right:nth-child(5), .scale-in:nth-child(5) { transition-delay: 0.18s; }
}


/* ============================================
   === Mobile Stat Number — Glow Pulse ===
   ============================================ */

@media (max-width: 768px) {
  .stat-card.visible .stat-number {
    animation: mobile-glow-pulse 3s ease-in-out infinite;
  }
}

@keyframes mobile-glow-pulse {
  0%, 100% { text-shadow: 0 0 20px rgba(212,175,55,0.5), 0 0 6px rgba(212,175,55,0.25); }
  50%       { text-shadow: 0 0 36px rgba(212,175,55,0.75), 0 0 12px rgba(212,175,55,0.45); }
}


/* ============================================
   === Mobile Scroll Effects ===
   ============================================ */

/* Scroll progress bar — always visible, slightly thicker on mobile */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--blue, #1863DC), var(--gold, #D4AF37));
  z-index: 10000;
  pointer-events: none;
  transition: width 0.1s linear;
}
@media (max-width: 768px) {
  #scroll-progress {
    height: 4px; /* slightly thicker thumb on mobile */
  }
}

/* Smooth CSS scroll snapping for full-page sections */
@media (max-width: 768px) {
  .snap-container {
    scroll-snap-type: y proximity;
    overflow-y: scroll;
    height: 100vh;
  }
  .snap-section {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
  }
}

/* Mobile parallax depth — works via CSS translate driven by JS scroll,
   fallback is a gentle hero gradient float */
@media (max-width: 768px) {
  .parallax-layer-slow {
    will-change: transform;
  }
  .hero-bg-overlay {
    animation: hero-depth-float 8s ease-in-out infinite;
  }
}
@keyframes hero-depth-float {
  0%, 100% { transform: scale(1.0) translateY(0); }
  50%       { transform: scale(1.03) translateY(-6px); }
}

/* Fade-up entrance for sections visible after scroll on mobile */
@media (max-width: 768px) {
  .section-fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease-reveal), transform 0.6s var(--ease-reveal);
  }
  .section-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ============================================
   === Bottom Sheet Modal Animations ===
   (Calculator, Contact Forms on Mobile)
   ============================================ */

.bottom-sheet {
  position: fixed;
  inset: auto 0 0;
  max-height: 92vh;
  background: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 48px rgba(0,0,0,0.2);
  z-index: 5000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  transform: translateY(100%);
  transition: transform 0.42s var(--ease-reveal);
  will-change: transform;
}
.bottom-sheet.open {
  transform: translateY(0);
}

/* Drag handle */
.bottom-sheet-handle {
  width: 44px;
  height: 5px;
  background: rgba(0,0,0,0.15);
  border-radius: 3px;
  margin: 12px auto 0;
}

/* Backdrop */
.bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 4999;
  transition: background 0.3s ease;
  pointer-events: none;
}
.bottom-sheet-backdrop.open {
  background: rgba(0,0,0,0.45);
  pointer-events: auto;
}


/* ============================================
   === Mobile Performance Optimisations ===
   ============================================ */

/* Contain heavy animations to their layer */
@media (max-width: 768px) {
  /* Disable conic-gradient spin border — expensive on mobile GPU */
  .stat-card::before {
    animation: none !important;
    display: none;
  }

  /* Disable navy background shift — saves GPU bandwidth */
  .section-navy {
    animation: none !important;
  }

  /* Simplify featured glow — lower frequency */
  .tier-card-featured {
    animation: featured-glow 5s ease-in-out infinite;
  }

  /* Disable float-badge — unnecessary motion on small screen */
  .trust-badge, .tier-badge-top {
    animation: none !important;
  }

  /* Keep scroll reveal transitions shorter (feels snappier on mobile) */
  .zoom-in {
    transition-duration: 0.4s;
  }

  /* Disable parallax team photo zoom on touch */
  .team-card:hover .team-photo img {
    transform: none;
    filter: grayscale(0%);
  }

  /* Disable footer link ::after underline animation (hover-only) */
  .footer a:hover::after {
    width: 0;
  }

  /* Hero title shimmer — reduce to 10s cycle (saves battery) */
  .hero h1 {
    animation-duration: 10s;
  }
}

/* Force composited layers only where truly needed on mobile */
@media (max-width: 768px) {
  .hero-typed-cursor,
  #scroll-progress,
  .bottom-sheet {
    will-change: transform, opacity;
  }
}


/* ============================================
   === Viewport-Specific Micro-Tweaks ===
   ============================================ */

/* iPhone SE / small Android (320–375px) */
@media (max-width: 375px) {
  .stat-card.visible .stat-number {
    animation-duration: 4s; /* slower glow on tiny screens = less distraction */
  }
  .bounce-arrow { animation-duration: 2.4s; }
  .bottom-sheet { border-radius: 18px 18px 0 0; }
}

/* iPhone 12/13/14 (390px) & iPhone 14 Pro Max (428px) */
@media (min-width: 376px) and (max-width: 428px) {
  .stat-card.visible .stat-number {
    animation-duration: 3s;
  }
}

/* Android large (412px) */
@media (min-width: 400px) and (max-width: 420px) {
  .bottom-sheet { max-height: 88vh; }
}


/* ============================================
   === Calculator Slider Mobile UX ===
   ============================================ */

@media (max-width: 768px) {
  /* Larger hit area + smooth thumb */
  input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: linear-gradient(
      90deg,
      var(--blue, #1863DC) var(--range-pct, 50%),
      rgba(24,99,220,0.18) var(--range-pct, 50%)
    );
    border-radius: 4px;
    outline: none;
    cursor: pointer;
  }

  input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;       /* larger touch target (min 44px with padding) */
    height: 28px;
    border-radius: 50%;
    background: var(--blue, #1863DC);
    border: 3px solid #fff;
    box-shadow: 0 2px 12px rgba(24,99,220,0.35);
    transition: transform 0.15s var(--ease-bounce),
                box-shadow 0.15s ease;
  }

  input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(1.25);
    box-shadow: 0 4px 20px rgba(24,99,220,0.5);
  }

  input[type="range"]::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--blue, #1863DC);
    border: 3px solid #fff;
    box-shadow: 0 2px 12px rgba(24,99,220,0.35);
    cursor: pointer;
    transition: transform 0.15s var(--ease-bounce);
  }

  input[type="range"]::-moz-range-thumb:active {
    transform: scale(1.25);
  }
}


/* ============================================
   === Hero Section — Mobile WOW Enhancements ===
   ============================================ */

/* Typed cursor — slightly larger for mobile readability */
@media (max-width: 768px) {
  .hero-typed-cursor {
    width: 3px;
    height: 1em;
  }
}

/* Hero particle glow — CSS-only subtle radial pulses as particle surrogates */
@media (max-width: 768px) {
  .hero::before {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212,175,55,0.12) 0%, transparent 70%);
    top: 15%;
    right: -60px;
    animation: particle-pulse 5s ease-in-out infinite;
    pointer-events: none;
  }
  .hero::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(24,99,220,0.15) 0%, transparent 70%);
    bottom: 10%;
    left: -40px;
    animation: particle-pulse 6.5s ease-in-out infinite reverse;
    pointer-events: none;
  }
}

@keyframes particle-pulse {
  0%, 100% { transform: scale(1);   opacity: 0.7; }
  50%       { transform: scale(1.3); opacity: 1;   }
}


/* ============================================
   === Reduced Motion Support ===
   (WCAG 2.1 — AAA compliance)
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  /* Kill all animations and transitions globally */
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Ensure scroll-reveal elements snap to visible immediately */
  .fade-left,
  .fade-right,
  .scale-in,
  .zoom-in,
  .section-fade-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Section title line should be visible immediately */
  .section-title::after {
    width: 80px !important;
    transition: none !important;
  }

  /* Stat number visible without pulse */
  .stat-card.visible .stat-number {
    animation: none !important;
    text-shadow: 0 0 12px rgba(212,175,55,0.4);
  }

  /* Progress bar no transition */
  #scroll-progress {
    transition: none !important;
  }

  /* Bottom sheet — instant open/close */
  .bottom-sheet {
    transition: none !important;
  }

  /* Pull-to-refresh — no animation */
  .pull-refresh-indicator .ptr-spinner {
    animation: none !important;
    border-top-color: transparent;
  }

  /* Hamburger — instant morph */
  .hamburger span {
    transition: none !important;
  }

  /* Hero depth float off */
  .hero-bg-overlay {
    animation: none !important;
  }

  /* Hero particle orbs off */
  .hero::before,
  .hero::after {
    animation: none !important;
    opacity: 0.4;
  }
}
