/* ==========================================================================
   KañaViva · Cartelera (versión 2)
   Carteles de imprenta de concierto de salsa: tipografía de madera condensada,
   tinta fluorescente, fotos tramadas (semitono) y papel. Retícula estricta.
   Movimiento según Emil Kowalski: rápido, con propósito, interrumpible.
   ========================================================================== */

html, body { background: #E7E4DD; }

:root {
  --pared: #E7E4DD;
  --tinta: #17161A;
  --fucsia: #FF2D87;
  --amarillo: #FFE14D;
  --verde: #18C27A;
  --noche: #17161A;
  --blanco: #FBFAF7;

  --f-cartel: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --f-texto: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --gutter: clamp(16px, 4vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: 90px; }
body { font-family: var(--f-texto); font-size: clamp(1rem, .97rem + .15vw, 1.08rem); line-height: 1.55; color: var(--tinta); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--fucsia); color: var(--blanco); }
:focus-visible { outline: 3px solid var(--fucsia); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--tinta); color: var(--blanco); transition: transform 200ms var(--ease-out); }
.skip:focus { transform: translateY(72px); }

/* Pared: textura de papel encolado */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .28 0 0 0 0 .25 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Botones: tinta plana, sin adornos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 1.5em;
  font-family: var(--f-cartel); font-weight: 800; font-size: 1.15rem; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  border: 2px solid var(--tinta); border-radius: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, color 160ms ease;
}
.btn--sm { height: 42px; font-size: 1rem; padding: 0 1.1em; }
.btn--ink { background: var(--tinta); color: var(--blanco); }
.btn--line { background: transparent; color: var(--tinta); }
.btn:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .btn--ink:hover { background: var(--fucsia); border-color: var(--fucsia); }
  .btn--line:hover { background: var(--tinta); color: var(--blanco); }
}

/* ---------- Nav ---------- */
.nav { position: fixed; z-index: 50; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 20px; height: 70px; padding: 0 var(--gutter); background: rgba(231, 228, 221, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 2px solid var(--tinta); }
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-cartel); font-weight: 900; font-size: 1.6rem; letter-spacing: .01em; }
.nav__brand img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #000; }
.nav__links { display: flex; gap: 26px; margin-left: auto; }
.nav__links a { font-family: var(--f-cartel); font-weight: 700; font-size: 1.15rem; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; background: linear-gradient(var(--fucsia), var(--fucsia)) 0 100% / 0 3px no-repeat; transition: background-size 240ms var(--ease-out); padding-bottom: 2px; }
@media (hover: hover) and (pointer: fine) { .nav__links a:hover { background-size: 100% 3px; } }
.nav__menu { display: none; }

/* Hoja inferior (móvil) */
.sheet-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(23, 22, 26, .45); opacity: 0; transition: opacity 300ms ease; }
.sheet-scrim.is-open { opacity: 1; }
.sheet { position: fixed; z-index: 71; left: 0; right: 0; bottom: 0; padding: 14px var(--gutter) calc(28px + env(safe-area-inset-bottom)); background: var(--amarillo); border-top: 2px solid var(--tinta); transform: translateY(100%); transition: transform 460ms var(--ease-drawer); touch-action: none; }
.sheet.is-open { transform: translateY(0); }
.sheet__grip { display: block; width: 48px; height: 5px; margin: 0 auto 18px; border-radius: 3px; background: rgba(23, 22, 26, .35); }
.sheet nav { display: grid; }
.sheet a { padding: 12px 0; font-family: var(--f-cartel); font-weight: 900; font-size: 2.6rem; line-height: 1; text-transform: uppercase; text-decoration: none; border-bottom: 2px solid var(--tinta); }

/* ---------- Cartel (componente) ---------- */
.poster { position: relative; display: flex; flex-direction: column; padding: clamp(16px, 2vw, 26px); color: var(--tinta); box-shadow: 0 1px 0 rgba(0, 0, 0, .08), 0 30px 50px -30px rgba(23, 22, 26, .55); }
.poster::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .25 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.poster--fucsia { background: var(--fucsia); }
.poster--amarillo { background: var(--amarillo); }
.poster--verde { background: var(--verde); }
.poster--noche { background: var(--noche); color: var(--blanco); }
.poster__meta { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 2px solid currentColor; font-family: var(--f-cartel); font-weight: 700; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; }
.poster__title { font-family: var(--f-cartel); font-weight: 900; font-size: clamp(4rem, 2rem + 8vw, 10.5rem); line-height: .82; letter-spacing: -.01em; text-transform: uppercase; margin-top: .14em; }
.poster__title--sm { font-size: clamp(2.6rem, 1.6rem + 3.4vw, 5rem); }
.poster__title--xs { font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.8rem); margin-top: 0; }
.poster__sub { margin-top: 14px; font-family: var(--f-cartel); font-weight: 800; font-size: clamp(1.2rem, 1rem + .8vw, 1.7rem); text-transform: uppercase; letter-spacing: .03em; }
.poster__strip { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; margin-top: auto; padding-top: 12px; border-top: 2px solid currentColor; font-size: .98rem; }
.poster__strip b { font-family: var(--f-cartel); font-weight: 800; font-size: 1.2rem; text-transform: uppercase; margin-right: .35em; }
.poster__voice { margin-top: 1rem; font-style: italic; font-weight: 600; font-size: clamp(1.2rem, 1rem + .6vw, 1.6rem); }
.poster__text { margin-top: .6rem; max-width: 34ch; font-size: 1.06rem; }
.poster__facts { display: flex; flex-wrap: wrap; gap: 0; margin-top: 1.4rem; border-top: 2px solid currentColor; }
.poster__facts div { flex: 1 1 140px; padding: 10px 14px 0 0; }
.poster__facts dt { font-family: var(--f-cartel); font-weight: 700; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.poster__facts dd { font-family: var(--f-cartel); font-weight: 900; font-size: 1.7rem; line-height: 1.05; }

/* Foto tramada: escala de grises + trama de puntos multiplicada sobre la tinta */
.halftone { position: relative; margin: 0; overflow: hidden; background: currentColor; isolation: isolate; }
.poster--fucsia .halftone, .poster--amarillo .halftone, .poster--verde .halftone { background: transparent; }
.halftone img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; filter: grayscale(1) contrast(1.2) brightness(1.32); mix-blend-mode: multiply; }
.poster--noche .halftone img { mix-blend-mode: normal; filter: grayscale(1) contrast(1.3) brightness(.9); }
.halftone::after { content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; background: radial-gradient(circle, rgba(23, 22, 26, .55) 1.1px, transparent 1.7px) 0 0 / 5px 5px; }
.poster--noche .halftone::after { background: radial-gradient(circle, rgba(24, 194, 122, .55) 1.1px, transparent 1.7px) 0 0 / 5px 5px; mix-blend-mode: screen; }

/* ---------- Pared de portada ---------- */
.wall { position: relative; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); grid-template-rows: auto 1fr; gap: 22px clamp(20px, 3vw, 48px); padding: 100px max(var(--gutter), calc((100% - 1440px) / 2 + var(--gutter))) 40px; align-items: start; }
.poster--main { grid-row: 1 / 3; min-height: calc(100dvh - 140px); rotate: -1.2deg; }
.poster--main .poster__photo { margin-top: 14px; height: clamp(180px, 30vh, 340px); }
.poster--side { rotate: 2.2deg; height: min(46vh, 440px); }
.poster--side .poster__photo { margin-top: 12px; flex: 1; min-height: 0; }
.poster--tiny { position: absolute; right: max(var(--gutter), calc((100% - 1440px) / 2 + var(--gutter))); top: calc(100px + min(46vh, 440px) - 60px); width: min(210px, 20vw); rotate: -4deg; z-index: 2; }
.wall__actions { align-self: end; padding: 18px 0 6px; border-top: 2px solid var(--tinta); }
.wall__actions p { font-size: 1.1rem; max-width: 34ch; }
.wall__buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ---------- Cartelera: pila ---------- */
.bill { padding: 60px 0 0; }
/* Cada cartel mide lo mismo que la pantalla visible: así la pila funciona */
.stack__card { position: sticky; top: 86px; height: calc(100dvh - 110px); min-height: 520px; overflow: hidden; margin: 0 max(var(--gutter), calc((100% - 1440px) / 2 + var(--gutter))) 24px; transform-origin: 50% 0; }
.stack__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: clamp(18px, 3vw, 48px); align-items: stretch; flex: 1; min-height: 0; padding-top: 10px; }
.stack__photo { min-height: 0; height: 100%; }

/* ---------- Carta ---------- */
.menu { padding: clamp(90px, 10vw, 150px) max(var(--gutter), calc((100% - 1280px) / 2 + var(--gutter))); background: var(--tinta); color: var(--blanco); margin-top: 60px; }
.menu__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 40px; padding-bottom: 18px; border-bottom: 2px solid var(--amarillo); }
.menu__title { font-family: var(--f-cartel); font-weight: 900; font-size: clamp(3.4rem, 2rem + 6vw, 8rem); line-height: .85; text-transform: uppercase; color: var(--amarillo); }
.menu__head p { max-width: 32ch; opacity: .8; }
.menu__tools { position: sticky; top: 70px; z-index: 5; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 0; background: var(--tinta); }
/* Pestañas con transición por recorte: la copia activa se recorta sobre la pestaña elegida */
.tabs { position: relative; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs__list { display: flex; gap: 0; width: max-content; }
.tab { height: 44px; padding: 0 16px; border: 2px solid var(--blanco); margin-right: -2px; background: transparent; color: var(--blanco); font-family: var(--f-cartel); font-weight: 800; font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.tabs__list--active { position: absolute; inset: 0; pointer-events: none; clip-path: inset(0 100% 0 0); transition: clip-path 260ms var(--ease-out); }
.tabs__list--active .tab { background: var(--amarillo); color: var(--tinta); border-color: var(--amarillo); }
.tab:active { transform: scale(.97); }
.search input { width: min(300px, 100%); height: 44px; padding: 0 14px; border: 2px solid var(--blanco); background: transparent; color: var(--blanco); font: inherit; }
.search input::placeholder { color: rgba(251, 250, 247, .65); }
.search input:focus { outline: none; border-color: var(--amarillo); }
.menu__body { columns: 2 340px; column-gap: clamp(32px, 5vw, 80px); margin-top: 24px; }
.menu__body.is-single { columns: auto; }
.menu__body.is-single .mblock > ul { columns: 2 320px; column-gap: clamp(32px, 5vw, 80px); }
.mblock { break-inside: avoid; margin-bottom: 2.4rem; }
.mblock__title { font-family: var(--f-cartel); font-weight: 900; font-size: 2.2rem; line-height: 1; text-transform: uppercase; color: var(--fucsia); }
.mblock__lead { margin-top: .3rem; opacity: .75; font-style: italic; }
.mitem { padding: .6rem 0; border-top: 1px solid rgba(251, 250, 247, .2); break-inside: avoid; }
.mitem__row { display: flex; align-items: baseline; gap: 12px; }
.mitem__name { flex: 1; font-weight: 600; }
.mitem__price { font-family: var(--f-cartel); font-weight: 900; font-size: 1.4rem; color: var(--amarillo); }
.mitem__desc { margin-top: .1rem; font-size: .92rem; opacity: .75; }
.mitem mark { background: var(--fucsia); color: var(--blanco); }
.mextras { margin-top: .8rem; padding-top: .6rem; border-top: 2px solid var(--fucsia); font-size: .94rem; }
.mextras li { display: flex; justify-content: space-between; }
.menu__empty { font-family: var(--f-cartel); font-size: 1.6rem; }

/* ---------- Dónde ---------- */
.where { padding: clamp(90px, 10vw, 150px) max(var(--gutter), calc((100% - 1280px) / 2 + var(--gutter))); }
.where__title { font-family: var(--f-cartel); font-weight: 900; font-size: clamp(3.4rem, 2rem + 6vw, 8rem); line-height: .85; text-transform: uppercase; }
.where__list { margin-top: 40px; border-top: 2px solid var(--tinta); }
.spot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 22px 0; border-bottom: 2px solid var(--tinta); }
.spot h3 { font-family: var(--f-cartel); font-weight: 900; font-size: clamp(2rem, 1.4rem + 2vw, 3.2rem); line-height: 1; text-transform: uppercase; }
.spot p { margin-top: .3rem; }
.spot__actions { display: flex; gap: 8px; }
.pending { display: inline-block; margin-left: 6px; padding: 0 6px; background: var(--amarillo); font-size: .8rem; font-weight: 600; }
.phone { display: inline-block; margin-top: 32px; font-family: var(--f-cartel); font-weight: 900; font-size: clamp(2.6rem, 1.6rem + 4vw, 5.6rem); text-decoration: none; background: linear-gradient(var(--fucsia), var(--fucsia)) 0 92% / 100% 8px no-repeat; }

/* ---------- Footer ---------- */
.footer { position: relative; padding: 90px var(--gutter) 60px; background: var(--fucsia); }
/* borde rasgado */
.footer::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 16px; background: var(--fucsia); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='16' preserveAspectRatio='none'%3E%3Cpath d='M0 16 L0 9 L8 4 L15 10 L24 3 L33 8 L41 2 L50 9 L58 5 L67 11 L75 3 L84 8 L92 4 L101 10 L109 2 L120 7 L120 16Z'/%3E%3C/svg%3E") 0 0 / 120px 16px repeat-x; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='16' preserveAspectRatio='none'%3E%3Cpath d='M0 16 L0 9 L8 4 L15 10 L24 3 L33 8 L41 2 L50 9 L58 5 L67 11 L75 3 L84 8 L92 4 L101 10 L109 2 L120 7 L120 16Z'/%3E%3C/svg%3E") 0 0 / 120px 16px repeat-x; }
.footer__line { font-family: var(--f-cartel); font-weight: 900; font-size: clamp(2.4rem, 1.4rem + 4.4vw, 6.4rem); line-height: .9; text-transform: uppercase; max-width: 18ch; }
.footer__legal { margin-top: 28px; font-size: .88rem; }

/* ---------- Avisos (estilo Sonner) ---------- */
.toasts { position: fixed; z-index: 90; left: 50%; bottom: 20px; translate: -50% 0; width: min(360px, calc(100vw - 24px)); display: grid; }
.toast {
  grid-area: 1 / 1; padding: 14px 18px; background: var(--tinta); color: var(--blanco); font-weight: 600; font-size: .95rem; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .5);
  border-left: 6px solid var(--amarillo);
  transform: translateY(calc(var(--i) * -12px)) scale(calc(1 - var(--i) * .05)); opacity: calc(1 - var(--i) * .25);
  transition: transform 400ms ease, opacity 400ms ease;
}
.toast[data-state="enter"] { transform: translateY(110%); opacity: 0; }
.toast[data-state="exit"] { transform: translateY(110%); opacity: 0; transition-duration: 200ms; }

/* ---------- Estados iniciales ---------- */
html.motion-on [data-slap] { opacity: 0; }

/* ---------- Pantallas muy grandes ---------- */
@media (min-width: 1800px) {
  .wall { padding-inline: max(var(--gutter), calc((100% - 1760px) / 2 + var(--gutter))); }
  .poster--tiny { right: max(var(--gutter), calc((100% - 1760px) / 2 + var(--gutter))); width: 260px; }
  .poster--main { min-height: min(calc(100dvh - 140px), 1040px); }
  .poster--side { height: min(48vh, 560px); }
  .poster--tiny { top: calc(100px + min(48vh, 560px) - 70px); }
  .wall__actions p { font-size: 1.35rem; }
  .stack__card { margin-inline: max(var(--gutter), calc((100% - 1760px) / 2 + var(--gutter))); }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .nav__menu { display: inline-flex; align-items: center; height: 42px; padding: 0 16px; margin-left: auto; border: 2px solid var(--tinta); background: var(--amarillo); font-family: var(--f-cartel); font-weight: 900; font-size: 1.1rem; text-transform: uppercase; cursor: pointer; }
  .wall { grid-template-columns: 1fr; grid-template-rows: auto; padding-top: 92px; }
  .poster--main { grid-row: auto; min-height: 0; rotate: -.6deg; }
  .poster--side { display: none; }
  .poster--tiny { top: 300px; right: 8px; width: 140px; }
  .stack__grid { grid-template-columns: 1fr; grid-template-rows: 32vh auto; }
  .stack__photo { order: -1; }
  .stack__card { top: 78px; height: auto; min-height: calc(100dvh - 96px); }
  .poster__text { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
