/* ===== Base & Typography ===== */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Lora', Georgia, serif;
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    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[data-reveal-delay="1"] { transition-delay: 0.1s; }
.reveal[data-reveal-delay="2"] { transition-delay: 0.2s; }
.reveal[data-reveal-delay="3"] { transition-delay: 0.3s; }
.reveal[data-reveal-delay="4"] { transition-delay: 0.4s; }
.reveal[data-reveal-delay="5"] { transition-delay: 0.5s; }

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

#navbar.scrolled {
    background: rgba(2, 6, 16, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(168, 213, 200, 0.06);
}

#navbar.scrolled .font-display,
#navbar.scrolled .font-accent {
    color: #fff;
}

/* ===== Mobile Menu ===== */
.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

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

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

/* ===== Menu Button ===== */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* ===== Selection ===== */
::selection {
    background: rgba(45, 168, 110, 0.3);
    color: #fff;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(168, 213, 200, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 213, 200, 0.35);
}

/* ===== Image aspect ratio fallback ===== */
.aspect-\[4\/5\] {
    aspect-ratio: 4/5;
}

.aspect-\[16\/10\] {
    aspect-ratio: 16/10;
}

/* ===== Focus visible ===== */
*:focus-visible {
    outline: 2px solid rgba(168, 213, 200, 0.5);
    outline-offset: 2px;
}

/* ===== Form date input fix ===== */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7) sepia(1) saturate(3) hue-rotate(105deg);
    cursor: pointer;
}

/* ===== Smooth image loading ===== */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
