/* Custom styles for SofiaAutosales */

:root {
  --color-midnight-950: #030812;
  --color-midnight-900: #0A1F3F;
  --color-mint-500: #4ECDC4;
  --color-mint-600: #3DB8AE;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection color */
::selection {
  background-color: rgba(78, 205, 196, 0.25);
  color: var(--color-midnight-950);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-midnight-950);
}
::-webkit-scrollbar-thumb {
  background: rgba(78, 205, 196, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(78, 205, 196, 0.5);
}

/* Scroll reveal base — visible by default for accessibility */
.scroll-reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Progressive enhancement: animate on scroll when JS is available and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
  }
  .scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile menu transition */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
#mobile-menu.open {
  max-height: 400px;
}

/* Navbar scroll state */
#navbar.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Form select arrow */
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='%230A1F3F' 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;
}

/* Subtle pattern for hero background */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.02) 1px, transparent 0);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-mint-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Print styles */
@media print {
  #navbar, #mobile-menu, .scroll-reveal { display: block; opacity: 1; }
  footer { background: white; color: black; }
}
