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

html { scroll-behavior: smooth; }

body {
    background: #f8fafc;
    -webkit-font-smoothing: antialiased;
}

/* ─── NAVBAR ─── */
#navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: box-shadow 0.3s ease;
}

#navbar.nav-scrolled {
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.nav-link { position: relative; }

/* ─── MOBILE MENU ─── */
.mobile-menu-btn { transition: background 0.2s; }
.mobile-menu { 
    animation: slideDown 0.3s ease;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, max-height 0.4s ease;
}
.mobile-menu.open { max-height: 400px; }

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

.hamburger-line { transition: all 0.3s ease !important; }
.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translate(-50%, -50%) rotate(45deg);
}
.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* ─── HERO ─── */
.hero {
    position: relative;
    overflow: hidden;
    background: #0f172a;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.82) 0%,
        rgba(13, 148, 136, 0.65) 50%,
        rgba(15, 23, 42, 0.80) 100%
    );
}

.hero-content { min-height: 85vh; display: flex; align-items: center; }

.hero-badge {
    animation: fadeInUp 0.8s ease both;
}

.hero-headline {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: #ffffff;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease 0.15s both;
}

.hero-accent {
    color: #5eead4;
    display: block;
}

.hero-subtitle {
    color: rgba(255,255,255,0.85);
    animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-ctas {
    animation: fadeInUp 0.8s ease 0.45s both;
}

.hero-trust {
    animation: fadeInUp 0.8s ease 0.6s both;
}

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

.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 1;
}

/* ─── BUTTONS ─── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #0d9488;
    color: #fff;
    font-weight: 600;
    padding: 0.875rem 1.75rem;
    border-radius: 9999px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 16px rgba(13,148,136,0.35);
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.btn-primary:hover {
    background: #0f766e;
    box-shadow: 0 6px 24px rgba(13,148,136,0.45);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    color: #fff;
    font-weight: 600;
    padding: 0.875rem 1.75rem;
    border-radius: 9999px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.3);
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
}

/* ─── SECTION COMMON ─── */
.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #0d9488;
    background: #ccfbf1;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
}

.section-title {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.section-desc {
    font-size: 1.1rem;
    color: #64748b;
    line-height: 1.7;
}

/* ─── SERVICE CARDS ─── */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* ─── PROJECT CARDS ─── */
.project-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

/* ─── TESTIMONIAL CARDS ─── */
.testimonial-card {
    transition: transform 0.3s ease, background 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.15);
}

/* ─── FORM ─── */
.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.input-field::placeholder { color: #94a3b8; }

.input-field:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13,148,136,0.12);
}

.input-field:hover:not(:focus) {
    border-color: #94a3b8;
}

/* ─── BACK TO TOP ─── */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #0d9488;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(13,148,136,0.4);
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    z-index: 50;
}

.back-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(13,148,136,0.5);
}

/* ─── SCROLL REVEAL (below-fold only, progressive enhancement) ─── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .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; }
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
