/* Base reset and custom properties */
:root {
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', system-ui, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-sans);
    overflow-x: hidden;
}

/* Hero animations - above the fold, no JS required */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hero elements animation */
#hero .animate-fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Scroll reveal - below the fold only, progressive enhancement */
.scroll-reveal {
    /* Default: always visible, JS adds animation */
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.revealed {
        animation: fadeInUp 0.7s ease-out forwards;
    }
}

/* Navbar transition */
.nav-scrolled {
    background: rgba(10, 22, 40, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-scrolled .font-serif,
.nav-scrolled .font-sans {
    color: #ffffff !important;
}

.nav-scrolled .menu-line {
    background: #ffffff !important;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F0FFF8;
}
::-webkit-scrollbar-thumb {
    background: #1EC488;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #15A06E;
}

/* Selection */
::selection {
    background: #1EC488;
    color: #0A1628;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #1EC488;
    outline-offset: 2px;
}

/* Image placeholder fallbacks */
img {
    max-width: 100%;
    height: auto;
}

/* Responsive typography adjustments */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.1 !important;
    }
}

/* Print styles */
@media print {
    nav, #contact-form, #form-success, .scroll-reveal {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
