/* ═══════════════════════════════════════════════
   AIQ — Dark Futuristic Monochromatic Theme
   ═══════════════════════════════════════════════ */

/* ─── Design Tokens ─── */
:root {
  /* Base */
  --bg-primary: #060610;
  --bg-secondary: #0c0c1d;
  --bg-card: rgba(12, 14, 30, 0.6);

  /* Monochromatic Blue Palette */
  --accent: #00a2ff;
  --accent-dark: #0066cc;
  --accent-light: #66ccff;
  --accent-glow: rgba(0, 162, 255, 0.15);
  --accent-glow-s: rgba(0, 162, 255, 0.35);

  /* Text */
  --text-primary: #e8eaf0;
  --text-secondary: #8a8fa8;
  --text-muted: #4a4f6a;

  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(0, 162, 255, 0.3);

  /* Layout */
  --max-width: 1200px;
  --nav-height: 72px;
  --section-pad: 120px 24px;
  --radius: 16px;
  --radius-sm: 10px;

  /* Fonts */
  --font: 'Inter', system-ui, -apple-system, sans-serif;

  /* Transitions */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Reset ─── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font);
  font-weight: 400;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
}

/* ─── Canvas Background ─── */
#gridCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

/* ─── Navigation ─── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

#navbar.scrolled {
  background: rgba(6, 6, 16, 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1001;
}

.nav-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.nav-name {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  position: relative;
  transition: color 0.3s;
}

.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.3s var(--ease);
}

.nav-links a:not(.nav-cta):hover {
  color: var(--text-primary);
}

.nav-links a:not(.nav-cta):hover::after {
  width: 100%;
}

.nav-cta {
  padding: 8px 22px;
  border: 1px solid var(--accent);
  border-radius: 100px;
  color: var(--accent) !important;
  font-weight: 600;
  transition: all 0.3s var(--ease);
}

.nav-cta:hover {
  background: var(--accent);
  color: var(--bg-primary) !important;
  box-shadow: 0 0 20px var(--accent-glow-s);
}

/* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  z-index: 1001;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ─── Hero Section ─── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 24px 100px;
  overflow: hidden;
  z-index: 1;
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow-s) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: pulse-glow 6s ease-in-out infinite;
}

@keyframes pulse-glow {

  0%,
  100% {
    opacity: 0.4;
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1.15);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.hero-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-light), var(--accent), var(--accent-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.35s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 0 0 0 var(--accent-glow);
}

.btn-primary:hover {
  box-shadow: 0 0 30px var(--accent-glow-s), 0 4px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ─── Sections Shared ─── */
section {
  position: relative;
  z-index: 1;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--section-pad);
}

.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 56px;
}

/* ─── Services Section ─── */
#services {
  background: var(--bg-secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  transition: all 0.4s var(--ease);
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, transparent, var(--accent-glow), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  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 var(--ease);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px var(--accent-glow);
}

.card-icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  padding: 10px;
  transition: all 0.3s var(--ease);
}

.service-card:hover .card-icon {
  background: var(--accent-glow-s);
  box-shadow: 0 0 20px var(--accent-glow);
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.2px;
}

.service-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ─── About Section ─── */
#about {
  background: var(--bg-primary);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.8;
}

.about-stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-suffix {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 6px;
  letter-spacing: 0.3px;
}

/* Orbit visual */
.about-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit-ring {
  position: absolute;
  border: 1px solid var(--border);
  border-radius: 50%;
  animation: orbit-spin linear infinite;
}

.ring-1 {
  width: 70%;
  height: 70%;
  animation-duration: 20s;
  border-color: rgba(0, 162, 255, 0.08);
}

.ring-2 {
  width: 85%;
  height: 85%;
  animation-duration: 30s;
  animation-direction: reverse;
  border-color: rgba(0, 162, 255, 0.05);
}

.ring-3 {
  width: 100%;
  height: 100%;
  animation-duration: 40s;
  border-color: rgba(0, 162, 255, 0.03);
}

/* Orbit dots */
.ring-1::after,
.ring-2::after,
.ring-3::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 12px var(--accent-glow-s);
}

.ring-2::after {
  width: 6px;
  height: 6px;
  top: auto;
  bottom: -3px;
  background: var(--accent-light);
}

.ring-3::after {
  width: 5px;
  height: 5px;
  left: -2px;
  top: 50%;
  background: var(--accent-dark);
}

@keyframes orbit-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.orbit-core {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: 50%;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 40px var(--accent-glow);
}

.orbit-core img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

/* ─── Contact Section ─── */
#contact {
  background: var(--bg-secondary);
}

.contact-form {
  max-width: 680px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  position: relative;
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: all 0.3s var(--ease);
  outline: none;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(0, 162, 255, 0.03);
}

.form-group label {
  position: absolute;
  top: 16px;
  left: 20px;
  font-size: 0.92rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: all 0.25s var(--ease);
}

.form-group input:focus~label,
.form-group input:not(:placeholder-shown)~label,
.form-group textarea:focus~label,
.form-group textarea:not(:placeholder-shown)~label {
  top: -10px;
  left: 14px;
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--bg-secondary);
  padding: 0 6px;
}

.btn-submit {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

.btn-submit svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease);
}

.btn-submit:hover svg {
  transform: translateX(4px);
}

/* ─── Footer ─── */
#footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px 40px;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.footer-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.footer-brand span {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.footer-links {
  display: flex;
  gap: 28px;
  justify-content: center;
  margin-bottom: 32px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ─── Scroll Reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* Stagger service cards */
.service-card.reveal:nth-child(1) {
  transition-delay: 0s;
}

.service-card.reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.service-card.reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.service-card.reveal:nth-child(4) {
  transition-delay: 0.3s;
}

.service-card.reveal:nth-child(5) {
  transition-delay: 0.4s;
}

.service-card.reveal:nth-child(6) {
  transition-delay: 0.5s;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --section-pad: 80px 20px;
  }

  /* Mobile nav */
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(6, 6, 16, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease);
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-visual {
    max-width: 300px;
    margin: 0 auto;
  }

  .about-stats {
    gap: 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3.2rem);
  }
}

@media (max-width: 480px) {
  .about-stats {
    flex-direction: column;
    gap: 20px;
  }
}