/* =========================================================
   BASE — armazón común de las páginas nuevas (/carta/, /locales/…,
   /pedir-online/, /contacto/): tipografías de marca, paleta, barra de
   navegación, menú móvil, selector de idioma, cabecera de página,
   botones, marquesina y pie.

   Las páginas antiguas (portada, /locales/, /catering/,
   /sobre-nosotros/, /trabaja-con-nosotros/, /aviso-legal/) llevan todo
   esto en línea dentro de su propio <style>; no dependen de este
   fichero. Si algún día se unifican, este es el sitio al que mirar.
   ========================================================= */

/* ===== TIPOGRAFÍAS DE MARCA (BamBam Brandguide 2025) ===== */
@font-face { font-family: 'Aged Machine'; src: url('/assets/fonts/Aged Machine.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Brakle'; src: url('/assets/fonts/Brakle-Light.otf') format('opentype'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Brakle'; src: url('/assets/fonts/Brakle-Regular.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Brakle'; src: url('/assets/fonts/Brakle-Medium.otf') format('opentype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Brakle'; src: url('/assets/fonts/Brakle-SemiBold.otf') format('opentype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Brakle'; src: url('/assets/fonts/Brakle-Bold.otf') format('opentype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Brakle Black'; src: url('/assets/fonts/Brakle-Bold.otf') format('opentype'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('/assets/fonts/Montserrat-VariableFont_wght.ttf') format('truetype'); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --bb-cream:#ece9d8; --bb-olive:#7b8c55; --bb-mustard:#e9be00;
  --bb-sky:#428abc; --bb-terracotta:#c9594d; --bb-navy:#295680;
  --bb-forest:#30543a; --bb-ink:#14110c;
  --bg: var(--bb-cream); --ink: var(--bb-ink);
  --accent: var(--bb-terracotta);
  --accent-3: var(--bb-mustard);
  --dark: var(--bb-ink);
  --maxw: 1440px;
}

html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: 'Montserrat', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Grano de papel: una capa fija por encima de todo, sin capturar clics */
body::before {
  content: ""; position: fixed; inset: 0;
  pointer-events: none; z-index: 200;
  opacity: .08; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ===== BARRA DE NAVEGACIÓN ===== */
.nav { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid rgba(20,17,12,.08); }
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 18px 32px;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 24px;
  font-weight: 600; font-size: 12px;
  letter-spacing: .16em; text-transform: uppercase;
}
.nav a { color: var(--ink); text-decoration: none; }
.nav-left, .nav-right { display: flex; gap: 28px; align-items: center; }
.nav-right { justify-content: flex-end; }
.nav-center {
  font-family: 'Brakle Black', sans-serif;
  font-size: clamp(13px, 1.4vw, 18px);
  letter-spacing: .22em; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 10px;
}
.nav a.hot, .nav a:hover { color: var(--accent); }
/* Los enlaces de la barra nunca parten en varias líneas */
.nav-left a, .nav-right a { white-space: nowrap; }
.nav-left a.current, .nav-right a.current { color: var(--accent); }
.nav-tigre { height: 26px; width: auto; display: block; flex-shrink: 0; }

/* ===== SELECTOR DE IDIOMA ===== */
.lang-switch { display: inline-flex; align-items: center; gap: 5px; }
.lang-btn {
  background: none; border: none; padding: 4px 2px; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: rgba(20,17,12,.42);
  transition: color .2s;
}
.lang-btn:hover { color: var(--accent); }
.lang-btn.on { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }
.lang-sep { color: rgba(20,17,12,.25); font-size: 11px; }
.nav-mobile .lang-switch { padding: 16px 20px; gap: 10px; border-top: 1px solid rgba(20,17,12,.08); }
.nav-mobile .lang-btn { font-size: 13px; letter-spacing: .18em; }

/* ===== MENÚ MÓVIL (hamburguesa) ===== */
.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--ink);
  width: 44px; height: 44px;
  box-sizing: border-box;
  align-items: center; justify-content: center;
  padding: 0; cursor: pointer;
  justify-self: end;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 2px; background: var(--ink);
  transition: transform .2s, background .2s, top .2s;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }
.nav.open .nav-toggle span { background: transparent; }
.nav.open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
.nav.open .nav-toggle span::after  { top: 0; transform: rotate(-45deg); }
.nav-mobile {
  display: none; flex-direction: column;
  background: var(--bg);
  border-top: 1px solid rgba(20,17,12,.12);
}
.nav-mobile a {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(20,17,12,.08);
  color: var(--ink); text-decoration: none;
  font-weight: 600; font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a.hot, .nav-mobile a.current { color: var(--accent); }
@media (max-width: 1000px) {
  /* Con cuatro enlaces ya no caben al lado del logotipo: hamburguesa */
  .nav-left, .nav-right { display: none; }
  .nav-inner { grid-template-columns: 1fr auto; padding: 14px 20px; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-mobile { display: flex; }
}
@media (max-width: 680px) {
  .nav-center { font-size: 11px; letter-spacing: .12em; gap: 7px; }
  .nav-tigre { height: 20px; }
  .nav .nav-toggle { width: 42px; height: 42px; }
}

/* ===== CABECERA DE PÁGINA ===== */
.page-header { position: relative; overflow: hidden; background: var(--dark); color: var(--bg); padding: 70px 32px 90px; }
.page-header-inner { max-width: var(--maxw); margin: 0 auto; position: relative; z-index: 1; }
.crumbs {
  font-family: 'Brakle', sans-serif;
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(236,233,216,.6); margin-bottom: 40px;
}
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--accent-3); }
.crumbs span { color: var(--accent-3); margin: 0 10px; }
/* Aged Machine es muy ancha (≈0,98 em por carácter): sin el tope y el
   overflow-wrap los titulares se salen de la pantalla en móvil. */
.mega-title {
  font-family: 'Brakle Black', 'Brakle', sans-serif;
  font-size: clamp(38px, 9vw, 120px);
  overflow-wrap: anywhere;
  line-height: .92; letter-spacing: -.02em;
  text-transform: lowercase; margin: 0;
  color: var(--accent);
}
.mega-title em { font-style: normal; color: var(--bg); }
.header-sub {
  max-width: 620px; margin: 36px 0 0;
  font-size: 17px; line-height: 1.55;
  color: rgba(236,233,216,.85);
}

/* ===== TÍTULOS DE SECCIÓN ===== */
.sec-kicker {
  display: block;
  font-family: 'Brakle', sans-serif;
  font-size: 11px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.sec-title {
  font-family: 'Aged Machine', sans-serif;
  font-size: clamp(46px, 7vw, 104px);
  line-height: .88; letter-spacing: -.03em;
  text-transform: lowercase; margin: 0 0 28px;
  overflow-wrap: anywhere;
}
.sec-title em { font-style: normal; color: var(--accent); }

/* ===== BOTONES ===== */
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 30px;
  font-family: 'Brakle', sans-serif;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  text-decoration: none; border: none; cursor: pointer;
  background: var(--ink); color: var(--bg);
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.btn:hover { background: var(--accent); transform: translate(-2px,-2px); box-shadow: 4px 4px 0 var(--ink); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent-3); color: var(--ink); }
.btn.inv, .btn-ghost-ink { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.inv:hover, .btn-ghost-ink:hover { background: var(--ink); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--bg); border: 1.5px solid var(--bg); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ===== CTA DE CIERRE ===== */
.cta { max-width: var(--maxw); margin: 0 auto; padding: 110px 32px; text-align: center; }
.cta h2 {
  font-family: 'Aged Machine', sans-serif;
  font-size: clamp(46px, 7vw, 96px);
  line-height: .88; letter-spacing: -.03em;
  text-transform: lowercase; margin: 0 0 32px;
  overflow-wrap: anywhere;
}
.cta h2 em { font-style: normal; color: var(--accent); }
.cta .cta-row { justify-content: center; }

/* ===== MARQUESINA ===== */
.marquee-strip {
  background: var(--ink); color: var(--bg);
  padding: 22px 0; overflow: hidden; white-space: nowrap;
  border-top: 2px solid var(--bg); border-bottom: 2px solid var(--bg);
}
.ribbon-track {
  display: inline-flex; gap: 40px;
  font-family: 'Brakle', sans-serif;
  font-size: 30px; text-transform: lowercase;
  animation: slide 30s linear infinite;
}
.ribbon-track .wild { color: var(--bb-mustard); }
.ribbon-track .star { color: var(--accent); }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ribbon-track { animation: none; }
}

/* ===== PIE ===== */
.footer { background: var(--ink); color: var(--bg); padding: 80px 32px 32px; text-align: center; }
.footer-logo {
  font-family: 'Aged Machine', sans-serif;
  font-size: clamp(80px, 11vw, 160px);
  line-height: .85; letter-spacing: -.03em;
  text-transform: lowercase; margin: 0 0 28px;
}
.footer-logo .amp { font-family: 'Brakle', sans-serif; font-size: .58em; vertical-align: .22em; color: var(--accent-3); padding: 0 .06em; }
.footer-contact { font-family: 'Brakle', sans-serif; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; margin-bottom: 18px; }
.footer-contact a { color: inherit; text-decoration: none; }
.footer-social { display: flex; justify-content: center; gap: 18px; margin-bottom: 44px; }
.footer-social a {
  width: 36px; height: 36px; border: 1.5px solid var(--bg); border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--bg); transition: background .2s, color .2s;
}
.footer-social a:hover { background: var(--bg); color: var(--ink); }
/* Mapa de enlaces del pie: ayuda a la gente y a que Google encuentre todo */
.footer-nav {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 10px 26px; margin: 0 auto 50px; max-width: 900px;
  font-family: 'Brakle', sans-serif;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
}
.footer-nav a { color: rgba(236,233,216,.7); text-decoration: none; }
.footer-nav a:hover { color: var(--accent-3); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  color: rgba(236,233,216,.5);
}
.footer-bottom a { color: inherit; text-decoration: none; }
.footer-bottom a:hover { color: var(--bg); }

/* ===== SELLO DE FONDO (logo cuadrado) =====
   Marca de agua con el logo, recortada por la propia sección. Se tiñe
   con --sello-color y se sitúa con las variantes. */
.sello {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  aspect-ratio: 1;
  -webkit-mask: url('/assets/img/logo-cuadrado.png') center / contain no-repeat;
          mask: url('/assets/img/logo-cuadrado.png') center / contain no-repeat;
  background: var(--sello-color, var(--ink));
  opacity: var(--sello-op, .06);
}
.sello--dcha { right: -10%; top: -16%; width: min(78vw, 660px); transform: rotate(-12deg); }
.sello--izda { left: -12%; bottom: -20%; width: min(70vw, 560px); transform: rotate(9deg); }

/* ===== MÓVIL: topes de tipografía display ===== */
@media (max-width: 680px) {
  .page-header { padding: 48px 20px 64px; }
  .sec-title, .cta h2 { font-size: 34px; }
  .footer-logo { font-size: 42px; }
  .footer { padding: 56px 20px 28px; }
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; }
  .sello--dcha, .sello--izda { width: min(90vw, 380px); }
}

/* ===== PREGUNTAS RÁPIDAS =====
   Mismo aspecto que las FAQ que ya hay en /locales/ y /catering/, pero
   la pregunta es un <button>, así que se puede abrir con el teclado. */
.faq { max-width: 960px; margin: 100px auto 0; padding: 0 32px; }
.faq h2 {
  font-family: 'Aged Machine', sans-serif;
  font-size: clamp(36px, 5vw, 76px);
  line-height: .9; letter-spacing: -.03em;
  text-transform: lowercase; margin: 0 0 36px;
  overflow-wrap: anywhere;
}
.faq-item { border-top: 1.5px solid var(--ink); }
.faq-item:last-child { border-bottom: 1.5px solid var(--ink); }
.faq-q {
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 22px 0; text-align: left; color: inherit;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font-family: 'Brakle Black', sans-serif;
  font-size: 16px; letter-spacing: .03em; text-transform: uppercase;
  line-height: 1.35;
}
.faq-q:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.faq-q .plus {
  font-family: 'Brakle', sans-serif; font-size: 22px;
  color: var(--accent); transition: transform .25s; flex-shrink: 0;
}
.faq-item.open .faq-q .plus { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease, margin-bottom .25s;
  font-size: 15px; line-height: 1.65; color: rgba(20,17,12,.75);
}
.faq-item.open .faq-a { max-height: 320px; margin-bottom: 22px; }
.faq-a a { color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .faq-a { transition: none; }
}
@media (max-width: 680px) {
  .faq { padding: 0 20px; margin-top: 64px; }
  .faq h2 { font-size: 34px; }
  .faq-q { font-size: 14px; }
}

/* ===== BOTONES DE PLATAFORMA (Glovo / Uber Eats) ===== */
.btn-plat {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--bg);
  padding: 13px 20px; text-decoration: none;
  font-family: 'Brakle', sans-serif;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn-plat:hover { transform: translate(-2px,-2px); box-shadow: 4px 4px 0 var(--ink); background: var(--accent); }
.btn-plat img { height: 17px; width: auto; display: block; flex-shrink: 0; }

/* Sobre fondo oscuro el botón de plataforma se invierte: la cabecera de
   página usa la misma tinta que el botón, así que si no, el botón
   desaparece y solo se ve el logotipo flotando.
   Van en mostaza y a mayor tamaño porque son la acción principal de la
   página: pedir. */
.page-header .btn-plat,
.domicilio .btn-plat {
  background: var(--accent-3);
  color: var(--ink);
  padding: 16px 24px;
  font-size: 12px;
  gap: 12px;
  border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
}
.page-header .btn-plat img,
.domicilio .btn-plat img { height: 21px; }
.page-header .btn-plat:hover,
.domicilio .btn-plat:hover {
  background: var(--bg);
  color: var(--ink);
  transform: translate(-3px,-3px);
  box-shadow: 8px 8px 0 var(--ink);
}

/* Los logotipos de plataforma tienen su propia proporción. Dentro de un
   flex en columna, el `align-items: stretch` por defecto los estira a lo
   ancho del contenedor y los deforma, así que se anclan al inicio. */
.plat-logo,
.btn-plat img {
  align-self: flex-start;
  flex-shrink: 0;
  width: auto;
  max-width: 100%;
}

/* «Glovo» es una palabra corta y «Uber Eats» una larga: a la misma altura,
   Uber Eats ocupa el doble de ancho y parece mucho más grande. Se les da
   altura distinta para que ocupen la MISMA área y pesen igual en pantalla
   (Glovo necesita ser 1,42 veces más alto). */
.plat-logo[src*="glovo"]        { height: 40px; }
.plat-logo[src*="ubereats"]     { height: 28px; }
.btn-plat img[src*="glovo"]     { height: 24px; }
.btn-plat img[src*="ubereats"]  { height: 17px; }


/* ===== Color por plataforma =====
   Los dos botones en mostaza se confundian entre si. Uber Eats pasa a su
   verde de marca (#06C167) con el logotipo en tinta, que es su propio
   lockup: el logotipo a color lleva el "Eats" en ese mismo verde y se
   perderia contra el fondo. Tinta sobre ese verde da 8:1 de contraste. */
.page-header .btn-plat[data-plat="ubereats"],
.domicilio .btn-plat[data-plat="ubereats"] {
  background: #06c167;
  color: var(--ink);
}
.page-header .btn-plat[data-plat="ubereats"]:hover,
.domicilio .btn-plat[data-plat="ubereats"]:hover {
  background: #04a556;
  color: var(--ink);
}
/* La tarjeta de Uber Eats lleva ya en reposo la sombra dura verde, que es
   el recurso del sitio para adelantar un elemento. El borde sigue siendo
   de tinta como el resto, para que la rejilla no se descuadre. */
.plat[data-plat="ubereats"] { box-shadow: 9px 9px 0 #06c167; }
.plat[data-plat="ubereats"]:hover { box-shadow: 14px 14px 0 #06c167; }
