/* ==========================================================
   TRU PREMIUM — depth + glass + motion layer for the vanilla apps
   (TruLive, TruTrade). Ports the TruLens "lit top hairline + soft
   shadow" depth vocabulary, glass surfaces, cursor-tracking card
   glow, and subtle motion. Loads AFTER the app's own <style>, so
   these rules enhance existing selectors without markup changes.
   Shared file — keep byte-identical across the sister apps.
   ========================================================== */

:root {
  --accent-rgb: 34, 211, 238;
  --shadow-card:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 14px 32px -18px rgba(0,0,0,0.72);
  --shadow-lift:
    0 1px 0 rgba(255,255,255,0.10) inset,
    0 22px 44px -20px rgba(0,0,0,0.8),
    0 0 40px -18px rgba(var(--accent-rgb), 0.5);
}

/* ---------- Glass surfaces ---------- */
.veh-card, .ai-box, .link-box, .prompt-ov, .tp-box {
  background:
    linear-gradient(160deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 46%),
    var(--panel);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  box-shadow: var(--shadow-card);
}

/* ---------- Chrome bars: appbar / bottomnav depth ---------- */
.topbar {
  background:
    linear-gradient(180deg, rgba(232,234,230,0.06) 0%, rgba(232,234,230,0.02) 55%, rgba(232,234,230,0) 100%),
    var(--bg);
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.16);
  box-shadow:
    inset 0 1px 0 rgba(232,234,230,0.13),
    0 1px 0 rgba(0,0,0,0.55),
    0 14px 30px -20px rgba(0,0,0,0.95);
}
.controls, .buyer-bar, .tabs {
  background:
    linear-gradient(0deg, rgba(232,234,230,0.05) 0%, rgba(232,234,230,0.018) 60%, rgba(232,234,230,0) 100%),
    var(--panel);
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  border-top: 1px solid rgba(var(--accent-rgb), 0.13);
  box-shadow:
    inset 0 1px 0 rgba(232,234,230,0.10),
    0 -14px 30px -20px rgba(0,0,0,0.95);
}

/* ---------- Cursor-tracking glow + lift on interactive cards ---------- */
.card-btn, .stat, .share-btn {
  --mx: 50%; --my: 40%;
  transition:
    transform 220ms cubic-bezier(.22,1,.36,1),
    box-shadow 220ms ease,
    border-color 180ms ease !important;
}
.card-btn::after, .stat::after, .share-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(240px circle at var(--mx) var(--my), rgba(var(--accent-rgb), 0.13), transparent 60%);
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
  z-index: 0;
}
.card-btn:hover::after, .stat:hover::after, .share-btn:hover::after { opacity: 1; }
.card-btn > *, .share-btn > * { position: relative; z-index: 1; }
@media (hover: hover) {
  .card-btn:hover, .share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift) !important;
    border-color: rgba(var(--accent-rgb), 0.5) !important;
  }
  .stat:hover { transform: translateY(-2px); border-color: rgba(var(--accent-rgb), 0.35); }
}

/* ---------- Progress rail sheen ---------- */
.rail { position: relative; overflow: hidden; }
.rail::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transform: translateX(-120%);
  animation: tru-sheen 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes tru-sheen {
  0% { transform: translateX(-120%); }
  60%, 100% { transform: translateX(120%); }
}

/* ---------- Subtle hero float (landing / join only) ---------- */
@media (hover: hover) {
  .landing .brand, .join .brand { animation: tru-float 5.5s ease-in-out infinite; }
}
@keyframes tru-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ---------- Accent focus ring for accessibility ---------- */
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.7);
  outline-offset: 2px;
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .rail::after, .landing .brand, .join .brand { animation: none; }
  .card-btn, .stat, .share-btn { transition: none !important; }
}
