/* ============================================================================
   aco-v2.css — BOLD premium UI layer for the customer-facing ACO experience.
   v2 rewrite: much more visible animations + interactive effects.

   ZERO-RISK KILL SWITCH (unchanged)
   ---------------------------------
   All rules scoped under body.v2 — no class = no effect.
   URL toggle: ?v2=1 to enable, ?v2=0 to disable. Persisted in localStorage.
   Soft kill: delete the <link> in aco.html → instant revert for everyone.
   Hard revert: `git checkout pre-aco-bold -- public/aco.html public/css`
============================================================================ */

/* ─── Typography polish ─────────────────────────────────────────────────── */
body.v2 {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1, 'liga' 1, 'cv11' 1, 'ss01' 1;
  letter-spacing: -0.012em;
  scroll-behavior: smooth;
}

/* ─── BACKGROUND: 4 drifting orbs + twinkling dot field + sweep ──────────── */
body.v2 .bg-glow,
body.v2 .bg-glow-2 { display: none; }

/* Orb 1 — top-left purple */
body.v2::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle 600px at 10% 8%,  rgba(168, 85,247,0.32) 0%, transparent 50%),
    radial-gradient(circle 500px at 85% 15%, rgba(236, 72,153,0.25) 0%, transparent 50%),
    radial-gradient(circle 700px at 50% 95%, rgba(139, 92,246,0.20) 0%, transparent 50%),
    radial-gradient(circle 400px at 90% 80%, rgba( 34,211,238,0.10) 0%, transparent 50%);
  filter: blur(40px) saturate(1.1);
  animation: v2-orbit 22s ease-in-out infinite alternate;
  will-change: transform, filter;
}
@keyframes v2-orbit {
  0%   { transform: translate3d(  0px,   0px, 0) scale(1.00) rotate(0deg);   filter: blur(40px) hue-rotate(0deg)   saturate(1.1); }
  20%  { transform: translate3d(-40px,  50px, 0) scale(1.08) rotate(-2deg);  filter: blur(40px) hue-rotate(15deg)  saturate(1.2); }
  40%  { transform: translate3d( 50px,  30px, 0) scale(1.05) rotate(2deg);   filter: blur(40px) hue-rotate(-8deg)  saturate(1.0); }
  60%  { transform: translate3d( 30px, -40px, 0) scale(0.96) rotate(1deg);   filter: blur(40px) hue-rotate(20deg)  saturate(1.3); }
  80%  { transform: translate3d(-30px, -20px, 0) scale(1.04) rotate(-1deg);  filter: blur(40px) hue-rotate(-12deg) saturate(1.1); }
  100% { transform: translate3d(  0px,   0px, 0) scale(1.02) rotate(0deg);   filter: blur(40px) hue-rotate(0deg)   saturate(1.1); }
}

/* Twinkling star field — many small dots, sparse + slow pulse */
body.v2::after {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at  17%  22%, rgba(255,255,255,0.50), transparent),
    radial-gradient(1px 1px at  43%  78%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at  68%  31%, rgba(216,180,254,0.55), transparent),
    radial-gradient(1px 1px at  82%  64%, rgba(255,255,255,0.30), transparent),
    radial-gradient(1px 1px at  11%  88%, rgba(255,255,255,0.40), transparent),
    radial-gradient(1px 1px at  56%  12%, rgba(249,168,212,0.45), transparent),
    radial-gradient(1px 1px at  91%  44%, rgba(255,255,255,0.32), transparent),
    radial-gradient(1px 1px at  29%  56%, rgba(255,255,255,0.42), transparent),
    radial-gradient(1px 1px at  74%   8%, rgba(216,180,254,0.40), transparent),
    radial-gradient(1px 1px at  38%  92%, rgba(255,255,255,0.35), transparent),
    radial-gradient(2px 2px at  62%  72%, rgba(168, 85,247,0.55), transparent),
    radial-gradient(2px 2px at  23%  44%, rgba(236, 72,153,0.45), transparent);
  background-size: 800px 800px;
  background-repeat: repeat;
  animation: v2-twinkle 6s ease-in-out infinite;
  opacity: 0.85;
}
@keyframes v2-twinkle {
  0%, 100% { opacity: 0.55; transform: translateY(0); }
  50%      { opacity: 0.90; transform: translateY(-2px); }
}

/* Scroll progress bar — top of viewport, gradient fill */
body.v2 .v2-scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, #8b5cf6, #a855f7, #ec4899, #f9a8d4);
  background-size: 300% 100%;
  animation: v2-shine 4s linear infinite;
  z-index: 100;
  box-shadow: 0 0 14px rgba(168,85,247,0.6);
  transition: width 0.05s ease-out;
  pointer-events: none;
}
@keyframes v2-shine {
  0%   { background-position:   0% 50%; }
  100% { background-position: 300% 50%; }
}

/* ─── HERO ──────────────────────────────────────────────────────────────── */
body.v2 .hero-badge::before {
  /* Bigger, more vibrant pulse */
  animation: v2-badge-pulse 1.8s infinite;
  box-shadow: 0 0 12px rgba(34,197,94,0.7);
}
@keyframes v2-badge-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 12px rgba(34,197,94,0.7); }
  50%      { opacity: 0.55; box-shadow: 0 0 24px rgba(34,197,94,1.0); }
}

body.v2 .hero-title {
  background: linear-gradient(120deg, #fff 0%, #d8b4fe 30%, #f9a8d4 55%, #fff 85%, #d8b4fe 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
          background-clip: text;
  animation: v2-shine 8s linear infinite, v2-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
  text-shadow: 0 4px 48px rgba(168,85,247,0.25);
}
@keyframes v2-rise {
  from { opacity: 0; transform: translateY(20px); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

body.v2 .hero-sub { animation: v2-rise 0.9s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both; }
body.v2 .hero-badge { animation: v2-rise 0.9s 0.05s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* Hero CTA — clean and confident, no glow */
body.v2 .hero-cta {
  background: #a855f7;
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 1px 2px rgba(0,0,0,0.3);
  transition: background 0.15s ease, transform 0.15s ease;
}
body.v2 .hero-cta:hover {
  background: #b06bf9;
  transform: translateY(-1px);
}
body.v2 .hero-cta:active { transform: translateY(0); }
@keyframes v2-spin { to { transform: rotate(360deg); } }

/* ─── STATS STRIP ───────────────────────────────────────────────────────── */
body.v2 .stats-strip {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(168,85,247,0.12);
  box-shadow:
    0 12px 40px -16px rgba(168,85,247,0.25),
    inset 0 0 0 1px rgba(168,85,247,0.05);
  animation: v2-rise 0.9s 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
  backdrop-filter: blur(20px);
}
body.v2 .stat-value {
  background: linear-gradient(135deg, #fff 0%, #e9d5ff 50%, #fbcfe8 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
          background-clip: text;
  animation: v2-shine 5s linear infinite;
  text-shadow: 0 0 36px rgba(168,85,247,0.30);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
body.v2 .stat-item:hover .stat-value {
  transform: scale(1.06);
}
body.v2 .stat-item:not(:last-child)::after {
  background: linear-gradient(180deg, transparent, rgba(168,85,247,0.32), transparent);
}

/* ─── LIVE WINS TICKER (auto-scrolling marquee) ─────────────────────────── */
body.v2 .win-card {
  position: relative;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
  transition: background 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
}
body.v2 .win-card::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: 12px;
  padding: 1px;
  background: conic-gradient(from var(--angle, 0deg),
    rgba(168, 85,247,0.7),
    rgba(236, 72,153,0.4),
    rgba(168, 85,247,0.7));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: v2-rotate-angle 4s linear infinite;
  pointer-events: none;
}
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes v2-rotate-angle {
  to { --angle: 360deg; }
}
body.v2 .win-card:hover {
  background: rgba(255,255,255,0.06);
  transform: translateY(-3px) scale(1.02);
}
body.v2 .win-card:hover::before { opacity: 1; }
body.v2 .win-dot {
  box-shadow: 0 0 8px rgba(34,197,94,0.7), 0 0 18px rgba(34,197,94,0.4);
  animation: v2-pulse-dot 1.5s ease-in-out infinite;
}
@keyframes v2-pulse-dot {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(34,197,94,0.7), 0 0 18px rgba(34,197,94,0.4); }
  50%      { transform: scale(1.4); box-shadow: 0 0 12px rgba(34,197,94,1), 0 0 30px rgba(34,197,94,0.6); }
}

/* ─── ORDER CARDS — 3D tilt-ready surface + glow border + image breathe ─── */
body.v2 .order-card {
  position: relative;
  background: linear-gradient(180deg, #0f0f17 0%, #0a0a12 100%);
  border: 1px solid rgba(255,255,255,0.08);
  transform-style: preserve-3d;
  transition: border-color 0.3s ease, box-shadow 0.4s ease;
  will-change: transform;
}
body.v2 .order-card::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: 16px;
  padding: 1px;
  background: conic-gradient(from var(--angle, 0deg),
    rgba(168, 85,247,0.55),
    rgba(236, 72,153,0.30),
    rgba(168, 85,247,0.55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  animation: v2-rotate-angle 6s linear infinite;
  pointer-events: none;
  z-index: 0;
}
body.v2 .order-card:hover {
  border-color: rgba(168,85,247,0.18);
  box-shadow:
    0 24px 56px -20px rgba(0,0,0,0.6),
    0 12px 32px -12px rgba(168,85,247,0.25);
}
body.v2 .order-card:hover::before { opacity: 1; }

/* Product image — gentle floating idle + zoom on card hover */
body.v2 .order-img,
body.v2 .order-img-ph img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  animation: v2-float 6s ease-in-out infinite;
}
body.v2 .order-card:hover .order-img,
body.v2 .order-card:hover .order-img-ph img {
  transform: scale(1.08);
  animation-play-state: paused;
}
@keyframes v2-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
body.v2 .order-card.cancelled {
  border-color: rgba(239,68,68,0.18);
  filter: saturate(0.6);
}

/* Stagger entrance — added by JS as .v2-revealed once in viewport */
body.v2 .order-card,
body.v2 .card {
  opacity: 1; /* default visible */
}
body.v2 .v2-reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
body.v2 .v2-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ─── Reveal buttons — purple highlight when revealed ───────────────────── */
body.v2 .order-reveal-btn.revealed {
  background: linear-gradient(135deg, rgba(168,85,247,0.20), rgba(236,72,153,0.10));
  border-color: rgba(168,85,247,0.40);
  color: #e9d5ff;
}
body.v2 .order-reveal-btn:hover {
  background: rgba(168,85,247,0.10);
  border-color: rgba(168,85,247,0.30);
}

/* ─── DROP ZONE — rotating gradient border when idle ────────────────────── */
body.v2 .drop-zone {
  position: relative;
  background: linear-gradient(180deg, rgba(168,85,247,0.07) 0%, rgba(236,72,153,0.03) 100%);
  border-color: rgba(168,85,247,0.30);
  overflow: hidden;
}
body.v2 .drop-zone::after {
  content: '';
  position: absolute; inset: 0;
  background: conic-gradient(from var(--angle, 0deg),
    transparent 0%,
    rgba(168, 85,247,0.20) 20%,
    rgba(236, 72,153,0.10) 50%,
    rgba(168, 85,247,0.20) 80%,
    transparent 100%);
  animation: v2-rotate-angle 8s linear infinite;
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}
body.v2 .drop-zone > * { position: relative; z-index: 1; }
body.v2 .drop-zone:hover {
  border-color: rgba(168,85,247,0.65);
  box-shadow:
    0 0 0 4px rgba(168,85,247,0.10),
    0 18px 40px rgba(168,85,247,0.18);
}
body.v2 .drop-zone:hover::after { opacity: 1; }

/* ─── MODALS — premium spring-in + heavier glass ───────────────────────── */
body.v2 .modal-overlay {
  background: rgba(0,0,0,0.70);
  backdrop-filter: blur(18px);
  animation: v2-fadein 0.3s ease-out;
}
body.v2 .modal-box {
  background: linear-gradient(180deg, #15151f 0%, #0f0f18 100%);
  border: 1px solid rgba(168,85,247,0.18);
  box-shadow:
    0 40px 100px -32px rgba(0,0,0,0.8),
    inset 0 0 0 1px rgba(168,85,247,0.08),
    inset 0 1px 0 rgba(255,255,255,0.06);
  animation: v2-spring-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes v2-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes v2-spring-in {
  from { opacity: 0; transform: translateY(20px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Win Card share modal — full premium treatment ─────────────────────── */
body.v2 .wc-shell {
  background: linear-gradient(180deg, #0e0b18 0%, #0a0813 100%);
  border: 1px solid rgba(168,85,247,0.32);
  box-shadow:
    0 48px 120px -32px rgba(168,85,247,0.45),
    inset 0 0 0 1px rgba(168,85,247,0.12);
  animation: v2-spring-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
/* DO NOT animate .share-card itself — html2canvas captures static styles */

/* ─── BUTTONS — lift + halo + magnetic-ready ────────────────────────────── */
body.v2 .btn,
body.v2 .land-btn {
  position: relative;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s ease,
              background 0.25s ease,
              border-color 0.25s ease;
  will-change: transform;
}
body.v2 .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -12px rgba(168,85,247,0.5);
}
body.v2 .land-btn:hover {
  border-color: rgba(168,85,247,0.5);
  background: rgba(168,85,247,0.08);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -10px rgba(168,85,247,0.3);
}

/* ─── Inputs — purple focus ring ────────────────────────────────────────── */
body.v2 input:focus,
body.v2 select:focus,
body.v2 textarea:focus {
  outline: none;
  border-color: rgba(168,85,247,0.65) !important;
  box-shadow: 0 0 0 4px rgba(168,85,247,0.18);
}

/* ─── Status badges — glass + glow ──────────────────────────────────────── */
body.v2 .status-badge,
body.v2 .badge-open,
body.v2 .badge-closed,
body.v2 .badge-count {
  backdrop-filter: blur(8px);
  border: 1px solid currentColor;
}
body.v2 .badge-open {
  animation: v2-badge-glow 2.5s ease-in-out infinite;
}
@keyframes v2-badge-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(34,197,94,0); }
  50%      { box-shadow: 0 0 16px rgba(34,197,94,0.5); }
}

/* ─── Custom scrollbar ──────────────────────────────────────────────────── */
body.v2 ::-webkit-scrollbar { width: 10px; height: 10px; }
body.v2 ::-webkit-scrollbar-track { background: transparent; }
body.v2 ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(168,85,247,0.4), rgba(236,72,153,0.3));
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
body.v2 ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(168,85,247,0.6), rgba(236,72,153,0.5));
  background-clip: padding-box;
}

/* ─── Selection ─────────────────────────────────────────────────────────── */
body.v2 ::selection {
  background: rgba(168,85,247,0.40);
  color: #fff;
}

/* ─── Reduced motion ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body.v2 *,
  body.v2 *::before,
  body.v2 *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
