/* ===== Base & Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

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

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

/* ===== Navbar ===== */
.nav-fixed {
    background: rgba(250, 245, 251, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(139, 61, 130, 0.08);
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

.nav-fixed.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(123, 45, 110, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* ===== Mobile Menu ===== */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-menu.open {
    max-height: 400px;
}

.mobile-menu-link {
    position: relative;
    padding-left: 0;
    transition: padding-left 0.2s ease, color 0.2s ease;
}

.mobile-menu-link:hover {
    padding-left: 8px;
    color: #a855a0;
}

.mobile-menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #a855a0, #f2ad3a);
    border-radius: 1px;
    transition: width 0.2s ease;
}

.mobile-menu-link:hover::before {
    width: 4px;
}

/* ===== Buttons ===== */
.btn-primary {
    background: linear-gradient(135deg, #a855a0 0%, #8b3d82 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 1rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 4px 15px rgba(139, 61, 130, 0.25);
    display: inline-flex;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 61, 130, 0.35);
    background: linear-gradient(135deg, #b366aa 0%, #9a4d91 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: white;
    padding: 14px 28px;
    border-radius: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== Inputs ===== */
.input-field {
    border: 2px solid #f0e0f5;
    border-radius: 0.75rem;
    padding: 12px 16px;
    font-family: 'Nunito', system-ui, sans-serif;
    font-size: 1rem;
    color: #4f1d46;
    background: #faf5fb;
    transition: all 0.2s ease;
    outline: none;
    width: 100%;
}

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

.input-field:focus {
    border-color: #a855a0;
    background: white;
    box-shadow: 0 0 0 4px rgba(168, 85, 160, 0.1);
}

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

/* ===== Floating Animation ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

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

.animation-delay-1500 {
    animation-delay: 1.5s;
}

.animation-delay-3000 {
    animation-delay: 3s;
}

/* ===== Blob Animation ===== */
@keyframes blob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -30px) scale(1.1); }
    50% { transform: translate(-10px, 20px) scale(0.95); }
    75% { transform: translate(15px, 10px) scale(1.05); }
}

.animate-blob {
    animation: blob 8s ease-in-out infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

/* ===== Scroll Indicator ===== */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(8px); opacity: 1; }
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 1rem;
    background: linear-gradient(135deg, #a855a0, #8b3d82);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(139, 61, 130, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 40;
}

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

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(139, 61, 130, 0.4);
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(139, 61, 130, 0.3), rgba(242, 173, 58, 0.2));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

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

/* ===== Service Card ===== */
.service-card {
    cursor: default;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .font-display {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
}

/* ===== Reduced Motion ===== */
@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;
    }

    .scroll-reveal {
        opacity: 1;
        transform: none;
    }

    .animate-float {
        animation: none;
    }

    .animate-blob {
        animation: none;
    }
}
