/* ========== BASE & RESET ========== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ========== NAVIGATION ========== */
#site-header { background: transparent; transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease; }
#site-header.scrolled { background: rgba(253, 252, 250, 0.95); backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(0,0,0,0.06); }
.nav-link { position: relative; }
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 50%; width: 0; height: 2px; background: #B8583A; transform: translateX(-50%); transition: width 0.2s ease; }
.nav-link:hover::after { width: 60%; }

/* ========== MOBILE MENU ========== */
#mobile-menu { animation: slideDown 0.25s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.mobile-nav-link { display: block; }

/* ========== FLOATING CARDS ========== */
.floating-card { animation: float 6s ease-in-out infinite; }
.floating-card:nth-child(2) { animation-delay: -2s; animation-duration: 7s; }
.floating-card:nth-child(3) { animation-delay: -4s; animation-duration: 5.5s; }
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* ========== SCROLL REVEAL ========== */
.scroll-reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.scroll-reveal.revealed { opacity: 1; transform: translateY(0); }
.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.5s; }

/* ========== BACK TO TOP ========== */
.back-to-top {
    position: fixed; bottom: 2rem; right: 2rem; z-index: 40;
    width: 44px; height: 44px; border-radius: 12px;
    background: #B8583A; color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(184, 88, 58, 0.35);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background 0.2s ease;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: #a34d35; transform: translateY(-2px); }

/* ========== FOCUS STYLES ========== */
:focus-visible { outline: 2px solid #B8583A; outline-offset: 2px; }

/* ========== SELECTION ========== */
::selection { background: rgba(184, 88, 58, 0.15); color: #1E3A5F; }

/* ========== FORM STYLES ========== */
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='%237A6149' 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; padding-right: 2.5rem; }

/* ========== ACCESSIBILITY: reduced motion ========== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    html { scroll-behavior: auto; }
    .scroll-reveal { opacity: 1; transform: none; }
    .floating-card { animation: none; }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
    .floating-card { display: none; }
}
