/* ==========================================================================
   RESTAURANTE SOLARINO - FINAL ART DIRECTION (PREMIUM)
   ========================================================================== */

:root {
    /* Ivory / Beige Base */
    --color-bg: #F8F6F2;
    --color-surface: #FFFFFF;
    --color-surface-alt: #F0EBE3;
    
    /* Text */
    --color-text-main: #25221F;   
    --color-text-muted: #726A60;
    
    /* Accents */
    --color-accent: #A65A3D; 
    --color-border: #E8E0D5;
    
    /* Night Integration */
    --color-night-bg: #1A1816;
    --color-night-surface: #24211E;
    --color-night-text: #F8F6F2;
    --color-night-text-muted: #A19990;

    /* Typography */
    --font-heading: "Cormorant Garamond", Georgia, serif;
    --font-body: "DM Sans", -apple-system, sans-serif;
    
    /* Spacing */
    --space-xs: 12px;
    --space-sm: 24px;
    --space-md: 48px;
    --space-lg: 80px; 
    
    --container-max: 1280px;
    
    /* Shadows */
    --shadow-subtle: 0 10px 40px rgba(37,34,31, 0.05);
    
    --transition-fast: 0.2s ease;
    --transition-slow: 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

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

img, video { max-width: 100%; height: auto; display: block; object-fit: cover; }
a { color: inherit; text-decoration: none; transition: color var(--transition-fast); }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.1;
    color: var(--color-text-main);
}

p { margin-bottom: var(--space-sm); color: var(--color-text-muted); font-weight: 300; }
p:last-child { margin-bottom: 0; }

/* Enforcing global text centering logic for main blocks where appropriate */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

.heading-primary {
    font-size: clamp(3rem, 6vw, 4.5rem);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
}

.heading-secondary {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    letter-spacing: -0.01em;
    margin-bottom: var(--space-sm);
}

.heading-tertiary {
    font-size: 1.8rem;
    margin-bottom: var(--space-xs);
}

.overline {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-accent);
    margin-bottom: var(--space-xs);
    font-weight: 500;
}

.lead-text {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--color-text-muted);
    font-weight: 300;
    max-width: 650px;
}

/* --- LAYOUT UTILITIES --- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

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

.section-dark {
    background-color: var(--color-night-bg);
    color: var(--color-night-text);
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: var(--color-night-text); }
.section-dark p { color: var(--color-night-text-muted); }
.section-dark .overline { color: #D4B8AA; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.align-center { align-items: center; }

/* --- CARDS --- */
.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: transparent;
    border: none;
    transition: transform var(--transition-slow);
}
.card:hover { transform: translateY(-4px); }

.card-img-wrapper {
    position: relative;
    padding-top: 100%; 
    overflow: hidden;
    margin-bottom: var(--space-sm);
}
.card-img-wrapper.rect { padding-top: 66%; } 
.card-img-wrapper.tall { padding-top: 130%; } 

.card-img-wrapper img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    transition: transform var(--transition-slow);
}
.card:hover .card-img-wrapper img { transform: scale(1.03); }

.card-content {
    display: flex; flex-direction: column; text-align: center; /* Enforce uniform centering */
    align-items: center;
}
.card-content p { font-size: 0.95rem; margin-bottom: 0; }

/* --- HERO --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px var(--space-sm) var(--space-lg);
    background-color: var(--color-night-bg);
    overflow: hidden;
    text-align: center;
}

@keyframes slowZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}
.hero-bg { position: absolute; inset: 0; z-index: 1; overflow: hidden; background-color: var(--color-night-bg); }
.hero-bg img { width: 100%; height: 100%; animation: slowZoom 25s ease-out forwards; }

.hero-overlay {
    position: absolute; inset: 0; z-index: 2;
    background: linear-gradient(rgba(26, 24, 22, 0.5), rgba(26, 24, 22, 0.8));
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero .heading-primary { color: var(--color-night-text); }
.hero .lead-text { color: var(--color-night-text-muted); }

/* --- BUTTONS --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 16px 36px;
    font-family: var(--font-body); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em;
    font-weight: 500; cursor: pointer; transition: all var(--transition-slow);
    border: 1px solid transparent; min-width: 180px;
}

.btn-primary { background-color: var(--color-text-main); color: var(--color-surface); }
.btn-primary:hover { background-color: var(--color-accent); color: var(--color-surface); transform: translateY(-2px); }

.btn-outline { border-color: var(--color-text-main); color: var(--color-text-main); background: transparent; }
.btn-outline:hover { background-color: var(--color-text-main); color: var(--color-surface); transform: translateY(-2px); }

.section-dark .btn-outline { border-color: var(--color-night-text); color: var(--color-night-text); }
.section-dark .btn-outline:hover { background-color: var(--color-night-text); color: var(--color-night-bg); }

/* --- NAVIGATION --- */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    padding: var(--space-sm) 0;
    z-index: 100; background: transparent; transition: var(--transition-slow);
}
.navbar.scrolled {
    padding: 16px 0; background: rgba(248, 246, 242, 0.98);
    backdrop-filter: blur(12px); border-bottom: 1px solid var(--color-border);
}

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

/* BRAND LOGO Logic */
.nav-brand {
    display: block; 
    height: 48px;
    z-index: 101;
}
.nav-brand img {
    height: 100%;
    width: auto;
    object-fit: contain;
    transition: var(--transition-slow);
}
/* If the original logo is dark, we invert it on transparent backgrounds so it shows */
.navbar:not(.scrolled) .nav-brand img { filter: brightness(0) invert(1); }
.navbar.scrolled .nav-brand img { filter: none; }

.nav-menu { display: flex; list-style: none; gap: var(--space-sm); align-items: center; }
.nav-link {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em;
    color: var(--color-night-text); opacity: 0.9;
}
.navbar.scrolled .nav-link { color: var(--color-text-main); }
.nav-link:hover, .nav-link.active { opacity: 1; border-bottom: 1px solid currentColor; }

/* Mobile Nav */
.mobile-toggle { display: none; background: none; border: none; font-size: 1.5rem; color: var(--color-night-text); cursor: pointer; }
.navbar.scrolled .mobile-toggle { color: var(--color-text-main); }
.mobile-nav-overlay {
    position: fixed; inset: 0; background: var(--color-bg); z-index: 999;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: opacity var(--transition-slow);
}
.mobile-nav-overlay.active { opacity: 1; pointer-events: auto; }
.mobile-nav-overlay .nav-menu { flex-direction: column; gap: var(--space-sm); text-align: center; }
.mobile-nav-overlay .nav-link { color: var(--color-text-main); font-size: 1rem; }

/* --- CARTA MENU LISTS --- */
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-item { margin-bottom: var(--space-sm); border-bottom: 1px solid var(--color-border); padding-bottom: var(--space-xs); }
.menu-item-header { display: flex; justify-content: space-between; align-items: baseline; }
.menu-item-name { font-family: var(--font-heading); font-size: 1.4rem; color: var(--color-text-main); }
.menu-item-price { font-size: 1.1rem; color: var(--color-accent); font-weight: 500; }
.menu-item-desc { font-size: 0.9rem; color: var(--color-text-muted); margin-top: 4px; }

/* --- CURATED GALLERY GRID (INSTAGRAM) --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm); /* Clean equal spacing margins */
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-sm) var(--space-lg);
}
.gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: block;
}
.gallery-item img {
    position: absolute; top:0; left:0; width: 100%; height: 100%; object-fit: cover;
    transition: transform var(--transition-slow);
}
.gallery-item:hover img { transform: scale(1.08); /* Sophisticated subtle zoom */ }

/* --- FORMS --- */
.split-img { width: 100%; height: 100%; object-fit: cover; min-height: 500px; }
.form-group { margin-bottom: var(--space-sm); text-align: left; }
.form-label { display: block; font-size: 0.8rem; margin-bottom: 8px; color: var(--color-text-muted); }
.form-control {
    width: 100%; padding: 12px 0; border: none; border-bottom: 1px solid var(--color-border);
    background: transparent; font-family: var(--font-body); font-size: 1rem; color: var(--color-text-main);
}
.form-control:focus { outline: none; border-color: var(--color-text-main); }
select.form-control { appearance: none; border-radius: 0; }
.checkbox-wrap { display: flex; align-items: flex-start; gap: 12px; margin-top: var(--space-sm); text-align: left; }
.checkbox-wrap input { margin-top: 4px; }
.checkbox-wrap label { font-size: 0.8rem; color: var(--color-text-muted); line-height: 1.4; }

/* --- COOKIE BANNER --- */
.cookie-banner {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(150%);
    background: var(--color-night-bg); color: var(--color-night-text);
    padding: var(--space-sm); display: flex; flex-direction: column; align-items: center; gap: var(--space-sm);
    z-index: 1000; box-shadow: var(--shadow-subtle); max-width: 600px; width: 90%; transition: transform var(--transition-slow);
    text-align: center;
}
.cookie-banner.show { transform: translateX(-50%) translateY(0); }
.cookie-banner p { color: var(--color-night-text-muted); font-size: 0.85rem; margin: 0; }
.cookie-actions { display: flex; gap: 12px; justify-content: center; width: 100%;}

/* --- RESPONSIVE POLISH --- */
@media (max-width: 900px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .hero { min-height: 90vh; padding-top: 100px; }
    .split-img { min-height: 350px; }
    .section { padding: var(--space-md) 0; } /* 48px padding mobile */
}

@media (max-width: 600px) {
    .nav-menu { display: none; }
    .mobile-toggle { display: block; }
    .grid-3 { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .heading-primary { font-size: 2.5rem; }
    .heading-secondary { font-size: 2rem; }
}
