/* ═══════════════════════════════════════════════════════
   Qaxal – Global Styles
   ═══════════════════════════════════════════════════════ */

/* ── Design tokens ── */
:root {
  --brand-grad: linear-gradient(270deg, #005BD1 0%, #027BFA 100%);
  --bg: hsl(222.2 84% 4.9%);
}

body {
  background: var(--bg);
  overflow-x: hidden;
}

/* ── Brand utilities ── */
.text-gradient {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bg-gradient-brand {
  background: var(--brand-grad);
}

.ring-gradient {
  position: relative;
  isolation: isolate;
}

.ring-gradient:before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 0.75rem;
  background: linear-gradient(270deg, rgba(0, 91, 209, 0.75), rgba(2, 123, 250, 0.55));
  z-index: -1;
  opacity: 0.22;
}

/* ── Hero background (grid + glow) ── */
.hero-bg {
  background:
    radial-gradient(900px 420px at 12% 18%, rgba(2, 123, 250, 0.38), transparent 60%),
    radial-gradient(700px 380px at 70% 20%, rgba(0, 91, 209, 0.32), transparent 62%),
    radial-gradient(800px 420px at 55% 85%, rgba(2, 123, 250, 0.28), transparent 62%),
    linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: auto, auto, auto, 60px 60px, 60px 60px;
  background-position: center;
  mask-image: radial-gradient(70% 60% at 50% 35%, black 0%, rgba(0, 0, 0, 0.65) 55%, transparent 80%);
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    filter: hue-rotate(0deg);
  }

  50% {
    transform: translate3d(0, -10px, 0) scale(1.02);
    filter: hue-rotate(10deg);
  }

  100% {
    transform: translate3d(0, 0, 0) scale(1);
    filter: hue-rotate(0deg);
  }
}

.hero-bg-anim {
  animation: drift 12s ease-in-out infinite;
}

/* ── Fade-in on scroll ── */
.reveal {
  opacity: 0;
  transform: translateY(10px);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 700ms ease, transform 700ms ease;
}

/* ── Feature hover ── */
.lift {
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 40px rgba(0, 0, 0, 0.35), 0 0 22px rgba(2, 123, 250, 0.12);
  border-color: rgba(255, 255, 255, 0.16) !important;
}

/* ── Focus rings ── */
.focus-ring:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 123, 250, 0.35);
}

/* ── Navigation blur ── */
.nav-blur {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ── Mobile fullscreen menu ── */
.mobile-menu {
  background: #061124;
  opacity: 0;
  visibility: hidden;
  transition: opacity 260ms ease, visibility 260ms ease;
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.scrim {
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.scrim.open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Toggle switch ── */
.switch {
  transition: background-color 200ms ease;
}

.switch-knob {
  transition: transform 200ms ease, background-color 200ms ease;
}

/* ── Consent banner toggle switches ── */
.consent-switch {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s;
  cursor: pointer;
  flex-shrink: 0;
  border: none;
  padding: 0;
}

.consent-switch::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s, background 0.2s;
}

.consent-switch.active {
  background: var(--color-brand-500, #4f8cff);
}

.consent-switch.active::after {
  transform: translateX(16px);
  background: #fff;
}

.consent-switch.locked {
  opacity: 0.6;
  cursor: not-allowed;
}

#consentBanner>div {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ── Mobile-responsive identity report ── */
@media (max-width: 639px) {

  /* Stack detection cards in single column on small screens */
  .identity-cards-grid {
    grid-template-columns: 1fr !important;
  }

  /* Ensure cookie table doesn't cause horizontal overflow */
  .cookie-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  /* Larger touch targets for footer links */
  footer a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* ── Reduce motion ── */
@media (prefers-reduced-motion: reduce) {
  .hero-bg-anim {
    animation: none !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .drawer,
  .scrim,
  .switch,
  .switch-knob {
    transition: none !important;
  }
}