:root {
  --ink: #120306;
  --ink-2: #24060a;
  --ink-3: #33090e;
  --ink-4: #45141a;
  --paper: #fdf6ec;
  --surface: #fffdf9;
  --gold: #ffc93c;
  --gold-2: #ffb400;
  --red: #e0202f;
  --red-ink: #c4192a; /* the red darkened enough to clear 4.5:1 as text on --paper */
  --orange: #ff6a1a;

  --text-on-dark: #fdf6ec;
  --text-on-dark-dim: #d8c4b8;
  --text-on-light: #241012;
  --text-on-light-dim: #6b4c4a;

  --rule-on-light: rgba(36, 16, 18, 0.14);
  --rule-on-dark: rgba(255, 255, 255, 0.07);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  /* motion scale — everything below 300ms except authored reveals */
  --dur-press: 140ms;
  --dur-hover: 200ms;
  --dur-pop: 220ms;
  --dur-reveal: 720ms;
  --dur-wipe: 900ms;
  --stagger: 70ms;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 2.75rem;
  --space-5: 4.5rem;
  --space-6: 7rem;

  --radius-card: 16px;
  --radius-pill: 999px;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text-on-dark);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-optical-sizing: auto;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

/* ---------- Browser surfaces ---------- */

::selection {
  background: var(--gold);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}
/* gold on cream fails 3:1 — the light sections get the red ring */
.section-light :focus-visible { outline-color: var(--red); }

html { scrollbar-color: var(--ink-4) var(--ink); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--ink-4); border-radius: 999px; border: 2px solid var(--ink); }
::-webkit-scrollbar-thumb:hover { background: var(--gold-2); }

.skip-link {
  position: fixed;
  top: var(--space-2);
  left: 50%;
  z-index: 100;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  transform: translate(-50%, -180%);
  transition: transform 260ms var(--ease-out);
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

/* ---------- Layout primitives ---------- */

.section { position: relative; padding: var(--space-6) var(--space-3); }
.section-inner { max-width: 1140px; margin: 0 auto; }
.section-dark { background: var(--ink); color: var(--text-on-dark); }
.section-light { background: var(--paper); color: var(--text-on-light); }

.section h2 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.section-lead {
  max-width: 62ch;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-on-dark-dim);
  margin-top: var(--space-2);
}
.section-light .section-lead { color: var(--text-on-light-dim); }

/* ---------- Organic section dividers ----------
   The divider's own background is the section ABOVE it; the path is
   painted in the colour of the section BELOW, and always fills the
   bottom of the viewBox. Hill = the next section bulges up, valley =
   the current section dips down. */

.divider {
  position: relative;
  height: 90px;
  margin: -1px 0;
  z-index: 1;
  line-height: 0;
}
@media (max-width: 640px) {
  .divider { height: 52px; }
}
.divider svg { width: 100%; height: 100%; display: block; }

.divider-to-light { background: var(--ink); }
.divider-to-light path { fill: var(--paper); }

.divider-to-dark { background: var(--paper); }
.divider-to-dark path { fill: var(--ink); }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: rgba(18, 3, 6, 0);
  backdrop-filter: blur(0px);
  transition: background 320ms var(--ease-out), backdrop-filter 320ms var(--ease-out), box-shadow 320ms var(--ease-out);
}
.site-header.is-scrolled {
  background: rgba(18, 3, 6, 0.72);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px -12px rgba(0,0,0,0.6);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.brand img {
  border-radius: 10px;
  transition: transform 320ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .brand:hover img { transform: rotate(-7deg) scale(1.07); }
}

.header-ctas { display: flex; gap: 0.5rem; }

@media (max-width: 560px) {
  .site-header { padding: 0.75rem var(--space-2); }
  .brand span { display: none; }
  .header-ctas { gap: 0.35rem; }
  .pill-sm { padding: 0.55rem 0.85rem; }
}

/* ---------- Pills / buttons ---------- */

.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform var(--dur-press) var(--ease-out),
    box-shadow var(--dur-hover) var(--ease-out),
    background-color var(--dur-hover) var(--ease-out),
    color var(--dur-hover) var(--ease-out);
}

.ico-wa, .ico-pin {
  flex: none;
  transition: transform var(--dur-hover) var(--ease-out);
}

.pill-gold {
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-2) 100%);
  color: var(--ink);
  box-shadow: 0 10px 24px -10px rgba(255, 180, 0, 0.55);
}

.pill-wa {
  background: var(--ink-3);
  color: var(--paper);
  box-shadow: 0 6px 18px -10px rgba(0,0,0,0.6);
}

.pill-outline {
  background: transparent;
  color: currentColor;
  box-shadow: inset 0 0 0 1.5px currentColor;
}

.pill-sm { padding: 0.6rem 1.1rem; font-size: 0.85rem; min-height: 40px; }
.pill-lg { padding: 1rem 2rem; font-size: 1.05rem; }

@media (hover: hover) and (pointer: fine) {
  .pill-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px -12px rgba(255, 180, 0, 0.72);
  }
  .pill-wa:hover {
    transform: translateY(-2px);
    background-color: var(--ink-4);
    box-shadow: 0 12px 24px -12px rgba(0,0,0,0.75);
  }
  .pill-outline:hover {
    transform: translateY(-2px);
    background-color: rgba(224, 32, 47, 0.08);
  }
  .section-dark .pill-outline:hover { background-color: rgba(255, 201, 60, 0.1); }

  .pill:hover .ico-wa { transform: scale(1.12); }
  .pill:hover .ico-pin { transform: translateY(-2px); }
}

/* placed after the hover block so a press always wins over a hover lift */
.pill:active,
.pill:hover:active { transform: scale(0.97); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 300vh;
}
@media (max-width: 640px) {
  .hero { height: 200vh; }
}

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  /* the first frame doubles as the poster, so the hero is never a black box */
  background: var(--ink) url("../assets/hero-frames/frame-000.webp") center / cover no-repeat;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 300ms var(--ease-out);
}
#hero-canvas.is-ready { opacity: 1; }

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 105%, rgba(18,3,6,0.92) 0%, rgba(18,3,6,0) 62%),
    linear-gradient(180deg, rgba(18,3,6,0.42) 0%, rgba(18,3,6,0.06) 34%, rgba(18,3,6,0.72) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 var(--space-3) var(--space-5);
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}
.js .hero-content {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
}
.js .hero-content.is-in { opacity: 1; transform: none; }

/* once the sequence starts scrubbing, JS drives --hero-fade per frame */
.hero-content.is-scrubbing {
  transition: none;
  will-change: opacity, transform, filter;
  opacity: var(--hero-fade, 1);
  transform: translateY(calc((1 - var(--hero-fade, 1)) * -22px));
  filter: blur(calc((1 - var(--hero-fade, 1)) * 5px));
}
.hero-content.is-gone { pointer-events: none; }

.hero-badge { width: 84px; height: 84px; }

.hero-content h1 {
  color: var(--paper);
  font-size: clamp(2.1rem, 6vw, 4.2rem);
  max-width: 16ch;
  text-shadow: 0 2px 24px rgba(18, 3, 6, 0.5);
}
.hero-content h1 em {
  font-style: normal;
  color: var(--gold);
}

.hero-sub {
  color: var(--text-on-dark-dim);
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 46ch;
}

.hero-ctas { margin-top: var(--space-1); }

.scroll-cue {
  position: absolute;
  bottom: var(--space-2);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-on-dark-dim);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: bob 2.4s var(--ease-in-out) infinite;
  transition: opacity 320ms var(--ease-out);
}
.hero.is-scrolling .scroll-cue { opacity: 0; pointer-events: none; }

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 7px); }
}

/* ---------- Megas ---------- */

.megas-anchor {
  margin: var(--space-5) auto;
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 44px 80px -42px rgba(0,0,0,0.95);
}
.megas-anchor img {
  width: 100%;
  height: auto;
  border-radius: inherit;
}

.megas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--space-3);
}

.mega-card {
  position: relative;
  overflow: hidden;
  background: var(--ink-2);
  border-radius: var(--radius-card);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  box-shadow: 0 20px 40px -28px rgba(0,0,0,0.8);
  transition:
    transform 280ms var(--ease-out),
    box-shadow 280ms var(--ease-out),
    background-color 280ms var(--ease-out);
}
.mega-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--orange));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 380ms var(--ease-out);
}
.mega-card h3 {
  font-size: 1.3rem;
  color: var(--gold);
}
.mega-card p {
  color: var(--text-on-dark-dim);
  font-size: 0.95rem;
  flex-grow: 1;
}
.mega-card .pill { align-self: flex-start; }

@media (hover: hover) and (pointer: fine) {
  .mega-card:hover {
    transform: translateY(-5px);
    background-color: #2a070c;
    box-shadow: 0 30px 54px -24px rgba(0,0,0,0.9);
  }
  .mega-card:hover::before { transform: scaleX(1); }
}
.mega-card:focus-within::before { transform: scaleX(1); }

/* ---------- Menu clasico ---------- */

.menu-grid {
  display: grid;
  grid-template-columns: minmax(240px, 380px) 1fr;
  gap: var(--space-5);
  align-items: center;
}
@media (max-width: 800px) {
  .menu-grid { grid-template-columns: 1fr; gap: var(--space-4); }
}

.menu-photo {
  min-width: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 34px 64px -34px rgba(36, 16, 18, 0.45);
}
.menu-photo img {
  width: 100%;
  height: auto;
  border-radius: inherit;
}

.menu-text h2 { margin-bottom: var(--space-2); }

.menu-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin: var(--space-3) 0 var(--space-4);
}
@media (max-width: 520px) {
  .menu-columns { grid-template-columns: 1fr; gap: var(--space-3); }
}

.menu-columns h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--red-ink);
  margin-bottom: var(--space-2);
}

.menu-columns li {
  position: relative;
  padding: 0.5rem 0;
  font-size: 0.98rem;
}

.menu-list-detailed li { padding: 0.6rem 0; }
.menu-list-detailed b { display: block; font-weight: 600; }
.menu-list-detailed span {
  display: block;
  color: var(--text-on-light-dim);
  font-size: 0.88rem;
  line-height: 1.4;
}
/* the rule under each row draws itself in, left to right, on arrival */
.menu-columns li::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--rule-on-light);
  transform-origin: left;
  transition: transform 620ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 55ms);
}
.menu-columns li:last-child::after { content: none; }
.js .menu-columns li::after { transform: scaleX(0); }
.js .menu-columns li.is-visible::after { transform: scaleX(1); }

/* ---------- Salsas ---------- */

.salsas-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-5);
  align-items: center;
}
@media (max-width: 800px) {
  .salsas-grid { grid-template-columns: 1fr; gap: var(--space-4); }
}

.salsas-photo {
  min-width: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 34px 64px -30px rgba(0,0,0,0.85);
}
.salsas-photo img {
  width: 100%;
  height: auto;
  border-radius: inherit;
}

/* ---------- Sedes ---------- */

.sedes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.sede-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  box-shadow: 0 20px 40px -28px rgba(36,16,18,0.3);
  transition: transform 280ms var(--ease-out), box-shadow 280ms var(--ease-out);
}
.sede-card h3 { font-size: 1.15rem; }
.sede-tag {
  display: inline-block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--gold);
  color: var(--ink);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  margin-left: 0.4rem;
  vertical-align: middle;
}
.sede-hours { color: var(--text-on-light-dim); font-size: 0.9rem; }
.sede-card p:first-of-type { flex-grow: 1; }
.sede-card .pill { align-self: flex-start; }

@media (hover: hover) and (pointer: fine) {
  .sede-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 52px -26px rgba(36,16,18,0.4);
  }
}

/* ---------- Cierre ---------- */

.cierre-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
}
.cierre-logo { margin-bottom: var(--space-1); }
.cierre-inner h2 { max-width: 16ch; }
.cierre-inner .section-lead { text-align: center; }
.cierre-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.ig-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.25rem;
  margin-top: var(--space-4);
  font-weight: 600;
  color: var(--gold);
  box-shadow: inset 0 -1px 0 transparent;
  transition: box-shadow var(--dur-hover) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .ig-link:hover { box-shadow: inset 0 -1px 0 var(--gold); }
}
.cierre-hours { color: var(--text-on-dark-dim); font-size: 0.9rem; margin-top: var(--space-1); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--text-on-dark-dim);
  text-align: center;
  padding: var(--space-3);
  font-size: 0.82rem;
  border-top: 1px solid var(--rule-on-dark);
}

/* ---------- Floating WhatsApp ---------- */

.wa-fab {
  position: fixed;
  right: var(--space-2);
  bottom: var(--space-2);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.wa-fab-button {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: #25D366;
  color: #06210f;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 14px 30px -10px rgba(0,0,0,0.55);
  transition: transform var(--dur-press) var(--ease-out), box-shadow var(--dur-hover) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .wa-fab-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 38px -12px rgba(0,0,0,0.6);
  }
}
.wa-fab-button:active { transform: scale(0.94); }

.wa-fab-glyph, .wa-fab-close {
  position: absolute;
  transition: opacity 180ms var(--ease-out), transform 260ms var(--ease-out);
}
.wa-fab-close { opacity: 0; transform: rotate(-90deg) scale(0.6); }
.wa-fab.is-open .wa-fab-glyph { opacity: 0; transform: rotate(90deg) scale(0.6); }
.wa-fab.is-open .wa-fab-close { opacity: 1; transform: none; }

.wa-fab-panel {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: var(--ink-2);
  border-radius: var(--radius-card);
  padding: 0.9rem;
  min-width: 210px;
  box-shadow: 0 24px 48px -18px rgba(0,0,0,0.75);
  transform-origin: bottom right;
  transform: scale(0.94) translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 160ms var(--ease-out), opacity 160ms var(--ease-out);
}
.wa-fab.is-open .wa-fab-panel {
  transform: none;
  opacity: 1;
  pointer-events: auto;
  transition-duration: var(--dur-pop);
}

.wa-fab-title {
  color: var(--text-on-dark-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 0.3rem 0.25rem;
}

.wa-fab-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.7rem;
  border-radius: 10px;
  color: var(--paper);
  font-weight: 600;
  font-size: 0.92rem;
  opacity: 0;
  transform: translateY(6px);
  transition:
    background-color var(--dur-press) var(--ease-out),
    opacity 120ms var(--ease-out),
    transform 120ms var(--ease-out);
}
.wa-fab-option svg { color: var(--gold); }
.wa-fab.is-open .wa-fab-option {
  opacity: 1;
  transform: none;
  transition-duration: var(--dur-press), 240ms, 240ms;
}
.wa-fab.is-open .wa-fab-option:nth-of-type(1) { transition-delay: 0ms, 50ms, 50ms; }
.wa-fab.is-open .wa-fab-option:nth-of-type(2) { transition-delay: 0ms, 100ms, 100ms; }
@media (hover: hover) and (pointer: fine) {
  .wa-fab-option:hover { background-color: rgba(255,255,255,0.07); }
}
.wa-fab-option:active { background-color: rgba(255,255,255,0.12); }

/* ---------- Reveal on scroll ---------- */

/* text and cards rise into place */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--dur-reveal) var(--ease-out),
    transform var(--dur-reveal) var(--ease-out);
  transition-delay: calc(var(--i, 0) * var(--stagger));
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* photographs wipe open from the top and settle out of a slight push-in */
.js .reveal-img img {
  clip-path: inset(0 0 100% 0);
  transform: scale(1.06);
  transition:
    clip-path var(--dur-wipe) var(--ease-out),
    transform 1200ms var(--ease-out);
}
.js .reveal-img.is-visible img {
  clip-path: inset(0 0 0 0);
  transform: none;
}

/* Reduced motion keeps the fades that aid comprehension and drops every
   movement, wipe and blur. */
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .reveal.is-visible { opacity: 1; transform: none; transition: none; }
  .js .reveal-img img, .js .reveal-img.is-visible img { clip-path: none; transform: none; transition: none; }
  .js .menu-columns li::after, .js .menu-columns li.is-visible::after { transform: scaleX(1); transition: none; }
  .js .hero-content, .js .hero-content.is-in { opacity: 1; transform: none; transition: none; }
  .js .hero-content.is-scrubbing { opacity: 1; transform: none; filter: none; }
  .scroll-cue { animation: none; }
  .mega-card, .sede-card, .pill, .wa-fab-button, .brand img { transition-duration: 1ms; }
  .mega-card::before { transition: none; }
}
