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

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

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #0d9488;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #14b8a6;
}

/* Hero Image Animation */
@keyframes heroZoom {
    from { transform: scale(1.1); }
    to { transform: scale(1); }
}
.hero-img {
    animation: heroZoom 20s ease-out forwards;
}

/* Hero Entrance Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-subtitle {
    animation: fadeDown 0.8s ease-out 0.3s both;
}

.hero-headline {
    animation: fadeUp 1s ease-out 0.6s both;
}

.hero-desc {
    animation: fadeUp 1s ease-out 0.9s both;
}

.hero-cta {
    animation: fadeUp 1s ease-out 1.2s both;
}

.hero-scroll {
    animation: fadeIn 1s ease-out 1.8s both;
}

/* Navbar transition */
#navbar {
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

/* Mobile menu */
#mobileMenu {
    transition: opacity 0.4s ease, pointer-events 0.4s ease;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    transition: opacity 0.3s ease;
}

/* Menu lines animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
    transform-origin: center;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

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

#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: translateY(-4px) rotate(-45deg);
    margin-left: 0;
}

/* Scroll reveal */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Decorative elements */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(13, 148, 136, 0.3), transparent);
}

/* Button focus styles */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selection color */
::selection {
    background-color: rgba(13, 148, 136, 0.3);
    color: #0f172a;
}

/* Image aspect ratios */
.aspect-\[4\/3\] {
    aspect-ratio: 4 / 3;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* 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;
    }
    
    .hero-img {
        animation: none;
        transform: scale(1);
    }
}

/* Tablet and up adjustments */
@media (min-width: 768px) {
    .hero-headline {
        line-height: 1.05;
    }
}

/* Large desktop */
@media (min-width: 1280px) {
    .hero-headline {
        font-size: 5rem;
    }
}
