/* ========== CSS Custom Properties ========== */
:root {
    --burgundy-800: #800020;
    --burgundy-700: #a21542;
    --burgundy-900: #6b001a;
    --cream-50: #fefdfb;
    --blush-50: #fef7f5;
}

/* ========== Base Reset & Typography ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* ========== Section Label ========== */
.section-label {
    display: block;
}

/* ========== Hero Animations ========== */
.hero-anim {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-anim:nth-child(1) { transition-delay: 0.1s; }
.hero-anim:nth-child(2) { transition-delay: 0.2s; }
.hero-anim:nth-child(3) { transition-delay: 0.3s; }
.hero-anim:nth-child(4) { transition-delay: 0.4s; }
.hero-anim:nth-child(5) { transition-delay: 0.5s; }

/* ========== Floating Card ========== */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* ========== Scroll Reveal (Below the fold only) ========== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
}

/* Reduced motion: keep everything visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .floating-card {
        animation: none;
    }
}

/* ========== Card Services Hover ========== */
.card-service {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.5s ease, border-color 0.5s ease;
}

.card-service:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(128, 0, 32, 0.15);
}

/* ========== Navbar Scrolled State ========== */
.nav-scrolled {
    background: rgba(254, 253, 251, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(128, 0, 32, 0.08);
}

/* ========== Button Focus States ========== */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--burgundy-700);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========== Selection Color ========== */
::selection {
    background: rgba(128, 0, 32, 0.15);
    color: var(--burgundy-900);
}

/* ========== Smooth Scrollbar ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--cream-50);
}

::-webkit-scrollbar-thumb {
    background: rgba(128, 0, 32, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(128, 0, 32, 0.4);
}

/* ========== Mobile Menu Transition ========== */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

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

/* ========== Back to Top ========== */
#back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== Print Styles ========== */
@media print {
    nav, #back-to-top, .floating-card {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-burgundy-900, .bg-burgundy-800, .bg-burgundy-950 {
        background: #800020 !important;
        color: white !important;
    }
}
