/* ========== BASE & RESET ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(197, 160, 89, 0.2);
    color: #1e3a5f;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scrollLine {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

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

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

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

/* ========== SCROLL REVEAL ========== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    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-left {
    opacity: 0;
    transform: translateX(-40px);
    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-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    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-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* ========== HEADER ========== */
#header {
    transition: background-color 0.4s ease, 
                box-shadow 0.4s ease,
                padding 0.4s ease;
}

#header.scrolled {
    background-color: rgba(250, 248, 245, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(30, 58, 95, 0.06);
}

#header.scrolled .header-color {
    stroke: #1e3a5f;
}

#header.scrolled .header-text {
    color: #1e3a5f;
}

#header.scrolled .header-subtext {
    color: #6b7a8d;
}

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

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

#mobileMenu.open #line1 {
    transform: rotate(45deg) translate(4px, 4px);
}

#mobileMenu.open #line2 {
    opacity: 0;
    transform: translateX(10px);
}

#mobileMenu.open #line3 {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ========== SERVICE CARDS ========== */
.service-card {
    transition: background-color 0.3s ease;
}

.service-card:hover {
    background-color: #faf8f5;
}

/* ========== NAV LINKS ========== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #c5a059;
    transition: width 0.3s ease;
}

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

/* ========== MOBILE NAV LINKS ========== */
.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #c5a059;
    transition: width 0.3s ease;
}

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

/* ========== SCROLL INDICATOR ========== */
.animate-scroll-line {
    animation: scrollLine 1.5s ease-in-out infinite;
}

/* ========== CUSTOM SELECT ========== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7a8d' stroke-width='1.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 2rem;
}

/* ========== FORM INPUTS ========== */
input:focus,
textarea:focus,
select:focus {
    border-color: #c5a059 !important;
}

input:focus + label,
textarea:focus + label,
select:focus + label {
    color: #c5a059;
}

/* ========== SELECTION ========== */
input::placeholder,
textarea::placeholder {
    color: #b8c0cc;
}

/* ========== GALLERY ========== */
.gallery-item {
    overflow: hidden;
    position: relative;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(30, 58, 95, 0);
    transition: background 0.3s ease;
}

.gallery-item:hover::after {
    background: rgba(30, 58, 95, 0.05);
}

/* ========== SMOOTH TRANSITIONS ========== */
a, button, input, textarea, select {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ========== FOCUS VISIBLE ========== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #c5a059;
    outline-offset: 2px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 767px) {
    html {
        font-size: 15px;
    }
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

@media (min-width: 1200px) {
    html {
        font-size: 17px;
    }
}

/* ========== REDUCED 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, .reveal-left, .reveal-right {
        opacity: 1;
        transform: none;
    }
}
