/* ==========================================================================
   Basoa · plantilla de carta digital (Digital Bultzada) · v6 "inmersiva"
   Para adaptar a otro restaurante: cambia solo los tokens de :root y la foto
   del hero (en index.html). Nada debajo usa colores sueltos.
   ========================================================================== */

:root {
  /* Paleta base: noche de bosque */
  --night-950: #050e0b;
  --night-900: #07130f;
  --night-850: #0b1b16;
  --night-800: #0e221c;
  --night-700: #163129;
  --night-600: #214237;
  --sage-400: #8fcaae;
  --sage-300: #b2dcc6;
  --sage-200: #d4ecdf;
  --cream-100: #f4efe4;
  --mist-100: #eef3ef;
  --mist-300: #b4c6bd;
  --clay-300: #f0a897;
  --white: #ffffff;

  /* Roles */
  --bg: var(--night-900);
  --bg-deep: var(--night-950);
  --surface: var(--night-800);
  --surface-2: var(--night-700);
  --text: var(--mist-100);
  --text-muted: var(--mist-300);
  --display: var(--cream-100);
  --line: rgba(238, 243, 240, .1);
  --line-strong: rgba(238, 243, 240, .22);
  --accent: var(--sage-400);
  --accent-soft: rgba(143, 202, 174, .14);
  --on-accent: var(--night-900);
  --error: var(--clay-300);
  --focus: var(--sage-300);

  /* Materiales (apple-design: capa translúcida que no roba el foco) */
  --glass: rgba(12, 30, 24, .58);
  --glass-strong: rgba(10, 25, 20, .9);
  --glass-blur: blur(22px) saturate(160%);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, .07);

  /* Tipografía */
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --fs-xs: .8125rem;
  --fs-sm: .875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: clamp(1.625rem, 1.3rem + 1.2vw, 2.125rem);
  --fs-2xl: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);
  --fs-hero: clamp(3rem, 1.6rem + 5.4vw, 6rem);

  /* Espacio */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4rem; --s-9: 6rem;
  --gutter: clamp(1rem, 4.5vw, 4rem);
  --max: 1280px;
  --pad-x: max(var(--gutter), calc((100% - var(--max)) / 2));
  --measure: 60ch;
  --topbar-h: 64px;
  --dock-h: 64px;

  /* Forma y profundidad */
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-xl: 28px; --r-pill: 999px;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 32px -12px rgba(0, 0, 0, .55);
  --shadow-float: 0 18px 48px -12px rgba(0, 0, 0, .6);

  /* Movimiento (emil-design-eng) */
  --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);
  --t-press: 160ms;
  --t-fast: 180ms;
  --t-pop-in: 240ms;
  --t-pop-out: 160ms;
  --t-sheet-in: 480ms;
  --t-sheet-out: 260ms;
  --touch: 44px;

  /* Capas */
  --z-topbar: 20; --z-menubar: 15; --z-dock: 30; --z-scrim: 39; --z-sheet: 40; --z-skip: 100;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 7rem);
  -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent;
  color-scheme: dark; background: var(--bg);
}
body {
  margin: 0; font-family: var(--font-body); font-size: var(--fs-base); line-height: 1.6;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.sheet-open { overflow: hidden; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.05; letter-spacing: -.025em; margin: 0; color: var(--display); text-wrap: balance; }
h1 em, h2 em { font-style: italic; font-weight: 400; }
p { margin: 0; text-wrap: pretty; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: .2em; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, [role="button"], label, select { touch-action: manipulation; }
button, .chip, .btn, .dock, .lang-switch, .tabs, .site-nav a { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
::selection { background: var(--accent); color: var(--on-accent); }
input, select { caret-color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
img.is-broken { visibility: hidden; }

.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sprite { position: absolute; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--s-4); top: -100px; z-index: var(--z-skip); background: var(--mist-100); color: var(--night-900); padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); font-weight: 700; }
.skip-link:focus { top: var(--s-4); }

.material {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line); box-shadow: var(--glass-edge);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-3);
  min-height: var(--touch); padding: 0 var(--s-5); border-radius: var(--r-pill); border: 1px solid transparent;
  font-size: var(--fs-sm); font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease, color var(--t-fast) ease, transform var(--t-press) var(--ease-out);
}
.btn .icon { width: 1.15em; height: 1.15em; }
.btn:active { transform: scale(.97); }
.btn-lg { min-height: 52px; padding: 0 var(--s-6); font-size: var(--fs-base); }
.btn-sm { min-height: var(--touch); padding: 0 var(--s-4); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-glass { color: var(--text); background: rgba(238, 243, 240, .1); border-color: var(--line-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.btn-ghost { color: var(--text); border-color: var(--line-strong); background: transparent; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--sage-300); }
  .btn-glass:hover, .btn-ghost:hover { background: rgba(238, 243, 240, .16); }
}

.icon-btn { display: inline-grid; place-items: center; width: var(--touch); height: var(--touch); border: 0; border-radius: var(--r-pill); background: transparent; color: inherit; transition: background-color var(--t-fast) ease, transform var(--t-press) var(--ease-out); }
.icon-btn.round { background: rgba(238, 243, 240, .08); border: 1px solid var(--line); }
.icon-btn .icon { width: 22px; height: 22px; }
.icon-btn:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: rgba(238, 243, 240, .16); } }

.chip-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--touch); padding: 0 var(--s-4);
  border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: transparent;
  font-size: var(--fs-sm); font-weight: 500; color: var(--text);
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease, transform var(--t-press) var(--ease-out);
}
.chip .icon { width: 18px; height: 18px; color: var(--accent); }
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip[aria-pressed="true"] .icon { color: var(--on-accent); }
@media (hover: hover) and (pointer: fine) { .chip:hover { border-color: var(--accent); } }

/* ---------- Barra superior ---------- */
.topbar { position: fixed; inset: 0 0 auto; z-index: var(--z-topbar); padding: calc(var(--s-3) + env(safe-area-inset-top)) var(--gutter) 0; pointer-events: none; }
.topbar-inner {
  pointer-events: auto; max-width: var(--max); margin: 0 auto; height: var(--topbar-h);
  display: flex; align-items: center; gap: var(--s-4); padding: 0 var(--s-2) 0 var(--s-5);
  border-radius: var(--r-pill); background: rgba(7, 19, 15, .18); border-color: transparent; box-shadow: none;
  transition: background-color 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}
.topbar.is-scrolled .topbar-inner { background: var(--glass); border-color: var(--line); box-shadow: var(--glass-edge), var(--shadow-float); }
.logo { display: inline-flex; align-items: center; gap: var(--s-2); text-decoration: none; min-height: var(--touch); color: var(--display); }
.logo-mark { width: 24px; height: 24px; color: var(--accent); }
.logo-word { font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.site-nav { display: flex; gap: var(--s-1); margin-inline: auto; }
.site-nav a { display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 var(--s-3); border-radius: var(--r-pill); font-size: var(--fs-sm); text-decoration: none; color: var(--text-muted); transition: color var(--t-fast) ease, background-color var(--t-fast) ease; }
.site-nav a[aria-current="true"] { color: var(--text); background: rgba(238, 243, 240, .08); }
@media (hover: hover) and (pointer: fine) { .site-nav a:hover { color: var(--text); } }

/* Selector de idioma con píldora deslizante */
.lang-switch { position: relative; display: flex; padding: 3px; border-radius: var(--r-pill); background: rgba(238, 243, 240, .07); }
.lang-switch button { position: relative; z-index: 1; min-width: 44px; min-height: 44px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--text-muted); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; transition: color var(--t-fast) ease, transform var(--t-press) var(--ease-out); }
.lang-switch button[aria-pressed="true"] { color: var(--on-accent); }
.lang-switch button:active { transform: scale(.94); }
.lang-pill { position: absolute; top: 3px; left: 0; height: 44px; width: 44px; border-radius: var(--r-pill); background: var(--mist-100); }
.lang-switch[data-ready] .lang-pill { transition: transform 250ms var(--ease-out), width 250ms var(--ease-out); }

/* ---------- Hero a pantalla completa ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; isolation: isolate; background: var(--night-850); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; z-index: -2; animation: settle 1600ms var(--ease-out) both; }
.hero-shade { position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(5, 14, 11, .55) 0%, rgba(5, 14, 11, 0) 22%),
    linear-gradient(0deg, var(--bg) 0%, rgba(7, 19, 15, .86) 30%, rgba(7, 19, 15, .2) 70%),
    linear-gradient(90deg, rgba(5, 14, 11, .7) 0%, rgba(5, 14, 11, 0) 65%); }
.hero-content { padding: calc(var(--topbar-h) + var(--s-9)) var(--pad-x) calc(var(--s-8) + var(--dock-h)); width: 100%; }
.hero-content > * { animation: rise 700ms var(--ease-out) both; }
.hero-content > :nth-child(2) { animation-delay: 70ms; }
.hero-content > :nth-child(3) { animation-delay: 140ms; }
.hero-content > :nth-child(4) { animation-delay: 210ms; }
.hero-content > :nth-child(5) { animation-delay: 280ms; }
.hero-tag { font-size: var(--fs-sm); color: var(--sage-300); margin-bottom: var(--s-4); }
.hero h1 { font-size: var(--fs-hero); line-height: .98; letter-spacing: -.035em; max-width: 16ch; margin-bottom: var(--s-5); }
.hero-text { font-size: var(--fs-md); color: var(--text-muted); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: var(--s-6) 0; }
.hero-features { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.hero-features li { display: inline-flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-4) var(--s-2) var(--s-3); border-radius: var(--r-pill); font-size: var(--fs-xs); color: var(--text); }
.hero-features .icon { width: 18px; height: 18px; color: var(--accent); }
.hero-scroll { position: absolute; right: var(--pad-x); bottom: calc(var(--s-8) + var(--dock-h)); display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--text); animation: rise 700ms 400ms var(--ease-out) both; transition: background-color var(--t-fast) ease; }
@media (hover: hover) and (pointer: fine) { .hero-scroll:hover { background: rgba(238, 243, 240, .1); } }

/* ---------- Carta ---------- */
.menu-section { padding: var(--s-9) var(--pad-x) var(--s-8); outline: none; }
.section-head { max-width: 40rem; margin-bottom: var(--s-6); }
.section-head h2, .story h2, .gallery h2, .booking h2, .contact h2 { font-size: var(--fs-2xl); margin-bottom: var(--s-3); }
.section-head p { color: var(--text-muted); font-size: var(--fs-md); }

.menu-bar { position: sticky; top: calc(var(--topbar-h) + var(--s-5) + env(safe-area-inset-top)); z-index: var(--z-menubar); margin: 0 calc(-1 * var(--s-2)) var(--s-5); }
.menu-bar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-2); border-radius: var(--r-lg); }
.tabs { position: relative; display: flex; padding: 3px; border-radius: var(--r-pill); background: rgba(238, 243, 240, .07); }
.tabs button { position: relative; z-index: 1; min-height: var(--touch); padding: 0 var(--s-4); border: 0; border-radius: var(--r-pill); background: transparent; color: var(--text-muted); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; transition: color var(--t-fast) ease, transform var(--t-press) var(--ease-out); }
.tabs button[aria-pressed="true"] { color: var(--on-accent); }
.tabs button:active { transform: scale(.96); }
.tab-indicator { position: absolute; top: 3px; left: 0; height: var(--touch); width: 0; border-radius: var(--r-pill); background: var(--accent); }
.tabs[data-ready] .tab-indicator { transition: transform 240ms var(--ease-out), width 240ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .tabs button:hover { color: var(--text); } .tabs button[aria-pressed="true"]:hover { color: var(--on-accent); } }

.filter-note, .menu-note { display: flex; gap: var(--s-3); align-items: flex-start; max-width: 72ch; font-size: var(--fs-sm); }
.filter-note { margin: 0 0 var(--s-5); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--accent-soft); color: var(--sage-200); border: 1px solid rgba(143, 202, 174, .25); }
.filter-note .icon, .menu-note .icon { margin-top: 2px; color: var(--accent); }
.menu-note { margin-top: var(--s-6); color: var(--text-muted); }
@supports (transition-behavior: allow-discrete) {
  .filter-note { transition: opacity var(--t-pop-in) var(--ease-out), transform var(--t-pop-in) var(--ease-out); }
  @starting-style { .filter-note { opacity: 0; transform: translateY(-4px); } }
}

.dishes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: var(--s-5); }
.dish-card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: transform var(--t-press) var(--ease-out), border-color var(--t-fast) ease;
}
.dish-card:has(.dish-hit:active) { transform: scale(.98); }
.dish-hit { position: absolute; inset: 0; z-index: 2; width: 100%; border: 0; padding: 0; background: transparent; border-radius: inherit; }
.dish-hit:focus-visible { outline-offset: -3px; border-radius: var(--r-lg); }
.dish-media-wrap { position: relative; }
.dish-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(110deg, var(--night-700) 40%, var(--night-600) 50%, var(--night-700) 60%) 0 0 / 300% 100%; animation: shimmer 1.6s linear infinite; }
.dish-media.is-loaded, .dish-media.is-broken, .dish-media.no-photo { animation: none; background: var(--night-700); }
.dish-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 300ms var(--ease-out), transform 500ms var(--ease-out); }
.dish-media.is-loaded img { opacity: 1; }
.dish-media.is-broken img { visibility: hidden; }
.dish-media.no-photo { display: grid; place-items: center; color: var(--text-muted); }
.dish-media.no-photo .icon { width: 40px; height: 40px; opacity: .5; }
.price-tag { position: absolute; top: var(--s-3); right: var(--s-3); z-index: 1; padding: 6px 12px; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.price-tag.is-market { font-weight: 500; font-size: var(--fs-xs); }
.dish-body { display: flex; flex-direction: column; gap: var(--s-2); flex: 1; padding: var(--s-4) var(--s-5) var(--s-5); }
.dish-cat { font-size: var(--fs-xs); color: var(--accent); font-weight: 600; letter-spacing: .02em; }
.dish-card h3 { font-size: var(--fs-lg); overflow-wrap: anywhere; hyphens: auto; }
.dish-card p { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.diet-tags { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: auto; padding-top: var(--s-2); }
.diet-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 8px; background: var(--accent-soft); color: var(--sage-200); font-size: var(--fs-xs); font-weight: 500; }
.diet-tag .icon { width: 16px; height: 16px; color: var(--accent); }
.no-results { grid-column: 1 / -1; padding: var(--s-7) var(--s-5); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--text-muted); text-align: center; }
.show-all { margin: var(--s-6) auto 0; display: flex; }
@media (hover: hover) and (pointer: fine) {
  .dish-card:hover { border-color: var(--line-strong); }
  .dish-card:hover .dish-media.is-loaded img { transform: scale(1.03); }
}

/* ---------- Historia ---------- */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); padding: var(--s-9) var(--pad-x); background: var(--bg-deep); border-block: 1px solid var(--line); }
.story-body { display: grid; gap: var(--s-6); align-content: start; }
.story-body > p { font-size: var(--fs-md); line-height: 1.75; color: var(--text-muted); max-width: var(--measure); }
.story-points { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.story-points li { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); font-size: var(--fs-sm); }
.story-points .icon { color: var(--accent); }

/* ---------- Galería deslizable ---------- */
.gallery { padding: var(--s-9) 0 var(--s-8); }
.gallery-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-5); padding: 0 var(--pad-x); margin-bottom: var(--s-5); }
.rail-controls { display: flex; gap: var(--s-2); }
.rail { display: flex; gap: var(--s-4); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scroll-padding-inline: var(--pad-x); padding: 0 var(--pad-x) var(--s-3); scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail li { flex: none; width: min(56vw, 720px); scroll-snap-align: start; }
.rail img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }

/* ---------- Reservas ---------- */
.booking { padding: var(--s-8) var(--pad-x); }
.booking-card { display: grid; grid-template-columns: 1fr 1.1fr; gap: var(--s-8); padding: var(--s-7); border-radius: var(--r-xl); background: linear-gradient(160deg, rgba(143, 202, 174, .1), rgba(12, 30, 24, .6) 40%); }
.booking-intro p { color: var(--text-muted); max-width: 40ch; }
.booking form { display: grid; gap: var(--s-4); align-content: start; }
.booking .row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.field { display: grid; gap: 6px; }
.field label { font-size: var(--fs-sm); font-weight: 500; }
.booking input, .booking select { width: 100%; min-height: 52px; padding: 0 var(--s-4); background: rgba(5, 14, 11, .55); border: 1px solid var(--line-strong); border-radius: var(--r-md); color: var(--text); font-size: var(--fs-base); transition: border-color var(--t-fast) ease; }
.booking input:focus-visible, .booking select:focus-visible { outline-offset: 1px; border-color: var(--accent); }
.booking input[aria-invalid="true"] { border-color: var(--error); }
@media (hover: hover) and (pointer: fine) { .booking input:hover, .booking select:hover { border-color: rgba(238, 243, 240, .38); } }
.field-error { font-size: var(--fs-xs); color: var(--error); }
.field-error:empty { display: none; }
.booking .btn { justify-self: start; }
.form-status { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); color: var(--sage-300); }
.form-status .icon { width: 18px; height: 18px; }

/* ---------- Contacto y pie ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-7); align-items: center; padding: var(--s-8) var(--pad-x); }
.contact-info { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); color: var(--text-muted); }
.contact-info li { display: flex; align-items: center; gap: var(--s-3); min-height: 64px; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.contact-info .icon { color: var(--accent); }
.contact-info a { text-decoration: none; min-height: var(--touch); display: inline-flex; align-items: center; color: var(--text); }
.site-footer { display: flex; align-items: center; gap: var(--s-6); padding: var(--s-6) var(--pad-x) calc(var(--s-6) + var(--dock-h) + var(--s-5) + env(safe-area-inset-bottom)); background: var(--bg-deep); border-top: 1px solid var(--line); color: var(--text-muted); font-size: var(--fs-xs); }
.footer-brand { margin-right: auto; }
.footer-brand strong { display: block; font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--display); }
.site-footer a { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--touch); text-decoration: none; }
.site-footer a .icon { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) { .site-footer a:hover { color: var(--text); } }

/* ---------- Dock inferior (barra de pestañas tipo app) ---------- */
.dock {
  position: fixed; z-index: var(--z-dock); left: 50%; bottom: calc(var(--s-4) + env(safe-area-inset-bottom));
  display: flex; gap: var(--s-1); padding: var(--s-1); height: var(--dock-h); border-radius: var(--r-pill);
  transform: translateX(-50%); box-shadow: var(--glass-edge), var(--shadow-float);
  transition: opacity var(--t-pop-out) var(--ease-out), transform var(--t-pop-out) var(--ease-out);
  animation: dock-in 600ms 500ms var(--ease-out) backwards; /* backwards: al acabar no bloquea las transiciones */
}
.dock a, .dock button {
  display: grid; place-items: center; align-content: center; gap: 2px; min-width: 88px; padding: 0 var(--s-3);
  border: 0; border-radius: var(--r-pill); background: transparent; color: var(--text-muted); text-decoration: none;
  font-size: var(--fs-xs); font-weight: 600; line-height: 1.1;
  transition: color var(--t-fast) ease, background-color var(--t-fast) ease, transform var(--t-press) var(--ease-out);
}
.dock .icon { width: 22px; height: 22px; }
.dock .dock-ask { background: var(--accent); color: var(--on-accent); }
.dock a:active, .dock button:active { transform: scale(.94); }
body.sheet-open .dock { opacity: 0; transform: translateX(-50%) translateY(12px); pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .dock a:hover { color: var(--text); background: rgba(238, 243, 240, .08); } .dock .dock-ask:hover { background: var(--sage-300); } }

/* ---------- Hojas (asistente y ficha de plato) ---------- */
.scrim {
  position: fixed; inset: 0; z-index: var(--z-scrim); background: rgba(3, 10, 8, .6); display: none; opacity: 0;
  transition: opacity var(--t-sheet-out) var(--ease-out), display var(--t-sheet-out) allow-discrete;
}
.scrim.is-on { display: block; opacity: 1; transition-duration: 300ms; }
@starting-style { .scrim.is-on { opacity: 0; } }

.sheet {
  position: fixed; z-index: var(--z-sheet); display: none; flex-direction: column;
  background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line-strong); box-shadow: var(--glass-edge), var(--shadow-float); color: var(--text); overflow: hidden;
}
.sheet.is-dragging { transition: none !important; }
.sheet-grab { display: none; }
.sheet-head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-4) var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); }
.sheet-close { margin-left: auto; }
.bot-avatar { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.bot-avatar .icon { width: 22px; height: 22px; }
.assistant-id h2 { font-family: var(--font-body); font-size: var(--fs-base); font-weight: 700; letter-spacing: 0; color: var(--text); }
.assistant-id p { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-xs); color: var(--text-muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.assistant .chat { flex: 1; overflow-y: auto; padding: var(--s-4) var(--s-5); overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--night-600) transparent; }
.bubble { font-size: var(--fs-sm); line-height: 1.55; padding: var(--s-3) var(--s-4); border-radius: 18px; margin-bottom: var(--s-3); max-width: 88%; animation: msg 260ms var(--ease-out) both; }
.bubble.bot { background: var(--surface-2); border-bottom-left-radius: 6px; }
.bubble.user { background: var(--accent); color: var(--on-accent); margin-left: auto; border-bottom-right-radius: 6px; }
.chat .chip-row { margin-bottom: var(--s-3); }
.chat .chip { font-size: var(--fs-xs); padding: 0 var(--s-3); text-align: left; }
.bubble.typing { display: inline-flex; gap: 5px; align-items: center; min-height: 40px; }
.bubble.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--sage-300); animation: dot 1s ease-in-out infinite; }
.bubble.typing span:nth-child(2) { animation-delay: .14s; }
.bubble.typing span:nth-child(3) { animation-delay: .28s; }
.chat-input { display: flex; align-items: center; gap: var(--s-2); margin: 0 var(--s-4) var(--s-3); padding: 4px 4px 4px var(--s-4); border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: rgba(5, 14, 11, .6); }
.chat-input:focus-within { border-color: var(--accent); }
.chat-input input { flex: 1; min-width: 0; min-height: var(--touch); border: 0; background: transparent; color: var(--text); font-size: var(--fs-base); outline: 0; }
.chat-input input::placeholder { color: var(--text-muted); opacity: 1; }
.send { width: var(--touch); height: var(--touch); flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent); transition: background-color var(--t-fast) ease, transform var(--t-press) var(--ease-out); }
.send:active { transform: scale(.94); }
.send .icon { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) { .send:hover { background: var(--sage-300); } }
.assistant-note { display: flex; gap: var(--s-2); padding: 0 var(--s-5) calc(var(--s-4) + env(safe-area-inset-bottom)); font-size: var(--fs-xs); line-height: 1.45; color: var(--text-muted); }
.assistant-note .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--accent); }

.dish-close { position: absolute; top: var(--s-3); right: var(--s-3); z-index: 4; background: rgba(5, 14, 11, .6); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.dish-sheet-body { overflow-y: auto; overscroll-behavior: contain; }
.dish-sheet .dish-media { aspect-ratio: 16 / 10; }
.dish-sheet-info { display: grid; gap: var(--s-3); padding: var(--s-5) var(--s-5) calc(var(--s-5) + env(safe-area-inset-bottom)); }
.dish-sheet-info h2 { font-size: var(--fs-xl); overflow-wrap: anywhere; }
.dish-sheet-meta { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.dish-sheet-meta .price { font-size: var(--fs-lg); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.dish-sheet-info > p { color: var(--text-muted); }
.dish-sheet-info .diet-tags { margin-top: 0; }
.dish-sheet-info .filter-note { margin: var(--s-2) 0 0; }
.dish-sheet-info .btn { justify-self: stretch; margin-top: var(--s-2); }

/* Escritorio y tablet: paneles flotantes */
@media (min-width: 761px) {
  .assistant {
    right: var(--s-5); bottom: var(--s-5); width: 420px; height: min(680px, calc(100dvh - 2 * var(--s-5)));
    border-radius: var(--r-xl); transform-origin: 50% 100%;
    opacity: 0; transform: scale(.96) translateY(10px);
    transition: opacity var(--t-pop-out) var(--ease-out), transform var(--t-pop-out) var(--ease-out), display var(--t-pop-out) allow-discrete, overlay var(--t-pop-out) allow-discrete;
  }
  .assistant.is-open { display: flex; opacity: 1; transform: none; transition-duration: var(--t-pop-in); }
  @starting-style { .assistant.is-open { opacity: 0; transform: scale(.96) translateY(10px); } }
  .dish-sheet {
    left: 50%; top: 50%; width: min(880px, calc(100vw - 2 * var(--s-6))); max-height: min(620px, calc(100dvh - 2 * var(--s-6)));
    border-radius: var(--r-xl); translate: -50% -50%;
    opacity: 0; transform: scale(.96);
    transition: opacity var(--t-pop-out) var(--ease-out), transform var(--t-pop-out) var(--ease-out), display var(--t-pop-out) allow-discrete, overlay var(--t-pop-out) allow-discrete;
  }
  .dish-sheet.is-open { display: flex; opacity: 1; transform: none; transition-duration: var(--t-pop-in); }
  @starting-style { .dish-sheet.is-open { opacity: 0; transform: scale(.96); } }
  .dish-sheet-body { display: grid; grid-template-columns: 1.1fr 1fr; }
  .dish-sheet .dish-media { aspect-ratio: auto; height: 100%; min-height: 420px; }
  .dish-sheet-info { align-content: center; padding: var(--s-7) var(--s-6); }
}

/* Móvil: hojas que suben desde abajo (curva tipo iOS) y se arrastran para cerrar */
@media (max-width: 760px) {
  .sheet {
    left: 0; right: 0; bottom: 0; border-radius: var(--r-xl) var(--r-xl) 0 0; border-bottom: 0;
    transform: translateY(100%);
    transition: transform var(--t-sheet-out) var(--ease-out), display var(--t-sheet-out) allow-discrete, overlay var(--t-sheet-out) allow-discrete;
  }
  .sheet.is-open { display: flex; transform: none; transition-duration: var(--t-sheet-in); transition-timing-function: var(--ease-drawer); }
  @starting-style { .sheet.is-open { transform: translateY(100%); } }
  .assistant { height: min(88dvh, 720px); }
  .dish-sheet { max-height: 92dvh; }
  .sheet-grab { display: block; position: absolute; top: 0; left: 0; right: 0; height: 28px; z-index: 3; touch-action: none; cursor: grab; }
  .sheet-grab::after { content: ""; position: absolute; left: 50%; top: 9px; width: 40px; height: 5px; margin-left: -20px; border-radius: 5px; background: rgba(238, 243, 240, .45); }
  .assistant .sheet-head { padding-top: var(--s-5); touch-action: none; }
  .dish-close { top: var(--s-5); }
}

/* ---------- Movimiento ---------- */
@keyframes settle { from { transform: scale(1.06); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes dock-in { from { opacity: 0; transform: translateX(-50%) translateY(16px); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes msg { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes dot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes shimmer { to { background-position: -150% 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  /* Menos y más suave, no cero: se conserva la opacidad, se quita el desplazamiento */
  html { scroll-behavior: auto; }
  .hero-img { animation: none; }
  .hero-content > *, .hero-scroll, .bubble { animation: fade 200ms ease both; }
  .dock { animation: none; }
  .btn:active, .chip:active, .icon-btn:active, .send:active, .dish-card:has(.dish-hit:active), .tabs button:active, .lang-switch button:active, .dock a:active, .dock button:active { transform: none; }
  .dish-media { animation: none; }
  .dish-card:hover .dish-media.is-loaded img { transform: none; }
  .bubble.typing span { animation: none; opacity: .7; }
  .sheet { transform: none !important; opacity: 0; transition: opacity 200ms ease, display 200ms allow-discrete, overlay 200ms allow-discrete !important; }
  .sheet.is-open { opacity: 1; }
  @starting-style { .sheet.is-open { opacity: 0; } }
  .filter-note { transform: none !important; }
}

@media (prefers-reduced-transparency: reduce) {
  :root { --glass: var(--night-800); --glass-strong: var(--night-800); --glass-blur: none; }
}
@media (prefers-contrast: more) {
  :root { --line: rgba(238, 243, 240, .4); --line-strong: rgba(238, 243, 240, .7); --text-muted: var(--mist-100); }
}

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .site-nav { display: none; }
  .lang-switch { margin-left: auto; }
  .story { grid-template-columns: 1fr; gap: var(--s-6); }
  .booking-card { grid-template-columns: 1fr; gap: var(--s-6); padding: var(--s-6); }
  .contact { grid-template-columns: 1fr; gap: var(--s-5); }
  .rail li { width: min(72vw, 640px); }
}

/* ---------- Móvil ---------- */
@media (max-width: 760px) {
  :root { --topbar-h: 56px; }
  html { scroll-padding-top: calc(var(--topbar-h) + 9rem); }
  .topbar { padding-inline: var(--s-3); }
  .topbar-inner { padding-left: var(--s-4); gap: var(--s-2); }
  .topbar-cta { display: none; }
  .logo-word { font-size: 1.125rem; }
  .hero-content { padding-bottom: calc(var(--s-6) + var(--dock-h) + var(--s-4)); }
  .hero-text { font-size: var(--fs-base); }
  .hero-actions { margin: var(--s-5) 0 0; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-features, .hero-scroll { display: none; }
  .menu-section { padding-top: var(--s-8); }
  .menu-bar { margin-inline: calc(-1 * var(--s-2)); }
  .menu-bar-inner { flex-direction: column; align-items: stretch; }
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: 1 0 auto; }
  #dietFilters { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; }
  #dietFilters::-webkit-scrollbar { display: none; }
  #dietFilters .chip { flex: none; scroll-snap-align: start; }
  .rail li { width: 84vw; }
  .rail-controls { display: none; }
  .story-points { grid-template-columns: 1fr; }
  .contact-info { grid-template-columns: 1fr; }
  .booking { padding-inline: var(--s-3); }
  .booking-card { padding: var(--s-5); border-radius: var(--r-lg); }
  .booking .btn { justify-self: stretch; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: var(--s-3); }
  .dock { width: calc(100vw - 2 * var(--s-4)); max-width: 380px; }
  .dock a, .dock button { min-width: 0; flex: 1; }
}
@media (max-width: 380px) { .booking .row { grid-template-columns: 1fr; } }

/* ==========================================================================
   v7 · Capa de movimiento (motion.js). Todo es transform / opacity / clip-path.
   Sin JS no se oculta nada: cada estado inicial depende de una clase que pone JS.
   ========================================================================== */

/* Intro: telón con la marca, una vez por sesión */
.intro { display: none; }
html.js:not(.no-intro) .intro {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--bg-deep);
  animation: intro-failsafe 0s 4s forwards; /* si el JS no llega, desaparece igual */
}
.intro-mark { display: flex; align-items: center; gap: var(--s-3); color: var(--display); font-family: var(--font-display); font-size: clamp(2rem, 1.4rem + 3vw, 3.5rem); letter-spacing: .3em; text-transform: uppercase; opacity: 0; }
.intro-mark .icon { width: 1em; height: 1em; color: var(--accent); }
@keyframes intro-failsafe { to { visibility: hidden; } }

/* El hero espera a la intro */
html.js:not(.hero-go) .hero-content > *, html.js:not(.hero-go) .hero-img, html.js:not(.hero-go) .hero-scroll, html.js:not(.hero-go) .dock { animation-play-state: paused; }
.hero h1.is-split { animation: none; }
.hero-content, .hero-img { will-change: auto; }

/* Titulares palabra a palabra */
[data-split].is-split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
[data-split].is-split .w > span { display: inline-block; transform: translateY(105%); transition: transform 1000ms var(--ease-out); transition-delay: calc(var(--i, 0) * 45ms); }
[data-split].is-split.is-in .w > span { transform: none; }
[data-split].is-split.no-anim .w > span { transition: none; }

/* Entradas genéricas */
[data-reveal] { opacity: 0; transform: translateY(36px); transition: opacity 900ms var(--ease-out), transform 1000ms var(--ease-out); transition-delay: var(--d, 0ms); }
[data-reveal].is-in { opacity: 1; transform: none; }
.dish-card[data-reveal] { transform: translateY(56px) scale(.97); }
.dish-card[data-reveal].is-in { transform: none; transition: opacity 900ms var(--ease-out) var(--d, 0ms), transform 1000ms var(--ease-out) var(--d, 0ms); }
.dish-card[data-reveal].is-in:hover { transition-delay: 0ms; }

/* Cinta infinita */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--bg-deep); padding: var(--s-4) 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee-group { display: flex; align-items: center; gap: var(--s-6); padding-right: var(--s-6); }
.marquee-group span { font-family: var(--font-display); font-style: italic; font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.5rem); color: var(--display); white-space: nowrap; }
.marquee-group .icon { width: 1.4rem; height: 1.4rem; color: var(--accent); }
@media (hover: hover) and (pointer: fine) { .marquee:hover .marquee-track { animation-play-state: paused; } }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Cifras */
.stats { padding: var(--s-8) var(--pad-x); border-top: 1px solid var(--line); }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.stats-row li { display: grid; gap: var(--s-2); justify-items: start; padding-top: var(--s-5); border-top: 1px solid var(--line-strong); }
.stats-row strong { font-family: var(--font-display); font-weight: 500; font-size: clamp(3.5rem, 2rem + 6vw, 7rem); line-height: .9; letter-spacing: -.04em; color: var(--display); font-variant-numeric: tabular-nums; }
.stats-row span { color: var(--text-muted); font-size: var(--fs-sm); }

/* Imagen que se expande al hacer scroll (sección fijada) */
.story { display: block; padding: 0 0 var(--s-9); border-top: 0; }
.cinema { position: relative; height: 230vh; }
.cinema-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; overflow: hidden; }
.cinema-frame { position: absolute; inset: 0; clip-path: inset(14% 16% 14% 16% round 32px); background: var(--surface); }
.cinema-frame img { width: 100%; height: 100%; object-fit: cover; scale: 1.22; }
.cinema-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5, 14, 11, .75), rgba(5, 14, 11, .15) 60%); }
.cinema-title { position: relative; z-index: 1; text-align: center; font-size: clamp(2.75rem, 1.4rem + 5.5vw, 6.5rem); line-height: .98; letter-spacing: -.035em; padding: 0 var(--pad-x); max-width: 16ch; }
.story-body { padding: var(--s-8) var(--pad-x) 0; grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: start; }
html:not(.js) .cinema, html.js:not(.motion-ready) .cinema { height: auto; }
html:not(.js) .cinema-sticky { position: relative; height: 70vh; }

/* Galería: en escritorio se fija y avanza en horizontal */
.gallery.is-pinned { padding: 0; }
.gallery.is-pinned .gallery-pin { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.gallery.is-pinned .rail { align-items: flex-start; overflow: visible; scroll-snap-type: none; will-change: transform; }
.gallery.is-pinned .rail li { width: min(44vw, 640px); }
.gallery.is-pinned .rail-controls { display: none; }

/* Puntero: tarjetas que se inclinan con un brillo que sigue al ratón */
@media (hover: hover) and (pointer: fine) {
  .dish-card { transform-style: preserve-3d; }
  .dish-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 300ms ease; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(178, 220, 198, .14), transparent 60%); }
  .dish-card:hover::after { opacity: 1; }
  .dish-card.is-in, .dish-card:not([data-reveal]) { transition: transform 400ms var(--ease-out), border-color var(--t-fast) ease; }
  [data-magnetic] { transition: translate 400ms var(--ease-out), background-color var(--t-fast) ease, transform var(--t-press) var(--ease-out); }
  .has-spot { position: relative; isolation: isolate; }
  .has-spot::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; opacity: 0; transition: opacity 300ms ease; background: radial-gradient(320px circle at var(--mx) var(--my), rgba(143, 202, 174, .12), transparent 65%); pointer-events: none; }
  .has-spot:hover::before { opacity: 1; }
}

@media (max-width: 1100px) {
  .story-body { grid-template-columns: 1fr; gap: var(--s-6); }
}
@media (max-width: 760px) {
  .cinema { height: 180vh; }
  .cinema-frame { clip-path: inset(14% 6% 14% 6% round 24px); }
  .stats-row { grid-template-columns: 1fr; gap: var(--s-4); }
  .stats-row li { grid-template-columns: auto 1fr; align-items: baseline; gap: var(--s-4); }
  .stats-row strong { font-size: 4rem; min-width: 1.4em; }
  .marquee { padding: var(--s-3) 0; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .cinema { height: auto; }
  .cinema-sticky { position: relative; height: 70vh; }
  .cinema-frame { clip-path: inset(0 round 0); }
  .cinema-frame img { scale: 1; }
  [data-split].is-split .w > span { transform: none; transition: none; }
}
