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

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

body {
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9f0;
}
::-webkit-scrollbar-thumb {
    background: #e06b52;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d4503a;
}

/* Selection */
::selection {
    background: #f9d5cc;
    color: #753029;
}

/* Hero Content Animation */
.hero-content > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.7s ease forwards;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.25s; }
.hero-content > *:nth-child(3) { animation-delay: 0.4s; }
.hero-content > *:nth-child(4) { animation-delay: 0.55s; }
.hero-content > *:nth-child(5) { animation-delay: 0.7s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar */
.nav-scrolled {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(254, 253, 251, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.04);
}

.nav-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-toggle.active .nav-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#menu-toggle.active .nav-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menu-toggle.active .nav-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(3px, -3px);
}

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

.mobile-menu.open .mobile-link {
    animation: mobileLinkIn 0.4s ease forwards;
}

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

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

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Reduce 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;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Focus styles */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid #e06b52;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Button hover lift */
button, a {
    transition: all 0.2s ease;
}

/* Subtle image parallax on hero */
@media (min-width: 1024px) {
    .lg\:col-span-7 {
        will-change: transform;
    }
}

/* Card hover effects */
.group:hover .group-hover\:bg-terracotta-500 {
    background-color: #e06b52;
}

/* Smooth border radius transitions */
.rounded-2xl, .rounded-3xl {
    transition: box-shadow 0.3s ease;
}

/* Loading state for form */
button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
