/* ── Base & Animations ── */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Fade-up animation */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fadeUp 0.7s ease-out both;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* Staggered reveal children */
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }

/* ── Navbar scroll state ── */
#navbar.scrolled {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

/* ── Mobile menu ── */
.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.mobile-link:last-child {
  border-bottom: none;
}

/* ── Selection ── */
::selection {
  background: rgba(13, 148, 136, 0.15);
  color: #0f766e;
}

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

/* ── Input autofill ── */
input:-webkit-autofill,
textarea:-webkit-autofill {
  box-shadow: 0 0 0 30px white inset;
  -webkit-text-fill-color: #334155;
}

/* ── Smooth image loading ── */
img {
  opacity: 1;
  transition: opacity 0.3s ease;
}

img[data-src] {
  opacity: 0;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f8fafc;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
