/* ── Base & Resets ── */
*, *::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: #e8625a;
    color: white;
}

/* ── Navbar ── */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 248, 245, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-logo-text {
    transition: color 0.3s ease;
}

#navbar.scrolled .nav-logo-text {
    color: #1c1c1f;
}

/* ── Hero Blobs ── */
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: blobFloat 20s ease-in-out infinite;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: #ffece9;
    top: -10%;
    right: -5%;
    animation-delay: 0s;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: #e8ede6;
    bottom: 5%;
    left: 10%;
    animation-delay: -7s;
}

.blob-3 {
    width: 250px;
    height: 250px;
    background: #ffd5cf;
    top: 40%;
    right: 30%;
    animation-delay: -14s;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(15px, 30px) scale(1.02); }
}

/* ── Hero Badge ── */
.hero-badge {
    animation: fadeInDown 0.8s ease forwards;
}

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

/* ── Contact Blobs ── */
.contact-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
}

.contact-blob.blob-1 {
    width: 500px;
    height: 500px;
    background: #e8625a;
    top: -15%;
    right: -5%;
}

.contact-blob.blob-2 {
    width: 350px;
    height: 350px;
    background: #d94f47;
    bottom: -10%;
    left: 5%;
}

/* ── Reveal Animations ── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: none;
}

/* When JS adds the animated class, only animate if user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal.animate-on-scroll {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.animate-on-scroll.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

#mobile-menu.open .mobile-link {
    animation: mobileLinkIn 0.4s ease forwards;
    animation-delay: calc(var(--i) * 0.06s);
    opacity: 0;
}

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

/* Hamburger animation */
#mobile-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobile-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

#mobile-toggle.active .hamburger-line:nth-child(3) {
    width: 1.25rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Smooth scroll offset for fixed nav ── */
section[id] {
    scroll-margin-top: 80px;
}

/* ── Image hover effects ── */
.rounded-3xl.overflow-hidden {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.rounded-3xl.overflow-hidden:hover {
    transform: scale(1.01);
}

/* ── Focus styles ── */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid #e8625a;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Mobile responsiveness ── */
@media (max-width: 768px) {
    .hero-blob {
        filter: blur(60px);
        opacity: 0.35;
    }

    .blob-1 {
        width: 300px;
        height: 300px;
    }

    .blob-2 {
        width: 200px;
        height: 200px;
    }

    .blob-3 {
        width: 150px;
        height: 150px;
    }

    #hero h1 {
        font-size: 2.75rem;
    }

    #hero h1 br {
        display: none;
    }

    .floating-card {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        margin-top: 1rem;
        max-width: 100%;
    }

    .contact-blob {
        filter: blur(60px);
        opacity: 0.1;
    }
}

@media (max-width: 640px) {
    #hero h1 {
        font-size: 2.25rem;
    }

    .font-serif.text-4xl,
    .font-serif.text-5xl {
        font-size: 2rem;
    }
}
