/* ==========================================================================
   Guardian Moldova — Landing page custom styles (Web-03 redesign)
   ==========================================================================

   Modern FinTech / Bento-Grid aesthetic.
   Tailwind (CDN) handles layout/spacing/typography utilities.
   This file adds only what Tailwind cannot express cleanly:
     - ambient mesh glow backgrounds
     - glassmorphism surfaces (light + dark)
     - gradient text + glow borders
     - phone mockup realism (frame, dynamic island, glass sheen)
     - floating alert badge
     - bento card hover lift + glow
     - timeline glowing connector
     - FAQ +/- icon rotation
     - custom scrollbar
     - language pill active state
     - accessibility (reduced motion, focus-visible)

   Brand palette (DEC-039 + Web-03 brief):
     --abyss:    #090D16  (deep navy-black hero/dark sections)
     --slate-900:#0F172A  --slate-800:#1E293B
     --emerald:  #10B981  --emerald-600:#059669
     --sapphire: #3B82F6  (family blue)
     --amber:    #F59E0B  (soft warning)
     --bg-light: #F8FAFC  --bg-mid:#EEF2F6
   ========================================================================== */

:root {
  --abyss: #090d16;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --emerald: #10b981;
  --emerald-600: #059669;
  --sapphire: #3b82f6;
  --amber: #f59e0b;
  --bg-light: #f8fafc;
  --bg-mid: #eef2f6;
}

/* ---------- Base ---------- */

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, sans-serif;
  background-color: var(--bg-light);
  color: var(--slate-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Custom scrollbar ---------- */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-mid);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--emerald), var(--emerald-600));
  border-radius: 999px;
  border: 2px solid var(--bg-mid);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--emerald-600), var(--emerald));
}

/* ---------- Ambient mesh glow backgrounds ---------- */

.bg-abyss {
  background-color: var(--abyss);
}

.bg-mesh-hero {
  background-color: var(--abyss);
  background-image:
    radial-gradient(900px 600px at 78% -8%, rgba(16, 185, 129, 0.18), transparent 60%),
    radial-gradient(700px 500px at 12% 12%, rgba(59, 130, 246, 0.10), transparent 55%),
    radial-gradient(600px 400px at 50% 110%, rgba(16, 185, 129, 0.08), transparent 60%);
}

.bg-mesh-dark {
  background-color: var(--abyss);
  background-image:
    radial-gradient(800px 500px at 85% 20%, rgba(16, 185, 129, 0.12), transparent 60%),
    radial-gradient(600px 400px at 10% 80%, rgba(59, 130, 246, 0.08), transparent 55%);
}

.bg-light-gradient {
  background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-mid) 100%);
}

/* ---------- Brand gradients ---------- */

.bg-emerald-gradient {
  background: linear-gradient(135deg, var(--emerald-600) 0%, var(--emerald) 100%);
}

.bg-sapphire-gradient {
  background: linear-gradient(135deg, #2563eb 0%, var(--sapphire) 100%);
}

.text-gradient-emerald {
  background: linear-gradient(135deg, #ffffff 0%, var(--emerald) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.text-gradient-light-emerald {
  background: linear-gradient(135deg, var(--emerald-600) 0%, var(--emerald) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Glassmorphism ---------- */

.glass-light {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.glass-dark {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-nav {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

/* ---------- Glow borders ---------- */

.glow-border-emerald {
  position: relative;
}
.glow-border-emerald::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.5), rgba(16, 185, 129, 0));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.glow-border-light {
  position: relative;
}
.glow-border-light::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---------- Floating navbar ---------- */

.floating-nav {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease,
    transform 0.3s ease;
}
.floating-nav.nav-scrolled {
  box-shadow: 0 12px 40px -16px rgba(15, 23, 42, 0.25);
}

/* ---------- Language pill ---------- */

[data-lang-btn] {
  transition: color 0.2s ease, background-color 0.2s ease;
}
[data-lang-btn].lang-active {
  color: #ffffff;
  background-color: var(--emerald-600);
}

/* ---------- CTA glow ---------- */

.cta-glow {
  box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cta-glow:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 16px 40px -10px rgba(16, 185, 129, 0.65);
}

/* ---------- Animations ---------- */

@keyframes guardian-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
}

@keyframes guardian-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 0 0 16px rgba(16, 185, 129, 0); }
}

@keyframes guardian-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes guardian-float-badge {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-6px) rotate(-2deg); }
}

@keyframes guardian-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes guardian-scan {
  0% { transform: translateY(-100%); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(100%); opacity: 0; }
}

@keyframes guardian-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-pulse-soft { animation: guardian-pulse 3.2s ease-in-out infinite; }
.animate-glow { animation: guardian-glow 2.8s ease-out infinite; }
.animate-float { animation: guardian-float 6s ease-in-out infinite; }
.animate-float-badge { animation: guardian-float-badge 5s ease-in-out infinite; }
.animate-fade-up { animation: guardian-fade-up 0.8s ease-out both; }
.animate-scan { animation: guardian-scan 3s ease-in-out infinite; }

/* ---------- Phone mockup ---------- */

.phone-frame {
  background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 40px 80px -24px rgba(0, 0, 0, 0.55),
    0 20px 40px -16px rgba(16, 185, 129, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.phone-screen {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.phone-sheen {
  background: linear-gradient(
    125deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 45%,
    rgba(255, 255, 255, 0.05) 55%,
    transparent 100%
  );
  pointer-events: none;
}

.dynamic-island {
  background: #000000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.shield-ring {
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.22);
}

.protection-pill {
  background: linear-gradient(135deg, var(--emerald-600), var(--emerald));
  box-shadow: 0 8px 20px -8px rgba(16, 185, 129, 0.55);
}

/* Floating alert badge over phone */

.alert-badge {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow:
    0 20px 40px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(16, 185, 129, 0.15);
}

/* ---------- Bento cards ---------- */

.bento-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.bento-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -24px rgba(15, 23, 42, 0.25);
  border-color: rgba(16, 185, 129, 0.4);
}

.bento-card-dark {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.bento-card-dark:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.6);
  border-color: rgba(16, 185, 129, 0.45);
}

/* ---------- Timeline (how it works) ---------- */

.timeline-connector {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.6), rgba(16, 185, 129, 0.05));
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.timeline-node {
  background: linear-gradient(135deg, var(--emerald-600), var(--emerald));
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.12), 0 8px 20px -6px rgba(16, 185, 129, 0.5);
}

/* ---------- FAQ ---------- */

[data-faq-panel] {
  overflow: hidden;
}

.faq-icon-open,
.faq-icon-close {
  transition: transform 0.3s ease, opacity 0.3s ease;
}
[data-faq-item][data-open="true"] .faq-icon-close {
  transform: rotate(180deg);
  opacity: 0;
}
[data-faq-item][data-open="true"] .faq-icon-open {
  transform: rotate(180deg);
  opacity: 1;
}
[data-faq-item][data-open="false"] .faq-icon-open {
  opacity: 0;
}
[data-faq-item][data-open="false"] .faq-icon-close {
  opacity: 1;
}

/* ---------- Scanning visual (how it works step 2) ---------- */

.scan-line {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(16, 185, 129, 0.8),
    transparent
  );
}

/* ---------- Accessibility ---------- */

:focus-visible {
  outline: 2px solid var(--emerald-600);
  outline-offset: 2px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .animate-pulse-soft,
  .animate-glow,
  .animate-float,
  .animate-float-badge,
  .animate-fade-up,
  .animate-scan {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}
