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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

img, svg {
    display: block;
    max-width: 100%;
}

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

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

ul {
    list-style: none;
}

/* ===== NAVBAR ===== */
.nav-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(254, 243, 238, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(232, 112, 83, 0.1);
    transition: box-shadow 0.3s ease;
}

.nav-fixed.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.nav-link {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--charcoal-600, #3d3e45);
    border-radius: 0.5rem;
    transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
    color: #E87053;
    background: rgba(232, 112, 83, 0.08);
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--charcoal-600, #3d3e45);
    border-radius: 0.75rem;
    transition: color 0.2s, background 0.2s;
}

.mobile-nav-link:hover {
    color: #E87053;
    background: rgba(232, 112, 83, 0.08);
}

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, #fef3ee 0%, #fde4d8 50%, #fbc9b8 100%);
    position: relative;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: blobFloat 8s ease-in-out infinite;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: rgba(232, 112, 83, 0.2);
    top: -100px;
    right: 10%;
    animation-delay: 0s;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: rgba(232, 112, 83, 0.15);
    bottom: 10%;
    left: -5%;
    animation-delay: -3s;
}

.blob-3 {
    width: 200px;
    height: 200px;
    background: rgba(232, 112, 83, 0.25);
    top: 40%;
    right: -3%;
    animation-delay: -5s;
}

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

/* ===== SERVICE CARDS ===== */
.service-card {
    opacity: 1;
}

/* ===== GALLERY ===== */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

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

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

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: #E87053;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(232, 112, 83, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s;
    z-index: 90;
}

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

.back-to-top:hover {
    background: #d45a3e;
    transform: translateY(-2px);
}

/* ===== SCROLL REVEAL ===== */
/* Default: visible (no-JS friendly) */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }

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

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

/* ===== MOBILE MENU ANIMATION ===== */
#menuIconOpen span:nth-child(1) {
    transform-origin: center;
}

#menuIconOpen span:nth-child(3) {
    transform-origin: center;
}

body.menu-open #menuIconOpen span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

body.menu-open #menuIconOpen span:nth-child(2) {
    opacity: 0;
}

body.menu-open #menuIconOpen span:nth-child(3) {
    transform: translateX(8px) rotate(-45deg);
    width: 1.25rem;
}

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

/* ===== SELECTION ===== */
::selection {
    background: rgba(232, 112, 83, 0.2);
    color: #1e1f24;
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 640px) {
    .nav-fixed {
        background: rgba(254, 243, 238, 0.95);
    }

    .hero {
        min-height: auto;
        padding-top: 6rem;
        padding-bottom: 4rem;
    }

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

    .service-card .bg-coral-50,
    .service-card .bg-charcoal-100,
    .service-card .bg-charcoal-800 {
        border-radius: 1.5rem;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .hero {
        padding-top: 5rem;
        padding-bottom: 4rem;
    }
}

/* Reduced motion: disable animations */
@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;
    }

    .back-to-top {
        transition: none;
    }
}
