/* ============================================================
   SportsCard ZA — "The Vault" design system
   Dark premium look with holographic (refractor) accents.
   ============================================================ */

:root {
  --bg: #07100c;
  --holo: linear-gradient(110deg, #34d399, #22d3ee, #a78bfa, #f472b6, #fbbf24, #34d399);
  --gold: linear-gradient(120deg, #f59e0b, #fde047 50%, #fbbf24);
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: #e7e5e4;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

/* Ambient glow layers behind everything */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(16, 185, 129, 0.14), transparent 60%),
    radial-gradient(800px 460px at 95% 12%, rgba(251, 191, 36, 0.08), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(34, 211, 238, 0.07), transparent 60%);
  pointer-events: none;
}

.font-display { font-family: 'Space Grotesk', 'Inter', sans-serif; letter-spacing: -0.02em; }

::selection { background: rgba(52, 211, 153, 0.35); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0a1410; }
::-webkit-scrollbar-thumb { background: #1c2b24; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #2a4036; }

/* ------------------------------------------------------------
   Holographic text + borders
   ------------------------------------------------------------ */
.holo-text {
  background: var(--holo);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: holo-shift 9s linear infinite;
}

@keyframes holo-shift {
  to { background-position: 300% 0; }
}

/* Gradient border wrapper: <div class="holo-border"><div class="holo-inner">…</div></div> */
.holo-border {
  position: relative;
  border-radius: 1.5rem;
  padding: 1.5px;
  background: var(--holo);
  background-size: 300% 100%;
  animation: holo-shift 9s linear infinite;
}
.holo-inner {
  border-radius: calc(1.5rem - 1.5px);
  background: #0b1712;
  height: 100%;
}

/* ------------------------------------------------------------
   Nav
   ------------------------------------------------------------ */
.cv-nav {
  background: rgba(7, 16, 12, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-link {
  padding: 0.45rem 0.7rem;
  border-radius: 0.6rem;
  color: #d6d3d1;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.nav-link.is-active { color: #fcd34d; }

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn-gold, .btn-emerald, .btn-ghost {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  border-radius: 0.8rem;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s;
  cursor: pointer;
}
.btn-gold { background: var(--gold); color: #052e16; }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 32px -8px rgba(251, 191, 36, 0.55); }
.btn-gold:active { transform: translateY(0); }
.btn-gold:disabled { opacity: 0.55; transform: none; box-shadow: none; cursor: wait; }

.btn-emerald { background: #047857; color: #fff; }
.btn-emerald:hover { background: #059669; transform: translateY(-2px); box-shadow: 0 10px 32px -10px rgba(16, 185, 129, 0.5); }
.btn-emerald:active { transform: translateY(0); }
.btn-emerald:disabled { opacity: 0.55; transform: none; box-shadow: none; cursor: wait; }

.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.16); color: #e7e5e4; font-weight: 600; }
.btn-ghost:hover { border-color: rgba(52, 211, 153, 0.5); background: rgba(52, 211, 153, 0.08); transform: translateY(-2px); }

/* Shine sweep across gold buttons */
.btn-gold::after {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
.btn-gold:hover::after { left: 130%; }

/* ------------------------------------------------------------
   Glass panels + form fields
   ------------------------------------------------------------ */
.glass {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.glass-hover { transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s, box-shadow 0.25s; }
.glass-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.35);
  box-shadow: 0 18px 48px -18px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(52, 211, 153, 0.12);
}

.field {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.7rem;
  padding: 0.65rem 0.9rem;
  color: #f5f5f4;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field::placeholder { color: #57534e; }
.field:focus {
  border-color: rgba(52, 211, 153, 0.6);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15);
  background: rgba(255, 255, 255, 0.07);
}
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #a8a29e 50%), linear-gradient(135deg, #a8a29e 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
select.field option { background: #0b1712; color: #f5f5f4; }

.checkbox {
  accent-color: #10b981;
  width: 1rem; height: 1rem;
}

.label { display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #78716c; margin-bottom: 0.35rem; }

/* ------------------------------------------------------------
   Card tiles — 3D tilt + holographic shine (JS sets --mx/--my/--rx/--ry)
   ------------------------------------------------------------ */
.tilt-wrap { perspective: 900px; }
.tilt {
  position: relative;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.18s ease-out, box-shadow 0.25s;
  will-change: transform;
}
.tilt::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
      rgba(255, 255, 255, 0.14), transparent 45%),
    radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%),
      rgba(52, 211, 153, 0.1), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 2;
}
.tilt:hover::after { opacity: 1; }
.tilt:hover { box-shadow: 0 24px 60px -22px rgba(0, 0, 0, 0.85), 0 0 36px -14px rgba(52, 211, 153, 0.35); }

/* Foil sweep across tile images on hover */
.foil { position: relative; overflow: hidden; }
.foil::before {
  content: '';
  position: absolute;
  top: -60%; left: -80%;
  width: 60%; height: 220%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.18) 45%, rgba(167, 139, 250, 0.18) 55%, transparent);
  transform: rotate(18deg);
  transition: left 0.7s ease;
  pointer-events: none;
  z-index: 1;
}
.foil:hover::before { left: 150%; }

/* Badges */
.chip {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  border: 1px solid;
}
.chip-gold { color: #fcd34d; border-color: rgba(252, 211, 77, 0.4); background: rgba(252, 211, 77, 0.08); }
.chip-purple { color: #c4b5fd; border-color: rgba(196, 181, 253, 0.4); background: rgba(196, 181, 253, 0.08); }
.chip-sky { color: #7dd3fc; border-color: rgba(125, 211, 252, 0.4); background: rgba(125, 211, 252, 0.08); }
.chip-emerald { color: #6ee7b7; border-color: rgba(110, 231, 183, 0.4); background: rgba(110, 231, 183, 0.08); }
.chip-stone { color: #d6d3d1; border-color: rgba(214, 211, 209, 0.25); background: rgba(214, 211, 209, 0.06); }

/* ------------------------------------------------------------
   Hero floating cards (pure CSS card mockups)
   ------------------------------------------------------------ */
.hero-card {
  position: absolute;
  width: 178px;
  height: 250px;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.85);
  animation: floaty 7s ease-in-out infinite;
}
.hero-card .hc-emblem { font-size: 52px; line-height: 1; filter: drop-shadow(0 6px 12px rgba(0,0,0,.5)); }
.hero-card .hc-name { font-weight: 800; font-size: 13px; letter-spacing: 0.02em; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.6); }
.hero-card .hc-meta { font-size: 10px; color: rgba(255, 255, 255, 0.75); }
.hero-card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.22) 45%, transparent 60%);
  background-size: 250% 100%;
  animation: holo-shift 6s linear infinite;
  pointer-events: none;
}

/* rotate (not transform) so the JS tilt transform composes with it */
.hc-1 { background: linear-gradient(160deg, #065f46, #0d9488 60%, #134e4a); rotate: -9deg; top: 6%; left: 2%; z-index: 3; }
.hc-2 { background: linear-gradient(160deg, #7c2d12, #dc2626 55%, #450a0a); rotate: 7deg; top: 0; right: 4%; animation-delay: -2.5s; z-index: 2; }
.hc-3 { background: linear-gradient(160deg, #1e3a8a, #2563eb 55%, #172554); rotate: -2deg; bottom: -4%; left: 30%; animation-delay: -4.5s; z-index: 4; }

@keyframes floaty {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -16px; }
}

/* ------------------------------------------------------------
   Ticker marquee
   ------------------------------------------------------------ */
.ticker {
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  user-select: none;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 30s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.7rem 1.5rem 0.7rem 0;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #57534e;
  white-space: nowrap;
}
.ticker-item .tick-star { color: #10b981; }
@keyframes ticker-scroll { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------
   Scroll reveal (JS toggles .is-visible)
   ------------------------------------------------------------ */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0s);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  /* iteration-count 1 is essential: a 0.01ms INFINITE animation re-loops
     every frame and looks like violent jitter instead of stillness */
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------
   Misc
   ------------------------------------------------------------ */
.divider-glow {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(52, 211, 153, 0.5), transparent);
}

.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.16);
  border-radius: 1rem;
  transition: border-color 0.25s, background 0.25s, transform 0.2s;
  cursor: pointer;
}
.dropzone:hover, .dropzone.is-drag {
  border-color: rgba(52, 211, 153, 0.65);
  background: rgba(52, 211, 153, 0.06);
}

.modal-panel { animation: modal-pop 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes modal-pop {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------
   Notification bell (injected by site.js for signed-in users)
   ------------------------------------------------------------ */
.cv-bell-wrap { position: relative; }
.cv-badge {
  position: absolute;
  top: 1px; right: 1px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #f59e0b;
  color: #052e16;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px #07100c;
}
.cv-bell-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 340px;
  max-width: calc(100vw - 1.5rem);
  max-height: 420px;
  overflow-y: auto;
  background: #0b1712;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.9);
  z-index: 60;
  animation: modal-pop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.cv-bell-item {
  display: block;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  transition: background 0.15s;
}
.cv-bell-item:hover { background: rgba(255, 255, 255, 0.04); }
.cv-bell-item.is-unread { background: rgba(52, 211, 153, 0.06); }
.cv-bell-item.is-unread:hover { background: rgba(52, 211, 153, 0.1); }

/* ------------------------------------------------------------
   Flip cards (Card School glossary) — click/tap toggles .is-flipped
   ------------------------------------------------------------ */
.flip { perspective: 1000px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.flip-inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.flip.is-flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 1.25rem;
  display: flex; flex-direction: column;
  padding: 1.25rem;
  overflow: hidden;
}
.flip-front {
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}
.flip-front::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.07) 48%, transparent 60%);
  background-size: 250% 100%;
  animation: holo-shift 7s linear infinite;
  pointer-events: none;
}
.flip-back {
  transform: rotateY(180deg);
  justify-content: center;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: linear-gradient(160deg, #0b1f17, #0b1712);
}

.pulse-dot { position: relative; }
.pulse-dot::before {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.4);
  animation: pulse-ring 1.8s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}
