/* ==========================================================
   Casa Reinosa · Torrelavega
   Paleta extraída del logo/carta: crema, marrón cálido, negro tinta.
   ========================================================== */

:root {
    --cream: #f5ecd7;
    --cream-2: #ede0c2;
    --cream-3: #f9f2e0;
    --paper: #fbf6e8;
    --ink: #2a1b0e;
    --ink-soft: #4a3524;
    --brown: #6b4423;
    --brown-2: #8b5a2b;
    --gold: #b78446;
    --accent: #a3652b;

    --font-display: "Playfair Display", "Georgia", serif;
    --font-script: "Dancing Script", "Brush Script MT", cursive;
    --font-body: "Lora", "Georgia", serif;

    --radius: 10px;
    --shadow-sm: 0 4px 12px rgba(58, 36, 22, 0.08);
    --shadow-md: 0 10px 30px rgba(58, 36, 22, 0.12);

    --max: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

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

.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px;
}

.script { font-family: var(--font-script); font-weight: 700; color: var(--brown); }

/* ---------------- Header / Nav ---------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(251, 246, 232, 0.92);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid rgba(107, 68, 35, 0.12);
}

.nav {
    max-width: var(--max);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--ink);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    font-family: var(--font-script);
    font-size: 20px;
    color: var(--ink);
}

.brand-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.brand-text {
    font-family: var(--font-script);
    font-size: 24px;
    color: var(--brown);
}

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

.nav-links a {
    font-family: var(--font-display);
    font-size: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ink-soft);
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition: color .2s, border-color .2s;
}

.nav-links a:hover {
    color: var(--brown);
    border-bottom-color: var(--gold);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    width: 40px;
    height: 40px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ink);
    margin: 0 auto;
    transition: transform .2s;
}

/* ---------------- Hero ---------------- */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ink);
    overflow: hidden;
    text-align: center;
    padding: 100px 24px 80px;
    isolation: isolate;
}

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

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(20, 12, 6, 0.62) 0%, rgba(20, 12, 6, 0.5) 40%, rgba(20, 12, 6, 0.8) 100%),
        radial-gradient(circle at 50% 42%, rgba(20, 12, 6, 0.4), rgba(20, 12, 6, 0.7) 85%);
}

.hero-content {
    position: relative;
    max-width: 820px;
    z-index: 2;
    color: var(--cream-3);
}

.hero-content .hero-title,
.hero-content .hero-title .script,
.hero-content .hero-eyebrow,
.hero-content .hero-tagline {
    color: var(--cream-3);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

.hero-content .hero-title .script {
    color: #f0c98b;
}

.hero-content .hero-eyebrow {
    color: #f0c98b;
}

.hero-logo {
    width: clamp(140px, 18vw, 200px);
    height: auto;
    margin: 0 auto 24px;
    filter: drop-shadow(0 6px 16px rgba(58, 36, 22, 0.15));
    animation: fadeInDown .8s ease-out both;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
    font-family: var(--font-display);
    letter-spacing: 8px;
    text-transform: uppercase;
    font-size: 13px;
    color: var(--brown);
    margin-bottom: 24px;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.6rem, 6vw, 5rem);
    line-height: 1.05;
    color: var(--ink);
    margin-bottom: 24px;
}

.hero-title .script {
    display: block;
    font-size: clamp(3.4rem, 8vw, 6.5rem);
    font-weight: 700;
    color: var(--brown);
    line-height: 1;
    margin-top: 8px;
}

.hero-tagline {
    font-family: var(--font-body);
    font-style: italic;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    color: var(--ink-soft);
    max-width: 520px;
    margin: 0 auto 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 13px;
    cursor: pointer;
    transition: transform .2s, background .2s, color .2s, box-shadow .2s;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--ink);
    color: var(--cream-3);
}

.btn-primary:hover {
    background: var(--brown);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--ink);
}

.btn-ghost:hover {
    background: var(--ink);
    color: var(--cream-3);
    transform: translateY(-2px);
}

.hero .btn-ghost {
    color: var(--cream-3);
    border-color: var(--cream-3);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(4px);
}
.hero .btn-ghost:hover {
    background: var(--cream-3);
    color: var(--ink);
}
.hero .btn-primary {
    background: var(--cream-3);
    color: var(--ink);
}
.hero .btn-primary:hover {
    background: var(--gold);
    color: var(--ink);
}

.hero-logo {
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.45));
}

/* ---------------- Section base ---------------- */
.section {
    padding: 110px 0;
    position: relative;
}

.section-eyebrow {
    font-family: var(--font-display);
    letter-spacing: 6px;
    text-transform: uppercase;
    font-size: 12px;
    color: var(--brown);
    margin-bottom: 14px;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--ink);
    line-height: 1.15;
    margin-bottom: 24px;
}

.section-title .script {
    font-weight: 700;
    color: var(--brown);
}

.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 60px;
}

.ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}
.ornament span {
    display: block;
    width: 60px;
    height: 1px;
    background: var(--brown);
}
.ornament .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brown);
}

/* ---------------- Flavors (galería) ---------------- */
.flavors {
    background: var(--paper);
}

.flavors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.flavor-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    aspect-ratio: 4 / 3;
    background: var(--cream-2);
    transition: transform .3s ease, box-shadow .3s ease;
    margin: 0;
}

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

.flavor-card img,
.flavor-card picture {
    width: 100%;
    height: 100%;
    display: block;
}

.flavor-card img {
    object-fit: cover;
    transition: transform .5s ease;
}

.flavor-card:hover img { transform: scale(1.04); }

.flavor-card figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px 16px 14px;
    color: var(--cream-3);
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    background: linear-gradient(180deg, rgba(20, 12, 6, 0) 0%, rgba(20, 12, 6, 0.75) 70%, rgba(20, 12, 6, 0.9) 100%);
}

.flavors-cta {
    text-align: center;
    margin-top: 48px;
}

/* ---------------- Team ---------------- */
.team {
    background:
        radial-gradient(circle at 0% 0%, rgba(183, 132, 70, 0.10), transparent 40%),
        var(--cream);
    border-top: 1px solid rgba(107, 68, 35, 0.10);
    border-bottom: 1px solid rgba(107, 68, 35, 0.10);
}

.team-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 60px;
    align-items: center;
}

.team-photo {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    aspect-ratio: 3 / 4;
    max-width: 460px;
    justify-self: center;
    width: 100%;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.team-text p + p { margin-top: 16px; }

/* ---------------- Menu ---------------- */
.menu {
    background:
        radial-gradient(circle at 100% 0%, rgba(183, 132, 70, 0.10), transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(107, 68, 35, 0.10), transparent 40%),
        var(--cream);
    border-top: 1px solid rgba(107, 68, 35, 0.10);
    border-bottom: 1px solid rgba(107, 68, 35, 0.10);
}

/* Página dedicada de la carta */
.carta-page {
    padding-top: 80px;
}

.carta-back {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

/* --- Carta oficial (imágenes) --- */
.menu-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    margin-bottom: 24px;
}

.menu-image {
    background: transparent;
    border: 0;
    padding: 0;
    cursor: zoom-in;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform .3s ease, box-shadow .3s ease;
    position: relative;
    display: block;
    width: 100%;
    max-width: 900px;
}

.menu-image:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 42px rgba(58, 36, 22, 0.20);
}

.menu-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
}

.menu-images-hint {
    text-align: center;
    font-style: italic;
    font-size: 13px;
    color: var(--ink-soft);
    margin-top: 8px;
    margin-bottom: 40px;
}

/* --- Lightbox --- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(20, 12, 6, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 40px 24px;
    animation: fadeIn .2s ease-out;
}

.lightbox.open { display: flex; }

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 44px;
    height: 44px;
    background: rgba(251, 246, 232, 0.95);
    color: var(--ink);
    border: 0;
    border-radius: 50%;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s, background .2s;
}
.lightbox-close:hover {
    transform: rotate(90deg);
    background: var(--gold);
    color: var(--cream-3);
}

/* ---------------- Visit ---------------- */
.visit {
    background: var(--paper);
}

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

.info-block {
    margin-top: 28px;
}

.info-block h4 {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 13px;
    color: var(--gold);
    margin-bottom: 8px;
}

.info-block p {
    color: var(--ink-soft);
    line-height: 1.7;
}

.visit-actions {
    margin-top: 40px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.visit-map {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    min-height: 420px;
    border: 4px solid var(--cream-3);
}

.visit-map iframe {
    width: 100%;
    height: 100%;
    min-height: 420px;
    border: 0;
    display: block;
}

/* ---------------- Footer ---------------- */
.site-footer {
    background: var(--ink);
    color: var(--cream-2);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: start;
}

.footer-brand {
    font-family: var(--font-script);
    font-size: 32px;
    color: var(--cream-3);
    line-height: 1;
}

.footer-sub {
    font-family: var(--font-display);
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 12px;
    color: rgba(245, 236, 215, 0.6);
    margin-top: 10px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-links a {
    color: rgba(245, 236, 215, 0.75);
    transition: color .2s;
}
.footer-links a:hover { color: var(--gold); }

.footer-copy {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 30px;
    margin-top: 20px;
    border-top: 1px solid rgba(245, 236, 215, 0.15);
    font-size: 12.5px;
    letter-spacing: 1px;
    color: rgba(245, 236, 215, 0.55);
}

.footer-credit {
    display: inline-block;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid rgba(245, 236, 215, 0.2);
}

.footer-credit a {
    color: rgba(245, 236, 215, 0.75);
    transition: color .2s;
}

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

@media (max-width: 520px) {
    .footer-credit {
        display: block;
        margin: 8px 0 0;
        padding: 0;
        border: 0;
    }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
    .visit-grid,
    .team-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .team-photo { max-width: 380px; }

    .flavors-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }

    .menu-images { gap: 22px; }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-links {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        text-align: center;
    }
}

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

@media (max-width: 720px) {
    .nav-toggle { display: flex; }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--paper);
        flex-direction: column;
        gap: 0;
        padding: 12px 0;
        border-bottom: 1px solid rgba(107, 68, 35, 0.15);
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s, transform .2s;
    }
    .nav-links.open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    .nav-links li { width: 100%; }
    .nav-links a {
        display: block;
        padding: 14px 24px;
        border-bottom: 0;
    }

    .section { padding: 80px 0; }
    .hero    { min-height: min(82vh, 640px); padding-top: 80px; }
}

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
