@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #05070f;
  --bg-2: #0a0e1c;
  --panel: #0d1326;
  --panel-2: #111936;
  --line: rgba(148, 163, 184, 0.12);
  --accent: #22d3ee;
  --accent-2: #38bdf8;
  --accent-3: #0ea5e9;
  --text: #e2e8f0;
  --muted: #8ea0bd;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-3) transparent;
}

html {
  scroll-behavior: smooth;
}

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

h1, h2, h3, h4, .font-display {
  font-family: 'Space Grotesk', sans-serif;
}

.font-mono-tech {
  font-family: 'JetBrains Mono', monospace;
}

::selection {
  background: rgba(34, 211, 238, 0.35);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--accent-3), #1e40af);
  border-radius: 8px;
}

/* ---------- Background texture ---------- */
.bg-grid {
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
}

.bg-dots {
  background-image: radial-gradient(rgba(148, 163, 184, 0.15) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* ---------- Glow / gradient helpers ---------- */
.text-gradient {
  background: linear-gradient(92deg, #67e8f9 0%, #38bdf8 50%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glow-ring {
  position: relative;
}
.glow-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.6), rgba(129, 140, 248, 0.4), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card-glass {
  background: rgba(13, 19, 38, 0.7);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.hover-lift {
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.35s, box-shadow 0.35s;
}
.hover-lift:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 18px 45px -18px rgba(14, 165, 233, 0.45);
}

/* ---------- Buttons ---------- */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: #04121c;
  background: linear-gradient(92deg, #22d3ee, #38bdf8);
  padding: 0.85rem 1.75rem;
  border-radius: 0.75rem;
  transition: all 0.3s;
  box-shadow: 0 10px 30px -10px rgba(34, 211, 238, 0.55);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -10px rgba(34, 211, 238, 0.7);
  filter: brightness(1.08);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 0.85rem 1.75rem;
  border-radius: 0.75rem;
  transition: all 0.3s;
}
.btn-ghost:hover {
  border-color: rgba(34, 211, 238, 0.5);
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.06);
}

/* ---------- Navbar ---------- */
.nav-scrolled {
  background: rgba(5, 7, 15, 0.82) !important;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.6);
}

.nav-link {
  position: relative;
  color: var(--muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.25s;
  letter-spacing: 0.02em;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.3s;
}
.nav-link:hover, .nav-link.active {
  color: #fff;
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* ---------- Hero effects ---------- */
.hero-aurora {
  position: absolute;
  border-radius: 9999px;
  filter: blur(90px);
  opacity: 0.5;
  animation: aurora 14s ease-in-out infinite alternate;
}
@keyframes aurora {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -30px) scale(1.15); }
}

.scanline {
  position: relative;
  overflow: hidden;
}
.scanline::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 34%;
  top: -40%;
  background: linear-gradient(180deg, transparent, rgba(34, 211, 238, 0.14), transparent);
  animation: scan 5s linear infinite;
}
@keyframes scan {
  0%   { top: -40%; }
  100% { top: 140%; }
}

.radar {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}
.radar::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.08), transparent 62%),
    conic-gradient(from 0deg, rgba(34, 211, 238, 0.55), transparent 25%);
  animation: spin 4.5s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.radar .ring {
  position: absolute;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 50%;
}
.radar .blip {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #67e8f9;
  box-shadow: 0 0 12px 2px rgba(34, 211, 238, 0.9);
  animation: blip 3s ease-in-out infinite;
}
@keyframes blip {
  0%, 100% { opacity: 0.4; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.25); }
}

.typing-cursor::after {
  content: '|';
  color: var(--accent);
  animation: blink 1s step-end infinite;
  font-weight: 400;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.float-slow {
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }

/* ---------- Ticker ---------- */
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 30s linear infinite;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-wrap:hover .ticker-track {
  animation-play-state: paused;
}

/* ---------- Cards ---------- */
.service-icon {
  transition: all 0.4s;
}
.service-card:hover .service-icon {
  transform: rotate(-6deg) scale(1.1);
  box-shadow: 0 0 0 6px rgba(34, 211, 238, 0.12);
}

.gradient-frame {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
}
.gradient-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(5, 7, 15, 0.92));
  pointer-events: none;
}

/* ---------- Timeline ---------- */
.timeline-item {
  position: relative;
  padding-left: 2.5rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 6px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent), var(--accent-3));
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.8);
}
.timeline-item::after {
  content: '';
  position: absolute;
  left: 14px;
  top: 26px;
  bottom: -28px;
  width: 2px;
  background: linear-gradient(rgba(34, 211, 238, 0.4), rgba(34, 211, 238, 0.03));
}

/* ---------- Testimonial ---------- */
.testimonial-dot {
  transition: all 0.3s;
}
.testimonial-dot.active {
  width: 28px;
  background: var(--accent);
  border-radius: 9999px;
}

/* ---------- Inputs ---------- */
.field {
  width: 100%;
  background: rgba(13, 19, 38, 0.7);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.8rem 1rem;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  outline: none;
}
.field::placeholder {
  color: #64748b;
}
.field:focus {
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
  background: rgba(13, 19, 38, 0.95);
}
select.field {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2338bdf8' stroke-width='2'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.1rem;
}

/* ---------- FAQ ---------- */
.faq-item.active .faq-answer {
  max-height: 400px;
  opacity: 1;
  padding-top: 0.25rem;
}
.faq-answer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.45s ease, opacity 0.45s ease, padding 0.45s ease;
}
.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--accent);
}

/* ---------- Filter ---------- */
.filter-btn.active {
  background: linear-gradient(92deg, #22d3ee, #38bdf8);
  color: #04121c;
  border-color: transparent;
}

/* ---------- Misc ---------- */
.marquee-strip {
  background-image: linear-gradient(90deg, rgba(34, 211, 238, 0.06) 1px, transparent 1px);
  background-size: 40px 100%;
}

.divider-glow {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.5), transparent);
}

.maps-pin {
  animation: pinpulse 2s ease-in-out infinite;
}
@keyframes pinpulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.5); }
  50% { box-shadow: 0 0 0 12px rgba(34, 211, 238, 0); }
}

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