/* ============================================================
   WOW ECOSYSTEM — SHARED PREMIUM EFFECTS
   Grain · Reveals · Marquee · Magnetic · Enhanced cards
   No framework. Pure CSS. Zero runtime cost.
   ============================================================ */

/* ── GRAIN TEXTURE OVERLAY ───────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: var(--grain-opacity, 0.028);
  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: 160px 160px;
}

/* ── SCROLL REVEAL SYSTEM ────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity  0.65s cubic-bezier(.16,1,.3,1),
    transform 0.65s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
[data-reveal="left"]  { transform: translateX(-24px) translateY(0); }
[data-reveal="right"] { transform: translateX(24px) translateY(0); }
[data-reveal="scale"] { transform: scale(0.92); }

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
[data-reveal-delay="1"] { transition-delay: 80ms; }
[data-reveal-delay="2"] { transition-delay: 160ms; }
[data-reveal-delay="3"] { transition-delay: 240ms; }
[data-reveal-delay="4"] { transition-delay: 320ms; }
[data-reveal-delay="5"] { transition-delay: 400ms; }

/* ── MARQUEE ─────────────────────────────────────────────── */
.wow-marquee {
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image:         linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.wow-marquee-inner {
  display: inline-flex;
  gap: 0;
  animation: wowMarquee 28s linear infinite;
  width: max-content;
}
.wow-marquee-inner:hover { animation-play-state: paused; }
.wow-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
.wow-marquee-item::after {
  content: '·';
  opacity: 0.35;
}
@keyframes wowMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.wow-marquee.reverse .wow-marquee-inner {
  animation-direction: reverse;
}

/* ── MAGNETIC BUTTON BASE ────────────────────────────────── */
.magnetic-btn {
  position: relative;
  transition: transform 0.3s cubic-bezier(.16,1,.3,1) !important;
  will-change: transform;
}

/* ── CARD TILT SYSTEM ────────────────────────────────────── */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(.16,1,.3,1), box-shadow 0.4s ease;
  will-change: transform;
}
.tilt-card .tilt-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--tilt-x, 50%) var(--tilt-y, 50%),
    rgba(255,255,255,0.08) 0%,
    transparent 65%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
}
.tilt-card:hover .tilt-shine { opacity: 1; }

/* ── PREMIUM SECTION HEADS ───────────────────────────────── */
.sec-title.serif {
  font-family: var(--niche-font, Georgia, serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.01em;
}

/* ── LIVE COUNTER PULSE ──────────────────────────────────── */
.home-counter-chip {
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1);
}
.home-counter-chip.bump {
  animation: counterBump 0.35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes counterBump {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ── HERO NICHE BADGE ────────────────────────────────────── */
.niche-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.8;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
.niche-hero-badge::before {
  content: '';
  display: block;
  width: 18px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

/* ── TRUST STRIP ─────────────────────────────────────────── */
.trust-strip {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 16px;
  margin: 0 -16px;
  -webkit-overflow-scrolling: touch;
}
.trust-strip::-webkit-scrollbar { display: none; }
.trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: var(--r);
  background: var(--bg2);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  transition: border-color var(--t-fast), background var(--t-fast);
  margin-right: 8px;
}
.trust-item:last-child { margin-right: 0; }
.trust-icon { font-size: 16px; line-height: 1; flex-shrink: 0; }

/* ── PREMIUM HERO ENHANCEMENT ────────────────────────────── */
.home-hero {
  min-height: 140px;
}

/* Ambient particle dots (CSS only) */
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.hero-particle {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  animation: particleFloat var(--dur, 8s) ease-in-out infinite var(--delay, 0s);
}
@keyframes particleFloat {
  0%   { opacity: 0; transform: translateY(0) scale(0); }
  20%  { opacity: var(--op, 0.35); transform: translateY(-20px) scale(1); }
  80%  { opacity: var(--op, 0.35); transform: translateY(-80px) scale(0.8); }
  100% { opacity: 0; transform: translateY(-110px) scale(0); }
}

/* ── BRAND LOGO STRIP ────────────────────────────────────── */
.brands-strip-section {
  padding: 0 0 4px;
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
  margin-bottom: 8px;
}

/* ── SECTION DIVIDER ─────────────────────────────────────── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-hover) 30%, var(--border-hover) 70%, transparent);
  margin: 4px 16px;
}

/* ── COD TRUST BADGE ─────────────────────────────────────── */
.cod-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--r-full);
  background: rgba(0,168,107,0.10);
  border: 1px solid rgba(0,168,107,0.22);
  font-size: 12px;
  font-weight: 700;
  color: #00a86b;
  margin-top: 14px;
  position: relative;
  z-index: 1;
}
.cod-hero-badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #00a86b;
  animation: blink 1.6s ease infinite;
  flex-shrink: 0;
}

/* ── SKELETON UPGRADE ────────────────────────────────────── */
.card-skeleton {
  background: var(--bg3);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}
.card-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 25%, var(--bg4) 50%, transparent 75%);
  background-size: 200% 100%;
  animation: skelShimmer 1.5s ease infinite;
}

/* ── RESPONSIVE GRAIN SCALE ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .wow-marquee-inner { animation: none !important; }
  body::after { display: none; }
}

/* ── REFERRAL SHEET ──────────────────────────────────────── */
.ref-sheet-body {
  padding: 0 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Telegram input row */
.ref-tg-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.ref-tg-inp {
  flex: 1;
  background: var(--bg3, #ebebed);
  border: 1px solid rgba(0,0,0,.09);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 14px;
  color: var(--text, #111);
  outline: none;
  transition: border-color .15s;
}
.ref-tg-inp:focus { border-color: rgba(var(--accent-rgb, 255,62,62), .5); }
.ref-tg-inp::placeholder { color: var(--text-muted, #999); }
.ref-tg-save {
  flex-shrink: 0;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(var(--accent-rgb, 255,62,62), .12);
  border: 1px solid rgba(var(--accent-rgb, 255,62,62), .28);
  color: var(--text, #111);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.ref-tg-save:active { background: rgba(var(--accent-rgb, 255,62,62), .22); }
.ref-tg-hint {
  font-size: 11px;
  color: var(--text-muted, #999);
  margin: -8px 0 0;
  line-height: 1.4;
}

/* Link row */
.ref-link-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.ref-link-input {
  flex: 1;
  background: var(--bg3, #ebebed);
  border: 1px solid rgba(0,0,0,.09);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-muted, #666);
  font-family: monospace;
  outline: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.ref-link-input:focus { border-color: rgba(var(--accent-rgb, 255,62,62), .5); }
.ref-copy-btn {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 10px;
  background: rgba(var(--accent-rgb, 255,62,62), .10);
  border: 1px solid rgba(var(--accent-rgb, 255,62,62), .25);
  color: var(--text, #111);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.ref-copy-btn:active { transform: scale(.92); }
.ref-copy-btn.copied {
  background: rgba(24,199,90,.18);
  border-color: rgba(24,199,90,.4);
  font-size: 15px; font-weight: 800; color: #18c75a;
}

/* Sheet description */
.ref-sheet-desc {
  font-size: 12px;
  color: var(--text-muted, #999);
  line-height: 1.5;
  margin: -8px 0 0;
}

/* Bio section */
.ref-bio-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted, #aaa);
  margin-bottom: 6px;
}

/* Social share buttons */
.ref-socials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ref-soc-btn {
  padding: 11px 10px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: opacity .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  border: none;
  color: #fff;
}
.ref-soc-btn:active { opacity: .85; transform: scale(.97); }
.ref-soc-tg  { background: #229ED9; }
.ref-soc-fb  { background: #1877F2; }
.ref-soc-wa  { background: #25D366; }
.ref-soc-more {
  background: var(--bg3, #ebebed);
  color: var(--text, #111);
  border: 1px solid rgba(0,0,0,.08) !important;
}

/* Big share button */
.ref-share-btn {
  width: 100%;
  padding: 14px;
  border-radius: 13px;
  background: rgba(var(--accent-rgb, 255,62,62), 1);
  border: none;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.ref-share-btn:active { opacity: .88; transform: scale(.99); }

.hidden { display: none !important; }
