/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #fdfcf8; }
::-webkit-scrollbar-thumb { background: #166534; border-radius: 3px; }

/* ─── Navigation ─── */
#nav {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
#nav.scrolled {
    background: rgba(253, 252, 248, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(22, 101, 52, 0.08);
}

.nav-link {
    position: relative;
    padding-bottom: 2px;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #166534;
    transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* ─── Mobile Menu ─── */
#mobile-menu.open { opacity: 1 !important; pointer-events: all !important; }
.mobile-link { font-size: 1.5rem; }
.menu-line { transition: transform 0.3s ease, opacity 0.3s ease; }
.menu-btn.active .menu-line:first-child { transform: rotate(45deg) translate(3px, 3px); }
.menu-btn.active .menu-line:last-child { transform: rotate(-45deg) translate(3px, -3px); }
.menu-btn.active .menu-line { opacity: 0; }
.menu-btn.active .menu-line:first-child,
.menu-btn.active .menu-line:last-child { opacity: 1; }

/* ─── Buttons ─── */
.btn-primary {
    background: #166534;
    color: #fdfcf8;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 14px 28px;
    border-radius: 0;
    transition: background 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-primary:hover {
    background: #14532d;
    transform: translateY(-1px);
}
.btn-ghost {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #1a1a1a;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: color 0.3s ease;
}
.btn-ghost:hover { color: #166534; }

/* ─── Hero ─── */
.hero-eyebrow {
    opacity: 0;
    animation: fadeUp 0.8s ease 0.3s forwards;
}
.hero-headline {
    opacity: 0;
    animation: fadeUp 0.8s ease 0.5s forwards;
}
.hero-sub {
    opacity: 0;
    animation: fadeUp 0.8s ease 0.7s forwards;
}
.hero-cta {
    opacity: 0;
    animation: fadeUp 0.8s ease 0.9s forwards;
}
.hero-img {
    opacity: 0;
    animation: fadeIn 1s ease 0.4s forwards;
}
.hero-img-wrap {
    opacity: 0;
    animation: fadeIn 1s ease 0.2s forwards;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scrollLine {
    0% { top: -50%; }
    100% { top: 150%; }
}
.scroll-line { animation: scrollLine 1.5s ease infinite; }

/* ─── Section Shared ─── */
.section-eyebrow { margin-bottom: 1rem; }
.section-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 1rem;
}
.section-subtitle {
    max-width: 32rem;
}

/* ─── Service Cards ─── */
.service-card {
    transition: background 0.5s ease;
}
.service-icon {
    transition: color 0.5s ease;
}

/* ─── Gallery ─── */
.gallery-item {
    overflow: hidden;
    cursor: pointer;
}
.gallery-img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

/* ─── Input Fields ─── */
.input-field {
    border: none;
    border-bottom: 1px solid #d1d5db;
    padding: 10px 0;
    outline: none;
    transition: border-color 0.3s ease;
    background: transparent;
    color: #1a1a1a;
}
.input-field::placeholder { color: #9ca3af; }
.input-field:focus { border-bottom-color: #166534; }
select.input-field {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    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='%23166534' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 32px;
}

/* ─── Contact Item ─── */
.contact-item {
    text-decoration: none;
}

/* ─── Reveal Animations (progressive enhancement) ─── */
.reveal-section,
.reveal-left,
.reveal-right,
.reveal-grid {
    opacity: 1; /* visible by default — JS enhances with animation */
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-section,
    .reveal-left,
    .reveal-right,
    .reveal-grid {
        opacity: 0;
    }
    .reveal-section.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed,
    .reveal-grid.revealed {
        opacity: 1;
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    .reveal-left.revealed,
    .reveal-right.revealed {
        transform: translateX(0) !important;
    }
    .reveal-left { transform: translateX(-30px); }
    .reveal-right { transform: translateX(30px); }
    .reveal-grid { transform: translateY(20px); }
    .reveal-grid.revealed { transform: translateY(0); }
}
