/* ── Custom styles for Cardif Castle ── */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Nav transition */
#nav {
    transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#nav.nav-scrolled {
    background-color: rgba(253, 248, 240, 0.97);
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.07);
    backdrop-filter: blur(8px);
}

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

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

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* No-underline utility */
.no-underline {
    text-decoration: none;
}

/* Scroll reveal base (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(28px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Selection */
::selection {
    background-color: #f5c4a8;
    color: #632615;
}
