/* ============================================
   El Rincón de Tomás — Estilos
   Paleta: terracota profunda + crema + carbón
   ============================================ */

:root {
  /* Colores */
  --c-bg: #f5efe6;
  --c-bg-alt: #ebe2d3;
  --c-ink: #1a1410;
  --c-ink-soft: #4a3f36;
  --c-mute: #8a7d6e;
  --c-line: #d4c8b5;
  --c-accent: #8a3324;
  --c-accent-deep: #5e2218;
  --c-gold: #b8860b;
  --c-cream: #faf6ef;

  /* Tipografía */
  --f-display: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --f-body: "DM Sans", -apple-system, system-ui, sans-serif;

  /* Layout */
  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  /* Animación */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-bg);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ============================================
   Tipografía
   ============================================ */

.display {
  font-family: var(--f-display);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.eyebrow {
  font-family: var(--f-body);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-accent);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.eyebrow.is-left::before { display: none; }

h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.1; }

.h-xl { font-size: clamp(2.8rem, 7vw, 5.8rem); }
.h-l  { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.h-m  { font-size: clamp(1.5rem, 3vw, 2.2rem); }

/* ============================================
   Layout helpers
   ============================================ */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: clamp(4rem, 10vw, 8rem) 0; }
.section-tight { padding: clamp(3rem, 6vw, 5rem) 0; }

/* ============================================
   Header / Navegación
   ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.4rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), padding 0.4s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(245, 239, 230, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(212, 200, 181, 0.4);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  z-index: 2;
}
.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--c-cream);
  padding: 6px;
  border: 1px solid var(--c-line);
  transition: transform 0.4s var(--ease);
}
.brand:hover .brand-logo { transform: rotate(-8deg); }
.brand-name {
  font-family: var(--f-display);
  font-size: 1.4rem;
  font-style: italic;
  line-height: 1;
  color: var(--c-ink);
}
.brand-name small {
  display: block;
  font-family: var(--f-body);
  font-style: normal;
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--c-mute);
  margin-top: 4px;
}

/* Variante hero (sobre imagen oscura) */
.site-header.on-dark:not(.is-scrolled) .brand-name,
.site-header.on-dark:not(.is-scrolled) .nav a {
  color: var(--c-cream);
}
.site-header.on-dark:not(.is-scrolled) .brand-name small {
  color: rgba(250, 246, 239, 0.75);
}
.site-header.on-dark:not(.is-scrolled) .brand-logo {
  background: rgba(250, 246, 239, 0.12);
  border-color: rgba(250, 246, 239, 0.3);
}
.site-header.on-dark:not(.is-scrolled) .nav-toggle span {
  background: var(--c-cream);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2.4rem;
}
.nav a {
  position: relative;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 0.4rem 0;
  transition: color 0.3s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: var(--c-accent);
  transition: width 0.4s var(--ease);
}
.nav a:hover::after,
.nav a.active::after { width: 100%; }
.nav a.active { color: var(--c-accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  z-index: 2;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 1.5px;
  background: var(--c-ink);
  margin: 6px 0;
  transition: all 0.4s var(--ease);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: 0;
    background: var(--c-bg);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.5s var(--ease);
  }
  .nav.is-open { transform: translateX(0); }
  .nav a { font-size: 1.1rem; }
  .site-header.on-dark:not(.is-scrolled) .nav a { color: var(--c-ink); }
}

/* ============================================
   Hero
   ============================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: var(--c-cream);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  will-change: transform;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(26, 20, 16, 0.55) 0%,
    rgba(26, 20, 16, 0.4) 40%,
    rgba(26, 20, 16, 0.75) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 7rem var(--gutter) 5rem;
  max-width: var(--container);
  margin: 0 auto;
}
.hero-eyebrow {
  color: rgba(250, 246, 239, 0.85);
  font-size: 0.82rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-bottom: 1.8rem;
}
.hero-title {
  font-size: clamp(3rem, 9vw, 7.5rem);
  font-style: italic;
  margin-bottom: 1.5rem;
  max-width: 12ch;
}
.hero-title em {
  font-style: normal;
  display: block;
  font-size: 0.75em;
  color: var(--c-gold);
  font-weight: 400;
}
.hero-sub {
  font-size: 1.1rem;
  max-width: 48ch;
  color: rgba(250, 246, 239, 0.88);
  margin-bottom: 2.5rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(250, 246, 239, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}
.hero-scroll::after {
  content: "";
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(250, 246, 239, 0.8), transparent);
  animation: scrollLine 2.4s ease-in-out infinite;
}
@keyframes scrollLine {
  0%, 100% { transform: scaleY(0.4); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
}

/* Hero variante pequeño (para páginas internas) */
.hero.is-compact { min-height: 60vh; }
.hero.is-compact .hero-inner { padding-top: 9rem; padding-bottom: 4rem; }

/* ============================================
   Botones
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 1.8rem;
  font-family: var(--f-body);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid currentColor;
  background: transparent;
  color: var(--c-cream);
  cursor: pointer;
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c-accent);
  transform: translateY(101%);
  transition: transform 0.4s var(--ease);
  z-index: -1;
}
.btn:hover { border-color: var(--c-accent); color: var(--c-cream); }
.btn:hover::before { transform: translateY(0); }
.btn-primary {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: var(--c-cream);
}
.btn-primary::before { background: var(--c-accent-deep); }
.btn-primary:hover { border-color: var(--c-accent-deep); }

.btn-dark { color: var(--c-ink); border-color: var(--c-ink); }
.btn-dark:hover { color: var(--c-cream); }

.btn-arrow::after {
  content: "→";
  transition: transform 0.3s var(--ease);
  font-size: 1.1em;
}
.btn-arrow:hover::after { transform: translateX(4px); }

/* ============================================
   Inicio — secciones
   ============================================ */

.welcome {
  text-align: center;
  position: relative;
}
.welcome-mark {
  font-family: var(--f-display);
  font-size: 8rem;
  font-style: italic;
  color: var(--c-accent);
  opacity: 0.08;
  line-height: 1;
  margin-bottom: -2rem;
  user-select: none;
}
.welcome p {
  max-width: 62ch;
  margin: 1.8rem auto 0;
  font-size: 1.08rem;
  color: var(--c-ink-soft);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.split.reverse > :first-child { order: 2; }
@media (max-width: 820px) {
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
}
.split-img {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.split-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease);
}
.split-img:hover img { transform: scale(1.05); }
.split-img::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(250, 246, 239, 0.4);
  pointer-events: none;
}

.section-bg-alt { background: var(--c-bg-alt); }

.section-dark {
  background: var(--c-ink);
  color: var(--c-cream);
}
.section-dark .eyebrow { color: var(--c-gold); }

/* Familias destacadas en home */
.familias-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
@media (max-width: 800px) { .familias-grid { grid-template-columns: 1fr; } }

.familia-card {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  cursor: pointer;
  background: var(--c-ink);
}
.familia-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 1.2s var(--ease), opacity 0.6s var(--ease);
}
.familia-card:hover img { transform: scale(1.08); opacity: 1; }
.familia-card-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  background: linear-gradient(to top, rgba(26, 20, 16, 0.85), rgba(26, 20, 16, 0.1) 60%, transparent);
  color: var(--c-cream);
  z-index: 2;
}
.familia-card-name {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 1.8rem;
  margin-bottom: 0.3rem;
}
.familia-card-count {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--c-gold);
}
.familia-card::after {
  content: "→";
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  z-index: 3;
  color: var(--c-cream);
  font-size: 1.3rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.4s var(--ease);
}
.familia-card:hover::after { opacity: 1; transform: translateX(0); }

/* Galería en home */
.gallery-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 3rem;
}
@media (max-width: 700px) { .gallery-strip { grid-template-columns: repeat(2, 1fr); } }
.gallery-strip > div {
  aspect-ratio: 1;
  overflow: hidden;
}
.gallery-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.5s var(--ease);
  cursor: zoom-in;
}
.gallery-strip > div:hover img { transform: scale(1.1); }

/* ============================================
   Lightbox (galería a pantalla completa)
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(12, 9, 7, 0.94);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox-img {
  max-width: 88vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.96);
  transition: transform 0.35s var(--ease);
  cursor: default;
}
.lightbox.is-open .lightbox-img { transform: scale(1); }
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.8rem;
  width: 48px;
  height: 48px;
  background: rgba(250, 246, 239, 0.1);
  border: 1px solid rgba(250, 246, 239, 0.25);
  color: var(--c-cream);
  font-size: 1.7rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.3s var(--ease), transform 0.4s var(--ease);
}
.lightbox-close:hover { background: var(--c-accent); transform: rotate(90deg); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  background: rgba(250, 246, 239, 0.08);
  border: 1px solid rgba(250, 246, 239, 0.22);
  color: var(--c-cream);
  font-size: 1.9rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.3s var(--ease);
}
.lightbox-nav:hover { background: var(--c-accent); }
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }
.lightbox-counter {
  position: absolute;
  bottom: 1.8rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(250, 246, 239, 0.8);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
}
@media (max-width: 600px) {
  .lightbox-nav { width: 44px; height: 44px; font-size: 1.6rem; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
  .lightbox-close { top: 1rem; right: 1rem; width: 42px; height: 42px; }
  .lightbox-img { max-width: 94vw; }
}

/* ============================================
   Carta — Mosaico de familias
   ============================================ */

.carta-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 3rem;
}
.carta-mosaic .familia-card { aspect-ratio: 4 / 5; }

/* Carta — secciones parallax por familia */
.familia-section {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 5rem 0;
  overflow: hidden;
}
.familia-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.familia-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 20, 16, 0.85), rgba(26, 20, 16, 0.65));
}
.familia-section .container { position: relative; z-index: 2; color: var(--c-cream); }

.familia-header {
  text-align: center;
  margin-bottom: 3rem;
}
.familia-header .eyebrow { color: var(--c-gold); }
.familia-header h2 {
  font-style: italic;
  margin-top: 1rem;
  font-size: clamp(2.4rem, 5vw, 4rem);
}
.familia-header h2::first-letter { text-transform: uppercase; }

.platos-list {
  max-width: 760px;
  margin: 0 auto;
  list-style: none;
}
.plato {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px dashed rgba(250, 246, 239, 0.18);
  align-items: center;
}
.plato-thumb {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(250, 246, 239, 0.25);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
/* Hueco reservado cuando el plato aún no tiene foto: mantiene la alineación */
.plato-thumb--empty {
  border: 1px solid rgba(250, 246, 239, 0.10);
  background: rgba(250, 246, 239, 0.05);
  box-shadow: none;
}
.plato-info { display: block; }
.plato-name {
  font-family: var(--f-display);
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 400;
  text-transform: capitalize;
  letter-spacing: 0.005em;
}
.plato-desc {
  display: block;
  font-family: var(--f-body);
  font-style: normal;
  font-size: 0.92rem;
  color: rgba(250, 246, 239, 0.7);
  margin-top: 0.3rem;
  text-transform: none;
}
.plato-tags {
  display: inline-flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.plato-tag {
  font-family: var(--f-body);
  font-style: normal;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(184, 134, 11, 0.5);
  color: var(--c-gold);
  border-radius: 2px;
}
.plato-price {
  font-family: var(--f-display);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--c-gold);
  white-space: nowrap;
}
.plato-price small {
  display: block;
  font-family: var(--f-body);
  font-style: normal;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250, 246, 239, 0.6);
  text-align: right;
  margin-top: 0.1rem;
}

.carta-back-top {
  text-align: center;
  margin-top: 3rem;
}

/* Loading state de la carta */
.carta-loading {
  text-align: center;
  padding: 6rem 0;
  color: var(--c-mute);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.carta-loading::after {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  background: var(--c-accent);
  margin: 1.5rem auto 0;
  animation: loading-bar 1.5s ease-in-out infinite;
}
@keyframes loading-bar {
  0%, 100% { transform: scaleX(0.2); }
  50% { transform: scaleX(1); }
}

.carta-error {
  text-align: center;
  padding: 4rem var(--gutter);
  background: var(--c-bg-alt);
  border-left: 3px solid var(--c-accent);
  margin: 2rem 0;
}

/* ============================================
   Reservas
   ============================================ */

.reservas-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 900px) { .reservas-grid { grid-template-columns: 1fr; } }

.form {
  display: grid;
  gap: 1.2rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.field label {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--c-mute);
  font-weight: 500;
}
.field input,
.field select,
.field textarea {
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--c-line);
  background: var(--c-cream);
  font-family: var(--f-body);
  font-size: 1rem;
  color: var(--c-ink);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  border-radius: 2px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(138, 51, 36, 0.12);
}
.field textarea { resize: vertical; min-height: 110px; }

.form-aside {
  background: var(--c-ink);
  color: var(--c-cream);
  padding: clamp(2rem, 4vw, 3rem);
  position: relative;
}
.form-aside h3 {
  font-style: italic;
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  color: var(--c-gold);
}
.form-aside-list {
  list-style: none;
  display: grid;
  gap: 1.4rem;
}
.form-aside-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}
.form-aside-list .icon {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(250, 246, 239, 0.3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: var(--c-gold);
  flex-shrink: 0;
}
.form-aside-list strong {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1rem;
  display: block;
  margin-bottom: 0.2rem;
}
.form-aside-list span,
.form-aside-list a {
  color: rgba(250, 246, 239, 0.78);
  font-size: 0.95rem;
  line-height: 1.5;
}
.form-aside-list a:hover { color: var(--c-gold); }

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1.4rem;
  background: #25d366;
  color: white;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 2px;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
  margin-top: 1.5rem;
}
.btn-whatsapp:hover { background: #1ebe57; transform: translateY(-2px); }

/* ============================================
   Contacto
   ============================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info {
  display: grid;
  gap: 1.4rem;
}
.contact-info-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.3rem;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--c-line);
}
.contact-info-item:last-child { border-bottom: 0; }
.contact-info-item .icon {
  width: 44px;
  height: 44px;
  border: 1px solid var(--c-accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--c-accent);
  font-size: 1.05rem;
}
.contact-info-item h4 {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--c-ink);
  margin-bottom: 0.3rem;
}
.contact-info-item p,
.contact-info-item a {
  color: var(--c-ink-soft);
  line-height: 1.5;
}
.contact-info-item a:hover { color: var(--c-accent); }

.map-frame {
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--c-line);
}
.map-frame iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.3) contrast(1.05); }

/* ============================================
   Footer
   ============================================ */

.site-footer {
  background: var(--c-ink);
  color: rgba(250, 246, 239, 0.78);
  padding: 4rem var(--gutter) 2rem;
  margin-top: 4rem;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(250, 246, 239, 0.12);
}
@media (max-width: 820px) { .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 500px) { .footer-inner { grid-template-columns: 1fr; } }

.footer-brand-name {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 1.8rem;
  color: var(--c-cream);
  margin-bottom: 1rem;
}
.footer-tagline { font-size: 0.95rem; max-width: 28ch; line-height: 1.6; }

.footer-title {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--c-gold);
  margin-bottom: 1.2rem;
}
.footer-list { list-style: none; display: grid; gap: 0.6rem; }
.footer-list a:hover { color: var(--c-gold); }

.socials {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.5rem;
}
.socials a {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(250, 246, 239, 0.25);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  transition: all 0.4s var(--ease);
}
.socials a:hover {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: var(--c-cream);
  transform: translateY(-2px);
}

.footer-bottom {
  max-width: var(--container);
  margin: 2rem auto 0;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(250, 246, 239, 0.5);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ============================================
   Animaciones de entrada por scroll
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.4s; }
.reveal-stagger.is-visible > *:nth-child(n+7) { transition-delay: 0.48s; }
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }

/* Detalle decorativo */
.divider-glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 3rem auto;
  color: var(--c-accent);
  opacity: 0.5;
}
.divider-glyph::before,
.divider-glyph::after {
  content: "";
  display: block;
  width: 60px;
  height: 1px;
  background: currentColor;
}
.divider-glyph span {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 1.3rem;
}

/* Mensaje de "gracias" */
.thanks {
  min-height: 80vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8rem var(--gutter) 4rem;
}
.thanks-mark {
  font-family: var(--f-display);
  font-size: 6rem;
  font-style: italic;
  color: var(--c-accent);
  margin-bottom: 1rem;
}

/* Capitalización inteligente — el dueño puede escribir EN MAYÚSCULAS y se mostrará bien */
.cap-sentence {
  text-transform: lowercase;
}
.cap-sentence::first-letter {
  text-transform: uppercase;
}

/* Reducir movimiento si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   Alérgenos — iconos bajo cada plato
   ============================================ */

.alg-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  margin-top: 0.55rem;
  align-items: center;
}

/* Cada alérgeno es un botón: al tocarlo aparece su nombre.
   El relleno agranda la zona sensible al dedo sin agrandar el dibujo. */
.alg-chip {
  display: inline-flex;
  padding: 5px;
  border: 0;
  background: none;
  line-height: 0;
  border-radius: 50%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s var(--ease);
}
.alg-chip:hover { transform: scale(1.12); }
.alg-chip:active { transform: scale(0.94); }
.alg-chip:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 1px; }
.alg-chip[aria-pressed="true"] { transform: scale(1.14); }
.alg-chip[aria-pressed="true"] .alg-ico {
  box-shadow: 0 0 0 2px var(--c-gold), 0 0 0 4px rgba(26, 20, 16, 0.4);
}

.alg-ico {
  width: 30px;
  height: 30px;
  display: block;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(250, 246, 239, 0.28);
  transition: box-shadow 0.18s var(--ease);
}
.alg-ico--lg { width: 34px; height: 34px; }

/* Nombre del alérgeno que aparece al tocar */
.alg-name {
  display: none;
  font-family: var(--f-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--c-ink);
  background: var(--c-gold);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-left: 0.35rem;
  white-space: nowrap;
}
.alg-name.is-on { display: inline-block; }

/* Nota bajo el título de una familia (p. ej. patrocinio de vinos) */
.familia-note {
  font-family: var(--f-body);
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-top: 0.9rem;
}

/* Hueco reservado cuando el plato aún no tiene foto:
   en vez de un cuadro vacío, un cubierto discreto */
.plato-thumb--empty {
  border: 1px solid rgba(250, 246, 239, 0.12);
  background: rgba(250, 246, 239, 0.05)
    url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(250,246,239,0.3)' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M7 3v8m0 0v10M5 3v5a2 2 0 0 0 4 0V3'/%3E%3Cpath d='M17 3c-1.5 1.5-2 3.5-2 5.5s.5 3 2 3.5v9'/%3E%3C/svg%3E")
    center / 26px 26px no-repeat;
  box-shadow: none;
}

/* Bloque informativo de alérgenos en la carta */
.alg-info { background: var(--c-bg-alt); }
.alg-legend {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.9rem 1.4rem;
  margin: 2.5rem 0 0;
  text-align: left;
}
.alg-legend-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.92rem;
  color: var(--c-ink-soft);
}
.alg-legend-item .alg-ico { box-shadow: 0 0 0 1px rgba(26, 20, 16, 0.12); flex: 0 0 auto; }
.alg-disclaimer {
  margin-top: 2.5rem;
  padding: 1.2rem 1.4rem;
  border-left: 3px solid var(--c-accent);
  background: rgba(138, 51, 36, 0.05);
  font-size: 0.92rem;
  color: var(--c-ink-soft);
  text-align: left;
  border-radius: 0 6px 6px 0;
}

/* ============================================
   Selector de idioma (cabecera, arriba a la derecha)
   ============================================ */

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: rgba(250, 246, 239, 0.75);
  backdrop-filter: blur(6px);
  flex: 0 0 auto;
}
.site-header.on-dark:not(.is-scrolled) .lang-switch {
  border-color: rgba(250, 246, 239, 0.4);
  background: rgba(26, 20, 16, 0.28);
}
.lang-opt {
  display: inline-flex;
  align-items: center;
  gap: 0.42em;
  padding: 0.3rem 0.62rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-family: var(--f-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--c-ink-soft);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.site-header.on-dark:not(.is-scrolled) .lang-opt { color: rgba(250, 246, 239, 0.8); }
.lang-opt svg { width: 18px; height: 13px; display: block; border-radius: 2px; flex: 0 0 auto; }
.lang-opt:hover { background: rgba(138, 51, 36, 0.1); }
.lang-opt.is-active {
  background: var(--c-accent);
  color: var(--c-cream);
  box-shadow: 0 2px 8px rgba(138, 51, 36, 0.3);
}
.site-header.on-dark:not(.is-scrolled) .lang-opt.is-active { color: var(--c-cream); }

/* En el header el orden es: marca · nav · idioma · hamburguesa */
.site-header { gap: 0.8rem; }
.nav { margin-left: auto; }
.lang-switch + .nav-toggle { margin-left: 0; }

@media (max-width: 860px) {
  .nav { margin-left: 0; }
  .lang-switch { margin-left: auto; margin-right: 0.2rem; }
  .lang-opt { padding: 0.28rem 0.5rem; font-size: 0.64rem; }
  .lang-opt svg { width: 16px; height: 12px; }
}

/* Menos ruido visual en el móvil para la fila de alérgenos */
@media (max-width: 560px) {
  .alg-ico { width: 32px; height: 32px; }
  .alg-chip { padding: 6px; }
  /* En pantalla estrecha el nombre ocupa su propia línea, así no
     empuja los iconos ni se corta */
  .alg-name { margin-left: 0; margin-top: 0.35rem; }
  .alg-name.is-on { display: block; width: 100%; }
  .alg-legend { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); font-size: 0.86rem; }
}

/* Los <em> de los titulares ahora vienen del diccionario de idiomas,
   así que su color se define aquí en vez de en línea */
.display:not(.hero-title) em { font-style: italic; color: var(--c-accent); }
.section-dark .display em,
.familia-header h2 em { color: var(--c-gold); }

/* Campo trampa antispam: fuera de la vista pero accesible para los bots */
.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
