/* ===== BASE & RESET ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f0fdfa;
}
::-webkit-scrollbar-thumb {
    background: #99f6e4;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5eead4;
}

/* ===== ANIMATIONS ===== */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-scroll {
    animation: scroll 30s linear infinite;
}

.animate-scroll:hover {
    animation-play-state: paused;
}

/* ===== SCROLL REVEAL (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* Fallback: always visible if JS is disabled or prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ===== NAVBAR SCROLLED STATE ===== */
#site-header.scrolled #nav-inner {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
    border-radius: 0 0 16px 16px;
    max-width: 720px;
    margin: 0 auto;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

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

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

/* ===== MOBILE NAV LINKS ===== */
.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 24px;
    height: 2px;
    background: #0d9488;
    border-radius: 1px;
    transition: transform 0.3s ease;
}

.mobile-nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* ===== FORM STYLES ===== */
input:focus, textarea:focus {
    outline: none;
}

input::placeholder, textarea::placeholder {
    color: #94a3b8;
}

/* ===== BUTTON HOVER EFFECTS ===== */
a {
    text-decoration: none;
}

/* ===== IMAGE HOVER ===== */
.rounded-3xl.overflow-hidden {
    overflow: hidden;
}

/* ===== SELECTION ===== */
::selection {
    background: #99f6e4;
    color: #134e4a;
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== ACCESSIBILITY: Skip Link ===== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    background: #0f766e;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    z-index: 100;
    font-size: 14px;
}

.skip-link:focus {
    top: 16px;
}
