/* ===== CSS Variables & Reset ===== */
:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-card: #1e1e1e;
    --bg-card-hover: #252525;
    --gold: #c9a96e;
    --gold-light: #dfc08a;
    --gold-dark: #a88a4e;
    --amber: #d4a853;
    --text-primary: #f0ece4;
    --text-secondary: #a8a29e;
    --text-muted: #6b6560;
    --border: #2a2a2a;
    --border-light: #333;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.6);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    text-decoration: none;
}

.logo:hover {
    color: var(--text-primary);
}

.logo-icon {
    color: var(--gold);
    font-size: 1.4rem;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color var(--transition);
}

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

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('https://images.unsplash.com/photo-1470337458703-46ad1756a187?w=1600&q=80') center/cover no-repeat;
    padding: 120px 20px 80px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(15, 15, 15, 0.7) 0%,
        rgba(15, 15, 15, 0.5) 50%,
        rgba(15, 15, 15, 0.95) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.hero-content h1 em {
    color: var(--gold);
    font-style: italic;
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 14px 36px;
    background: var(--gold);
    color: var(--bg-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition);
}

.btn:hover {
    background: var(--gold-light);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 169, 110, 0.3);
}

/* ===== Recipes Section ===== */
.recipes-section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.section-header p {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

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

/* ===== Recipe Card ===== */
.recipe-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid var(--border);
}

.recipe-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-light);
}

.recipe-card:hover .card-image img {
    transform: scale(1.05);
}

.card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(30, 30, 30, 0.9), transparent);
    pointer-events: none;
}

.card-category {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    padding: 4px 12px;
    background: rgba(201, 169, 110, 0.9);
    color: var(--bg-primary);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 50px;
}

.card-content {
    padding: 20px 24px 28px;
}

.card-content h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.card-footer span {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.card-footer .view-recipe {
    font-size: 0.8rem;
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ===== About Section ===== */
.about-section {
    padding: 80px 0 100px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.about-text p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-image img {
    border-radius: var(--radius-lg);
    width: 100%;
    height: 400px;
    object-fit: cover;
    border: 1px solid var(--border);
}

/* ===== Footer ===== */
.site-footer {
    padding: 60px 0 0;
    background: var(--bg-primary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-brand .logo-icon {
    font-size: 1.2rem;
}

.footer-brand .logo-text {
    font-size: 1.1rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

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

.footer-bottom {
    padding: 24px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(30px) scale(0.97);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.4rem;
    cursor: pointer;
    transition: all var(--transition);
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.modal-hero {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.modal-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-secondary) 0%, transparent 60%);
}

.modal-hero-content {
    position: absolute;
    bottom: 24px;
    left: 32px;
    right: 32px;
    z-index: 2;
}

.modal-category {
    display: inline-block;
    padding: 4px 14px;
    background: var(--gold);
    color: var(--bg-primary);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 50px;
    margin-bottom: 10px;
}

.modal-hero-content h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 700;
    color: var(--text-primary);
}

.modal-body {
    padding: 32px;
}

.modal-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

.modal-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

.modal-details h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.modal-ingredients ul {
    list-style: none;
}

.modal-ingredients li {
    padding: 8px 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.modal-ingredients li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.modal-ingredients li:last-child {
    border-bottom: none;
}

.modal-ingredients .amount {
    color: var(--gold-light);
    font-weight: 500;
    white-space: nowrap;
}

.modal-instructions ol {
    list-style: none;
    counter-reset: step;
}

.modal-instructions li {
    counter-increment: step;
    padding: 10px 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: flex;
    gap: 14px;
}

.modal-instructions li::before {
    content: counter(step);
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold);
    color: var(--bg-primary);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50%;
    margin-top: 1px;
}

.modal-meta {
    display: flex;
    gap: 20px;
    padding: 20px 24px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.meta-item {
    flex: 1;
    text-align: center;
}

.meta-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.meta-value {
    display: block;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== Scrollbar ===== */
.modal::-webkit-scrollbar {
    width: 6px;
}

.modal::-webkit-scrollbar-track {
    background: transparent;
}

.modal::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .recipes-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-image {
        order: -1;
    }

    .about-image img {
        height: 260px;
    }

    .modal-details {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .modal-hero {
        height: 220px;
    }

    .modal-body {
        padding: 24px 20px;
    }

    .modal-hero-content {
        left: 20px;
        right: 20px;
        bottom: 16px;
    }

    .modal-meta {
        flex-direction: column;
        gap: 12px;
    }

    .meta-item {
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .hero {
        min-height: 85vh;
        padding: 100px 20px 60px;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
    }

    .nav {
        gap: 20px;
    }

    .card-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .nav a {
        font-size: 0.8rem;
    }

    .logo-text {
        font-size: 1.05rem;
    }

    .recipes-section {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 36px;
    }
}

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

.recipe-card {
    animation: fadeInUp 0.5s ease both;
}

.recipe-card:nth-child(1) { animation-delay: 0.05s; }
.recipe-card:nth-child(2) { animation-delay: 0.1s; }
.recipe-card:nth-child(3) { animation-delay: 0.15s; }
.recipe-card:nth-child(4) { animation-delay: 0.2s; }
.recipe-card:nth-child(5) { animation-delay: 0.25s; }
.recipe-card:nth-child(6) { animation-delay: 0.3s; }
.recipe-card:nth-child(7) { animation-delay: 0.35s; }
.recipe-card:nth-child(8) { animation-delay: 0.4s; }
.recipe-card:nth-child(9) { animation-delay: 0.45s; }
.recipe-card:nth-child(10) { animation-delay: 0.5s; }

/* Body lock for modal */
body.modal-open {
    overflow: hidden;
}
