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

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

body {
    margin: 0;
    line-height: 1.6;
}

/* === Scroll Reveal === */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* === Navbar === */
#navbar {
    background: rgba(254, 252, 246, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#navbar.scrolled {
    background: rgba(254, 252, 246, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
}

.nav-logo-text {
    transition: color 0.3s ease;
}

/* === Mobile Menu === */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

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

.mobile-link {
    opacity: 1;
    transform: none;
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

.mobile-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* === Hero Shapes === */
@media (prefers-reduced-motion: no-preference) {
    .hero-shape-1 {
        animation: float-slow 8s ease-in-out infinite;
    }
    .hero-shape-2 {
        animation: float-medium 6s ease-in-out infinite;
        animation-delay: -2s;
    }
    .hero-shape-3 {
        animation: float-fast 5s ease-in-out infinite;
        animation-delay: -1s;
    }
}

@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -15px) scale(1.03); }
}

@keyframes float-medium {
    0%, 100% { transform: rotate(12deg) translate(0, 0); }
    50% { transform: rotate(15deg) translate(-10px, 20px); }
}

@keyframes float-fast {
    0%, 100% { transform: rotate(-12deg) translate(0, 0); }
    50% { transform: rotate(-8deg) translate(15px, -10px); }
}

/* === Marquee === */
.marquee-track {
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* === Menu Lines Animation === */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

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

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

#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

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

/* === Selection === */
::selection {
    background: #b83939;
    color: #fefcf6;
}

/* === Image Optimization === */
img {
    max-width: 100%;
    height: auto;
}

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

/* === Card Hover Transforms === */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}
