*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    min-height: 100vh;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 100;
    padding: 0.75rem 1.5rem;
    background: #064E3B;
    color: #FAF8F5;
    font-size: 0.875rem;
    border-radius: 0 0 0.25rem 0.25rem;
    text-decoration: none;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

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

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

.mobile-link {
    position: relative;
}

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

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

/* Hamburger animation */
#menu-btn[aria-expanded="true"] #bar1 {
    transform: translateY(5px) rotate(45deg);
}

#menu-btn[aria-expanded="true"] #bar2 {
    opacity: 0;
}

#menu-btn[aria-expanded="true"] #bar3 {
    transform: translateY(-5px) rotate(-45deg);
}

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

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

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

/* Stagger children */
.stagger-children .reveal:nth-child(1) { transition-delay: 0.05s; }
.stagger-children .reveal:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .reveal:nth-child(3) { transition-delay: 0.15s; }
.stagger-children .reveal:nth-child(4) { transition-delay: 0.2s; }
.stagger-children .reveal:nth-child(5) { transition-delay: 0.25s; }
.stagger-children .reveal:nth-child(6) { transition-delay: 0.3s; }

/* Form focus styles */
input:focus, textarea:focus {
    outline: none;
}

/* Selection color */
::selection {
    background: rgba(6, 78, 59, 0.15);
    color: #064E3B;
}

/* Smooth image loading */
img {
    display: block;
    max-width: 100%;
}

/* Header transition */
header {
    transition: box-shadow 0.3s ease;
}

header.scrolled {
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

/* Button focus visible */
button:focus-visible, a:focus-visible {
    outline: 2px solid #064E3B;
    outline-offset: 2px;
}
</style>
