/* ─── Reset & Base ─── */
*, *::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: #fbbf24;
    color: #0f172a;
}

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

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

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

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ─── Scroll Reveal (progressive enhancement) ─── */
@media (prefers-reduced-motion: no-preference) {
    .reveal-section {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    .reveal-section:nth-child(2) { transition-delay: 0.1s; }
    .reveal-section:nth-child(3) { transition-delay: 0.2s; }
    .reveal-section:nth-child(4) { transition-delay: 0.3s; }
    .reveal-section:nth-child(5) { transition-delay: 0.4s; }
    .reveal-section:nth-child(6) { transition-delay: 0.5s; }
}

/* ─── Hero Animations ─── */
@media (prefers-reduced-motion: no-preference) {
    .hero-badge {
        animation: fadeDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
        animation-delay: 0.2s;
    }

    .hero-title {
        animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
        animation-delay: 0.4s;
    }

    .hero-subtitle {
        animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
        animation-delay: 0.6s;
    }

    .hero-ctas {
        animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
        animation-delay: 0.8s;
    }
}

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

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Navbar ─── */
#navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#navbar.scrolled {
    background: rgba(2, 6, 23, 0.95);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-link {
    position: relative;
}

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

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

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

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.menu-line {
    display: block;
    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);
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: #fbbf24;
    transition: height 0.4s ease;
}

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

/* ─── Why Us Cards ─── */
.why-card {
    position: relative;
}

/* ─── 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(251, 191, 36, 0.08);
    pointer-events: none;
}

/* ─── Form ─── */
#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: #fbbf24 !important;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

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

::-webkit-scrollbar-track {
    background: #0f172a;
}

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

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

/* ─── Responsive ─── */
@media (max-width: 767px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    #hero h1 {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    #hero h1 {
        font-size: clamp(3rem, 7vw, 5rem);
    }
}
