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

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

body {
    margin: 0;
    overflow-x: hidden;
}

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

/* ===== Selection ===== */
::selection {
    background: #0D4F4F;
    color: #F5F0EB;
}

/* ===== Navigation ===== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(10, 61, 61, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

#navbar.scrolled .nav-logo-text,
#navbar.scrolled .nav-logo-sub,
#navbar.scrolled .nav-link,
#navbar.scrolled #menuBtn {
    color: #F5F0EB;
}

#navbar.scrolled .nav-logo-path {
    stroke: #F5F0EB;
}

.nav-link {
    color: rgba(245, 240, 235, 0.8);
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link:hover {
    color: #F5F0EB;
}

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

#menuBtn {
    color: #F5F0EB;
}

/* Mobile menu active state */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.open .mobile-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 0;
}

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

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

/* Hamburger animation */
#menuBtn.active #bar1 {
    transform: translateY(3px) rotate(45deg);
}

#menuBtn.active #bar2 {
    opacity: 0;
    transform: scaleX(0);
}

#menuBtn.active #bar3 {
    transform: translateY(-3px) rotate(-45deg);
}

/* ===== Hero Animations ===== */
.hero-eyebrow {
    animation: fadeUp 0.8s ease 0.3s forwards;
    opacity: 0;
    transform: translateY(24px);
}

.hero-headline {
    animation: fadeUp 0.8s ease 0.5s forwards;
    opacity: 0;
    transform: translateY(32px);
}

.hero-sub {
    animation: fadeUp 0.8s ease 0.7s forwards;
    opacity: 0;
    transform: translateY(24px);
}

.hero-ctas {
    animation: fadeUp 0.8s ease 0.9s forwards;
    opacity: 0;
    transform: translateY(24px);
}

.hero-scroll {
    animation: fadeUp 0.8s ease 1.2s forwards;
    opacity: 0;
}

/* ===== Reveal Animations ===== */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up {
    transform: translateY(40px);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* ===== Clip diagonal for about section ===== */
.clip-diagonal {
    clip-path: polygon(60% 0, 100% 0, 100% 100%, 0% 100%);
}

/* ===== Smooth scroll offset for fixed nav ===== */
section[id] {
    scroll-margin-top: 80px;
}

/* ===== Focus styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #2BA5A5;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Button hover lift ===== */
button, a {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Image hover zoom ===== */
img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

::-webkit-scrollbar-track {
    background: #1A2332;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #106363;
}

/* ===== 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-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
}

/* ===== Tablet ===== */
@media (max-width: 768px) {
    .clip-diagonal {
        clip-path: none;
    }
    
    #hero h1 {
        font-size: 3.5rem;
    }
}

/* ===== Mobile ===== */
@media (max-width: 640px) {
    #hero h1 {
        font-size: 3rem;
    }
    
    .hero-corner {
        display: none !important;
    }
}

/* ===== Large desktop ===== */
@media (min-width: 1280px) {
    .clip-diagonal {
        clip-path: polygon(55% 0, 100% 0, 100% 100%, 0% 100%);
    }
}
