/* ============================================================
   NEXA INC — Custom Stylesheet
   Design System: Dark Premium + Blue/Gold/Emerald Accents
   ============================================================ */

/* === CSS VARIABLES === */
:root {
  --nexa-bg:        #030712;
  --nexa-bg-2:      #080f1f;
  --nexa-card:      #0d1117;
  --nexa-card-2:    #111827;
  --nexa-blue:      #2563eb;
  --nexa-blue-l:    #60a5fa;
  --nexa-gold:      #f59e0b;
  --nexa-gold-l:    #fbbf24;
  --nexa-emerald:   #10b981;
  --nexa-emerald-l: #34d399;
  --nexa-purple:    #8b5cf6;
  --text-primary:   #f8fafc;
  --text-muted:     #94a3b8;
  --text-faint:     #475569;
  --border-soft:    rgba(255, 255, 255, 0.06);
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--nexa-bg);
  color: var(--text-primary);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
}

/* === CUSTOM SCROLLBAR === */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--nexa-bg); }
::-webkit-scrollbar-thumb { background: var(--nexa-blue); border-radius: 3px; }

/* ============================================================
   NAVIGATION
   ============================================================ */
#navbar {
  transition: background 0.4s ease, border-color 0.4s ease, padding 0.3s ease;
}

#navbar.scrolled {
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(37, 99, 235, 0.12);
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--nexa-blue), var(--nexa-emerald));
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active-nav { color: var(--text-primary); }
.nav-link:hover::after,
.nav-link.active-nav::after { width: 100%; }

/* Hamburger */
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  background: linear-gradient(135deg, var(--nexa-blue), #1d4ed8);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0.6rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  white-space: nowrap;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.5s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(37, 99, 235, 0.45); }
.btn-primary:hover::before { left: 100%; }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  background: transparent;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: 0.6rem;
  text-decoration: none;
  border: 1px solid rgba(148, 163, 184, 0.2);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.btn-ghost:hover {
  color: var(--text-primary);
  border-color: rgba(37, 99, 235, 0.5);
  background: rgba(37, 99, 235, 0.06);
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  background: linear-gradient(135deg, var(--nexa-gold), #d97706);
  color: #030712;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 0.6rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(245, 158, 11, 0.4); }

.btn-emerald {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  background: linear-gradient(135deg, var(--nexa-emerald), #059669);
  color: #030712;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 0.6rem;
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-emerald:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(16, 185, 129, 0.4); }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 60%, rgba(37, 99, 235, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 15%, rgba(16, 185, 129, 0.09) 0%, transparent 50%),
    radial-gradient(ellipse at 55% 85%, rgba(245, 158, 11, 0.07) 0%, transparent 45%),
    linear-gradient(160deg, #030712 0%, #080f1f 60%, #030712 100%);
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}
.orb-1 {
  width: 450px; height: 450px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, transparent 70%);
  top: -150px; right: -80px;
  animation: floatOrb 9s ease-in-out infinite;
}
.orb-2 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.18) 0%, transparent 70%);
  bottom: 80px; left: -60px;
  animation: floatOrb 12s ease-in-out infinite reverse;
}
.orb-3 {
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.13) 0%, transparent 70%);
  top: 45%; right: 25%;
  animation: floatOrb 15s ease-in-out infinite 3s;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0); }
  33%       { transform: translate(20px, -30px); }
  66%       { transform: translate(-15px, 15px); }
}

/* Terminal / Dashboard card */
.terminal-card {
  background: rgba(13, 17, 23, 0.95);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.04);
  animation: floatCard 7s ease-in-out infinite;
}
.terminal-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  padding: 1px;
  background: linear-gradient(135deg, rgba(37,99,235,0.5), rgba(16,185,129,0.35));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-14px); }
}

.float-badge {
  background: rgba(13, 17, 23, 0.96);
  border: 1px solid var(--border-soft);
  border-radius: 0.75rem;
  padding: 0.65rem 1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* Gradient badges */
.gradient-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--nexa-blue-l);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Gradient text utilities */
.gradient-text-blue {
  background: linear-gradient(135deg, var(--nexa-blue-l), var(--nexa-blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-gold {
  background: linear-gradient(135deg, var(--nexa-gold-l), var(--nexa-gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-emerald {
  background: linear-gradient(135deg, var(--nexa-emerald-l), var(--nexa-emerald));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-mixed {
  background: linear-gradient(135deg, var(--nexa-blue-l) 0%, var(--nexa-emerald) 50%, var(--nexa-gold-l) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   SERVICE CARDS
   ============================================================ */
.service-card {
  position: relative;
  background: var(--nexa-card);
  border-radius: 1.25rem;
  padding: 2rem;
  border: 1px solid var(--border-soft);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  cursor: default;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1.25rem;
  padding: 1px;
  background: linear-gradient(135deg, var(--card-from, #2563eb), var(--card-to, #10b981));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1.25rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(37, 99, 235, 0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.service-card:hover { transform: translateY(-8px); box-shadow: 0 24px 64px rgba(0,0,0,0.45); }
.service-card:hover::before { opacity: 1; }
.service-card:hover::after { opacity: 1; }

.service-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

.service-tag {
  display: inline-flex;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  margin: 0.2rem 0.15rem 0.2rem 0;
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(13,17,23,0.6), rgba(13,17,23,0.3));
}

/* ============================================================
   NEXALINK SECTION
   ============================================================ */
.nexalink-section {
  position: relative;
  overflow: hidden;
}
.nexalink-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 70% 40%, rgba(16, 185, 129, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse at 15% 70%, rgba(37, 99, 235, 0.07) 0%, transparent 50%);
}

.nexalink-card {
  background: var(--nexa-card);
  border: 1px solid rgba(16, 185, 129, 0.14);
  border-radius: 1.5rem;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}
.nexalink-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--nexa-emerald), var(--nexa-blue), var(--nexa-gold));
  border-radius: 1.5rem 1.5rem 0 0;
}

.wifi-icon-wrap {
  width: 72px; height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(16,185,129,0.18), rgba(37,99,235,0.18));
  border: 1px solid rgba(16,185,129,0.25);
  display: flex; align-items: center; justify-content: center;
  animation: glowEmerald 3s ease-in-out infinite;
}
@keyframes glowEmerald {
  0%, 100% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.15); }
  50%       { box-shadow: 0 0 40px rgba(16, 185, 129, 0.35); }
}

.impact-metric {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border-soft);
  border-radius: 1rem;
  padding: 1.25rem;
  transition: all 0.3s ease;
  text-align: center;
}
.impact-metric:hover {
  background: rgba(37, 99, 235, 0.05);
  border-color: rgba(37, 99, 235, 0.18);
  transform: translateY(-3px);
}

/* Coverage map visual */
.coverage-visual {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-soft);
  border-radius: 1.25rem;
  overflow: hidden;
  position: relative;
  min-height: 260px;
  display: flex; align-items: center; justify-content: center;
}

/* ============================================================
   FORM SECTION
   ============================================================ */
.form-section {
  background: var(--nexa-bg-2);
  position: relative;
}
.form-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,0.3), rgba(16,185,129,0.3), transparent);
}

.form-container {
  background: var(--nexa-card);
  border: 1px solid var(--border-soft);
  border-radius: 1.5rem;
  padding: 2.75rem;
  position: relative;
}
.form-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--nexa-blue), var(--nexa-emerald), var(--nexa-gold));
  border-radius: 1.5rem 1.5rem 0 0;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  color: var(--text-primary);
  font-size: 0.925rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: rgba(37, 99, 235, 0.55);
  background: rgba(37, 99, 235, 0.04);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-faint); }
.form-textarea { resize: vertical; min-height: 120px; }

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
  appearance: none;
}
.form-select option { background: #0d1117; color: var(--text-primary); }

/* Validation states */
.form-input.invalid,
.form-select.invalid,
.form-textarea.invalid {
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}
.form-input.valid,
.form-select.valid,
.form-textarea.valid {
  border-color: rgba(16, 185, 129, 0.45);
}

.error-msg {
  display: block; font-size: 0.75rem;
  color: #f87171; margin-top: 0.35rem;
  opacity: 0; height: 0;
  overflow: hidden;
  transition: opacity 0.3s, height 0.3s;
}
.error-msg.show { opacity: 1; height: auto; }

/* Phone input */
.phone-wrapper { display: flex; gap: 0.5rem; }
.phone-code { width: 120px; flex-shrink: 0; }

/* Calendar widget */
.calendar-widget {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border-soft);
  border-radius: 1rem;
  padding: 1.5rem;
}

.time-slot {
  padding: 0.5rem 0.5rem;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  user-select: none;
}
.time-slot:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.3);
  color: var(--nexa-blue-l);
}
.time-slot.selected {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(37, 99, 235, 0.6);
  color: var(--nexa-blue-l);
  font-weight: 600;
}

/* Submit spinner */
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 0.8s linear infinite; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-box {
  background: var(--nexa-card);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 1.5rem;
  padding: 2.5rem;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.active .modal-box { transform: translateY(0) scale(1); }
.modal-box::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--nexa-emerald), var(--nexa-blue));
  border-radius: 1.5rem 1.5rem 0 0;
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast {
  position: fixed;
  bottom: 2rem; right: 2rem;
  background: var(--nexa-card);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 0.875rem;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 200;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55);
  max-width: 380px;
  transform: translateY(120%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast.show { transform: translateY(0); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #030712;
  border-top: 1px solid var(--border-soft);
}
.footer-link {
  color: #64748b; font-size: 0.875rem;
  text-decoration: none; transition: color 0.2s;
}
.footer-link:hover { color: var(--text-muted); }

.social-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center;
  color: #64748b;
  transition: all 0.25s ease;
  text-decoration: none;
}
.social-btn:hover {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.3);
  color: var(--nexa-blue-l);
  transform: translateY(-2px);
}

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; }
.d4 { transition-delay: 0.4s; }
.d5 { transition-delay: 0.5s; }

/* ============================================================
   SECTION DIVIDER
   ============================================================ */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,0.2), rgba(16,185,129,0.2), transparent);
}

/* ============================================================
   COUNTER ANIMATION
   ============================================================ */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.counter-done { animation: countUp 0.4s ease; }

/* ============================================================
   ACADEMY CARD
   ============================================================ */
#academy .academy-feature {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.02);
  transition: all 0.25s ease;
}
#academy .academy-feature:hover {
  background: rgba(139,92,246,0.06);
  border-color: rgba(139,92,246,0.2);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .service-card  { padding: 1.5rem; }
  .form-container,
  .nexalink-card { padding: 1.75rem; }
  .modal-box     { padding: 1.75rem; }
  .toast         { right: 1rem; left: 1rem; max-width: none; }
  .orb-1 { width: 280px; height: 280px; }
  .orb-2 { display: none; }
}

@media (max-width: 480px) {
  .btn-primary,
  .btn-ghost { padding: 0.6rem 1.1rem; font-size: 0.83rem; }
}
