/* ============================================================
   TERRENAL — Hoja de Estilos Principal
   Restaurante · Eventos
   ============================================================ */

/* ── Reset & Variables ─────────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --gold: #B8964E;
  --gold-light: #D4B483;
  --gold-pale: #E8D5A8;
  --dark: #0A0906;
  --dark2: #131109;
  --dark3: #1C1810;
  --cream: #F5F0E8;
  --cream-muted: #C8BDA8;
  --text-muted: #A59A86;
  --nav-offset: calc(52px + max(0.8rem, env(safe-area-inset-top)) + 0.8rem + 1px);
}

html { scroll-behavior: smooth; }

body {
  background: var(--dark);
  color: var(--cream);
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
}

::selection { background: var(--gold); color: var(--dark); }

:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 4px;
}

section[id], .stats, #reservar { scroll-margin-top: var(--nav-offset); }

.site-content { width: 100%; max-width: 100%; }

.skip-link {
  position: fixed;
  top: -4rem;
  left: 1rem;
  z-index: 110;
  padding: 0.75rem 1rem;
  background: var(--cream);
  color: var(--dark);
  text-decoration: none;
}

.skip-link:focus { top: 1rem; }

/* ── Navegación ─────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: max(0.8rem, env(safe-area-inset-top)) max(4rem, env(safe-area-inset-right)) 0.8rem max(4rem, env(safe-area-inset-left));
  background: rgba(10, 9, 6, 0.92);
  border-bottom: 1px solid rgba(184, 150, 78, 0.12);
}

.logo img {
  display: block;
  height: 52px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--cream-muted);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: color 0.3s;
}

.nav-links a:link,
.nav-links a:visited { color: var(--cream-muted); }

.nav-links a:hover { color: var(--gold); }

.mobile-nav { display: none; }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  height: auto;
  min-height: min(88svh, 52rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 1.5rem 2rem 3rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(184,150,78,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at center, #1a1408 0%, var(--dark) 70%);
}

.hero-mountains {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 35%;
  background: linear-gradient(to top, rgba(184,150,78,0.04), transparent);
  mask-image: linear-gradient(to top, black 40%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-heading {
  width: 100%;
  max-width: 60rem;
  color: var(--cream);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.8rem, 6.4vw, 5.6rem);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: -0.6rem 0 0.5rem;
}

.hero-logo {
  display: block;
  width: min(480px, 80vw);
  margin-bottom: 2rem;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.3));
}

.hero-tagline {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.75rem;
}

.hero-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.hero-divider-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold));
}

.hero-divider-line.right {
  background: linear-gradient(to left, transparent, var(--gold));
}

.hero-divider-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  margin-top: 1.25rem;
}

.hero-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 44px;
  padding: .5rem .25rem;
  color: var(--gold-light);
  font-size: .875rem;
  text-decoration: none;
  text-underline-offset: .3em;
  transition: color .2s;
}

.hero-socials a:hover {
  color: var(--cream);
  text-decoration: underline;
}

.hero-socials svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ── Botones ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.75rem 1.8rem;
  font-family: 'Jost', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.35s;
}

.btn-primary { background: var(--gold); color: var(--dark); font-weight: 400; }
.btn-primary:hover { background: var(--gold-light); }

.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(184, 150, 78, 0.35);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ── Secciones (Base) ───────────────────────────────────────── */
section { padding: 5.5rem 4rem; }

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--cream);
}

.section-title em { font-style: italic; color: var(--gold-light); }

.gold-divider { width: 40px; height: 1px; background: var(--gold); margin: 2rem 0; }

.section-title--narrow { max-width: 32rem; margin: 0 auto; }
.section-divider--center { margin: 2rem auto; }

/* ── Historia ───────────────────────────────────────────────── */
.about {
  background: var(--dark2);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
  padding-block: 4rem;
}

.about-visual {
  position: relative;
  min-height: 360px;
  height: auto;
  aspect-ratio: 1.18 / 1;
}

.about-frame {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(184, 150, 78, 0.15);
}

.about-frame-inner {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(184, 150, 78, 0.07);
}

.about-logo-display {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.about-logo-display img {
  width: 100%;
  max-width: 320px;
  opacity: 0.18;
}

.generation-badge {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  background: rgba(184,150,78,0.08);
  border: 1px solid rgba(184,150,78,0.2);
  padding: 1rem 1.5rem;
  text-align: center;
}

.generation-badge .num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  color: var(--gold);
  line-height: 1;
  display: block;
}

.generation-badge .label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-top: 0.3rem;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.about-text p {
  color: var(--cream-muted);
  line-height: 1.8;
  font-size: 1rem;
}

.about-text .section-label { color: var(--gold-light); }

.about-menu-link { align-self: flex-start; margin-top: 0.25rem; }

.heritage-quote {
  border-left: 1px solid var(--gold);
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

.heritage-quote p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem !important;
  font-style: italic;
  color: var(--gold-pale) !important;
  line-height: 1.6 !important;
}

/* ── Stats ──────────────────────────────────────────────────── */
.stats {
  background: var(--dark3);
  padding: 4.5rem 4rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  padding: 2rem;
  text-align: center;
  border-right: 1px solid rgba(184, 150, 78, 0.08);
}

.stat:last-child { border-right: none; }

.stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.2rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
}

.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ── Carta ──────────────────────────────────────────────────── */
.menu {
  --paper-ink: #352B1D;
  --paper-muted: #655846;
  background: var(--dark);
  overflow: clip;
  text-align: center;
  padding-block: 1.25rem 3rem;
}

.menu [hidden] { display: none !important; }
.menu-title, .menu-chapter-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.menu-book-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 45rem;
  margin: 0 auto 0.9rem;
}

.menu-chapter-label { color: var(--cream-muted); font-size: 0.85rem; }
.menu-book-tools select {
  min-height: 2.75rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.5rem 2rem 0.5rem 0.8rem;
  border: 1px solid rgba(184, 150, 78, 0.4);
  border-radius: 0;
  background: var(--dark2);
  color: var(--cream);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.menu-reading-toggle {
  flex-shrink: 0;
  min-height: 2.75rem;
  padding: 0.5rem 0;
  border: 0;
  background: transparent;
  color: var(--gold-light);
  font: inherit;
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 0.35em;
  cursor: pointer;
}

.menu-book-shell { max-width: 45rem; margin-inline: auto; }
.menu-book { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; text-align: left; }
.menu-book.is-interactive {
  position: relative;
  min-width: 0 !important;
  width: 100%;
  display: block;
  isolation: isolate;
  margin-inline: auto;
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.45);
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.menu-book.is-interactive .stf__wrapper { height: var(--book-height, 700px); }

.menu-book.is-interactive::before {
  content: '';
  position: absolute;
  inset: -0.35rem;
  z-index: -1;
  background: #332A1B;
}

.is-interactive .book-page { min-height: 0; }

.menu-book-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 45rem;
  margin: 1rem auto 0;
  -webkit-user-select: none;
  user-select: none;
}

.menu-page-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid rgba(184, 150, 78, 0.4);
  background: transparent;
  color: var(--gold-light);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.menu-page-control svg, .menu-action svg { width: 1.2rem; height: 1.2rem; }
.menu-page-control:hover:not(:disabled) { color: var(--cream); border-color: var(--cream); }
.menu-page-control:disabled, .menu-page-control[aria-disabled="true"] { opacity: 0.4; cursor: default; }
.menu-book-position { color: var(--cream-muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.menu-book-hint { margin-top: 1rem; color: var(--text-muted); font-size: 0.8rem; }
.menu-action { margin-top: 2rem; text-align: center; }
.menu-action p { margin-bottom: 1rem; color: var(--cream-muted); font-size: 0.85rem; }
.menu-action .btn { gap: 1rem; }

.menu-reading-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; text-align: left; }
.menu-reading-list .book-page { min-height: 0; }
.menu-reading-list .book-page-content { overflow: visible; }
.menu-reading-list .book-page-footer { display: none; }

@media (max-width: 600px) {
  .menu { padding-inline: 1rem; }
  .menu-book, .menu-reading-list { grid-template-columns: 1fr; }
  .menu-book-tools select { flex: 1; font-size: 0.8rem; }
  .menu-reading-toggle { font-size: 0.8rem; }
  .menu-book-controls { gap: 0.35rem; }
  .menu-page-control { padding: 0.5rem 0.6rem; font-size: 0.75rem; gap: 0.35rem; }
  .menu-book-position { font-size: 0.75rem; }
  .menu-book-hint { max-width: 32ch; margin-inline: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .menu-book.is-interactive { pointer-events: none; }
}

/* ── Eventos ────────────────────────────────────────────────── */
.events {
  background: var(--dark2);
  padding-block: clamp(4.5rem, 8vw, 7rem);
}

.events-shell { max-width: 88rem; margin-inline: auto; }

.events-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.events-title {
  max-width: 23ch;
  font-size: clamp(3rem, 5.8vw, 5rem);
  line-height: 1.03;
}

.events-lead {
  max-width: 56ch;
  margin-top: 1rem;
  color: var(--cream-muted);
  font-size: 1rem;
  line-height: 1.75;
}

.events-gallery-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.85rem;
  min-height: 2.75rem;
  padding-bottom: 0.3rem;
  color: var(--gold-light);
  font-size: 0.875rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(184, 150, 78, 0.4);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.events-gallery-link:hover { color: var(--cream); border-color: var(--cream); }
.events-gallery-link svg, .events-contact svg { width: 1.25rem; height: 1.25rem; }

.events-experience {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(19rem, 1fr);
  align-items: stretch;
  gap: clamp(2rem, 5vw, 5rem);
}

.events-visual {
  position: relative;
  min-width: 0;
  min-height: 30rem;
  overflow: hidden;
  background: var(--dark3);
}

.events-image-stage { position: absolute; inset: 0; }

.events-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.045);
  transition: opacity 0.45s ease, transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.events-image[data-event-image="bodas"] { object-position: center 67%; }
.events-image.is-active { opacity: 1; transform: scale(1); }

.events-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 9, 6, 0.92));
}

.events-caption {
  position: absolute;
  right: clamp(1.25rem, 3vw, 2.5rem);
  bottom: clamp(1.25rem, 3vw, 2rem);
  left: clamp(1.25rem, 3vw, 2.5rem);
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--cream);
}

.events-caption span:first-child {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  line-height: 1.1;
}

.events-caption span:last-child { color: var(--cream-muted); font-size: 0.875rem; }
.events-planner { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.events-options { border-top: 1px solid rgba(184, 150, 78, 0.3); }
.event-option { position: relative; border-bottom: 1px solid rgba(184, 150, 78, 0.3); }

.event-option::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gold-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.event-option[open]::after { transform: scaleX(1); }

.event-option summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5.25rem;
  padding: 1.25rem 0;
  cursor: pointer;
  list-style: none;
  color: var(--cream-muted);
  transition: color 0.2s ease;
}

.event-option summary::-webkit-details-marker { display: none; }
.event-option summary::marker { content: ''; }
.event-option summary:hover, .event-option[open] summary { color: var(--gold-light); }
.event-option summary svg { width: 1.3rem; height: 1.3rem; flex: 0 0 auto; transition: transform 0.25s ease; }
.event-option[open] summary svg { transform: rotate(45deg); }

.event-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.65rem, 2.7vw, 2.2rem);
  font-weight: 400;
  line-height: 1.12;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .event-option summary:hover .event-name { transform: translateX(4px); }
}

.event-desc {
  max-width: 42ch;
  padding: 0 1.75rem 1.5rem 0;
  font-size: 1rem;
  color: var(--cream-muted);
  line-height: 1.75;
}

.events-action { padding-top: 2rem; }
.events-action p { margin-bottom: 1rem; color: var(--cream-muted); font-size: 0.875rem; }
.events-contact { width: 100%; min-height: 3.5rem; justify-content: space-between; }

/* ── Galería ────────────────────────────────────────────────── */
.gallery {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: var(--dark);
  padding-block: clamp(4.5rem, 8vw, 7rem);
}

/* A small image sample carries the photograph's light into the surface. */
.gallery-atmosphere {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.gallery-atmosphere-stage {
  position: sticky;
  top: var(--nav-offset);
  height: calc(100svh - var(--nav-offset));
  overflow: hidden;
}

.gallery-atmosphere-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 9, 6, 0.94), rgba(10, 9, 6, 0.25) 65%),
    linear-gradient(180deg, var(--dark), transparent 22%, transparent 72%, var(--dark));
}

.gallery-atmosphere-light {
  position: absolute;
  inset: -3rem;
  transform: translate3d(var(--atmosphere-x, 0px), var(--atmosphere-y, 0px), 0);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-atmosphere-layer {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: blur(32px) saturate(1.15);
  opacity: 0;
  transition: opacity 0.65s ease;
}

.gallery-atmosphere-layer.is-active { opacity: 0.48; }

.gallery-layout {
  display: grid;
  grid-template-columns: minmax(15rem, 0.78fr) minmax(0, 1.55fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
  max-width: 88rem;
  margin-inline: auto;
}

.gallery-intro {
  position: sticky;
  top: calc(var(--nav-offset) + 2rem);
  padding-bottom: 1rem;
}

.gallery-title {
  max-width: 14ch;
  font-size: clamp(3rem, 4.7vw, 4.6rem);
  line-height: 1.06;
  text-wrap: balance;
}

.gallery-title em { color: var(--gold-light); }

.gallery-lead {
  max-width: 37ch;
  margin-top: 1.5rem;
  color: var(--cream-muted);
  font-size: 1rem;
  line-height: 1.75;
}

.gallery-filters {
  display: grid;
  gap: 0;
  margin-top: 2rem;
  border-top: 1px solid rgba(184, 150, 78, 0.28);
}

.gallery-filter {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  display: flex;
  min-height: 3.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.15rem;
  border: 0;
  border-bottom: 1px solid rgba(184, 150, 78, 0.28);
  background: transparent;
  color: var(--cream-muted);
  cursor: pointer;
  font-family: 'Jost', sans-serif;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.gallery-filter::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: var(--gold-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-filter:hover,
.gallery-filter[aria-pressed="true"] { color: var(--gold-pale); }
.gallery-filter[aria-pressed="true"]::after { transform: scaleX(1); }

.gallery-filter-count {
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.gallery-status {
  min-height: 1.5rem;
  margin-top: 1rem;
  color: var(--cream-muted);
  font-size: 0.8rem;
}

.gallery-hint {
  margin-top: 0.4rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.gallery-content { min-width: 0; }

.gallery-grid {
  --gallery-gap: clamp(1rem, 1.8vw, 1.5rem);
  display: block;
  columns: 2;
  column-gap: var(--gallery-gap);
}

.gallery-photo {
  display: block;
  min-width: 0;
  margin: 0 0 var(--gallery-gap);
  break-inside: avoid;
}
.gallery-photo[hidden] { display: none; }
.gallery-photo[data-layout="lead"] { column-span: all; }

.gallery-photo-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--dark3);
  color: var(--cream);
  cursor: zoom-in;
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.28);
  transform: perspective(1000px) rotateX(var(--photo-tilt-x, 0deg)) rotateY(var(--photo-tilt-y, 0deg));
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-photo-button img {
  display: block;
  width: 100%;
  height: auto;
}

.gallery-photo[data-layout="lead"] .gallery-photo-button { aspect-ratio: 16 / 10; }
.gallery-photo[data-layout="lead"] img { height: 100%; object-fit: cover; }

.gallery-photo-open {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(10, 9, 6, 0.86);
  font-family: 'Jost', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-photo-open svg { width: 1.1rem; height: 1.1rem; }
.gallery-photo-button:hover .gallery-photo-open,
.gallery-photo-button:focus-visible .gallery-photo-open,
.gallery-photo[data-layout="lead"] .gallery-photo-open { opacity: 1; transform: translateY(0); }

@media (hover: none) {
  .gallery-photo-open { right: 0.5rem; bottom: 0.5rem; opacity: 1; transform: none; }
  .gallery-photo-open span { display: none; }
}

dialog.gallery-lightbox:not([open]) { display: none; }

/* Repeated navigation clicks must not select the counter or photograph. */
.gallery-lightbox,
.gallery-lightbox * {
  -webkit-user-select: none;
  user-select: none;
}

.gallery-lightbox[open] {
  position: fixed;
  inset: 0;
  margin: auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 1rem;
  width: min(94vw, 76rem);
  height: fit-content;
  max-width: none;
  max-height: calc(100dvh - 2rem);
  padding: clamp(0.9rem, 2vw, 1.5rem);
  border: 1px solid rgba(184, 150, 78, 0.28);
  background: var(--dark2);
  color: var(--cream);
}

.gallery-lightbox::backdrop { background: rgba(4, 3, 2, 0.92); }

.gallery-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.gallery-lightbox-title {
  color: var(--cream);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.1;
}

.gallery-lightbox-position {
  margin-top: 0.25rem;
  color: var(--gold-light);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.gallery-lightbox-close,
.gallery-lightbox-control {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(184, 150, 78, 0.35);
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-control:hover:not(:disabled) {
  border-color: var(--gold);
  background: rgba(184, 150, 78, 0.1);
  color: var(--gold-pale);
}

.gallery-lightbox-close svg,
.gallery-lightbox-control svg { display: block; width: 1.4rem; height: 1.4rem; }

.gallery-lightbox-control:disabled {
  color: var(--text-muted);
  cursor: default;
  opacity: 0.45;
}

.gallery-lightbox-view {
  display: grid;
  min-height: 0;
  grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem;
  align-items: center;
  justify-items: center;
  gap: clamp(0.5rem, 1.5vw, 1.25rem);
}

.gallery-lightbox-image {
  display: block;
  width: 100%;
  height: min(76dvh, 48rem);
  object-fit: contain;
  background: var(--dark);
}

/* ── Reservas y contacto ─────────────────────────────────────── */
.contact {
  position: relative;
  background: var(--dark2);
  border-top: 1px solid rgba(184, 150, 78, 0.18);
  padding-block: clamp(3rem, 5vw, 5rem);
}

.contact-anchor { position: absolute; top: 0; left: 0; width: 1px; height: 1px; scroll-margin-top: var(--nav-offset); }
.contact-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: 'reservation visit' 'hours visit'; align-items: start; column-gap: clamp(2.5rem, 6vw, 5rem); max-width: 76rem; margin-inline: auto; }
.contact-reservation { grid-area: reservation; }
.contact-visit { grid-area: visit; display: flex; flex-direction: column; }
.contact-visit .contact-location { order: 0; }
.contact-visit .map-container { order: 1; }
.contact-visit .contact-directions { order: 2; }
.contact-title { max-width: 15ch; font: 400 clamp(2.4rem, 4vw, 3.25rem)/1.05 'Cormorant Garamond', serif; }
.contact-title em { color: var(--gold-light); font-weight: 300; }
.contact-intro { max-width: 40ch; margin-top: 1rem; color: var(--cream-muted); font-size: 1rem; line-height: 1.65; }
.reservation-actions { margin-top: 1.5rem; }
.reservation-submit { width: 100%; min-height: 3.5rem; margin-top: 0; padding: 0.9rem 1rem; justify-content: center; gap: 0.75rem; font-size: 0.9375rem; font-weight: 400; letter-spacing: 0.03em; text-transform: none; }
.reservation-submit svg { width: 1.125rem; height: 1.125rem; flex: 0 0 auto; }
.reservation-submit .reservation-arrow { margin-left: auto; }
.contact-direct { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.contact-direct a { display: flex; align-items: center; gap: 0.7rem; min-width: 0; min-height: 3rem; color: var(--cream-muted); text-decoration: none; font-size: 0.8rem; line-height: 1.5; }
.contact-direct strong { color: var(--cream); font-size: 0.9375rem; font-weight: 400; }
.contact-direct svg { width: 1.2rem; height: 1.2rem; flex: 0 0 auto; }
.contact-direct a:hover strong { color: var(--gold-light); }
.contact-hours { grid-area: hours; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid rgba(184, 150, 78, 0.25); }
.contact-hours h3 { margin-bottom: 0.65rem; color: var(--cream); font: 400 1.5rem/1.2 'Cormorant Garamond', serif; }
.contact-hours dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-block: 0.4rem; color: var(--cream-muted); font-size: 0.875rem; line-height: 1.5; }
.contact-hours dd { flex-shrink: 0; color: var(--cream); font-variant-numeric: tabular-nums; }
.contact-location { display: flex; justify-content: space-between; align-items: start; gap: 1.5rem; margin-bottom: 1.25rem; }
.contact-location h3 { color: var(--cream); font: 400 2rem/1.1 'Cormorant Garamond', serif; }
.contact-location p { color: var(--cream); font-size: 0.9375rem; line-height: 1.6; }
.contact-location p span { color: var(--cream-muted); font-size: 0.875rem; }
.map-container { min-width: 0; background: var(--dark3); }
.map-frame { display: block; width: 100%; height: 23rem; min-height: 0; border: 0; }
.contact-directions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; margin-top: 0.8rem; }
.contact-directions a { display: inline-flex; align-items: center; gap: 0.75rem; min-height: 2.75rem; color: var(--gold-light); font-size: 0.875rem; text-decoration: underline; text-underline-offset: 0.35rem; text-decoration-color: rgba(184, 150, 78, 0.4); }
.contact-directions a:hover { color: var(--cream); text-decoration-color: var(--cream); }
.contact-directions svg { width: 1.2rem; height: 1.2rem; }

@media (max-width: 960px) {
  .contact-shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'reservation' 'hours' 'visit'; max-width: 38rem; }
  .contact-visit { margin-top: 2.75rem; }
  .contact-title { max-width: none; }
  .map-frame { height: 20rem; }
}

@media (max-width: 768px) {
  .contact-shell { grid-template-areas: 'reservation' 'visit' 'hours'; }
  .contact-visit .contact-directions { order: 1; margin: 0 0 1rem; }
  .contact-visit .map-container { order: 2; }
}

@media (max-width: 480px) {
  .contact-direct { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
  .contact-direct a { min-height: 3rem; }
  .contact-direct a:last-child { justify-content: space-between; }
  .contact-hours dl > div { gap: 0.75rem; font-size: 0.8rem; }
  .contact-location { display: block; }
  .contact-location p { margin-top: 0.65rem; }
  .map-frame { height: 16rem; }
  .reservation-submit { font-size: 0.875rem; letter-spacing: 0; }
}

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  background: var(--dark2);
  border-top: 1px solid rgba(184, 150, 78, 0.1);
  padding: 3rem 4rem 6rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}

.footer-logo img { height: 44px; }

.footer-copy {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-align: center;
}

.footer-socials {
  display: flex;
  gap: 1.5rem;
  justify-content: flex-end;
}

.footer-socials a {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-socials a:hover { color: var(--gold); }

.whatsapp-float {
  position: fixed;
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 95;
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  gap: 0.65rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: #12613A;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.whatsapp-float svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.whatsapp-float:hover {
  background: #0D5230;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
  transform: translateY(-2px);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --nav-offset: calc(44px + max(0.375rem, env(safe-area-inset-top)) + 0.375rem + 1px); }
  nav { padding: max(0.375rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 0.375rem max(1rem, env(safe-area-inset-left)); background: var(--dark); }
  .logo { display: flex; align-items: center; min-height: 44px; }
  .logo img { height: 34px; }
  .nav-links { display: none; }
  .mobile-nav { display: block; position: relative; }
  .mobile-nav-toggle {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0 0.75rem;
    border: 1px solid rgba(184, 150, 78, 0.35);
    color: var(--cream);
    cursor: pointer;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    list-style: none;
    text-transform: uppercase;
  }
  .mobile-nav-toggle::-webkit-details-marker { display: none; }
  .mobile-nav-toggle::marker { content: ''; }
  .mobile-nav-toggle svg { width: 18px; height: 18px; }
  .mobile-nav-links {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: min(20rem, calc(100vw - 2.5rem));
    padding: 0.5rem 1rem;
    list-style: none;
    background: var(--dark2);
    border: 1px solid rgba(184, 150, 78, 0.25);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
  }
  .mobile-nav-links a {
    min-height: 48px;
    display: flex;
    align-items: center;
    color: var(--cream-muted);
    border-bottom: 1px solid rgba(184, 150, 78, 0.1);
    font-size: 0.86rem;
    letter-spacing: 0.08em;
    text-decoration: none;
  }
  .mobile-nav-links a:link,
  .mobile-nav-links a:visited { color: var(--cream-muted); }
  .mobile-nav-links li:last-child a { border-bottom: 0; color: var(--gold-light); }
  .mobile-nav-links a:hover { color: var(--gold-light); }
  section { padding: 4.25rem 1.5rem; }
  .about { grid-template-columns: 1fr; }
  .about { gap: 2.25rem; padding-block: 3rem; }
  .about-visual { height: clamp(15rem, 70vw, 22rem); min-height: 0; aspect-ratio: auto; }
  .events-heading { display: block; margin-bottom: 1.75rem; }
  .events-title { font-size: clamp(2.6rem, 8.5vw, 4rem); }
  .events-gallery-link { margin-top: 1rem; }
  .events-experience { grid-template-columns: 1fr; gap: 1.75rem; }
  .events-visual { min-height: 0; aspect-ratio: 4 / 3; }
  .event-option summary { min-height: 4.5rem; }
  .event-name { font-size: clamp(1.8rem, 6vw, 2.25rem); }
  .events-action { padding-top: 1.5rem; }
  .gallery-layout { grid-template-columns: 1fr; gap: 2.25rem; }
  .gallery-intro { position: static; }
  .gallery-title { max-width: 18ch; }
  .gallery-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-top: 1.5rem; }
  .gallery-filter { min-height: 3rem; padding-inline: 0.15rem; font-size: 0.78rem; letter-spacing: 0.07em; }
  .gallery-title { font-size: clamp(2.6rem, 8.5vw, 4rem); }
  .gallery-title br { display: none; }
  .gallery-atmosphere-layer { filter: blur(24px); }
  .gallery-atmosphere-layer.is-active { opacity: 0.32; }
  .gallery-grid { --gallery-gap: 0.75rem; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { border-right: none; border-bottom: 1px solid rgba(184,150,78,0.08); }
  footer {
    grid-template-columns: 1fr;
    text-align: center;
    padding-bottom: max(6rem, calc(5rem + env(safe-area-inset-bottom)));
  }
  .footer-socials { justify-content: center; }
  .hero-logo { width: min(320px, 85vw); }
  .hero { min-height: max(34rem, 88svh); height: auto; padding: 6rem 1.5rem 3rem; }
  .hero-heading { max-width: 16ch; font-size: clamp(2.75rem, 11vw, 4rem); }
  .hero-tagline { margin-bottom: 1.5rem; letter-spacing: clamp(0.08em, 0.6vw, 0.3em); }
  .hero-btns { width: 100%; }
  .hero-btns .btn { justify-content: center; flex: 1 1 12rem; }
  .gallery-lightbox[open] { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); padding: 0.75rem; }
  .gallery-lightbox-view { grid-template-columns: 2.25rem minmax(0, 1fr) 2.25rem; gap: 0.35rem; }
  .gallery-lightbox-control,
  .gallery-lightbox-close { width: 2.25rem; height: 2.25rem; }
  .gallery-lightbox-image { height: 72dvh; }
}

@media (max-width: 560px) {
  .stats { padding: 2rem 1rem; }
  .stat { padding: 1.5rem 0.5rem; }
  .stat-num { font-size: 2.7rem; }
  .footer-copy { max-width: 34ch; margin: 0 auto; line-height: 1.7; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .about { gap: 3rem; }
  section { padding-inline: 2.5rem; }
}

@media (min-width: 769px) and (max-width: 1120px) {
  nav { padding-inline: 2rem; }
  .logo img { height: 46px; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.7rem; letter-spacing: 0.13em; }
  .gallery-layout { grid-template-columns: minmax(13rem, 0.72fr) minmax(0, 1.5fr); gap: 2.25rem; }
  .gallery-grid { --gallery-gap: 1rem; }
}

@media (min-width: 769px) and (max-width: 900px) {
  .gallery-layout { grid-template-columns: 1fr; gap: 2rem; }
  .gallery-intro { position: static; }
  .gallery-title { max-width: 20ch; }
  .gallery-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid { --gallery-gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery-atmosphere-light, .gallery-photo-button, .events-image { transform: none; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
