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

::selection {
    background: rgba(94, 234, 212, 0.2);
    color: #0f172a;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: rgba(94, 234, 212, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(94, 234, 212, 0.5);
}

/* ===== Hero Animations ===== */
.hero-title {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.8s ease forwards;
    animation-delay: 0.2s;
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: heroReveal 0.8s ease forwards;
    animation-delay: 0.1s;
}

.hero-desc {
    opacity: 0;
    transform: translateY(20px);
    animation: heroReveal 0.8s ease forwards;
    animation-delay: 0.3s;
}

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

/* ===== Scroll Indicator ===== */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ===== Navbar ===== */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

.navbar-dark {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.navbar-dark .nav-link {
    color: rgba(255, 255, 255, 0.7);
}

.navbar-dark .navbar-logo-text {
    color: #ffffff;
}

.navbar-dark .mobile-menu-link {
    color: #ffffff;
}

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

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

/* ===== Service Cards ===== */
.service-card {
    transition: background-color 0.5s ease;
}

.service-card:hover {
    background-color: #0f172a !important;
}

/* ===== Button Styles ===== */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* ===== Mobile Menu ===== */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

#bar1.open {
    transform: rotate(45deg) translate(3px, 3px);
}

#bar2.open {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ===== Link Underline Animation ===== */
.nav-link {
    position: relative;
}

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

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

/* ===== Input Focus ===== */
input:focus,
textarea:focus {
    border-color: #5eead4 !important;
    box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.2);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem !important;
    }
    
    .hero-title lg\:text-8xl {
        font-size: 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;
    }
    
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
