/* Base & Reset */
*, *::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;
}

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

/* Selection */
::selection {
    background: #f97583;
    color: #fff;
}

/* Nav */
.nav-logo-text {
    line-height: 1.3;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #f97583;
    transition: width 0.3s ease;
}

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

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .nav-logo-text,
#navbar.scrolled .nav-link {
    color: #1a1a1a;
}

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

.menu-line:last-child {
    width: 1.4rem;
}

#menu-toggle.active .menu-line:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}

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

#menu-toggle.active .menu-line:last-child {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.4rem;
}

/* Hero decorations */
.hero-deco {
    animation: float 8s ease-in-out infinite;
}

.hero-deco:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 10s;
}

.hero-deco:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 12s;
}

.hero-deco:nth-child(4) {
    animation-delay: -6s;
    animation-duration: 9s;
}

.hero-line {
    animation: lineFade 3s ease-in-out infinite;
}

.hero-line:nth-child(5) {
    animation-delay: -1s;
}

.hero-line:nth-child(6) {
    animation-delay: -2s;
}

.hero-line:nth-child(7) {
    animation-delay: -0.5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(10px, -10px) scale(1.02); }
}

@keyframes lineFade {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Hero elements stagger */
.hero-elem {
    animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.hero-elem:nth-child(1) { animation-delay: 0.1s; }
.hero-elem:nth-child(2) { animation-delay: 0.25s; }
.hero-elem:nth-child(3) { animation-delay: 0.4s; }
.hero-elem:nth-child(4) { animation-delay: 0.55s; }

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

/* Scroll reveal */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Service cards */
.service-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Process steps */
.process-step {
    position: relative;
}

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Smooth focus outlines */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Prefers 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;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Tablet */
@media (max-width: 767px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}

/* Large desktop */
@media (min-width: 1280px) {
    .max-w-6xl {
        max-width: 72rem;
    }
}
