html { scroll-behavior: smooth; }
body {
  background: #020617;
  color: #e2e8f0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.grid-overlay {
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,.35));
}
.section-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(0.16, 1, 0.3, 1), transform .8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.section-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.nav-glass {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.safe-bottom { padding-bottom: env(safe-area-inset-bottom); }

.card-tech-hover {
  @apply transition-all duration-300 ease-out;
}
.card-tech-hover:hover {
  transform: translateY(-0.5rem);
  box-shadow: 0 0 0 1px rgba(34,211,238,.18), 0 18px 50px rgba(34,211,238,.08), 0 18px 60px rgba(2,6,23,.22);
}

.contact-reveal {
  opacity: 0;
  transform: scale(.95);
  transition: opacity .5s ease, transform .5s ease;
  will-change: opacity, transform;
}
.contact-reveal.is-visible {
  opacity: 1;
  transform: scale(1);
}

@keyframes floatSlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(3%, -4%) scale(1.05); }
  66% { transform: translate(-2%, 3%) scale(0.97); }
}
@keyframes floatSlower {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-4%, 4%) scale(1.08); }
}
.blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(70px);
  pointer-events: none;
}
.blob-cyan {
  background: radial-gradient(circle, rgba(34,211,238,.35), transparent 70%);
  animation: floatSlow 18s ease-in-out infinite;
}
.blob-blue {
  background: radial-gradient(circle, rgba(56,189,248,.28), transparent 70%);
  animation: floatSlower 22s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  .section-reveal, .contact-reveal { transition: none; }
}

button, a { -webkit-tap-highlight-color: transparent; }
.press-feedback:active { transform: scale(0.97); }

.form-field.touched:invalid {
  border-color: #f87171;
  background-color: rgba(248,113,113,.06);
}
.form-field.touched:valid {
  border-color: rgba(52,211,153,.5);
}
.field-error {
  display: none;
  margin-top: 0.375rem;
  font-size: 0.75rem;
  line-height: 1.2rem;
  color: #f87171;
}
.form-field.touched:invalid ~ .field-error {
  display: block;
}

.service-accordion summary::-webkit-details-marker {
  display: none;
}
.service-accordion summary {
  list-style: none;
}
.service-accordion > div {
  animation: accordionOpen .25s ease-out;
}
@keyframes accordionOpen {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile menu: controlled via inline style (display) from JS, not Tailwind class toggling,
   to avoid utility-order specificity conflicts between .hidden and .flex. */
#mobileMenu {
  display: none;
  flex-direction: column;
  /* dvh accounts for mobile browser toolbars so the panel isn't clipped */
  top: 5rem;
  height: calc(100dvh - 5rem);
}
#mobileMenu.is-open { display: flex; }
@media (min-width: 1024px) {
  #mobileMenu { display: none !important; }
}
