/* ============================================
   Agnes Desserts — Stylesheet
   Warm, cozy, elegant cake business
   ============================================ */

/* --- CSS Variables --- */
:root {
    --cream:        #FFF8F0;
    --soft-pink:    #F4C2C2;
    --blush:        #FADBD8;
    --warm-white:   #FFFAF5;
    --chocolate:    #5C3A21;
    --chocolate-light: #7B5B3A;
    --gold:         #C9A96E;
    --gold-light:   #D4B97C;
    --text-dark:    #3E2723;
    --text-medium:  #6D4C41;
    --text-light:   #8D6E63;
    --shadow-soft:  0 2px 20px rgba(92, 58, 33, 0.08);
    --shadow-card:  0 4px 24px rgba(92, 58, 33, 0.10);
    --shadow-hover: 0 8px 40px rgba(92, 58, 33, 0.16);
    --radius:       12px;
    --transition:   0.3s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Lora', 'Georgia', serif;
    background-color: var(--cream);
    color: var(--text-dark);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--chocolate);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--gold);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 248, 240, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(92, 58, 33, 0.06);
    transition: box-shadow var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-soft);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    font-family: 'Great Vibes', cursive;
    font-size: 1.8rem;
    color: var(--chocolate);
    letter-spacing: 1px;
}

.nav-logo:hover {
    color: var(--chocolate);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 36px;
}

.nav-links a {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-medium);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    padding: 4px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: width var(--transition);
}

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

.nav-links a:hover {
    color: var(--chocolate);
}

/* Mobile toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--chocolate);
    border-radius: 2px;
    transition: all var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: url('../images/hero.jpg') center center / cover no-repeat,
        linear-gradient(135deg, #5C3A21 0%, #8B6914 50%, #C9A96E 100%);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(62, 39, 35, 0.45) 0%,
        rgba(62, 39, 35, 0.55) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 24px;
}

.hero-title {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(3rem, 8vw, 6.5rem);
    color: #fff;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 16px;
    text-shadow: 0 2px 30px rgba(0,0,0,0.3);
}

.hero-tagline {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    letter-spacing: 2px;
}

.hero-btn {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.7);
    padding: 14px 40px;
    border-radius: 50px;
    transition: all var(--transition);
}

.hero-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    color: #fff;
    transform: translateY(-2px);
}

/* --- Section Titles --- */
.section-title {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: var(--chocolate);
    text-align: center;
    margin-bottom: 8px;
    font-weight: 400;
}

.section-subtitle {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 1rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 48px;
}

/* --- Gallery --- */
.gallery {
    padding: 100px 0;
    background: var(--warm-white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

.cake-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--transition);
    cursor: pointer;
}

.cake-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.cake-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--blush);
}

.cake-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cake-card:hover .cake-image img {
    transform: scale(1.06);
}

/* Fallback for missing images */
.cake-image img[src=""],
.cake-image img:not([src]) {
    display: none;
}

.cake-name {
    font-family: 'Lora', serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    padding: 16px 20px;
    text-align: center;
}

/* --- About Section --- */
.about {
    padding: 100px 0;
    background: var(--cream);
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.05rem;
    color: var(--text-medium);
    margin-bottom: 20px;
    line-height: 1.9;
}

.about-signature {
    font-family: 'Great Vibes', cursive;
    font-size: 2rem;
    color: var(--gold);
    margin-top: 32px;
}

/* --- Contact Section --- */
.contact {
    padding: 100px 0;
    background: var(--warm-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
    margin-bottom: 48px;
}

.contact-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 40px 28px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: all var(--transition);
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}

.contact-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: var(--gold);
}

.contact-icon svg {
    width: 100%;
    height: 100%;
}

.contact-card h3 {
    font-family: 'Lora', serif;
    font-size: 1.1rem;
    color: var(--chocolate);
    margin-bottom: 8px;
}

.contact-card a {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text-medium);
}

.contact-card a:hover {
    color: var(--gold);
}

.order-cta {
    text-align: center;
}

.order-btn {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    background: linear-gradient(135deg, var(--chocolate) 0%, var(--chocolate-light) 100%);
    padding: 16px 48px;
    border-radius: 50px;
    transition: all var(--transition);
    box-shadow: 0 4px 20px rgba(92, 58, 33, 0.25);
}

.order-btn:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(92, 58, 33, 0.35);
}

/* --- Footer --- */
.footer {
    background: var(--chocolate);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 40px 24px;
}

.footer-logo {
    font-family: 'Great Vibes', cursive;
    font-size: 1.6rem;
    color: var(--gold-light);
    margin-bottom: 8px;
}

.footer-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(30, 18, 10, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 78vh;
    border-radius: 8px;
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.4);
    object-fit: contain;
}

.lightbox-caption {
    font-family: 'Lora', serif;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 16px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: color var(--transition);
    z-index: 2001;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    color: #fff;
}

.lightbox-close {
    top: 24px;
    right: 28px;
    font-size: 2.4rem;
    line-height: 1;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.2rem;
    padding: 12px;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(255, 248, 240, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 20px 24px;
        gap: 0;
        border-bottom: 1px solid rgba(92, 58, 33, 0.08);
        box-shadow: var(--shadow-soft);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        padding: 12px 0;
        border-bottom: 1px solid rgba(92, 58, 33, 0.06);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .hero {
        min-height: 500px;
    }

    .gallery {
        padding: 60px 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 18px;
    }

    .about {
        padding: 60px 0;
    }

    .contact {
        padding: 60px 0;
    }

    .section-subtitle {
        margin-bottom: 32px;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cake-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.cake-card:nth-child(1)  { animation-delay: 0.05s; }
.cake-card:nth-child(2)  { animation-delay: 0.10s; }
.cake-card:nth-child(3)  { animation-delay: 0.15s; }
.cake-card:nth-child(4)  { animation-delay: 0.20s; }
.cake-card:nth-child(5)  { animation-delay: 0.25s; }
.cake-card:nth-child(6)  { animation-delay: 0.30s; }
.cake-card:nth-child(7)  { animation-delay: 0.35s; }
.cake-card:nth-child(8)  { animation-delay: 0.40s; }
.cake-card:nth-child(9)  { animation-delay: 0.45s; }
.cake-card:nth-child(10) { animation-delay: 0.50s; }
.cake-card:nth-child(11) { animation-delay: 0.55s; }
.cake-card:nth-child(12) { animation-delay: 0.60s; }
.cake-card:nth-child(13) { animation-delay: 0.65s; }
.cake-card:nth-child(14) { animation-delay: 0.70s; }
.cake-card:nth-child(15) { animation-delay: 0.75s; }
.cake-card:nth-child(16) { animation-delay: 0.80s; }
.cake-card:nth-child(17) { animation-delay: 0.85s; }
.cake-card:nth-child(18) { animation-delay: 0.90s; }
.cake-card:nth-child(19) { animation-delay: 0.95s; }
.cake-card:nth-child(20) { animation-delay: 1.00s; }

/* Scroll-triggered animation (activated by JS) */
.cake-card.in-view {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}
