/* ── Base & Typography ── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(20, 184, 166, 0.3);
  color: #f0fdfa;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #020617;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* ── Navbar ── */
#navbar {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#navbar.scrolled {
  background: rgba(2, 6, 23, 0.92);
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
  box-shadow: 0 1px 40px rgba(0, 0, 0, 0.4);
}

/* ── Hero ── */
#hero {
  position: relative;
}

#hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, #020617, transparent);
  pointer-events: none;
}

/* ── Section Divider ── */
section + section::before {
  content: '';
  display: block;
}

/* ── Image hover zoom ── */
.group img {
  will-change: transform;
}

/* ── Focus visible ── */
*:focus-visible {
  outline: 2px solid #14b8a6;
  outline-offset: 2px;
}

/* ── Select styling ── */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .group img {
    transition: none;
  }
  .group:hover img {
    transform: none;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Mobile menu animation ── */
#mobile-menu {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Form success animation ── */
#form-success {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
