/* ============================================
   Git'er Done Paint and Body — Custom Styles
   ============================================ */

/* --- Base --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background: #7B1E2A;
  color: #FDF8F6;
}

/* --- Custom scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FDF8F6;
}
::-webkit-scrollbar-thumb {
  background: #c45a6e;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #7B1E2A;
}

/* --- Navbar --- */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
  background: rgba(253, 248, 246, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(123, 30, 42, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #7B1E2A;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

#navbar.scrolled .nav-link {
  color: #44403C;
}

#navbar.scrolled .nav-link:hover {
  color: #7B1E2A;
}

/* --- Mobile menu --- */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu.closed {
  opacity: 0;
  pointer-events: none;
}

.menu-line {
  transition: all 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

#menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
  width: 20px;
  transform: rotate(-45deg) translate(3px, -3px);
  margin-left: 0;
}

/* --- Reveal animations (progressive enhancement) --- */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
  }

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

  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
  .reveal-delay-4 { transition-delay: 0.4s; }
}

/* --- Card hover --- */
.card-hover {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(123, 30, 42, 0.12);
}

/* --- 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='%2378746C' 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 1rem center;
  appearance: none;
  -webkit-appearance: none;
}

/* --- Smooth image loading --- */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* --- Focus visible --- */
:focus-visible {
  outline: 2px solid #7B1E2A;
  outline-offset: 2px;
}

/* --- Button press effect --- */
button, a {
  -webkit-tap-highlight-color: transparent;
}

button:active, a:active {
  transform: scale(0.98);
}

/* --- Print styles --- */
@media print {
  #navbar, #mobile-menu { display: none; }
  body { color: #000; background: #fff; }
  a { color: #000; }
}
