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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* === Navbar === */
.nav {
    background: rgba(255, 255, 255, 0.0);
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(12px);
}

.nav.scrolled .nav-link {
    color: #334155;
}

.nav.scrolled .nav-link:hover {
    color: #0d9488;
}

.nav.scrolled .logo-text {
    color: #0f172a;
}

/* === Hero === */
.hero {
    position: relative;
}

.hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.82) 0%,
        rgba(15, 35, 55, 0.72) 50%,
        rgba(13, 148, 136, 0.35) 100%
    );
}

.hero-content {
    opacity: 1;
}

.hero-title {
    opacity: 1;
}

.hero-subtitle {
    opacity: 1;
}

.hero-actions {
    opacity: 1;
}

.hero-badges {
    opacity: 1;
}

/* === Buttons === */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
    border-radius: inherit;
}

.btn-secondary {
    backdrop-filter: blur(4px);
}

/* === Service Cards === */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d9488, #5eead4);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* === Section Spacing === */
.section {
    position: relative;
}

/* === Scroll Reveal === */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* === Scroll Indicator === */
.scroll-indicator {
    animation: fadeInUp 1s ease 1.5s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* === Mobile Menu === */
.mobile-menu {
    animation: slideDown 0.3s ease;
}

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

/* === Form Input Focus === */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* === Testimonial Cards === */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 6rem;
    font-family: 'Playfair Display', serif;
    color: rgba(13, 148, 136, 0.08);
    line-height: 1;
    pointer-events: none;
}

/* === CTA Pattern === */
.cta-pattern {
    background-image: radial-gradient(circle, rgba(255,255,255,0.15) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* === Loading state for submit button === */
.btn-submit.loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-submit.loading span {
    opacity: 0;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === Responsive === */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section {
        py: 4rem;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

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