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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background-color: #C0603A;
    color: #fff;
}

/* ===== NAVIGATION ===== */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(254, 253, 249, 0);
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
    padding: 0;
}

#nav.nav-scrolled {
    background: rgba(254, 253, 249, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.nav-link {
    position: relative;
}

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

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

#nav.scrolled .nav-link {
    color: #57534e;
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
    z-index: 200;
}

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

.mobile-link {
    position: relative;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(30, 20, 15, 0.55) 0%,
        rgba(30, 20, 15, 0.45) 50%,
        rgba(30, 20, 15, 0.70) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 10;
}

/* Hero reveal animation (above-the-fold content — always visible) */
.reveal-hero {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero .reveal-hero {
    animation: heroReveal 0.9s ease forwards;
    opacity: 0;
}

.hero .reveal-hero:nth-child(1) { animation-delay: 0.1s; }
.hero .reveal-hero:nth-child(2) { animation-delay: 0.3s; }
.hero .reveal-hero:nth-child(3) { animation-delay: 0.5s; }
.hero .reveal-hero:nth-child(4) { animation-delay: 0.7s; }

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

/* ===== SECTION PADDING ===== */
.section-padding {
    padding-top: 80px;
    padding-bottom: 80px;
}

@media (max-width: 639px) {
    .section-padding {
        padding-top: 60px;
        padding-bottom: 60px;
    }
}

/* ===== CARDS ===== */
.card {
    background: #fff;
    border-radius: 1.5rem;
    padding: 1.5rem;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

/* ===== SERVICE CARDS ===== */
.service-card {
    padding: 0;
    overflow: hidden;
    border: none;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

/* ===== TESTIMONIAL CARDS ===== */
.testimonial-card {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

/* ===== GALLERY ===== */
.gallery-item {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

/* ===== SCROLL REVEAL (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

    .reveal.revealed:nth-child(1) { transition-delay: 0s; }
    .reveal.revealed:nth-child(2) { transition-delay: 0.1s; }
    .reveal.revealed:nth-child(3) { transition-delay: 0.2s; }
    .reveal.revealed:nth-child(4) { transition-delay: 0.3s; }
}

/* When JS is active, apply the hidden state so JS can trigger the reveal */
.js-active .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ===== BUTTON HOVER EFFECTS ===== */
a[href="#contact"],
button[type="submit"] {
    position: relative;
    overflow: hidden;
}

/* ===== FOCUS STYLES ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #C0603A;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* ===== MOBILE MENU ANIMATION ===== */
.mobile-menu {
    transition: opacity 0.3s ease, pointer-events 0.3s ease;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 767px) {
    .hero {
        min-height: 100svh;
    }

    .hero-content {
        padding-top: 1rem;
    }
}

/* ===== FORM INPUTS ===== */
input,
select,
textarea {
    font-family: inherit;
    font-size: 1rem;
}

/* ===== SUBTLE BODY PATTERN ===== */
body {
    background-image: radial-gradient(circle at 20% 50%, rgba(192, 96, 58, 0.03) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(226, 168, 85, 0.04) 0%, transparent 50%);
}
