*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* ── Navbar ── */
nav {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

nav.nav-scrolled {
    background-color: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(251, 191, 36, 0.1), 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #fbbf24, transparent);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after {
    width: 80%;
    left: 10%;
}

/* ── Mobile Menu ── */
.mobile-menu-overlay {
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(4px);
}

.mobile-menu {
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
    transform: translateY(0);
}

.mobile-nav-link {
    transition: color 0.2s ease, background-color 0.2s ease;
}

.mobile-nav-link:hover {
    background-color: rgba(251, 191, 36, 0.05);
}

/* ── Menu Icon Animation ── */
#menu-btn[aria-expanded="true"] #menu-icon span:nth-child(1) {
    transform: translateY(3.5px) rotate(45deg);
}

#menu-btn[aria-expanded="true"] #menu-icon span:nth-child(2) {
    opacity: 0;
}

#menu-btn[aria-expanded="true"] #menu-icon span:nth-child(3) {
    transform: translateY(-3.5px) rotate(-45deg);
}

/* ── Service Cards ── */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(251, 191, 36, 0.15);
}

/* ── Gallery ── */
.gallery-item {
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

/* ── Testimonials ── */
.testimonial-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(251, 191, 36, 0.1);
}

/* ── Scroll Reveal ── */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Progressive enhancement: hide by default, reveal via JS */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Back to Top ── */
.back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:not(.visible) {
    transform: translateY(10px);
}

.back-to-top:hover {
    transform: translateY(-2px) !important;
}

/* ── Gold Accent Line ── */
.gold-line {
    background: linear-gradient(90deg, transparent, #fbbf24, transparent);
}

/* ── Input Focus Ring ── */
input:focus,
textarea:focus {
    outline: none;
}

/* ── Selection ── */
::selection {
    background-color: rgba(251, 191, 36, 0.3);
    color: #f1f5f9;
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #fbbf24, #d97706);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #fcd34d, #fbbf24);
}

/* ── Form success animation ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#form-success.show {
    animation: fadeInUp 0.4s ease forwards;
}
