/* ============================================
   Casa MIA — Restaurant & Pizzeria
   Bold Editorial Style: Burgundy + Blush
   ============================================ */

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

:root {
    --color-burgundy: #781F2E;
    --color-burgundy-dark: #5A1521;
    --color-burgundy-light: #9B2D40;
    --color-blush: #F5E6D3;
    --color-blush-light: #FDF3EB;
    --color-blush-dark: #E8CDB8;
    --color-cream: #FFF9F5;
    --color-charcoal: #1A1414;
    --color-dark: #2C2020;
    --color-text: #3D2B2B;
    --color-text-light: #6B5050;
    --color-white: #FFFFFF;
    --color-gold: #C9A96E;

    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Lato', 'Segoe UI', system-ui, sans-serif;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    --space-3xl: 8rem;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    --transition: 0.3s ease;
    --transition-slow: 0.6s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

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

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* --- Typography --- */
.section-eyebrow {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-burgundy);
    margin-bottom: var(--space-sm);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-charcoal);
    margin-bottom: var(--space-md);
}

.section-title em {
    font-style: italic;
    color: var(--color-burgundy);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--color-burgundy);
    color: var(--color-white);
    border-color: var(--color-burgundy);
}

.btn-primary:hover {
    background-color: var(--color-burgundy-dark);
    border-color: var(--color-burgundy-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(120, 31, 46, 0.3);
}

.btn-outline-light {
    background-color: transparent;
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.6);
}

.btn-outline-light:hover {
    background-color: var(--color-white);
    color: var(--color-burgundy);
    border-color: var(--color-white);
}

.btn-outline-dark {
    background-color: transparent;
    color: var(--color-burgundy);
    border-color: var(--color-burgundy);
}

.btn-outline-dark:hover {
    background-color: var(--color-burgundy);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(120, 31, 46, 0.25);
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(253, 249, 245, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(120, 31, 46, 0.08);
    transition: all var(--transition);
}

.header.scrolled {
    box-shadow: 0 2px 24px rgba(44, 32, 32, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

/* --- Logo --- */
.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    z-index: 1001;
}

.logo-mark {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--color-burgundy);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-burgundy);
    border-radius: 50%;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-charcoal);
    letter-spacing: 0.02em;
}

/* --- Navigation --- */
.nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav a {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text);
    position: relative;
    transition: color var(--transition);
}

.nav a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-burgundy);
    transition: width var(--transition);
}

.nav a:not(.btn):hover {
    color: var(--color-burgundy);
}

.nav a:not(.btn):hover::after {
    width: 100%;
}

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

.nav-toggle-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-charcoal);
    transition: all var(--transition);
    transform-origin: center;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--color-charcoal);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(26, 20, 20, 0.4) 0%,
        rgba(120, 31, 46, 0.5) 50%,
        rgba(26, 20, 20, 0.8) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    max-width: 820px;
}

.hero-eyebrow {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--color-blush);
    margin-bottom: var(--space-md);
    opacity: 0.9;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    color: var(--color-white);
    margin-bottom: var(--space-md);
}

.hero-headline em {
    font-style: italic;
    color: var(--color-blush);
}

.hero-sub {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    line-height: 1.7;
    color: rgba(245, 230, 211, 0.85);
    max-width: 560px;
    margin: 0 auto var(--space-lg);
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255, 255, 255, 0.5);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-8px); }
    60% { transform: translateX(-50%) translateY(-4px); }
}

/* --- About --- */
.about {
    padding: var(--space-3xl) 0;
    background-color: var(--color-cream);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.about-images {
    position: relative;
}

.about-img-main {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(44, 32, 32, 0.12);
}

.about-img-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-img-secondary {
    position: absolute;
    bottom: -40px;
    right: -40px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(44, 32, 32, 0.15);
    border: 6px solid var(--color-cream);
}

.about-img-secondary img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content {
    padding: var(--space-lg) 0;
}

.about-content p {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

.about-content p:first-of-type {
    font-size: 1.125rem;
    color: var(--color-text);
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-blush-dark);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--color-charcoal);
}

.feature-item svg {
    color: var(--color-burgundy);
    flex-shrink: 0;
}

/* --- Menu --- */
.menu {
    padding: var(--space-3xl) 0;
    background-color: var(--color-charcoal);
    position: relative;
    overflow: hidden;
}

.menu-bg-accent {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(120, 31, 46, 0.08) 100%);
    pointer-events: none;
}

.menu-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--space-2xl);
    position: relative;
    z-index: 1;
}

.menu-header .section-eyebrow {
    color: var(--color-blush);
}

.menu-header .section-title {
    color: var(--color-white);
}

.menu-header .section-title em {
    color: var(--color-blush);
}

.menu-header .menu-intro {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: rgba(245, 230, 211, 0.65);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    position: relative;
    z-index: 1;
}

.menu-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition);
}

.menu-category:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(201, 169, 110, 0.2);
    transform: translateY(-4px);
}

.category-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid rgba(201, 169, 110, 0.2);
}

.category-title svg {
    color: var(--color-gold);
}

.menu-list li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.menu-list li:last-child {
    border-bottom: none;
}

.dish-name {
    display: block;
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--color-blush);
    margin-bottom: 0.25rem;
}

.dish-desc {
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(245, 230, 211, 0.5);
    font-weight: 300;
}

.menu-note {
    text-align: center;
    font-size: 0.8125rem;
    color: rgba(245, 230, 211, 0.35);
    margin-top: var(--space-xl);
    font-style: italic;
    position: relative;
    z-index: 1;
}

/* --- Gallery --- */
.gallery {
    padding: var(--space-3xl) 0;
    background-color: var(--color-blush-light);
}

.gallery-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto;
    gap: var(--space-md);
}

.gallery-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(26, 20, 20, 0.2) 100%);
    opacity: 0;
    transition: opacity var(--transition);
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover img {
    transform: scale(1.03);
}

.gallery-item--wide {
    grid-column: span 12;
}

.gallery-item--wide img {
    height: 400px;
}

.gallery-item:not(.gallery-item--wide) img {
    height: 280px;
}

/* --- Visit --- */
.visit {
    padding: var(--space-3xl) 0;
    background-color: var(--color-cream);
}

.visit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

.visit-info {
    padding: var(--space-lg) 0;
}

.visit-details {
    margin: var(--space-xl) 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.visit-detail {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.visit-detail svg {
    color: var(--color-burgundy);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.visit-detail strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.0625rem;
    color: var(--color-charcoal);
    margin-bottom: 0.25rem;
}

.visit-detail p {
    font-size: 0.9375rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

.visit-detail a {
    color: var(--color-burgundy);
    transition: color var(--transition);
}

.visit-detail a:hover {
    color: var(--color-burgundy-dark);
    text-decoration: underline;
}

.visit-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-top: var(--space-lg);
}

.visit-map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(44, 32, 32, 0.1);
    min-height: 480px;
}

.visit-map iframe {
    width: 100%;
    height: 100%;
    min-height: 480px;
}

/* --- Footer --- */
.footer {
    background-color: var(--color-charcoal);
    color: var(--color-blush);
    padding: var(--space-2xl) 0 var(--space-sm);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-xl);
    align-items: center;
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-brand .logo-mark {
    width: 52px;
    height: 52px;
    font-size: 2rem;
}

.footer-brand .logo-text {
    font-size: 1.5rem;
    color: var(--color-white);
}

.footer-brand p {
    font-size: 0.8125rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(245, 230, 211, 0.4);
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(245, 230, 211, 0.6);
    transition: color var(--transition);
}

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

.footer-contact {
    text-align: right;
}

.footer-contact p {
    font-size: 0.875rem;
    color: rgba(245, 230, 211, 0.5);
    line-height: 1.7;
}

.footer-contact a {
    color: var(--color-blush);
    transition: color var(--transition);
}

.footer-contact a:hover {
    color: var(--color-white);
}

.footer-bottom {
    padding: var(--space-md) 0;
}

.footer-bottom p {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(245, 230, 211, 0.3);
    letter-spacing: 0.05em;
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

/* --- Responsive --- */
@media (max-width: 1024px) {
    .about-grid {
        gap: var(--space-xl);
    }

    .about-img-secondary {
        right: -20px;
        bottom: -20px;
    }

    .menu-grid {
        gap: var(--space-md);
    }
}

@media (max-width: 768px) {
    :root {
        --space-3xl: 5rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        inset: 0;
        background-color: rgba(253, 249, 245, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--space-lg);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
    }

    .nav.open {
        opacity: 1;
        visibility: visible;
    }

    .nav a {
        font-size: 1.125rem;
    }

    .nav a:not(.btn)::after {
        display: none;
    }

    .header-inner {
        height: 70px;
    }

    .hero-headline {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

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

    .about-images {
        max-width: 500px;
        margin: 0 auto;
    }

    .about-img-secondary {
        right: -10px;
        bottom: -15px;
        width: 55%;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

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

    .gallery-item--wide {
        grid-column: span 12;
    }

    .gallery-item--wide img {
        height: 260px;
    }

    .gallery-item:not(.gallery-item--wide) img {
        height: 220px;
    }

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

    .visit-map {
        min-height: 320px;
    }

    .visit-map iframe {
        min-height: 320px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-lg);
    }

    .footer-brand {
        align-items: center;
    }

    .footer-contact {
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: var(--space-sm);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }

    .hero-content {
        padding: var(--space-2xl) var(--space-md);
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .visit-actions {
        flex-direction: column;
    }
}
