/* ============================================
   Carvajal Tax Corp — Custom Styles
   ============================================ */

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

body {
  overflow-x: hidden;
}

/* Selection */
::selection {
  background: rgba(58, 148, 104, 0.2);
  color: #15203c;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f0f3f8;
}
::-webkit-scrollbar-thumb {
  background: #abb8df;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #8195d0;
}

/* Scroll Reveal — default state is VISIBLE (progressive enhancement) */
.scroll-reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* When JS is active and prefers-reduced-motion is off, add hidden initial state */
@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navbar transition */
#navbar {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Mobile menu animation */
#mobileMenu {
  animation: slideDown 0.3s ease forwards;
}

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

/* Hero text animation — only for below-fold, hero is always visible */
/* (Hero content is naturally visible — no animation needed) */

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #5fb88e;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Print styles */
@media print {
  nav, #contactForm, .scroll-reveal { display: none; }
  body { color: #000; background: #fff; }
}
