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

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

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* ── Scroll Reveal ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .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; }
}

/* ── Hero entrance animations ── */
@media (prefers-reduced-motion: no-preference) {
    .hero-subtitle {
        animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }
    .hero-desc {
        animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.15s forwards;
        opacity: 0;
    }
    .hero-ctas {
        animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards;
        opacity: 0;
    }
    .hero-trust {
        animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.45s forwards;
        opacity: 0;
    }

    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(24px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* ── Navbar scroll state ── */
#navbar.scrolled {
    background-color: rgba(254, 252, 251, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(138, 37, 37, 0.08);
}

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

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

.menu-line:nth-child(3) {
    margin-left: auto;
}

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

.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    margin-left: 0;
}

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

::-webkit-scrollbar-track {
    background: #fdf6f2;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #8a2525;
}

/* ── Selection ── */
::selection {
    background-color: #c43b3b;
    color: #fefcfb;
}

/* ── Form focus styles ── */
input:focus,
textarea:focus {
    outline: none;
}

/* ── Image aspect ratio utilities ── */
.aspect-\[4\/5\] { aspect-ratio: 4 / 5; }
.aspect-\[4\/3\] { aspect-ratio: 4 / 3; }
.aspect-\[5\/6\] { aspect-ratio: 5 / 6; }
.aspect-\[16\/9\] { aspect-ratio: 16 / 9; }
.aspect-square { aspect-ratio: 1 / 1; }

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