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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(201, 168, 76, 0.3);
    color: #f0f0f0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

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

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

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

/* Mobile Navigation */
.nav-menu {
    position: fixed;
    inset: 0;
    z-index: 60;
    background-color: rgba(5, 13, 26, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.nav-menu.nav-open {
    opacity: 1;
    pointer-events: all;
}

.nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 55;
    background-color: rgba(5, 13, 26, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.nav-overlay.nav-overlay-visible {
    opacity: 1;
    pointer-events: all;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #c9a84c, #e4c060);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Menu Button */
.menu-line {
    display: block;
}

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

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

#menu-btn.nav-open .menu-line:nth-child(3) {
    width: 6px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Navbar Scroll */
.nav-scrolled {
    background-color: rgba(5, 13, 26, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Form Messages */
.form-success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #4ade80;
}

.form-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* Back to Top */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

/* Gold gradient text utility */
.text-gradient-gold {
    background: linear-gradient(135deg, #f0d78c, #c9a84c, #b8943f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Smooth focus outlines */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.3);
}

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

::-webkit-scrollbar-track {
    background: #0a1628;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c9a84c, #9a7a32);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #e4c060, #c9a84c);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-menu {
        background-color: rgba(5, 13, 26, 0.99);
    }
}

/* Print styles */
@media print {
    nav, #back-to-top, .reveal {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}
