:root {
    --primary: #7a2b1e;
    --primary-light: #9c4531;
    --gold: #c9a253;
    --dark: #1c1512;
    --dark-2: #2a201b;
    --light: #faf6f0;
    --white: #ffffff;
    --text: #2a201b;
    --shadow: 0 10px 30px rgba(0,0,0,0.15);
    --radius: 10px;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--light);
    line-height: 1.65;
}

.container { width: 90%; max-width: 1150px; margin: 0 auto; }
h1, h2, h3 { font-family: var(--font-display); }
a { color: var(--gold); }

/* Utility: contenuto solo per screen reader */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -60px;
    left: 0;
    background: var(--dark);
    color: var(--white);
    padding: 0.9rem 1.4rem;
    z-index: 1000;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 8px 0;
    transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

/* Header */
header {
    background: var(--dark);
    position: sticky;
    top: 0;
    z-index: 200;
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1150px;
    margin: 0 auto;
    padding: 1.1rem 1.5rem;
}
.logo { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--white); text-decoration: none; letter-spacing: 0.02em; }
.nav-menu { display: flex; list-style: none; gap: 1.8rem; align-items: center; }
.nav-menu a { text-decoration: none; color: #e8ddd2; font-weight: 500; font-size: 0.95rem; }
.nav-menu a:hover { color: var(--gold); }

.cart-btn {
    position: relative;
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    border-radius: 30px;
    padding: 0.5rem 1.1rem;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 44px;
}
.cart-btn:hover { background: var(--gold); color: var(--dark); }
.cart-count {
    background: var(--gold);
    color: var(--dark);
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
.cart-btn:hover .cart-count { background: var(--dark); color: var(--gold); }

.hamburger {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    gap: 4px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    padding: 0;
}
.hamburger span { width: 25px; height: 3px; background: var(--white); border-radius: 2px; }

@media (max-width: 860px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        background: var(--dark);
        flex-direction: column;
        align-items: center;
        gap: 1.2rem;
        padding: 1.5rem 0;
    }
    .nav-menu.active { display: flex; }
    .hamburger { display: flex; }
}

/* Sotto ~480px logo, pulsante carrello e hamburger non ci stanno più su
   una riga: il testo del logo va a capo su due righe in modo scomposto.
   Si restringono logo e pulsante carrello per lasciare spazio a entrambi. */
@media (max-width: 480px) {
    .logo { font-size: 1.15rem; white-space: nowrap; }
    .cart-btn { padding: 0.4rem 0.8rem; font-size: 0.8rem; gap: 0.3rem; }
}

/* Hero */
.hero {
    background: linear-gradient(160deg, var(--dark) 0%, var(--primary) 100%);
    color: var(--white);
    text-align: center;
    padding: 6rem 1.5rem 5rem;
}
.hero .kicker { color: var(--gold); letter-spacing: 0.15em; text-transform: uppercase; font-size: 0.8rem; margin-bottom: 1rem; display: block; }
.hero h1 { font-size: clamp(2.2rem, 5vw + 1rem, 3.6rem); margin-bottom: 1.2rem; }
.hero p { font-size: 1.15rem; max-width: 560px; margin: 0 auto 2.2rem; opacity: 0.9; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.85rem 2.2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-gold { background: var(--gold); color: var(--dark); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(201,162,83,0.4); }
.btn-outline-light { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--dark); }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

section { padding: 4.5rem 0; }
section h2 { text-align: center; font-size: clamp(1.7rem, 2.5vw + 1rem, 2.3rem); margin-bottom: 0.5rem; color: var(--dark); }
.section-sub { text-align: center; color: #6b5f53; margin-bottom: 2.8rem; max-width: 550px; margin-left: auto; margin-right: auto; }

/* fade-in on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .reveal { transition: none; }
    .btn, .add-cart-btn { transition: none; }
    .btn-gold:hover { transform: none; }
}

/* Menu / ordina online */
.menu-order-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.6rem;
}
.dish-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.dish-photo {
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--white);
    overflow: hidden;
}
.dish-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.dish-body { padding: 1.3rem; display: flex; flex-direction: column; flex: 1; }
.dish-body h3 { font-size: 1.15rem; margin-bottom: 0.4rem; color: var(--dark); }
.dish-body p { color: #6b5f53; font-size: 0.9rem; flex: 1; margin-bottom: 1rem; }
.dish-footer { display: flex; justify-content: space-between; align-items: center; }
.dish-price { font-weight: 700; color: var(--primary); font-size: 1.1rem; }
.add-cart-btn {
    background: var(--dark);
    color: var(--white);
    border: none;
    border-radius: 30px;
    padding: 0.5rem 1rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}
.add-cart-btn:hover { background: var(--primary); }
.add-cart-btn:disabled { background: var(--gold); color: var(--dark); cursor: default; }

.tile-a { background: linear-gradient(135deg,#7a2b1e,#c9714f); }
.tile-b { background: linear-gradient(135deg,#3f5b38,#5b7052); }
.tile-c { background: linear-gradient(135deg,#8a5a2f,#c9a253); }
.tile-d { background: linear-gradient(135deg,#7a2b1e,#2a201b); }

/* Cart drawer */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 300;
    display: none;
}
.cart-overlay.open { display: block; }
.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: var(--white);
    z-index: 301;
    box-shadow: -10px 0 30px rgba(0,0,0,0.2);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}
.cart-drawer.open { right: 0; }
.cart-header { padding: 1.3rem 1.5rem; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.cart-header h3 { color: var(--dark); }
.cart-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--dark); padding: 10px; min-width: 44px; min-height: 44px; }
.cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }
.cart-empty { color: #756759; text-align: center; padding: 2rem 0; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 0.8rem 0; border-bottom: 1px solid #f0f0f0; gap: 0.5rem; }
.cart-item-name { font-weight: 600; font-size: 0.95rem; }
.cart-item-qty { display: flex; align-items: center; gap: 0.6rem; }
.qty-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #ddd; background: var(--white); cursor: pointer; font-size: 1rem; }
.cart-footer { padding: 1.3rem 1.5rem; border-top: 1px solid #eee; }
.cart-total { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 1rem; font-size: 1.1rem; }
.checkout-btn { width: 100%; }
.checkout-note { margin-top: 0.8rem; padding: 0.75rem; border-radius: 6px; background: #eaf1e7; color: #2f4a29; font-size: 0.85rem; display: none; text-align: center; }
.checkout-note.visible { display: block; }

/* Prenotazione */
.booking-section { background: var(--dark-2); color: var(--white); }
.booking-section h2, .booking-section .section-sub { color: var(--white); }
.booking-section .section-sub { color: #cbbfb2; }
.booking-box {
    background: var(--white);
    color: var(--text);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.2rem;
    max-width: 560px;
    margin: 0 auto;
}
.booking-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.booking-grid .full-width { grid-column: 1 / -1; }
.booking-box label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; color: #5a4e44; }
.booking-box input, .booking-box select {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    margin-bottom: 1rem;
    min-height: 44px;
}
.booking-confirm {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
    background: #eaf1e7;
    color: #2f4a29;
    display: none;
}
.booking-confirm.visible { display: block; }

@media (max-width: 600px) {
    .booking-grid { grid-template-columns: 1fr; }
}

/* Area riservata */
.reserved-section { text-align: center; }
.reserved-card {
    max-width: 520px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    color: var(--white);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
}
.reserved-card h3 { margin-bottom: 0.6rem; }
.reserved-card p { opacity: 0.9; margin-bottom: 1.5rem; font-size: 0.95rem; }

/* Modal login */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 400;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal-box {
    background: var(--white);
    border-radius: var(--radius);
    max-width: 400px;
    width: 100%;
    padding: 2rem;
    position: relative;
}
.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 1.3rem; cursor: pointer; padding: 10px; min-width: 44px; min-height: 44px; }
.modal-tabs { display: flex; gap: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid #eee; }
.modal-tab { background: none; border: none; padding: 0.7rem 0; min-height: 44px; font-family: inherit; font-weight: 600; color: #756759; cursor: pointer; border-bottom: 2px solid transparent; }
.modal-tab.active, .modal-tab[aria-pressed="true"] { color: var(--primary); border-color: var(--primary); }
.modal-box input {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-family: inherit;
    min-height: 44px;
}
.modal-note { font-size: 0.8rem; color: #756759; margin-top: 0.5rem; }

/* Footer */
footer { background: var(--dark); color: #cbbfb2; text-align: center; padding: 2rem 0; font-size: 0.9rem; }
footer a { color: var(--gold); }

/* Banner demo */
.demo-banner { background: #0f0b09; color: var(--white); text-align: center; font-size: 0.85rem; padding: 0.6rem 1rem; }
.demo-banner a { color: var(--gold); }

/* Banner consenso cookie */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--dark);
    color: var(--white);
    padding: 1.1rem 1.5rem;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    z-index: 500;
    box-shadow: 0 -6px 20px rgba(0,0,0,0.25);
}
.cookie-banner.visible { display: flex; }
.cookie-banner p { margin: 0; font-size: 0.9rem; max-width: 640px; color: #e8ddd2; }
.cookie-banner-actions { display: flex; gap: 0.8rem; flex-shrink: 0; }
.cookie-banner .btn { padding: 0.6rem 1.4rem; min-height: 40px; font-size: 0.85rem; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

/* [inert] non ha uno stile visivo di default: l'overlay semi-trasparente
   dietro carrello/modale comunica già visivamente lo stato disattivato. */
