/* ============================================================
   Celebrities Access Network — global styles (clean white theme)
   Tailwind (CDN) handles most styling; this file covers the
   page background, card surfaces, typography polish, and the
   scratch-card canvas.
   ============================================================ */

/* --- Site background: white with a very soft brand wash --- */
body {
  background-color: #ffffff;
  background-image:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(124, 58, 237, 0.06), transparent 60%),
    radial-gradient(ellipse 60% 40% at 95% 0%, rgba(217, 70, 239, 0.045), transparent 60%);
  background-attachment: fixed;
  color: #0f172a;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* --- Hero section background (soft spotlight on white) --- */
.hero-bg {
  background-color: #faf7ff;
  background-image:
    radial-gradient(ellipse 70% 60% at 50% -25%, rgba(139, 92, 246, 0.16), transparent 60%),
    radial-gradient(ellipse 45% 55% at 12% 8%, rgba(217, 70, 239, 0.09), transparent 60%),
    radial-gradient(ellipse 45% 55% at 88% 12%, rgba(251, 191, 36, 0.09), transparent 60%);
  border-bottom: 1px solid #eef2f7;
}

/* --- Card surface used across the public site --- */
.card-glass {
  background: #ffffff;
  border: 1px solid #e6e8ec;
  border-radius: 1rem;
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.04),
    0 4px 16px rgba(16, 24, 40, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.card-glass:hover {
  border-color: #d6dae0;
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.05),
    0 10px 30px rgba(16, 24, 40, 0.08);
}

/* --- Typography polish --- */
h1, h2, h3 { letter-spacing: -0.015em; }

::selection {
  background: rgba(124, 58, 237, 0.18);
  color: #4c1d95;
}

/* --- Accessible focus rings --- */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid rgba(124, 58, 237, 0.55);
  outline-offset: 2px;
  border-radius: 6px;
}

/* --- Line clamp helpers (in case CDN Tailwind lacks them) --- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Coin selector tabs (crypto address reveal) --- */
.coin-tab {
  border: 1px solid #e6e8ec;
  background: #ffffff;
  color: #475569;
  transition: all 0.15s ease;
}
.coin-tab:hover { border-color: #c4b5fd; color: #6d28d9; }
.coin-tab-active {
  border-color: #7c3aed;
  background: #f5f3ff;
  color: #6d28d9;
  font-weight: 600;
}

/* --- Scratch-to-reveal gift card canvas --- */
.scratch-wrap { position: relative; }
#scratchCanvas { touch-action: none; }

/* --- Upload dropzone drag state --- */
.upload-dropzone.dragover {
  border-color: rgba(124, 58, 237, 0.6);
  background: rgba(124, 58, 237, 0.05);
}

/* --- Subtle scrollbar --- */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #f1f3f5; }
::-webkit-scrollbar-thumb { background: #d0d5db; border-radius: 6px; border: 2px solid #f1f3f5; }
::-webkit-scrollbar-thumb:hover { background: #b8bfc7; }

/* --- Loading state for submit buttons --- */
button.is-loading, a.is-loading {
  opacity: 0.65;
  pointer-events: none;
  position: relative;
}
button.is-loading::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

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