/* ===== Base & Typography ===== */
:root {
    --color-teal-50: #f0fdfa;
    --color-teal-100: #ccfbf1;
    --color-teal-600: #0d9488;
    --color-teal-700: #0f766e;
    --color-teal-800: #115e59;
    --color-slate-900: #0f172a;
    --color-slate-800: #1e293b;
    --color-stone-50: #fafaf9;
    --color-stone-100: #f5f5f4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Karla', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Navigation ===== */
#navbar {
    background: rgba(250, 250, 249, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.4s ease, background 0.4s ease;
}

#navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
    background: rgba(250, 250, 249, 0.97);
}

.nav-link {
    position: relative;
}

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

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

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

.mobile-menu-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-menu-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-menu-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-menu-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-menu-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-menu-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-menu-link:nth-child(5) { transition-delay: 0.25s; }

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.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; }

/* ===== Hero Asymmetric Layout ===== */
#hero {
    background: linear-gradient(135deg, #fafaf9 0%, #f0fdfa 50%, #fafaf9 100%);
}

/* ===== Image Hover Effects ===== */
img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== Button Focus ===== */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
    border-radius: 9999px;
}

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

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #fafaf9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===== Selection ===== */
::selection {
    background: #ccfbf1;
    color: #134e4a;
}

/* ===== 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;
    }
    
    img {
        transition: none;
    }
}

/* ===== Tablet ===== */
@media (min-width: 768px) and (max-width: 1023px) {
    #hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 80px;
    }
}

/* ===== Small Mobile ===== */
@media (max-width: 360px) {
    .font-serif {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
}
