@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --primary: #1e5bb0;
  --primary-dark: #164788;
  --accent: #00a3e0;
  --navy: #0b2545;
  --navy-2: #132f5e;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --success: #16a34a;
  --success-bg: #dcfce7;
  --warning: #d97706;
  --warning-bg: #fef3c7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04),
    0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.1),
    0 2px 6px rgba(15, 23, 42, 0.06);
  --font-inter: var(--font-inter);
  --font-jetbrains-mono: var(--font-jetbrains-mono);
}

@layer base {
  * {
    @apply box-border;
  }

  body {
    @apply bg-bg text-text font-sans antialiased;
  }

  :focus-visible {
    @apply outline-2 outline-offset-2 outline-accent;
  }

  ::selection {
    @apply bg-accent text-white;
  }
}

@layer utilities {
  .mono {
    @apply font-mono;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── SweetAlert2 overrides ─────────────────────────────────────────── */
.swal2-popup {
  font-family: var(--font-inter), system-ui, sans-serif !important;
  padding: 0 !important;
  border-radius: 14px !important;
}

.swal2-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0b2545 !important;
  padding: 24px 24px 0 !important;
  margin: 0 !important;
}

.swal2-html-container {
  font-size: 13px !important;
  color: #64748b !important;
  padding: 6px 24px 0 !important;
  margin: 0 !important;
}

.swal2-icon {
  margin: 20px auto 0 !important;
  transform: scale(0.85) !important;
}

.swal2-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 20px 24px !important;
  margin: 0 !important;
  width: 100% !important;
  justify-content: flex-end !important;
}

.swal2-confirm,
.swal2-cancel,
.swal2-deny {
  margin: 0 !important;
  padding: 8px 18px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  transition: background-color 0.15s, transform 0.1s !important;
  cursor: pointer !important;
  border: none !important;
  outline: none !important;
}

.swal2-confirm:active,
.swal2-cancel:active {
  transform: scale(0.96) !important;
}

/* Progress bar */
.swal2-timer-progress-bar {
  background: #1e5bb0 !important;
}

/* Button variant classes */
.swal-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 18px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border: none !important;
  cursor: pointer !important;
  transition: background-color 0.15s, transform 0.1s !important;
  outline: none !important;
  margin: 0 !important;
}

.swal-btn:active {
  transform: scale(0.96) !important;
}

.swal-btn-primary {
  background-color: #1e5bb0 !important;
  color: #ffffff !important;
}
.swal-btn-primary:hover {
  background-color: #164788 !important;
}

.swal-btn-danger {
  background-color: #dc2626 !important;
  color: #ffffff !important;
}
.swal-btn-danger:hover {
  background-color: #b91c1c !important;
}

.swal-btn-secondary {
  background-color: #f1f5f9 !important;
  color: #0b2545 !important;
}
.swal-btn-secondary:hover {
  background-color: #e2e8f0 !important;
}

/* ── Landing page motion ───────────────────────────────────────────── */
.lp-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.lp-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes lpHeroIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lp-hero-in {
  opacity: 0;
  animation: lpHeroIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.lp-hero-in-d1 {
  animation-delay: 0.08s;
}
.lp-hero-in-d2 {
  animation-delay: 0.18s;
}
.lp-hero-in-d3 {
  animation-delay: 0.28s;
}
.lp-hero-in-d4 {
  animation-delay: 0.4s;
}

.lp-demo-mock {
  transform: perspective(1000px) rotateY(-6deg) rotateX(2deg);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.lp-demo-mock:hover {
  transform: perspective(1000px) rotateY(-2deg) rotateX(0.5deg);
}

@keyframes lpProgress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.lp-progress-fill {
  transform-origin: left center;
  animation: lpProgress 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}

.lp-crenel {
  height: 14px;
  width: 100%;
  color: #f8fafc;
  background-image: linear-gradient(
    90deg,
    currentColor 0 40%,
    transparent 40% 60%,
    currentColor 60% 100%
  );
  background-size: 28px 14px;
  clip-path: polygon(
    0 100%,
    0 0,
    12.5% 0,
    12.5% 40%,
    25% 40%,
    25% 0,
    37.5% 0,
    37.5% 40%,
    50% 40%,
    50% 0,
    62.5% 0,
    62.5% 40%,
    75% 40%,
    75% 0,
    87.5% 0,
    87.5% 40%,
    100% 40%,
    100% 0,
    100% 100%
  );
}

.lp-hero-nodes {
  background-image:
    radial-gradient(
      circle at 18% 42%,
      rgba(0, 163, 224, 0.18) 0,
      transparent 28%
    ),
    radial-gradient(
      circle at 78% 28%,
      rgba(30, 91, 176, 0.22) 0,
      transparent 32%
    ),
    radial-gradient(
      1.5px 1.5px at 20% 30%,
      rgba(255, 255, 255, 0.35),
      transparent
    ),
    radial-gradient(
      1.5px 1.5px at 40% 70%,
      rgba(0, 163, 224, 0.45),
      transparent
    ),
    radial-gradient(
      1.5px 1.5px at 65% 40%,
      rgba(255, 255, 255, 0.28),
      transparent
    ),
    radial-gradient(
      1.5px 1.5px at 85% 65%,
      rgba(0, 163, 224, 0.4),
      transparent
    ),
    radial-gradient(
      1.5px 1.5px at 55% 18%,
      rgba(255, 255, 255, 0.22),
      transparent
    );
  background-size: 100% 100%, 100% 100%, 180px 180px, 220px 220px, 160px 160px,
    200px 200px, 240px 240px;
  animation: lpNodesDrift 22s ease-in-out infinite alternate;
}

@keyframes lpNodesDrift {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  }
  to {
    background-position: 0 0, 0 0, 24px -16px, -18px 22px, 14px 18px, -22px -12px,
      10px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lp-reveal,
  .lp-hero-in,
  .lp-demo-mock,
  .lp-progress-fill,
  .lp-hero-nodes {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

