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

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

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

::selection {
    background: #f9c4b4;
    color: #6e2618;
}

/* ========== NAVBAR ========== */
.navbar {
    background: rgba(253, 248, 240, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(224, 196, 180, 0.3);
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.navbar.scrolled {
    background: rgba(253, 248, 240, 0.95);
    box-shadow: 0 1px 20px rgba(160, 120, 90, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* ========== MOBILE MENU ========== */
.mobile-link {
    position: relative;
}

/* ========== HERO ========== */
.hero {
    position: relative;
}

.hero-blob {
    animation: blobFloat 8s ease-in-out infinite;
}

.blob-1 {
    animation-delay: 0s;
}

.blob-2 {
    animation-delay: -3s;
}

.blob-3 {
    animation-delay: -5s;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ========== SECTION LABELS ========== */
.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #e05635;
    background: linear-gradient(135deg, #fdf0ec 0%, #fce4da 100%);
    padding: 0.4em 1em;
    border-radius: 100px;
    border: 1px solid #f9c4b4;
}

.section-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 400;
    line-height: 1.15;
    color: #2a231e;
}

.section-desc {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #706055;
}

/* ========== SERVICE CARDS ========== */
.service-card {
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e05635, #f5a08a);
    border-radius: 2px 2px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* ========== DEPARTMENT CARDS ========== */
.dept-card {
    position: relative;
}

.dept-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    transition: border-color 0.3s ease;
}

.dept-card:hover::after {
    border-color: rgba(255, 255, 255, 0.25);
}

/* ========== SCROLL REVEAL (progressive enhancement) ========== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        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; }
}

/* ========== FORM STYLES ========== */
input:focus, textarea:focus {
    outline: none;
}

/* ========== FOCUS VISIBLE ========== */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid #e05635;
    outline-offset: 2px;
    border-radius: 4px;
}

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

::-webkit-scrollbar-track {
    background: #FDF8F0;
}

::-webkit-scrollbar-thumb {
    background: #e4dbd0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d1c4b4;
}

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

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

/* ========== RESPONSIVE ========== */
@media (max-width: 767px) {
    .navbar .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero {
        padding-top: 5rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero h1 {
        font-size: 3.5rem;
    }
}

/* ========== 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 {
        opacity: 1;
        transform: none;
    }
}
