:root {
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #0a0e17;
}

::selection {
  background: rgba(61, 127, 255, 0.35);
  color: #fff;
}

/* ---------- scrollbar ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #05070c; }
::-webkit-scrollbar-thumb { background: #1a2236; border-radius: 999px; border: 2px solid #05070c; }
::-webkit-scrollbar-thumb:hover { background: #2a5fe0; }

/* ---------- grain overlay ---------- */
.grain-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------- glass ---------- */
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
}

/* ---------- loader ---------- */
#loader {
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
#loader.loaded {
  opacity: 0;
  visibility: hidden;
}

/* ---------- nav ---------- */
#site-nav.scrolled {
  background: rgba(5, 7, 12, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-link {
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: #6ea8ff;
  transition: width 0.3s ease;
}
.nav-link:hover { color: #fff; }
.nav-link:hover::after { width: 100%; }

.mobile-link {
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: rgb(203 213 225);
}

.burger, .burger::before, .burger::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 1.5px;
  background: #e2e8f0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.burger::before { transform: translateY(-6px); }
.burger::after { transform: translateY(6px); }
#menu-toggle[aria-expanded="true"] .burger { background: transparent; }
#menu-toggle[aria-expanded="true"] .burger::before { transform: rotate(45deg); }
#menu-toggle[aria-expanded="true"] .burger::after { transform: rotate(-45deg); }

/* ---------- buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #3d7fff;
  color: #05070c;
  font-weight: 600;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  box-shadow: 0 0 0 rgba(61,127,255,0);
  transition: box-shadow 0.35s ease, transform 0.2s ease, background 0.3s ease;
}
.btn-primary:hover {
  background: #6ea8ff;
  box-shadow: 0 0 40px rgba(61,127,255,0.45);
  transform: translateY(-2px);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(255,255,255,0.14);
  color: #e2e8f0;
  font-weight: 500;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.2s ease;
}
.btn-ghost:hover {
  border-color: rgba(110,168,255,0.5);
  background: rgba(110,168,255,0.06);
  transform: translateY(-2px);
}

/* ---------- section headings ---------- */
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #6ea8ff;
  font-weight: 600;
  margin-bottom: 0.9rem;
}
.section-title {
  font-family: "Bricolage Grotesque", serif;
  font-weight: 600;
  font-size: 2.5rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #fff;
  max-width: 34rem;
}
@media (min-width: 1024px) {
  .section-title { font-size: 3rem; }
}

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal.delay-1.in-view { transition-delay: 0.1s; }
.reveal.delay-2.in-view { transition-delay: 0.2s; }
.reveal.delay-3.in-view { transition-delay: 0.3s; }

/* ---------- project cards ---------- */
.project-card {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
}
.project-visual {
  flex: 1;
  min-height: 10rem;
}
.project-info {
  position: relative;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(180deg, rgba(10,14,23,0.4), rgba(10,14,23,0.96));
}
.project-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: #6ea8ff;
  align-self: flex-start;
  transition: gap 0.3s ease, color 0.3s ease;
}
.project-link:hover { color: #a8c8ff; }
.project-card:hover .project-visual { transform: scale(1.04); }
.project-visual { transition: transform 0.6s cubic-bezier(0.16,1,0.3,1); }

/* ---------- services ---------- */
.service-card {
  position: relative;
  border-radius: 1.75rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(160deg, rgba(255,255,255,0.03), rgba(255,255,255,0.005));
  padding: 2.5rem;
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}
.service-card:hover {
  border-color: rgba(110,168,255,0.35);
  transform: translateY(-4px);
  box-shadow: 0 0 60px rgba(61,127,255,0.14);
}
.service-number {
  font-family: "Bricolage Grotesque", serif;
  font-size: 1.5rem;
  color: rgba(255,255,255,0.25);
  font-weight: 600;
}
.service-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.service-item::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #3d7fff;
  box-shadow: 0 0 8px rgba(61,127,255,0.8);
  flex-shrink: 0;
}

/* ---------- pricing ---------- */
.pricing-card {
  position: relative;
  border-radius: 1.75rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  padding: 2.5rem 2rem;
  transition: transform 0.4s ease, border-color 0.4s ease;
}
.pricing-card:hover { transform: translateY(-6px); }
.pricing-card.featured {
  border-color: rgba(110,168,255,0.4);
  background: linear-gradient(160deg, rgba(61,127,255,0.12), rgba(255,255,255,0.02));
  box-shadow: 0 0 70px rgba(61,127,255,0.18);
}
.pricing-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}
.pricing-item::before {
  content: "✓";
  color: #6ea8ff;
  font-size: 0.75rem;
  margin-top: 0.15rem;
  font-weight: 700;
}

/* ---------- why choose us ---------- */
.why-tile {
  background: #0a0e17;
  padding: 2.25rem 2rem;
  transition: background 0.4s ease;
}
.why-tile:hover { background: #0d1220; }

/* ---------- process ---------- */
.process-step { position: relative; }
.process-dot {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Bricolage Grotesque", serif;
  font-weight: 600;
  background: #0a0e17;
  border: 1px solid rgba(110,168,255,0.4);
  color: #6ea8ff;
  box-shadow: 0 0 24px rgba(61,127,255,0.25);
}

/* ---------- FAQ ---------- */
.faq-item {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1.1rem;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
  transition: border-color 0.3s ease;
}
.faq-item:has(.faq-question[aria-expanded="true"]) {
  border-color: rgba(110,168,255,0.35);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  text-align: left;
  font-weight: 500;
  color: #e2e8f0;
}
.faq-icon { color: #6ea8ff; transition: transform 0.35s ease; flex-shrink: 0; }
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(135deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  color: rgb(148 163 184);
  font-size: 0.925rem;
  line-height: 1.6;
  padding: 0 1.5rem;
}
.faq-answer p { padding-bottom: 1.35rem; }

/* ---------- contact form ---------- */
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label { font-size: 0.8rem; color: rgb(148 163 184); font-weight: 500; }
.field input, .field select, .field textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  color: #fff;
  font-size: 0.925rem;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.field input::placeholder, .field textarea::placeholder { color: rgb(100 116 139); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: #3d7fff;
  background: rgba(61,127,255,0.06);
}
.field select option { background: #0d1220; }
.field-error {
  display: none;
  font-size: 0.75rem;
  color: #fb7185;
}
.field.error input, .field.error textarea, .field.error select { border-color: #fb7185; }
.field.error .field-error { display: block; }

/* ---------- AI assistant ---------- */
#ai-panel.open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}
.ai-msg-bot, .ai-msg-user {
  max-width: 85%;
  padding: 0.65rem 1rem;
  border-radius: 1rem;
  line-height: 1.5;
}
.ai-msg-bot {
  background: rgba(255,255,255,0.06);
  color: #e2e8f0;
  border-bottom-left-radius: 0.25rem;
}
.ai-msg-user {
  background: #3d7fff;
  color: #05070c;
  margin-left: auto;
  border-bottom-right-radius: 0.25rem;
  font-weight: 500;
}
.ai-chip {
  font-size: 0.75rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgb(203 213 225);
  transition: border-color 0.3s ease, color 0.3s ease;
}
.ai-chip:hover { border-color: rgba(110,168,255,0.5); color: #fff; }

.typing-dots span {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #94a3b8;
  margin-right: 3px;
  animation: bounce 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.6; }
  30% { transform: translateY(-4px); opacity: 1; }
}

@keyframes ping-slow {
  0% { transform: scale(1); opacity: 0.4; }
  80%, 100% { transform: scale(1.6); opacity: 0; }
}
.animate-ping-slow { animation: ping-slow 2.4s cubic-bezier(0,0,0.2,1) infinite; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
