/* ==========================================================================
   SPIN MEDIA — Landing Page
   Base tokens, grain overlay, reveal animations, custom components
   ========================================================================== */

:root {
  --bg: #05070f;
  --bg-elevated: #0a0e1c;
  --bg-card: #0d1226;
  --blue-300: #8fb0ff;
  --blue-400: #5b82ff;
  --blue-500: #2f5cff;
  --blue-600: #1e46e0;
  --blue-700: #142f9c;
  --holo-pink: #ff8ad1;
  --holo-green: #7cffd1;
  --holo-violet: #b98bff;
  --gold: #ffc75f;
  --gold-2: #ff9f4a;
  --text: #f5f7ff;
  --muted: #9aa4c7;
  --muted-2: #6b7394;
  --border: rgba(255, 255, 255, 0.08);
  --whatsapp: #25d366;
  --telegram: #2aabee;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Heebo", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.font-display {
  font-family: "Rubik", "Heebo", system-ui, sans-serif;
}

::selection {
  background: var(--blue-500);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--blue-300);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Grain overlay (fixed, whole page) ---------------------------------- */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
}

/* ---- Gradient text (holographic wordmark) ------------------------------- */
.text-holo {
  background: linear-gradient(100deg, #ffffff 0%, #cfe0ff 20%, #ffd7ef 40%, #cdfff0 60%, #ffffff 80%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: holo-shift 8s ease-in-out infinite;
}
@keyframes holo-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.text-gradient-blue {
  background: linear-gradient(90deg, #ffffff, var(--blue-300));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Ambient glow blobs -------------------------------------------------- */
.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

/* ---- Cursor spotlight (injected by JS into [data-spotlight]) ------------ */
[data-spotlight] {
  position: relative;
}
.spotlight-glow {
  position: absolute;
  width: 480px;
  height: 480px;
  margin-left: -240px;
  margin-top: -240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 130, 255, 0.22), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

/* ---- 3D tilt elements ----------------------------------------------------*/
[data-tilt] {
  transform-style: preserve-3d;
}

/* ---- Spinning circular badge (brand pun on "SPIN") ----------------------*/
.spin-badge {
  position: relative;
  width: 118px;
  height: 118px;
  animation: spin-rotate 9s linear infinite;
}
.spin-badge span {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--blue-300);
  transform-origin: center;
  white-space: pre;
}
.spin-badge-core {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px -2px rgba(47, 92, 255, 0.7);
  animation: spin-rotate-reverse 9s linear infinite;
}
@keyframes spin-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spin-rotate-reverse {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .spin-badge, .spin-badge-core { animation: none; }
}

/* ---- Floating iGaming particles (suits / chips ambience) -----------------*/
.particle-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.particle {
  position: absolute;
  color: var(--blue-300);
  opacity: 0.16;
  animation: particle-float 14s ease-in-out infinite;
}
.particle.alt { animation-name: particle-float-alt; }
@keyframes particle-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-26px) rotate(12deg); }
}
@keyframes particle-float-alt {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(22px) rotate(-10deg); }
}
@media (prefers-reduced-motion: reduce) {
  .particle { animation: none; }
}

/* ---- Reveal on scroll ----------------------------------------------------*/
.reveal {
  opacity: 0;
  transform: translateY(28px);
  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, 0ms);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  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, 0ms);
}
.reveal-scale.in-view {
  opacity: 1;
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---- Header --------------------------------------------------------------*/
#site-header {
  transition: background-color 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}
#site-header.scrolled {
  background-color: rgba(5, 7, 15, 0.75);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.95rem 1.75rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, filter 0.25s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-whatsapp {
  background: var(--whatsapp);
  color: #06210f;
  box-shadow: 0 8px 30px -8px rgba(37, 211, 102, 0.6);
}
.btn-whatsapp:hover { box-shadow: 0 12px 40px -6px rgba(37, 211, 102, 0.8); filter: brightness(1.05); }

.btn-telegram {
  background: linear-gradient(135deg, #2aabee, #229ed9);
  color: #eaf7ff;
  box-shadow: 0 8px 30px -8px rgba(42, 171, 238, 0.6);
}
.btn-telegram:hover { box-shadow: 0 12px 40px -6px rgba(42, 171, 238, 0.8); filter: brightness(1.05); }

.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}
.btn-outline:hover { border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.06); }

/* ---- Category picker (personalizes the WhatsApp message) --------------- */
.category-pill {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
}
.category-pill:hover {
  border-color: rgba(91, 130, 255, 0.5);
  color: #fff;
}
.category-pill[aria-pressed="true"] {
  background: var(--blue-500);
  border-color: var(--blue-500);
  color: #fff;
  box-shadow: 0 4px 18px -4px rgba(47, 92, 255, 0.6);
}

/* ---- Floating CTA dock -----------------------------------------------*/
#floating-cta {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fab {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.6);
  position: relative;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.fab:hover { transform: scale(1.08); }
.fab-whatsapp { background: var(--whatsapp); }
.fab-telegram { background: linear-gradient(135deg, #2aabee, #229ed9); }
.fab::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0.5;
  animation: fab-ping 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.fab-whatsapp::before { color: var(--whatsapp); }
.fab-telegram::before { color: #2aabee; animation-delay: 1.2s; }
@keyframes fab-ping {
  0% { transform: scale(1); opacity: 0.5; }
  75%, 100% { transform: scale(1.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fab::before { animation: none; display: none; }
}

/* ---- Cards -------------------------------------------------------------*/
.glass-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.service-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(91, 130, 255, 0.5);
  box-shadow: 0 20px 60px -20px rgba(47, 92, 255, 0.5);
}
.service-icon {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.service-card:hover .service-icon {
  transform: rotate(360deg);
}
@media (prefers-reduced-motion: reduce) {
  .service-icon { transition: none; }
  .service-card:hover .service-icon { transform: none; }
}

/* ---- Marquee (trust strip) --------------------------------------------*/
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ---- Portfolio tiles ----------------------------------------------------*/
.portfolio-tile {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, #0d1226, #070a16);
}
.portfolio-tile img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portfolio-tile:hover img { transform: scale(1.06); }
.portfolio-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.16) 50%, transparent 60%);
  background-size: 250% 250%;
  background-position: 120% 0;
  opacity: 0;
  transition: background-position 0.9s ease, opacity 0.2s ease;
  pointer-events: none;
}
.portfolio-tile:hover::after {
  opacity: 1;
  background-position: -20% 100%;
}
@media (prefers-reduced-motion: reduce) {
  .portfolio-tile::after { display: none; }
}
.portfolio-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  background: linear-gradient(180deg, transparent 40%, rgba(3, 4, 10, 0.92) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.portfolio-tile:hover .portfolio-overlay { opacity: 1; }

.portfolio-placeholder {
  width: 100%;
  height: 100%;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--muted-2);
  background:
    radial-gradient(circle at 30% 20%, rgba(47, 92, 255, 0.25), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(255, 138, 209, 0.12), transparent 55%),
    linear-gradient(160deg, #0d1226, #070a16);
}

/* ---- Section surface tints (break up the all-black monotony) ------------*/
.surface-violet {
  background:
    radial-gradient(65% 65% at 85% 0%, rgba(185, 139, 255, 0.4), transparent 65%),
    radial-gradient(55% 55% at 10% 100%, rgba(47, 92, 255, 0.34), transparent 65%),
    linear-gradient(180deg, #1a1436 0%, #08070f 100%);
}
.surface-teal {
  background:
    radial-gradient(60% 60% at 90% 10%, rgba(124, 255, 209, 0.28), transparent 65%),
    radial-gradient(60% 60% at 5% 90%, rgba(47, 92, 255, 0.30), transparent 65%),
    linear-gradient(180deg, #0a2a25 0%, #05070f 100%);
}
.surface-rose {
  background:
    radial-gradient(60% 60% at 15% 0%, rgba(255, 138, 209, 0.32), transparent 65%),
    radial-gradient(60% 60% at 90% 100%, rgba(255, 199, 95, 0.18), transparent 65%),
    linear-gradient(180deg, #2c1226 0%, #08070f 100%);
}
.surface-gold {
  background:
    radial-gradient(60% 60% at 20% 0%, rgba(255, 199, 95, 0.22), transparent 65%),
    radial-gradient(60% 60% at 90% 100%, rgba(47, 92, 255, 0.28), transparent 65%),
    linear-gradient(180deg, #241a08 0%, #08070f 100%);
}

#service-video, #service-banners, #service-social,
#service-brand, #service-ab, #service-landing {
  scroll-margin-top: 100px;
}

/* ---- Section divider glow -----------------------------------------------*/
.section-glow-top::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91, 130, 255, 0.6), transparent);
}


/* Scrollbar (webkit) */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1a2242; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue-700); }
