/* ==========================================================================
   Caserísima · Capa común (tokens, navegación, pie, botones, formularios)
   La cargan todas las páginas públicas. Cada página añade su propia hoja.
   ========================================================================== */

:root {
    --font-body: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-head: "Montserrat", system-ui, sans-serif;
    --shell: min(1180px, calc(100% - 40px));
    --nav-h: 78px;
    --r-xl: 36px;
    --r-lg: 26px;
    --r-md: 18px;
    --r-sm: 12px;
    --ease: cubic-bezier(.22, .61, .36, 1);
}

/* --- Mundo zanahoria: portada, catering y menús diarios ------------------- */
html,
html[data-world="verde"] {
    --ink: #18231f;
    --ink-soft: #3c4b44;
    --muted: #64716c;
    --paper: #fbfdfb;
    --paper-alt: #f2f8f3;
    --surface: #ffffff;
    --line: #dde8e1;
    --accent: #76bf38;
    --accent-dark: #4c8f25;
    --accent-soft: #eef8e7;
    --hot: #ffa62f;
    --hot-dark: #c87300;
    --hot-soft: #fff4e3;
    --on-accent: #ffffff;
    --shadow-sm: 0 10px 30px rgba(43, 69, 56, .08);
    --shadow-lg: 0 25px 70px rgba(43, 69, 56, .13);
    --nav-bg: rgba(251, 253, 251, .82);
    --nav-bg-solid: #fbfdfb;
    --nav-line: #e3ede6;
    --footer-bg: #10201b;
    --footer-ink: #cdd8d3;
    --footer-muted: #8d9d96;
}

/* --- Mundo brasa: Gourmet Burger ----------------------------------------- */
html[data-world="brasa"] {
    --ink: #f4ece0;
    --ink-soft: #d8cfc2;
    --muted: #9aa79f;
    --paper: #0d1311;
    --paper-alt: #121b17;
    --surface: #17211c;
    --line: rgba(255, 255, 255, .10);
    --accent: #ff8a1f;
    --accent-dark: #e57415;
    --accent-soft: rgba(255, 138, 31, .13);
    --hot: #ffb648;
    --hot-dark: #ffb648;
    --hot-soft: rgba(255, 182, 72, .12);
    --on-accent: #14100a;
    --shadow-sm: 0 12px 32px rgba(0, 0, 0, .38);
    --shadow-lg: 0 34px 80px rgba(0, 0, 0, .55);
    --nav-bg: rgba(13, 19, 17, .78);
    --nav-bg-solid: #0d1311;
    --nav-line: rgba(255, 255, 255, .08);
    --footer-bg: #080d0b;
    --footer-ink: #c8d1cb;
    --footer-muted: #7f8d86;
}

/* --------------------------------------------------------------- base --- */
* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 16px);
    background: var(--paper);
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--on-accent); }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-head); }

.shell { width: var(--shell); margin-inline: auto; }
.section { padding: clamp(76px, 9vw, 132px) 0; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--accent);
    color: var(--on-accent);
    padding: 12px 18px;
    border-radius: 0 0 12px 0;
    font-weight: 800;
}
.skip-link:focus { left: 0; }

:focus-visible {
    outline: 3px solid var(--hot);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ---------------------------------------------------------- tipografía --- */
.kicker {
    margin: 0 0 16px;
    color: var(--accent-dark);
    font: 800 .74rem/1.3 var(--font-head);
    letter-spacing: .16em;
    display: flex;
    align-items: center;
    gap: 10px;
}
.kicker::before {
    content: "";
    width: 26px;
    height: 2px;
    background: var(--hot);
    flex: 0 0 auto;
}
html[data-world="brasa"] .kicker { color: var(--hot); }

.display {
    margin: 0;
    font-weight: 900;
    letter-spacing: -.055em;
    line-height: .98;
    font-size: clamp(2.6rem, 5.4vw, 5rem);
}
.title {
    margin: 0;
    font-weight: 900;
    letter-spacing: -.05em;
    line-height: 1.04;
    font-size: clamp(2.1rem, 4.2vw, 3.9rem);
}
.lead {
    margin: 26px 0 0;
    max-width: 62ch;
    color: var(--muted);
    font-size: clamp(1rem, 1.35vw, 1.14rem);
    line-height: 1.72;
}
em.accent { color: var(--hot); font-style: normal; }

/* ------------------------------------------------------------- botones --- */
.btn {
    min-height: 54px;
    padding: 0 24px;
    border: 0;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform .25s var(--ease), background-color .25s var(--ease), border-color .25s var(--ease);
}
.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
    box-shadow: 0 15px 32px color-mix(in srgb, var(--accent) 28%, transparent);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--accent-dark); }
.btn-ghost {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); }
.btn-hot {
    background: var(--hot);
    color: #2a1a00;
    box-shadow: 0 15px 32px color-mix(in srgb, var(--hot) 30%, transparent);
}
.btn-hot:hover { transform: translateY(-2px); }

/* ---------------------------------------------------------- navegación --- */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.site-nav.is-stuck {
    border-bottom-color: var(--nav-line);
    box-shadow: var(--shadow-sm);
}

.nav-inner {
    width: var(--shell);
    margin-inline: auto;
    min-height: var(--nav-h);
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-brand { flex: 0 0 auto; display: block; }
.nav-brand img {
    height: 44px;
    width: auto;
    object-fit: contain;
    transition: transform .3s var(--ease);
}
.nav-brand:hover img { transform: scale(1.04); }

.nav-links {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-links a {
    position: relative;
    padding: 10px 14px;
    border-radius: 11px;
    font-size: .92rem;
    font-weight: 700;
    color: var(--ink-soft);
    transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-links a:hover { color: var(--ink); background: var(--accent-soft); }
.nav-links a.is-active { color: var(--ink); }
.nav-links a.is-active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 3px;
    height: 3px;
    border-radius: 3px;
    background: var(--hot);
}
/* El enlace de burgers guarda su color aunque estemos en el mundo verde. */
.nav-links a[data-world="brasa"]:hover { background: var(--hot-soft); }

.nav-cta {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: var(--hot);
    color: #2a1a00;
    font-size: .9rem;
    font-weight: 800;
    box-shadow: 0 10px 26px color-mix(in srgb, var(--hot) 28%, transparent);
    transition: transform .25s var(--ease);
}
.nav-cta:hover { transform: translateY(-2px); }
.nav-cta-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1f7a35;
    box-shadow: 0 0 0 0 rgba(31, 122, 53, .55);
    animation: pulse 2.4s infinite;
}
@keyframes pulse {
    70% { box-shadow: 0 0 0 9px rgba(31, 122, 53, 0); }
    100% { box-shadow: 0 0 0 0 rgba(31, 122, 53, 0); }
}

.nav-burger {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--nav-line);
    border-radius: 13px;
    background: var(--surface);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.nav-burger span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-panel {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px 20px 22px;
    background: var(--nav-bg-solid);
    border-top: 1px solid var(--nav-line);
}
.nav-panel[hidden] { display: none; }
.nav-panel a {
    padding: 15px 14px;
    border-radius: 13px;
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ink);
}
.nav-panel a.is-active { background: var(--accent-soft); color: var(--accent-dark); }
.nav-panel-cta {
    margin-top: 6px;
    text-align: center;
    background: var(--hot);
    color: #2a1a00 !important;
}

/* ------------------------------------------------------------ marquesina --- */
.marquee {
    overflow: hidden;
    padding: 18px 0;
    background: var(--ink);
    color: var(--paper);
    user-select: none;
}
html[data-world="brasa"] .marquee { background: var(--accent); color: var(--on-accent); }
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 34s linear infinite;
}
.marquee-track span,
.marquee-track b {
    padding: 0 22px;
    font: 900 clamp(.9rem, 1.7vw, 1.25rem)/1 var(--font-head);
    letter-spacing: .05em;
    white-space: nowrap;
}
.marquee-track b { color: var(--hot); }
html[data-world="brasa"] .marquee-track b { color: var(--on-accent); opacity: .55; }
@keyframes marquee {
    to { transform: translateX(-50%); }
}

/* ------------------------------------------------------------ formulario --- */
.contact-form {
    display: grid;
    gap: 16px;
    padding: clamp(24px, 3.5vw, 38px);
    border-radius: var(--r-lg);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
}
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label { display: grid; gap: 8px; }
.contact-form label > span {
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: 0;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}
.privacy-check {
    grid-template-columns: 22px 1fr;
    align-items: start;
    gap: 12px;
}
.privacy-check input {
    width: 22px;
    min-height: 22px;
    height: 22px;
    margin: 2px 0 0;
    padding: 0;
    accent-color: var(--accent);
}
/* Gana en especificidad a `.contact-form label > span`, que pone el texto en
   mayúsculas: una casilla de consentimiento tiene que poder leerse cómodo. */
.contact-form .privacy-check > span {
    font-size: .88rem;
    line-height: 1.55;
    color: var(--muted);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
}
.form-submit { justify-self: start; }
.form-submit[disabled] { opacity: .6; cursor: wait; }
.form-status { margin: 0; font-size: .92rem; font-weight: 600; min-height: 1.2em; }
.form-status.is-ok { color: var(--accent-dark); }
.form-status.is-error { color: #c8452f; }
html[data-world="brasa"] .form-status.is-ok { color: var(--hot); }
html[data-world="brasa"] .form-status.is-error { color: #ff8f7a; }

/* ------------------------------------------------------------------ pie --- */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-ink);
    padding: clamp(52px, 6vw, 82px) 0 28px;
}
.footer-grid {
    display: grid;
    /* La marca ocupa mas y el resto de columnas se reparten a partes iguales. */
    grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr));
    gap: clamp(26px, 3vw, 46px);
}
.footer-brand img {
    width: 190px;
    max-width: 100%;
    margin-bottom: 18px;
}
.footer-brand p { margin: 0; color: var(--footer-muted); font-size: .95rem; max-width: 34ch; }
.footer-col h3 {
    margin: 0 0 16px;
    font-size: .74rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--footer-muted);
    font-weight: 800;
}
.footer-col a,
.footer-col p {
    display: block;
    margin: 0 0 9px;
    font-size: .95rem;
    color: var(--footer-ink);
    transition: color .2s var(--ease);
}
.footer-col a:hover { color: var(--hot); }
.footer-bottom {
    margin-top: clamp(36px, 5vw, 60px);
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    font-size: .83rem;
    color: var(--footer-muted);
}

/* -------------------------------------------------------- botón flotante --- */
.wa-fab {
    position: fixed;
    right: clamp(16px, 3vw, 28px);
    bottom: clamp(16px, 3vw, 28px);
    z-index: 90;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    box-shadow: 0 14px 34px rgba(37, 211, 102, .38);
    transition: transform .25s var(--ease);
}
.wa-fab:hover { transform: scale(1.07); }
.wa-fab svg { width: 30px; height: 30px; }

/* ---------------------------------------------------------- animaciones --- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .09s; }
.reveal[data-delay="2"] { transition-delay: .18s; }
.reveal[data-delay="3"] { transition-delay: .27s; }
.reveal[data-delay="4"] { transition-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .marquee-track { animation: none; }
    .nav-cta-dot { animation: none; }
    * { transition-duration: .01ms !important; }
}

/* ------------------------------------------------------------ responsive --- */
@media (max-width: 1040px) {
    .nav-links { display: none; }
    .nav-burger { display: flex; }
    .nav-cta { margin-left: auto; }
    .nav-panel { display: flex; }
    .nav-panel[hidden] { display: none; }
}

@media (max-width: 860px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
    :root { --nav-h: 66px; --shell: min(100% - 28px, 1180px); }
    .section { padding: 66px 0; }
    .nav-brand img { height: 32px; }
    .nav-cta { font-size: 0; padding: 0 14px; gap: 0; }
    .nav-cta::after { content: "Escríbenos"; font-size: .85rem; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .wa-fab { width: 52px; height: 52px; }
    .wa-fab svg { width: 26px; height: 26px; }
}
