/* 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;
}

/* Scroll reveal — progressive enhancement, hidden by default, shown via JS */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Navbar scroll state */
#navbar.scrolled {
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.08);
}

/* Mobile menu */
#mobile-menu {
    animation: slideDown 0.25s ease;
}

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

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

/* Selection */
::selection {
    background: rgba(232, 96, 90, 0.2);
    color: inherit;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f5f4;
}
::-webkit-scrollbar-thumb {
    background: #d4d4d8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a1a1aa;
}

/* Form styles */
input, textarea {
    width: 100%;
    border: 1.5px solid #e4e4e7;
    border-radius: 12px;
    padding: 12px 16px;
    font-family: 'Lora', Georgia, serif;
    font-size: 1rem;
    color: #272a30;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
input:focus, textarea:focus {
    border-color: #E8605A;
    box-shadow: 0 0 0 3px rgba(232, 96, 90, 0.1);
    background: white;
}
input::placeholder, textarea::placeholder {
    color: #a1a1aa;
}

/* Success message */
.success-message {
    display: none;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 16px 20px;
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    text-align: center;
    animation: fadeIn 0.3s ease;
}
.success-message.show {
    display: block;
}

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