/* ===== Custom Styles for Chocolate Biscuit Tea Room ===== */

:root {
    --color-burgundy: #722F37;
    --color-burgundy-light: #8B3A44;
    --color-gold: #D4A574;
    --color-gold-light: #E8C49A;
    --color-cream: #F5E6D3;
    --color-dark: #0D0D0D;
    --color-dark-light: #111111;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--color-dark);
    color: var(--color-cream);
}

.font-playfair {
    font-family: 'Playfair Display', serif;
}

/* ===== Navigation ===== */
#navbar {
    background: transparent;
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(212, 165, 116, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-gold);
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: var(--color-gold) !important;
}

/* ===== Mobile Menu ===== */
.mobile-menu-link {
    position: relative;
}

.mobile-menu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

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

.mobile-menu-line:last-child {
    transform-origin: left center;
}

body.menu-open .mobile-menu-line:first-child {
    transform: rotate(45deg) translate(4px, 4px);
}

body.menu-open .mobile-menu-line:nth-child(2) {
    opacity: 0;
}

body.menu-open .mobile-menu-line:last-child {
    width: 1.25rem;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ===== Scroll Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ===== Back to Top ===== */
#back-to-top {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

#back-to-top:hover {
    transform: translateY(-2px);
}

/* ===== Form Styles ===== */
input:focus,
textarea:focus {
    border-color: var(--color-gold) !important;
}

input::placeholder,
textarea::placeholder {
    color: rgba(245, 230, 211, 0.25);
}

/* ===== Gold Accent Animations ===== */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* ===== Smooth Image Loading ===== */
img {
    transition: opacity 0.5s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ===== Selection Color ===== */
::selection {
    background: rgba(114, 47, 55, 0.6);
    color: var(--color-cream);
}

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

::-webkit-scrollbar-track {
    background: var(--color-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(114, 47, 55, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(114, 47, 55, 0.8);
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .font-playfair {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }
}

/* ===== Focus Visible for Accessibility ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}
