/* ==========================================================================
   VenueIQ — design enhancement & motion layer
   Loaded after style.css. Keeps brand tokens; adds atmosphere + polish.
   ========================================================================== */

html { scroll-behavior: smooth; }

/* ---------- Ambient page atmosphere ---------- */
body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(108, 92, 231, 0.09), transparent 55%),
    radial-gradient(900px 500px at 95% 5%, rgba(0, 194, 184, 0.08), transparent 50%),
    radial-gradient(700px 400px at 50% 100%, rgba(108, 92, 231, 0.05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(108, 92, 231, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 92, 231, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

/* Keep page content above the ambient grid; never override fixed FABs/nav. */
main, .footer, .ticker, .hero, .section, .cta-band, .soft-band {
  position: relative;
  z-index: 1;
}
.navbar { z-index: 50; }
.a11y-fab,
.concierge-fab {
  position: fixed;
  z-index: 90;
}
.mobile-tabbar { z-index: 95; }
.mobile-drawer-backdrop { z-index: 140; }
.mobile-drawer { z-index: 150; }
.toast { z-index: 200; }
.scroll-progress { z-index: 210; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  z-index: 210;
  background: var(--gradient);
  background-size: 200% 100%;
  transform-origin: left;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(108, 92, 231, 0.45);
  transition: width 0.08s linear;
}

/* ---------- Navbar polish ---------- */
.navbar {
  transition: background 0.35s var(--ease-smooth), box-shadow 0.35s var(--ease-smooth),
              border-color 0.35s var(--ease-smooth), padding 0.35s var(--ease-smooth);
}
.navbar.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 32px rgba(30, 40, 90, 0.08);
  border-bottom-color: rgba(108, 92, 231, 0.12);
}
.navbar.is-scrolled .nav-inner { padding-top: 10px; padding-bottom: 10px; }

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-smooth);
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active::after { transform: scaleX(1); }

.logo-mark {
  position: relative;
  overflow: hidden;
}
.logo-mark::after {
  content: '';
  position: absolute;
  inset: -40%;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.45) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: logoShine 4.5s ease-in-out infinite;
}
@keyframes logoShine {
  0%, 70% { transform: translateX(-120%) rotate(15deg); }
  85%, 100% { transform: translateX(120%) rotate(15deg); }
}

/* ---------- Hero upgrade ---------- */
.hero {
  padding: 110px 0 90px;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  pointer-events: none;
  opacity: 0.55;
  z-index: 0;
  --mx: 0px;
  --my: 0px;
}
.hero-orb-1 {
  width: 280px; height: 280px;
  top: -40px; right: 8%;
  background: rgba(108, 92, 231, 0.45);
  animation: orbFloat1 9s ease-in-out infinite, orbPulse 5s ease-in-out infinite;
}
.hero-orb-2 {
  width: 220px; height: 220px;
  bottom: 10%; left: 5%;
  background: rgba(0, 194, 184, 0.4);
  animation: orbFloat2 11s ease-in-out infinite, orbPulse 6s ease-in-out infinite 1s;
}
.hero-orb-3 {
  width: 140px; height: 140px;
  top: 40%; left: 42%;
  background: rgba(162, 155, 254, 0.35);
  animation: orbFloat3 7s ease-in-out infinite 0.5s;
}
@keyframes orbFloat1 {
  0%,100% { transform: translate(var(--mx), calc(var(--my) + 0px)); }
  50% { transform: translate(var(--mx), calc(var(--my) - 14px)); }
}
@keyframes orbFloat2 {
  0%,100% { transform: translate(var(--mx), calc(var(--my) + 0px)); }
  50% { transform: translate(var(--mx), calc(var(--my) + 12px)); }
}
@keyframes orbFloat3 {
  0%,100% { transform: translate(var(--mx), calc(var(--my) + 0px)); }
  50% { transform: translate(var(--mx), calc(var(--my) - 10px)); }
}
@keyframes orbPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

.hero-visual {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.92), rgba(238,240,255,0.75)),
    var(--gradient-soft);
  box-shadow:
    0 24px 60px rgba(108, 92, 231, 0.14),
    0 0 0 1px rgba(255,255,255,0.8) inset;
  transition: transform 0.5s var(--ease-smooth), box-shadow 0.5s var(--ease-smooth);
}
.hero-visual:hover {
  transform: translateY(-4px);
  box-shadow:
    0 32px 70px rgba(108, 92, 231, 0.2),
    0 0 0 1px rgba(255,255,255,0.9) inset;
}
.hero-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(108,92,231,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,92,231,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.7;
  pointer-events: none;
  border-radius: inherit;
}

.floating-card {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 12px 36px rgba(30, 40, 90, 0.12);
  z-index: 2;
}
/* Hover lift omitted — continuous floatY animation owns transform. */

.eyebrow {
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

/* ---------- Buttons ---------- */
.btn-primary {
  box-shadow:
    0 10px 28px rgba(108, 92, 231, 0.32),
    0 0 0 0 rgba(108, 92, 231, 0.25);
}
.btn-primary:hover {
  box-shadow:
    0 16px 36px rgba(108, 92, 231, 0.42),
    0 0 0 6px rgba(108, 92, 231, 0.12);
}
.btn-primary.anim-pulse-glow {
  animation: gradientShift 8s ease infinite, pulseGlow 2.8s ease-out infinite;
}

.btn-ghost {
  backdrop-filter: blur(6px);
}

/* ---------- Stats ---------- */
.stats {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9ff 100%);
  box-shadow: var(--shadow);
}
.stats::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient);
  background-size: 200% 100%;
  animation: gradientShift 5s ease infinite;
}
.stat-item {
  position: relative;
  padding: 8px;
  border-radius: 12px;
  transition: background 0.3s, transform 0.3s var(--ease-bounce);
}
.stat-item:hover {
  background: rgba(108, 92, 231, 0.05);
  transform: translateY(-2px);
}
.stat-value.is-counting {
  transition: none;
}

/* ---------- Section headers ---------- */
.section-header h2 {
  position: relative;
  display: inline-block;
}
.section-header .section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
  background: rgba(108, 92, 231, 0.08);
  padding: 6px 12px;
  border-radius: 999px;
}
.section-header .section-kicker .kicker-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}

/* ---------- Feature cards ---------- */
.feature-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfe 100%);
}
.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(108,92,231,0.35), transparent 40%, rgba(0,194,184,0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.feature-card:hover::after { opacity: 1; }
.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(108, 92, 231, 0.12);
}
.feature-icon {
  box-shadow: 0 10px 24px rgba(108, 92, 231, 0.25);
}
a.feature-card { color: inherit; display: block; }

/* ---------- Shop / promo / event cards ---------- */
.shop-card {
  background: linear-gradient(180deg, #fff, #fafbff);
}
.shop-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 50px rgba(30, 40, 90, 0.12);
  border-color: rgba(108, 92, 231, 0.25);
}
.shop-cover {
  overflow: hidden;
}
.shop-card:hover .shop-cover {
  transform: scale(1.06);
}

.promo-card {
  overflow: hidden;
  transition: transform 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth);
}
.promo-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 24px 50px rgba(108, 92, 231, 0.18);
}
.promo-banner {
  background-size: 200% 200% !important;
  animation: gradientShift 7s ease infinite;
  position: relative;
}
.promo-percent {
  text-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.event-card {
  transition: transform 0.35s var(--ease-smooth), box-shadow 0.35s var(--ease-smooth);
  overflow: hidden;
}
.event-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

/* ---------- Reveal stagger ---------- */
.reveal { transition-duration: 0.75s; }
.grid > .reveal:nth-child(1) { transition-delay: 0.02s; }
.grid > .reveal:nth-child(2) { transition-delay: 0.08s; }
.grid > .reveal:nth-child(3) { transition-delay: 0.14s; }
.grid > .reveal:nth-child(4) { transition-delay: 0.2s; }
.grid > .reveal:nth-child(5) { transition-delay: 0.26s; }
.grid > .reveal:nth-child(6) { transition-delay: 0.32s; }
.grid > .reveal:nth-child(7) { transition-delay: 0.38s; }
.grid > .reveal:nth-child(8) { transition-delay: 0.44s; }
/* Use transition only — animation fill-mode would lock transform and kill hover lifts. */

/* ---------- Soft band / CTA ---------- */
.soft-band {
  background: var(--surface-2);
  border-radius: 40px;
  margin: 0 24px;
  position: relative;
  overflow: hidden;
}
.soft-band::before {
  content: '';
  position: absolute;
  top: -80px; right: -60px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(108,92,231,0.15), transparent 70%);
  pointer-events: none;
}
.soft-band::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -40px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(0,194,184,0.14), transparent 70%);
  pointer-events: none;
}

.cta-band {
  position: relative;
  margin: 24px;
  padding: 72px 32px;
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1d2e 0%, #2d1b69 45%, #0d5c5a 100%);
  color: white;
  text-align: center;
  box-shadow: 0 30px 70px rgba(45, 27, 105, 0.35);
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(108,92,231,0.45), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(0,194,184,0.35), transparent 40%);
  animation: ctaGlow 8s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes ctaGlow {
  from { opacity: 0.7; transform: scale(1); }
  to { opacity: 1; transform: scale(1.05); }
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 12px;
  color: white;
}
.cta-band p {
  color: rgba(255,255,255,0.78);
  font-size: 17px;
  max-width: 520px;
  margin: 0 auto 28px;
}
.cta-band .hero-actions { justify-content: center; }
.cta-band .btn-ghost {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.25);
  color: white;
}
.cta-band .btn-ghost:hover {
  background: rgba(255,255,255,0.18);
  border-color: white;
  color: white;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  margin-top: 40px;
  padding-bottom: 88px;
  background:
    linear-gradient(180deg, transparent, rgba(108,92,231,0.03)),
    var(--bg);
}
.footer ul a {
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
}
.footer ul a:hover {
  transform: translateX(3px);
}

/* ---------- Concierge / a11y FABs ---------- */
.a11y-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 90;
  transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s;
}
.a11y-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 28px rgba(108, 92, 231, 0.4);
}
.concierge-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  left: auto;
  z-index: 90;
  box-shadow:
    0 12px 40px rgba(108, 92, 231, 0.45),
    0 0 0 0 rgba(108, 92, 231, 0.3);
  /* opacity-only entrance — never lock transform (breaks hover lift) */
  animation: gradientShift 6s ease infinite, fabEntrance 0.7s var(--ease-bounce) 0.4s both;
}
@keyframes fabEntrance {
  from { opacity: 0; }
  to { opacity: 1; }
}
.concierge-fab:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow:
    0 16px 48px rgba(108, 92, 231, 0.55),
    0 0 0 8px rgba(108, 92, 231, 0.12);
}

/* ---------- Toast ---------- */
.toast {
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 16px 40px rgba(30, 40, 90, 0.25);
}

/* ---------- Ticker ---------- */
.ticker {
  position: relative;
  background-size: 200% 200%;
  animation: gradientShift 10s ease infinite;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.2);
}
.ticker-item::before {
  content: '✦';
  margin-right: 8px;
  opacity: 0.7;
}

/* ---------- Mobile tab active bounce ---------- */
.mobile-tabbar a.active .mt-ico {
  animation: bounce 1.8s ease-in-out infinite;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-orb,
  .logo-mark::after,
  .cta-band::before,
  .promo-banner,
  .btn-primary.anim-pulse-glow,
  .mobile-tabbar a.active .mt-ico {
    animation: none !important;
  }
  .reveal.is-visible { animation: none; }
  html { scroll-behavior: auto; }
  body { background-attachment: scroll; }
  .concierge-fab { animation: none !important; opacity: 1 !important; }
}

@media (max-width: 900px) {
  .hero-orb-3 { display: none; }
  .cta-band { margin: 16px; padding: 48px 20px; border-radius: 24px; }
  .soft-band { margin: 0 12px; border-radius: 28px; }
}

body.large-type { font-size: 18px; }
body.rtl { direction: rtl; }
body.family-mode .hero .eyebrow { border-color: var(--accent); }

.crowd-banners { position: relative; z-index: 40; }
.crowd-banner {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  color: #1a1d2e;
  background: #fff8e6;
  border-bottom: 1px solid rgba(255, 159, 67, 0.35);
}
.crowd-banner-critical {
  background: #ffe8e8;
  border-bottom-color: rgba(255, 107, 107, 0.4);
  color: #b42318;
}

.pwa-install {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(26, 29, 46, 0.94);
  color: white;
  box-shadow: 0 16px 40px rgba(30, 40, 90, 0.35);
}
.pwa-install .btn-ghost { color: white; border-color: rgba(255,255,255,0.25); }
@media (min-width: 901px) {
  .pwa-install { left: auto; right: 24px; bottom: 24px; max-width: 420px; }
}
