@import url('https://fonts.googleapis.com/css2?family=UnifrakturMaguntia&display=swap');

:root {
  --cream: #f4ecdf;
  --paper: #f8f3ea;
  --kraft: #b88a58;
  --plum: #4a1f2e;
  --plum-d: #2f111b;
  --ink: #2a1418;
  --muted: #6d5a52;
  --line: rgba(74, 31, 46, 0.16);
  --bg: var(--cream);
  --accent: var(--plum);
  --gut: clamp(20px, 4vw, 48px);
  --f-logo: 'Sniglet', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --f-head: 'Fredoka', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--f-body);
  transition: background-color 0.9s ease, color 0.6s ease;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; border-radius: 6px; }

/* Fondo según la salsa activa */
body[data-salsa="azucar"] { --bg: #f4ecdf; }
body[data-salsa="dulce"] { --bg: #f0d8b6; --accent: #8a4d14; }
body[data-salsa="nutella"] { --bg: #e9d3c1; --accent: #41200f; }
body[data-salsa="blanco"] { --bg: #f8f2e6; --accent: #7a6248; }
body[data-salsa="crema"] { --bg: #f6e5ad; --accent: #8a6410; }
body[data-salsa="pink"] { --bg: #fadbe5; --accent: #b23a64; }
body[data-salsa="chocolate"] { --bg: #2b1610; --accent: #f0c98e; color: #f6eadb; }
body[data-salsa="caja"] { --bg: #ead6bb; }
body[data-salsa="carta"], body[data-salsa="local"] { --bg: #f4ecdf; }
body[data-salsa="grupos"] { --bg: #f1dfc8; }
body[data-salsa="visita"] { --bg: #efe4d2; }

/* Lienzos 3D */
#pano, #churro3d { position: fixed; inset: 0; width: 100%; height: 100lvh; display: block; pointer-events: none; }
#pano { z-index: 1; background: #d9cbb6; }
#churro3d { z-index: 2; transition: opacity 0.8s ease; }
body.in-entrada #churro3d { opacity: 0; }
main { position: relative; z-index: 3; }
body.churro-front #churro3d { z-index: 6; }
.float-img { z-index: 31; }
.grain { position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0.07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gut); }
.kicker { font: 600 13px/1.3 var(--f-head); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
.h2 { font: 700 clamp(36px, 5vw, 64px)/1.02 var(--f-head); letter-spacing: -0.02em; margin: 0 0 22px; color: var(--plum); }
.lead { font-size: clamp(17px, 1.4vw, 20px); color: var(--muted); max-width: 34em; margin: 0 0 28px; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0;
  background: var(--plum); color: #fbf3e6; font: 600 17px var(--f-head); text-decoration: none; cursor: pointer;
  transition: transform 0.25s cubic-bezier(.2,.8,.2,1), background 0.25s; }
.btn:hover { transform: translateY(-2px); background: var(--plum-d); }
.btn:active { transform: scale(0.97); }
.btn-ghost { background: transparent; color: var(--plum); box-shadow: inset 0 0 0 2px var(--plum); }
.btn-ghost:hover { background: var(--plum); color: #fbf3e6; }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 15px; }

/* Nav */
.nav { position: fixed; top: 14px; left: 50%; z-index: 40; transform: translate(-50%, -140%); width: min(1180px, calc(100% - 24px));
  display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 8px 8px 8px 22px; border-radius: 999px;
  background: color-mix(in srgb, #fbf6ee 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 30px rgba(42, 20, 24, 0.08); transition: transform 0.6s cubic-bezier(.2,.8,.2,1); }
.nav.is-visible { transform: translate(-50%, 0); }
.nav.is-visible.is-hidden { transform: translate(-50%, -140%); }
.nav-logo { font: 800 28px/1 var(--f-logo); color: var(--plum); text-decoration: none; }
.nav nav { display: flex; gap: 26px; }
.nav nav a { font: 500 15px var(--f-head); text-decoration: none; color: var(--ink); opacity: 0.8; }
.nav nav a:hover { opacity: 1; color: var(--plum); }
body[data-salsa="chocolate"] .nav { background: color-mix(in srgb, #3a1d15 80%, transparent); }
body[data-salsa="chocolate"] .nav nav a, body[data-salsa="chocolate"] .nav-logo { color: #f6eadb; }

/* ---------- ENTRADA ---------- */
.entrada { position: relative; z-index: 4; height: 430vh; }
.entrada-stage { position: sticky; top: 0; height: 100svh; display: grid; place-items: center; text-align: center; color: #fff; overflow: hidden; }
.entrada-stage::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 45%, transparent 35%, rgba(20, 8, 6, 0.55) 100%); pointer-events: none; }
.entrada-step { position: absolute; left: 50%; top: 50%; width: min(92vw, 980px); translate: -50% -50%; padding: 0 var(--gut); opacity: 0; will-change: opacity, transform; }
.entrada-step:first-of-type { opacity: 1; }
.entrada-kicker { font: 600 14px/1.4 var(--f-head); letter-spacing: 0.18em; text-transform: uppercase; margin: 0 0 14px; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6); }
.entrada-big { font: 800 clamp(40px, 5.8vw, 88px)/1 var(--f-logo); margin: 0; text-shadow: 0 4px 40px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.35); }
.entrada-step .entrada-kicker:last-child { margin: 18px 0 0; }
.entrada-hint { margin: 34px 0 0; display: inline-flex; flex-direction: column; align-items: center; gap: 12px; font: 500 15px var(--f-head); text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); }
.mouse { width: 24px; height: 38px; border: 2px solid #fff; border-radius: 14px; position: relative; }
.mouse::after { content: ''; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }
.entrada-skip { position: absolute; right: var(--gut); bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 2; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff; border-radius: 999px; padding: 10px 18px; font: 500 14px var(--f-head); cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.entrada-skip:hover { background: rgba(255, 255, 255, 0.28); }
.entrada-loader { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: var(--cream); color: var(--plum); font: 600 18px var(--f-head); transition: opacity 0.8s ease, visibility 0.8s; }
.entrada-loader span { animation: pulse 1.2s ease-in-out infinite; }
.entrada-loader.is-done { opacity: 0; visibility: hidden; }
@keyframes pulse { 50% { opacity: 0.45; } }

/* ---------- Paneles (hero y salsas) ---------- */
.panel { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 120px 0; }
.hero-grid, .salsa-grid { display: grid; grid-template-columns: minmax(0, 560px); }
.wordmark { position: relative; margin: 0 0 6px; font: 800 clamp(92px, 15vw, 230px)/0.9 var(--f-logo); letter-spacing: -0.02em; width: fit-content; }
.wm-text { background: linear-gradient(180deg, #6e2d43 0%, #4a1f2e 55%, #2f111b 100%); -webkit-background-clip: text; background-clip: text; color: transparent; position: relative; z-index: 1; }
.wm-drips { position: absolute; left: 0; width: 100%; top: 79%; height: 48%; fill: #3a1622; z-index: 0; overflow: visible; }
.hero-lead { font: 600 clamp(24px, 2.6vw, 36px)/1.18 var(--f-head); color: var(--ink); margin: 64px 0 30px; letter-spacing: -0.01em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.rating { display: inline-flex; gap: 10px; align-items: center; margin-top: 30px; font-size: 15px; text-decoration: none; color: var(--muted); }
.rating .stars { color: #d9902b; letter-spacing: 2px; }
.rating b { color: var(--ink); }
.scroll-cue { position: absolute; left: 50%; bottom: 26px; translate: -50% 0; margin: 0; font: 500 13px var(--f-head); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.salsa-n { font: 600 14px var(--f-head); letter-spacing: 0.08em; color: var(--accent); margin: 0 0 10px; display: flex; gap: 14px; align-items: baseline; }
.salsa-n span { text-transform: uppercase; letter-spacing: 0.16em; font-size: 12px; opacity: 0.75; }
.salsa-name { font: 800 clamp(58px, 8.4vw, 132px)/0.92 var(--f-logo); margin: 0 0 22px; color: var(--accent); letter-spacing: -0.02em; }
.salsa-text { font-size: clamp(18px, 1.5vw, 21px); max-width: 28em; margin: 0 0 22px; }
.salsa-tag { display: inline-block; margin: 0; padding: 8px 16px; border-radius: 999px; font: 600 15px var(--f-head); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.salsa-dark .salsa-text { color: #ecdcc8; }

/* ---------- CAJA ---------- */
.caja-grid { display: grid; grid-template-columns: minmax(0, 520px); }
.sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 16px; }
.size { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 0 10px; align-items: center; text-align: left; padding: 16px 14px; border-radius: 18px;
  border: 2px solid transparent; background: rgba(255, 255, 255, 0.45); cursor: pointer; transition: border-color 0.25s, background 0.25s, transform 0.25s; }
.size:hover { transform: translateY(-2px); }
.size[aria-checked="true"] { border-color: var(--plum); background: #fbf6ee; }
.size-n { grid-row: 1 / 3; font: 700 44px/1 var(--f-head); color: var(--plum); }
.size-l { font: 600 14px/1.15 var(--f-head); }
.size-l small { font-weight: 500; color: var(--muted); }
.size-p { font: 700 18px var(--f-head); color: var(--plum); }
.size-badge { position: absolute; top: -11px; left: 12px; padding: 2px 10px; border-radius: 999px; background: var(--plum); color: #fbf3e6; font: 600 11px/1.6 var(--f-head); letter-spacing: 0.04em; }
.caja-note { color: var(--muted); font-size: 15px; min-height: 3em; margin: 0 0 18px; }
.hint-3d { margin: 22px 0 0; font: 500 13px var(--f-head); color: var(--muted); opacity: 0.8; }
.caja { cursor: grab; }
.caja:active { cursor: grabbing; }

/* ---------- CARTA (periódico) ---------- */
.carta { position: relative; padding: 120px 0 100px; }
.paper { position: relative; max-width: 820px; background: var(--paper); border-radius: 6px; padding: clamp(26px, 4vw, 54px);
  box-shadow: 0 30px 80px rgba(42, 20, 24, 0.14), 0 2px 0 rgba(42, 20, 24, 0.05);
  background-image: repeating-linear-gradient(0deg, transparent 0 31px, rgba(42, 20, 24, 0.025) 31px 32px); }
.paper-head { text-align: center; border-bottom: 3px double var(--ink); padding-bottom: 12px; margin-bottom: 26px; }
.paper-mast { font: 400 clamp(40px, 6.4vw, 76px)/1 'UnifrakturMaguntia', serif; margin: 0 0 10px; }
.paper-sub { display: flex; justify-content: space-between; gap: 10px; margin: 0; padding-top: 8px; border-top: 1px solid var(--ink); font: 600 12px var(--f-head); letter-spacing: 0.08em; text-transform: uppercase; }
.carta-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.carta-top .h2 { margin-bottom: 10px; }
.carta-help { margin: 0; font: 500 14px var(--f-head); color: var(--muted); }
.has-hover .only-touch, .is-touch .only-hover { display: none; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 22px; }
.tab { border: 0; background: transparent; padding: 9px 16px; border-radius: 999px; font: 600 15px var(--f-head); cursor: pointer; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); }
.tab[aria-selected="true"] { background: var(--plum); color: #fbf3e6; box-shadow: none; }
.cat-intro { margin: 0 0 14px; color: var(--muted); font-style: italic; }
.items { list-style: none; margin: 0; padding: 0; }
.item { padding: 14px 10px; margin: 0 -10px; border-radius: 10px; border-bottom: 1px dashed var(--line); transition: background 0.2s; }
.item.has-img { cursor: pointer; }
.has-hover .item.has-img:hover { background: rgba(74, 31, 46, 0.06); }
.item-row { display: flex; align-items: baseline; gap: 10px; }
.item-name { font: 600 19px/1.3 var(--f-head); }
.item-name em { font-style: normal; font: 600 11px var(--f-head); letter-spacing: 0.04em; padding: 2px 8px; border-radius: 999px; background: var(--plum); color: #fbf3e6; vertical-align: 3px; margin-left: 6px; white-space: nowrap; }
.item-name em.new { background: #d9902b; }
.item.has-img .item-name::after { content: ''; display: inline-block; width: 15px; height: 15px; margin-left: 8px; vertical-align: -1px; opacity: 0.55;
  background: currentColor; -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><rect x='3' y='5' width='18' height='14' rx='2'/><circle cx='12' cy='12' r='3.5'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><rect x='3' y='5' width='18' height='14' rx='2'/><circle cx='12' cy='12' r='3.5'/></svg>") center / contain no-repeat; }
.dots { flex: 1; border-bottom: 2px dotted rgba(42, 20, 24, 0.25); transform: translateY(-5px); min-width: 20px; }
.item-price { font: 600 18px var(--f-head); white-space: nowrap; color: var(--plum); font-variant-numeric: tabular-nums; }
.item-desc { margin: 2px 0 0; font-size: 15px; color: var(--muted); }
.item-photo { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s cubic-bezier(.2,.8,.2,1), margin 0.45s; }
.item-photo > div { overflow: hidden; min-height: 0; }
.item-photo img { width: 100%; max-width: 420px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: #e8dccb; }
.item-photo span { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.item.is-open .item-photo { grid-template-rows: 1fr; margin-top: 12px; }
.has-hover .item-photo { display: none; }
.carta-foot { margin: 22px 0 0; font-size: 13px; color: var(--muted); }
.float-img { position: fixed; left: 0; top: 0; z-index: 30; margin: 0; width: 290px; pointer-events: none; opacity: 0; scale: 0.85; transition: opacity 0.25s, scale 0.35s cubic-bezier(.2,.8,.2,1); }
.float-img.is-on { opacity: 1; scale: 1; }
.float-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; box-shadow: 0 24px 60px rgba(42, 20, 24, 0.35); background: #e8dccb; }
.float-img figcaption { margin-top: 8px; font: 500 12px var(--f-head); color: var(--muted); text-align: right; }

/* ---------- GRUPOS ---------- */
.grupos { padding: 120px 0; }
.grupos-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(30px, 5vw, 80px); align-items: center; }
.langs { display: grid; gap: 4px; margin: -8px 0 26px; font-size: 15px; color: var(--muted); font-style: italic; }
.grupo-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.grupo-form label { display: grid; gap: 6px; font: 600 13px var(--f-head); color: var(--muted); }
.grupo-form input, .grupo-form select { min-height: 48px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--line); background: #fbf6ee; font: 500 16px var(--f-body); color: var(--ink); width: 100%; }
.grupo-form .btn { grid-column: 1 / -1; }
.grupos-photos { position: relative; aspect-ratio: 1 / 1.05; }
.grupos-photos img { position: absolute; object-fit: cover; border-radius: 20px; box-shadow: 0 24px 60px rgba(42, 20, 24, 0.2); }
.grupos-photos img:first-child { left: 0; top: 0; width: 74%; height: 70%; }
.grupos-photos img:last-child { right: 0; bottom: 0; width: 56%; height: 56%; border: 8px solid var(--bg); }

/* ---------- LOCAL ---------- */
.local { padding: 120px 0 100px; overflow: hidden; }
.strip { display: flex; gap: 18px; padding: 30px var(--gut) 60px; width: max-content; will-change: transform; }
.strip figure { margin: 0; width: clamp(260px, 30vw, 440px); flex: none; }
.strip figure:nth-child(even) { margin-top: 60px; }
.strip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 18px; }
.strip figcaption { margin-top: 10px; font: 500 14px var(--f-head); color: var(--muted); }
.insta-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.insta-at { font: 700 20px var(--f-head); color: var(--plum); text-decoration: none; }
.insta-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.insta-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }

/* ---------- VISITA ---------- */
.visita { padding: 120px 0; }
.visita-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(30px, 5vw, 80px); align-items: start; }
.open-now { display: inline-flex; align-items: center; gap: 10px; font: 600 16px var(--f-head); margin: 0 0 18px; }
.open-now::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.open-now.is-open { color: #2f7a3b; }
.open-now.is-closed { color: #a3402e; }
.hours { border-collapse: collapse; margin: 0 0 26px; font-size: 16px; }
.hours th { text-align: left; font: 600 16px var(--f-head); padding: 8px 30px 8px 0; vertical-align: top; }
.hours td { padding: 8px 0; font-variant-numeric: tabular-nums; }
.visita-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.reviews { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.reviews li { display: grid; gap: 4px; }
.reviews q { font: 500 18px/1.4 var(--f-head); }
.reviews span { font-size: 13px; color: var(--muted); }
.map { border-radius: 22px; overflow: hidden; min-height: 460px; background: #e5d8c4; position: sticky; top: 100px; }
.map iframe { width: 100%; height: 100%; min-height: 460px; border: 0; display: block; filter: sepia(0.25) saturate(0.9); }

/* ---------- FOOTER ---------- */
.foot { padding: 40px 0 40px; background: var(--plum-d); color: #ead9c6; overflow: hidden; }
.foot-word { margin: 0 0 20px; text-align: center; font: 800 clamp(120px, 27vw, 420px)/0.85 var(--f-logo); color: #4a1f2e; letter-spacing: -0.03em; }
.foot-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 15px; }
.foot-row p { margin: 0; }
.foot a { color: #fbe7cf; }
.proto { width: 100%; font-size: 13px; opacity: 0.6; }

/* ---------- Móvil ---------- */
@media (max-width: 899px) {
  body { font-size: 16px; }
  .nav { padding-left: 18px; }
  .nav nav { display: none; }
  .panel { align-items: flex-end; padding: 52svh 0 12svh; }
  .hero.panel { padding-top: 46svh; }
  .hero-grid, .salsa-grid, .caja-grid { grid-template-columns: 1fr; }
  .wordmark { font-size: clamp(84px, 26vw, 130px); }
  .hero-lead { margin: 26px 0 22px; }
  .br-d { display: none; }
  .scroll-cue { display: none; }
  .salsa-name { font-size: clamp(50px, 14vw, 76px); }
  .caja.panel { padding-top: 46svh; }
  .sizes { gap: 8px; }
  .size { grid-template-columns: 1fr; grid-template-rows: auto; padding: 14px 10px; gap: 2px; }
  .size-n { grid-row: auto; font-size: 34px; }
  .size-badge { left: 50%; translate: -50% 0; white-space: nowrap; font-size: 10px; padding: 1px 8px; }
  .hero.panel { padding-top: 48svh; }
  .grupos-grid, .visita-grid { grid-template-columns: 1fr; }
  .grupo-form { grid-template-columns: 1fr 1fr; }
  .grupo-form label:nth-child(3) { grid-column: 1 / -1; }
  .grupos-photos { aspect-ratio: 1 / 0.9; }
  .insta-grid { grid-template-columns: repeat(3, 1fr); }
  .map { position: relative; top: 0; min-height: 340px; }
  .map iframe { min-height: 340px; }
  .paper-sub span:nth-child(3) { display: none; }
  .strip figure { width: 72vw; }
  .strip figure:nth-child(even) { margin-top: 30px; }
  .item-name { font-size: 18px; }
}
