/* ============================================
   Ybarras Cake Shop — Custom Styles
   ============================================ */

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

body {
    font-family: 'Lato', system-ui, sans-serif;
    color: #4a3428;
    background-color: #fefdf8;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
}

/* --- Skip Link --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: #166534;
    color: #fefdf8;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 0.5rem 0.5rem;
    z-index: 9999;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s;
}

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

/* --- Navbar --- */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #f59e0b;
    transition: width 0.3s ease;
}

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

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #052e16;
    font-weight: 700;
    font-size: 0.9375rem;
    padding: 0.75rem 1.75rem;
    border-radius: 0.75rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
    letter-spacing: 0.01em;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.45);
    background: linear-gradient(135g, #fbbf24 0%, #f59e0b 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: #fef3c7;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.75rem 1.75rem;
    border-radius: 0.75rem;
    text-decoration: none;
    border: 1.5px solid rgba(254, 243, 199, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.01em;
}

.btn-outline:hover {
    background: rgba(254, 243, 199, 0.1);
    border-color: rgba(254, 243, 199, 0.7);
    color: #fefdf8;
    transform: translateY(-2px);
}

/* --- Cards --- */
.card-elevated {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
}

.card-elevated:hover {
    transform: translateY(-6px);
}

/* --- Mobile Menu --- */
.mobile-nav-link {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.375rem;
    font-weight: 500;
    color: #166534;
    text-decoration: none;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(22, 101, 52, 0.1);
    transition: color 0.2s, padding-left 0.2s;
}

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

.mobile-nav-link:hover {
    color: #f59e0b;
    padding-left: 0.5rem;
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    .card-elevated:hover {
        transform: none;
    }
    .btn-primary:hover, .btn-outline:hover {
        transform: none;
    }
}

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

/* --- Utility --- */
::selection {
    background: #166534;
    color: #fef3c7;
}

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

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

/* --- Fade in on load for hero (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .hero-fade-in {
        opacity: 0;
        transform: translateY(20px);
        animation: heroFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }
    .hero-fade-in-delay {
        opacity: 0;
        transform: translateY(20px);
        animation: heroFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s forwards;
    }
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Tablet adjustments --- */
@media (max-width: 767px) {
    .font-serif {
        font-family: 'Playfair Display', Georgia, serif;
    }
}
