/* ── Reset & Base ───────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg {
    display: block;
    max-width: 100%;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* ── Scrollbar ──────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f0f5f2;
}
::-webkit-scrollbar-thumb {
    background: #84b096;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #589171;
}

/* ── Scroll Animations (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* ── No-JS fallback: all content visible ────────── */
.no-js .reveal {
    opacity: 1;
    transform: none;
}

/* ── Hero scroll indicator ──────────────────────── */
@keyframes scrollLine {
    0% { top: -16px; }
    100% { top: 40px; }
}
.scroll-line {
    animation: scrollLine 1.2s ease-in-out infinite;
}

/* ── Navbar ─────────────────────────────────────── */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(253, 250, 245, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
}

.nav-link {
    position: relative;
}

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

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

#navbar.scrolled .nav-link {
    color: #1B4332;
}

#navbar.scrolled .nav-link::after {
    background: #1B4332;
}

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

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

.menu-line {
    transition: all 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-toggle.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(4px, -4px);
}

.mobile-nav-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-nav-link:nth-child(5) { transition-delay: 0.25s; }

/* ── Service cards ──────────────────────────────── */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: #1B4332;
    transition: height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-card:hover::before {
    height: 100%;
}

/* ── Testimonial cards ──────────────────────────── */
.testimonial-card {
    position: relative;
}

.testimonial-card::after {
    content: '"';
    position: absolute;
    top: 16px;
    right: 24px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 6rem;
    line-height: 1;
    color: rgba(27, 67, 50, 0.06);
    pointer-events: none;
}

/* ── Form focus styles ──────────────────────────── */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ── Selection ──────────────────────────────────── */
::selection {
    background: #1B4332;
    color: #D4A373;
}

/* ── Print ──────────────────────────────────────── */
@media print {
    #navbar, #mobile-menu { display: none; }
    body { color: #000; background: #fff; }
    .reveal { opacity: 1; transform: none; }
}
