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

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

body {
    background-color: #fefdf8;
    color: #1e3a5f;
    font-family: 'Nunito Sans', system-ui, sans-serif;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ─── Custom Properties ─── */
:root {
    --midnight: #1e3a5f;
    --midnight-light: #4d77bb;
    --mint: #3aad7a;
    --mint-light: #8edbb8;
    --cream: #fefdf8;
    --cream-dark: #fdf9ee;
}

/* ─── Navbar ─── */
#navbar {
    background: rgba(254, 253, 248, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(30, 58, 95, 0.06);
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    box-shadow: 0 4px 30px rgba(30, 58, 95, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #8edbb8, #3aad7a);
    border-radius: 1px;
    transition: width 0.3s ease;
}

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

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

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

#mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 5px;
}

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

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

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

/* ─── Hero ─── */
.hero-badge {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.hero-title {
    animation: fadeInUp 0.8s ease 0.1s forwards;
    opacity: 0;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-cta {
    animation: fadeInUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.hero-stats {
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

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

.floating-card {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ─── Section Components ─── */
.section-label {
    letter-spacing: 0.15em;
}

.section-title {
    line-height: 1.1;
}

.section-subtitle {
    line-height: 1.7;
}

/* ─── Buttons ─── */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    transition: all 0.3s ease;
}

/* ─── Service Cards ─── */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-4px);
}

/* ─── Gallery ─── */
.gallery-item {
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(30, 58, 95, 0.15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item {
    position: relative;
}

/* ─── Testimonial Cards ─── */
.testimonial-card {
    transition: all 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
}

/* ─── Contact Form ─── */
.input-field {
    transition: all 0.3s ease;
}

.input-field:focus {
    box-shadow: 0 0 0 3px rgba(58, 173, 122, 0.1);
}

.input-field::placeholder {
    color: #b8c5d6;
}

.btn-submit {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-submit:hover::after {
    opacity: 1;
}

/* ─── Scroll Animations ─── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    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; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-title span {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .floating-card {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
        display: inline-flex;
    }

    .hero-stats {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-title span {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* ─── Selection ─── */
::selection {
    background: rgba(142, 219, 184, 0.3);
    color: #1e3a5f;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9db3d9;
}
