/* ═══════════════════════════════════════════════════════════════════
   MBC Trading — Premium Visual Effects System
   Append this file after styles.css  (or @import it last)
   ═══════════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────────────
   1. SHADOW SCALE
   Each level uses 2–3 stacked layers: main spread, tight fill,
   optional warm-tinted ambient.
   ─────────────────────────────────────────────────────────────────── */
:root {
  /* XS – barely lifted (input focus rings, tiny chips) */
  --shadow-xs:
    0 1px 2px 0 rgba(0,0,0,0.45),
    0 1px 1px 0 rgba(0,0,0,0.30);

  /* SM – cards resting on surface */
  --shadow-sm:
    0 2px 4px -1px rgba(0,0,0,0.55),
    0 1px 3px 0   rgba(0,0,0,0.40);

  /* MD – modestly elevated panels */
  --shadow-md:
    0 4px 10px -2px rgba(0,0,0,0.60),
    0 2px 6px  -2px rgba(0,0,0,0.45),
    0 0  2px   0   rgba(0,0,0,0.30);

  /* LG – floating cards, dropdowns */
  --shadow-lg:
    0 10px 25px -3px rgba(0,0,0,0.65),
    0 4px  10px -4px rgba(0,0,0,0.50),
    0 0    4px  0   rgba(0,0,0,0.25);

  /* XL – dialogs, drawers */
  --shadow-xl:
    0 18px 40px -4px  rgba(0,0,0,0.70),
    0 8px  18px -6px  rgba(0,0,0,0.55),
    0 0    6px  0     rgba(0,0,0,0.30);

  /* 2XL – hero images, megamenus, fullscreen overlays */
  --shadow-2xl:
    0 32px 80px -8px   rgba(0,0,0,0.80),
    0 16px 40px -12px  rgba(0,0,0,0.60),
    0 4px  12px 0      rgba(0,0,0,0.35),
    0 0    2px  0      rgba(217,18,34,0.08);  /* red-tinted ambient */

  /* ── Coloured accent shadows (used by glow helpers below) ── */
  --shadow-red:
    0 8px 24px -4px rgba(217,18,34,0.55),
    0 2px 8px  0   rgba(217,18,34,0.35);

  --shadow-gold:
    0 8px 24px -4px rgba(245,184,67,0.45),
    0 2px 8px  0   rgba(245,184,67,0.28);

  --shadow-blue:
    0 8px 24px -4px rgba(79,168,255,0.45),
    0 2px 8px  0   rgba(79,168,255,0.28);

  --shadow-green:
    0 8px 24px -4px rgba(38,201,163,0.45),
    0 2px 8px  0   rgba(38,201,163,0.28);

  /* ─────────────────────────────────────────────────────────────────
     2. PREMIUM GRADIENTS
     ───────────────────────────────────────────────────────────────── */
  /* Hero — cinematic dark-to-colour sweep */
  --gradient-hero:
    radial-gradient(ellipse 120% 80% at 70% -10%,
      rgba(217,18,34,0.22) 0%,
      rgba(133,143,159,0.12) 35%,
      rgba(11,13,17,0) 70%),
    linear-gradient(170deg,
      rgba(21,24,30,1) 0%,
      rgba(10,12,16,1) 55%,
      rgba(5,6,9,1) 100%);

  /* Card — barely perceptible surface lift */
  --gradient-card:
    linear-gradient(145deg,
      rgba(255,255,255,0.055) 0%,
      rgba(255,255,255,0.018) 60%,
      rgba(255,255,255,0.008) 100%);

  /* Red — primary brand CTA gradient */
  --gradient-red:
    linear-gradient(135deg, #e3162a 0%, #D91222 45%, #b01020 100%);

  /* Gold — premium tier indicator */
  --gradient-gold:
    linear-gradient(135deg, #ffd060 0%, #F5B843 45%, #d4922a 100%);

  /* Blue — info / link accent */
  --gradient-blue:
    linear-gradient(135deg, #74bfff 0%, #4FA8FF 45%, #2a7fd4 100%);

  /* Green — positive / profit indicator */
  --gradient-green:
    linear-gradient(135deg, #3fe8c5 0%, #26C9A3 45%, #1a9a7c 100%);

  /* Surface — section background tint */
  --gradient-surface:
    linear-gradient(180deg,
      rgba(255,255,255,0.025) 0%,
      rgba(255,255,255,0.008) 50%,
      rgba(255,255,255,0.000) 100%);

  /* Shine — holographic shimmer for premium badges / borders */
  --gradient-shine:
    linear-gradient(105deg,
      rgba(255,255,255,0.00) 0%,
      rgba(255,255,255,0.08) 25%,
      rgba(255,255,255,0.18) 48%,
      rgba(255,255,255,0.08) 72%,
      rgba(255,255,255,0.00) 100%);

  /* Dark panel (used by megamenu + tools section) */
  --gradient-panel:
    radial-gradient(180.62% 113% at 0.96% 2.23%,
      rgba(88,155,255,0.09) 0%,
      rgba(88,155,255,0.02) 100%),
    linear-gradient(0deg, rgba(21,24,30,0.4), rgba(21,24,30,0.4)),
    radial-gradient(34.55% 74.25% at 72.71% 84.13%,
      rgba(21,24,30,0) 0%,
      rgb(21,24,30) 100%);

  /* Overlay for CTA / hero sections with background images */
  --gradient-overlay:
    linear-gradient(180deg,
      rgba(10,12,16,0.60) 0%,
      rgba(10,12,16,0.82) 100%);
}
/* END merged :root */


/* ───────────────────────────────────────────────────────────────────
   3. GLASS MORPHISM SYSTEM
   ─────────────────────────────────────────────────────────────────── */

/* Base — light frosted glass */
.glass-card {
  position: relative; /* CRITICAL: contains ::before shimmer pseudo-element */
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: var(--radius-card, 20px);
  cursor: pointer;
}

/* Dark glass — deeper frost on very dark surfaces */
.glass-card-dark {
  position: relative; /* CRITICAL: contains ::before shimmer pseudo-element */
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  background: rgba(10,12,18,0.72);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-card, 20px);
  cursor: pointer;
}

/* Panel glass — wider pane (tools, mega-menu card slots) */
.glass-panel {
  backdrop-filter: blur(24px) saturate(150%) brightness(0.9);
  -webkit-backdrop-filter: blur(24px) saturate(150%) brightness(0.9);
  background: rgba(15,18,24,0.65);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-card, 20px);
}

/* Nav glass — sticky navbar at scroll */
.glass-nav {
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  background: rgba(13,15,19,0.84);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

/* Tinted red glass — CTA tiles */
.glass-card-red {
  position: relative; /* contains ::before shimmer pseudo-element */
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  background: rgba(217,18,34,0.08);
  border: 1px solid rgba(217,18,34,0.22);
  border-radius: var(--radius-card, 20px);
  cursor: pointer;
}

/* Hover upgrade — apply with JS or :hover */
.glass-card:hover,
.glass-card-dark:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
}
.glass-card-red:hover {
  background: rgba(217,18,34,0.12);
  border-color: rgba(217,18,34,0.35);
  box-shadow: var(--shadow-red);
}
.glass-card-red::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--gradient-shine);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.glass-card-red:hover::before { opacity: 1; }

/* Shimmer line across top (decorative) */
.glass-card::before,
.glass-card-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--gradient-shine);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.glass-card:hover::before,
.glass-card-dark:hover::before { opacity: 1; }


/* ───────────────────────────────────────────────────────────────────
   4. BACKGROUND PATTERNS  (SVG data URI)
   ─────────────────────────────────────────────────────────────────── */

/* Dot matrix — 20 px grid of 1 px dots */
.bg-dots {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(255,255,255,0.07)'/%3E%3C/svg%3E");
  background-size: 20px 20px;
  background-repeat: repeat;
}

/* Fine grid — 40 px lines */
.bg-grid {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M40 0H0V40' fill='none' stroke='rgba(255,255,255,0.055)' stroke-width='0.5'/%3E%3C/svg%3E");
  background-size: 40px 40px;
  background-repeat: repeat;
}

/* Noise / film grain */
.bg-noise {
  position: relative;
}
.bg-noise::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.028;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  mix-blend-mode: overlay;
}

/* Diagonal lines — premium texture */
.bg-lines {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Cpath d='M0 10L10 0' stroke='rgba(255,255,255,0.04)' stroke-width='0.6'/%3E%3C/svg%3E");
  background-size: 10px 10px;
  background-repeat: repeat;
}

/* Hexagon mesh */
.bg-hex {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 0L56 16v32L28 64 0 48V16z' fill='none' stroke='rgba(255,255,255,0.045)' stroke-width='0.6'/%3E%3Cpath d='M28 64l28 16v20M28 64L0 80v20' fill='none' stroke='rgba(255,255,255,0.045)' stroke-width='0.6'/%3E%3C/svg%3E");
  background-size: 56px 100px;
  background-repeat: repeat;
}


/* ───────────────────────────────────────────────────────────────────
   5. GLOW & ACCENT EFFECTS
   ─────────────────────────────────────────────────────────────────── */

/* Colour glows — box-shadow */
.glow-red  { box-shadow: var(--shadow-red);   }
.glow-gold { box-shadow: var(--shadow-gold);  }
.glow-blue { box-shadow: var(--shadow-blue);  }
.glow-green{ box-shadow: var(--shadow-green); }

/* Hover-activate glows — full four-colour set */
.glow-red-hover:hover   { box-shadow: var(--shadow-red);   }
.glow-blue-hover:hover  { box-shadow: var(--shadow-blue);  }
.glow-gold-hover:hover  { box-shadow: var(--shadow-gold);  }
.glow-green-hover:hover { box-shadow: var(--shadow-green); }

/* Accent line across the top of an element */
.accent-line-top {
  position: relative;
  overflow: hidden;
}
.accent-line-top::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-red);
  border-radius: 2px 2px 0 0;
  pointer-events: none;
  z-index: 1;
}

/* Accent line — gold variant */
.accent-line-top.gold::before {
  background: var(--gradient-gold);
}

/* Accent line — blue variant */
.accent-line-top.blue::before {
  background: var(--gradient-blue);
}

/* Gradient border trick
   Usage: add .gradient-border to a container that has
   a child with class .gradient-border-inner  */
.gradient-border {
  position: relative;
  background: var(--bg, #0B0D11);
  border-radius: var(--radius-card, 20px);
  isolation: isolate;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg,
    rgba(217,18,34,0.70) 0%,
    rgba(255,255,255,0.12) 50%,
    rgba(79,168,255,0.50) 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

/* Shimmer sweep animation — apply to premium badges */
.shine-sweep {
  position: relative;
  overflow: hidden;
}
.shine-sweep::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; bottom: 0;
  width: 60%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.14) 50%,
    transparent 100%);
  transform: skewX(-15deg);
  pointer-events: none;
}
/* Only run continuous sweep on devices that can hover — no wasted GPU on touch */
@media (hover: hover) and (pointer: fine) {
  .shine-sweep::after {
    animation: shine-pass 3.5s ease-in-out infinite;
  }
}

@keyframes shine-pass {
  0%   { left: -100%; }
  60%  { left: 160%;  }
  100% { left: 160%;  }
}

/* Pulsing ring — attention-draw (notification dot, live badge) */
.pulse-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pulse-ring::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--red);
  opacity: 0;
  animation: pulse-ring-anim 2s ease-out infinite;
  pointer-events: none;
}

@keyframes pulse-ring-anim {
  0%   { transform: scale(0.9); opacity: 0.8; }
  70%  { transform: scale(1.4); opacity: 0;   }
  100% { transform: scale(1.4); opacity: 0;   }
}

/* Gradient text */
.text-gradient-red {
  background: var(--gradient-red);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-gold {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-blue {
  background: var(--gradient-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ───────────────────────────────────────────────────────────────────
   6. DEPTH & ELEVATION  (card height system + floating)
   ─────────────────────────────────────────────────────────────────── */

.elevated-xs  { box-shadow: var(--shadow-xs);  }
.elevated-sm  { box-shadow: var(--shadow-sm);  }
.elevated-md  { box-shadow: var(--shadow-md);  }
.elevated-lg  { box-shadow: var(--shadow-lg);  }
.elevated-xl  { box-shadow: var(--shadow-xl);  }
.elevated-2xl { box-shadow: var(--shadow-2xl); }

/* On-hover elevation upgrade (interactive cards) */
.elevate-on-hover {
  transition: box-shadow 0.25s cubic-bezier(.22,1,.36,1), transform 0.25s cubic-bezier(.22,1,.36,1);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.elevate-on-hover:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
}

/* Floating — continuous gentle levitation */
.floating {
  will-change: transform;
}
.floating-slow {
  will-change: transform;
}
.floating-delayed {
  will-change: transform;
}
@media (prefers-reduced-motion: no-preference) {
  .floating {
    animation: float-gentle 5s ease-in-out infinite;
  }
  .floating-slow {
    animation: float-gentle 7s ease-in-out infinite;
  }
  .floating-delayed {
    animation: float-gentle 5s ease-in-out 1.5s infinite;
  }
}

@keyframes float-gentle {
  0%   { transform: translateY(0px);   }
  50%  { transform: translateY(-6px);  } /* reduced from -10px — institutional subtlety */
  100% { transform: translateY(0px);   }
}

/* Breathing scale — for logo / icon hero elements */
.breathing {
  will-change: transform;
  animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1);     }
  50%       { transform: scale(1.03); }
}

/* Surface shimmer on hover — for stat cards */
.shimmer-on-hover {
  position: relative;
  overflow: hidden;
  will-change: transform;
}
.shimmer-on-hover::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; bottom: 0; width: 50%;
  background: var(--gradient-shine);
  transform: skewX(-15deg);
  opacity: 0;
  /* No transition: opacity here — animation is sole controller to avoid conflict */
  animation-fill-mode: forwards;
  pointer-events: none;
}
.shimmer-on-hover:hover::after {
  animation: shimmer-once 0.6s ease-out forwards;
}

@keyframes shimmer-once {
  0%   { left: -100%; opacity: 1; }
  100% { left: 150%;  opacity: 0; }
}


/* ───────────────────────────────────────────────────────────────────
   7. UPGRADE OVERRIDES — apply premium effects to existing components
   ─────────────────────────────────────────────────────────────────── */

/* Navbar — glass on scroll (JS adds .scrolled to .nav-main) */
/* Base nav gets transition so scroll-reveal is smooth in both directions */
.nav-main {
  transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}
.nav-main.scrolled {
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  background: rgba(13,15,19,0.90);
  box-shadow: 0 4px 24px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.05);
  transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}

/* Market cards */
.market-card {
  background: var(--gradient-card);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s cubic-bezier(.22,1,.36,1), transform 0.25s cubic-bezier(.22,1,.36,1), background 0.25s ease;
  position: relative;
  overflow: hidden;
}
.market-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
  background: rgba(255,255,255,0.09);
}
.market-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.12) 50%,
    transparent 100%);
  pointer-events: none;
}

/* AI cards */
.ai-card {
  background: var(--gradient-card);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s cubic-bezier(.22,1,.36,1), transform 0.25s cubic-bezier(.22,1,.36,1);
  position: relative;
  overflow: hidden;
}
.ai-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
}

/* Stat cards */
.stat-card {
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.25s cubic-bezier(.22,1,.36,1), transform 0.25s cubic-bezier(.22,1,.36,1);
}
.stat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Pricing cards */
.pricing-card {
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.25s cubic-bezier(.22,1,.36,1), transform 0.25s cubic-bezier(.22,1,.36,1), border-color 0.2s ease;
}
.pricing-card.featured {
  box-shadow: var(--shadow-red);
}
.pricing-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

/* Tool items */
.tool-item {
  transition: box-shadow 0.25s cubic-bezier(.22,1,.36,1), transform 0.25s cubic-bezier(.22,1,.36,1), background 0.2s ease;
}
.tool-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(3px);
}

/* Auth card */
.auth-card {
  box-shadow: var(--shadow-2xl);
}

/* Buttons — depth lift */
.btn-primary {
  box-shadow: var(--shadow-red);
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; bottom: 0; width: 50%;
  background: rgba(255,255,255,0.12);
  transform: skewX(-15deg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-primary:hover::after {
  animation: shimmer-once 0.5s ease-out forwards;
  opacity: 1;
}
.btn-primary:hover {
  box-shadow: 0 12px 32px -4px rgba(217,18,34,0.70),
              0 4px 12px   0   rgba(217,18,34,0.45);
}

/* Mega panel upgrade */
.mega-panel {
  background: rgba(10,12,16,0.96);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: var(--shadow-2xl);
}

/* Footer CTA strip */
.footer-cta-strip {
  background:
    var(--gradient-surface),
    linear-gradient(90deg, #0d1018 0%, #131720 50%, #0d1018 100%);
}

/* Account cards */
.account-card {
  transition: box-shadow 0.25s cubic-bezier(.22,1,.36,1), transform 0.25s cubic-bezier(.22,1,.36,1),
              border-color 0.2s ease, background 0.2s ease;
}
.account-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Rate tiles */
.rate-tile {
  transition: box-shadow 0.25s cubic-bezier(.22,1,.36,1), transform 0.25s cubic-bezier(.22,1,.36,1), border-color 0.2s ease;
}
.rate-tile:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Pricing tiles */
.pricing-tile {
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.25s cubic-bezier(.22,1,.36,1), transform 0.25s cubic-bezier(.22,1,.36,1), border-color 0.2s ease;
}
.pricing-tile:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

/* Platform cards */
.platform-card {
  transition: box-shadow 0.25s cubic-bezier(.22,1,.36,1), transform 0.25s cubic-bezier(.22,1,.36,1),
              border-color 0.2s ease, background 0.2s ease;
}
.platform-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* ───────────────────────────────────────────────────────────────────
   8. UTILITY HELPERS
   ─────────────────────────────────────────────────────────────────── */

/* Isolate stacking context (required for glass children) */
.isolate { isolation: isolate; }

/* Position helpers */
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

/* Smooth transitions — composited properties only (no layout thrash) */
.smooth {
  transition: transform 0.25s ease, box-shadow 0.25s ease,
              background-color 0.25s ease, border-color 0.25s ease,
              opacity 0.25s ease;
}

/* Focus ring — accessible but styled, uses design tokens */
:focus-visible {
  outline: 2px solid var(--red, rgba(217,18,34,0.70));
  outline-offset: 3px;
  border-radius: var(--radius-xs, 3px);
}

/* Scroll-reveal base — JS adds .revealed */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger children — extended to 10 for markets grid, platform cards, features */
.stagger > *:nth-child(1)  { transition-delay: 0.00s; }
.stagger > *:nth-child(2)  { transition-delay: 0.08s; }
.stagger > *:nth-child(3)  { transition-delay: 0.16s; }
.stagger > *:nth-child(4)  { transition-delay: 0.24s; }
.stagger > *:nth-child(5)  { transition-delay: 0.32s; }
.stagger > *:nth-child(6)  { transition-delay: 0.40s; }
.stagger > *:nth-child(7)  { transition-delay: 0.48s; }
.stagger > *:nth-child(8)  { transition-delay: 0.56s; }
.stagger > *:nth-child(9)  { transition-delay: 0.64s; }
.stagger > *:nth-child(10) { transition-delay: 0.72s; }

/* ───────────────────────────────────────────────────────────────────
   9. TOUCH ACTIVE STATES
   Tactile feedback on mobile — no hover available on touch screens
   ─────────────────────────────────────────────────────────────────── */

.glass-card:active,
.glass-card-dark:active,
.glass-card-red:active {
  transform: scale(0.985);
  transition: transform 0.08s ease;
}
.elevate-on-hover:active {
  transform: translateY(-1px) scale(0.99);
  box-shadow: var(--shadow-sm);
}
.market-card:active,
.pricing-card:active,
.platform-card:active {
  transform: translateY(-1px);
  transition: transform 0.08s ease;
}


/* ───────────────────────────────────────────────────────────────────
   10. MOBILE BLUR REDUCTION
   Reduce GPU load on mid-range mobile — backdrop-filter is expensive
   ─────────────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .glass-card {
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
  }
  .glass-card-dark {
    backdrop-filter: blur(10px) saturate(130%);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
  }
  .glass-panel {
    backdrop-filter: blur(10px) saturate(130%);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
  }
  .glass-card-red {
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
  }
  .mega-panel {
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
  }
}


/* ───────────────────────────────────────────────────────────────────
   11. PAGE-LOAD ENTRANCE UTILITIES
   For above-fold elements where scroll-triggered .reveal never fires
   ─────────────────────────────────────────────────────────────────── */

.fade-in {
  animation: fade-in-anim 0.6s cubic-bezier(.22,1,.36,1) both;
}
.fade-in-up {
  animation: fade-in-up-anim 0.65s cubic-bezier(.22,1,.36,1) both;
}
.scale-in {
  animation: scale-in-anim 0.5s cubic-bezier(.22,1,.36,1) both;
}

@keyframes fade-in-anim {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fade-in-up-anim {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scale-in-anim {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}


/* ───────────────────────────────────────────────────────────────────
   12. SKELETON LOADING COMPONENT
   Data-loading states for dashboard and trading page cards
   ─────────────────────────────────────────────────────────────────── */

.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 400% 100%;
  animation: skeleton-pulse 1.6s ease-in-out infinite;
  border-radius: var(--radius-sm, 6px);
  color: transparent !important;
  pointer-events: none;
  user-select: none;
}
@keyframes skeleton-pulse {
  0%   { background-position: 100% 50%; }
  100% { background-position:   0% 50%; }
}
.skeleton-text  { height: 1em;    margin-bottom: 0.5em;  }
.skeleton-title { height: 1.5em;  width: 60%; margin-bottom: 0.75em; }
.skeleton-block { height: 120px;  width: 100%; }


/* ───────────────────────────────────────────────────────────────────
   13. PREFERS-REDUCED-MOTION — WCAG 2.1 AA COMPLIANCE
   Pause or simplify every animation for users who opt out
   ─────────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  /* Continuous animations — stop entirely */
  .floating,
  .floating-slow,
  .floating-delayed    { animation: none; }
  .breathing           { animation: none; }
  .shine-sweep::after  { animation: none; }
  .shimmer-on-hover::after { animation: none; transition: none; }
  .pulse-ring::after   { animation: none; }

  /* Scroll-reveal — show immediately with no movement */
  .reveal,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }

  /* Button shimmer */
  .btn-primary::after  { animation: none; transition: none; }

  /* Nav glass snap instead of transition */
  .nav-main,
  .nav-main.scrolled   { transition: none; }

  /* Page-load entrance utilities — show immediately */
  .fade-in,
  .fade-in-up,
  .scale-in {
    animation: none;
    opacity: 1;
    transform: none;
  }

  /* Skeleton — static instead of animated */
  .skeleton {
    animation: none;
    background: rgba(255,255,255,0.06);
  }

  /* Smooth scroll — use instant jump */
  html { scroll-behavior: auto; }
}


/* ───────────────────────────────────────────────────────────────────
   14. @SUPPORTS BACKDROP-FILTER FALLBACK
   Firefox with hardware acceleration off (common in enterprise)
   ─────────────────────────────────────────────────────────────────── */

@supports not (backdrop-filter: blur(1px)) {
  .glass-card      { background: rgba(20,24,32,0.95); }
  .glass-card-dark { background: rgba(10,12,18,0.97); }
  .glass-panel     { background: rgba(15,18,24,0.97); }
  .glass-nav       { background: rgba(13,15,19,0.98); }
  .glass-card-red  { background: rgba(217,18,34,0.14); }
  .mega-panel      { background: rgba(10,12,16,0.98); }
}


/* ───────────────────────────────────────────────────────────────────
   END premium-effects.css
   ─────────────────────────────────────────────────────────────────── */
