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

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

body {
    margin: 0;
    font-family: 'Outfit', system-ui, sans-serif;
    line-height: 1.6;
}

::selection {
    background: #E8635A;
    color: #fff;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

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

/* Fallback: always visible if JS disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal-up {
        opacity: 1;
        transform: none;
    }
}

/* ===== Floating Animations ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(12deg); }
    50% { transform: translateY(-16px) rotate(12deg); }
}

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

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
    animation: float-delay 5s ease-in-out infinite;
    animation-delay: 1.5s;
}

/* ===== Scroll Line Animation ===== */
@keyframes scroll-line {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

.animate-scroll-line {
    animation: scroll-line 2s ease-in-out infinite;
}

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

#navbar.scrolled {
    background-color: rgba(28, 29, 36, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}

/* ===== Mobile Menu ===== */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.mobile-link {
    display: block;
    padding: 8px 0;
}

/* ===== Button Hover Effects ===== */
a[href^="tel"] {
    text-decoration: none;
}

/* ===== Image Loading ===== */
img {
    display: block;
    max-width: 100%;
}

/* ===== Focus Styles ===== */
a:focus-visible, button:focus-visible {
    outline: 2px solid #E8635A;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Smooth Scroll Offset for Anchor Links ===== */
section[id] {
    scroll-margin-top: 80px;
}

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

::-webkit-scrollbar-track {
    background: #1C1D24;
}

::-webkit-scrollbar-thumb {
    background: #42434D;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6B6C7A;
}
