/* ==========================================================================
   Los Gallegos — v7 "La Mesa Dorada"
   Dark, elegant, photo-led fine dining. Self-hosted fonts, no third parties.
   ThatsKrispy
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #100e0c;
  --bg-2: #161310;
  --panel: #1c1813;
  --line: rgba(201, 162, 94, 0.22);
  --line-soft: rgba(236, 229, 216, 0.08);
  --gold: #c9a25e;
  --gold-bright: #dcb877;
  --ink: #ece5d8;
  --ink-2: #bcb2a0;
  --ink-3: #93897a;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--gold); color: #14100a; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: 0.01em; }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); }
p { margin: 0 0 1em; }

.container { width: min(1160px, 92vw); margin-inline: auto; }
.container-wide { width: min(1400px, 94vw); margin-inline: auto; }
.container-narrow { width: min(760px, 90vw); margin-inline: auto; }

.section { padding: clamp(80px, 11vw, 150px) 0; }

/* Skip link */
.skip {
  position: absolute;
  left: -9999px; top: 0;
  background: var(--gold); color: #14100a;
  padding: 10px 18px; z-index: 200;
  font-family: var(--sans); font-size: 0.85rem;
}
.skip:focus { left: 12px; top: 12px; }
caption.skip { position: absolute; left: -9999px; }

/* ---------- Small-caps kicker + rules ---------- */
.kicker {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
}
.kicker--light { color: var(--gold-bright); }
.rule {
  width: 64px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 26px 0;
}
.rule--center { margin-inline: auto; }

.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head__lead { color: var(--ink-2); font-size: 1.05rem; margin-top: 10px; }

.text-link {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-bright);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: color 0.3s, border-color 0.3s;
}
.text-link:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 30px;
  font-family: var(--sans);
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s, border-color 0.35s;
  white-space: nowrap;
}
.btn--lg { padding: 16px 38px; }
.btn--gold { background: var(--gold); color: #14100a; border-color: var(--gold); }
.btn--gold:hover { background: transparent; color: var(--gold-bright); }
.btn--ghost { background: transparent; color: var(--ink); border-color: rgba(236, 229, 216, 0.4); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-bright); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 20px 0;
  background: linear-gradient(rgba(16, 14, 12, 0.55), transparent);
  transition: background 0.4s, padding 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(16, 14, 12, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line-soft);
  padding: 12px 0;
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name {
  font-family: var(--serif);
  font-size: 1.5rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink);
}
.brand__sub {
  font-size: 0.6rem; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--gold); margin-top: 3px;
}
.nav__links {
  display: flex; gap: 34px; list-style: none; margin: 0; padding: 0;
}
.nav__links a {
  font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-2);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
.nav__links a:hover { color: var(--gold-bright); border-bottom-color: var(--gold); }
.nav__links-cta { display: none; }
.nav__actions { display: flex; align-items: center; gap: 16px; }
.nav__toggle {
  display: none;
  background: none; border: 0; padding: 10px; cursor: pointer;
}
.nav__toggle span {
  display: block; width: 26px; height: 1.5px;
  background: var(--ink); margin: 7px 0;
  transition: transform 0.35s var(--ease), opacity 0.3s;
}
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  isolation: isolate;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover;
  animation: heroZoom 22s var(--ease) forwards;
}
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(16, 14, 12, 0.58), rgba(16, 14, 12, 0.38) 45%, var(--bg)),
    radial-gradient(ellipse at center, transparent 30%, rgba(16, 14, 12, 0.45));
}
.hero__inner { padding: 140px 24px 90px; max-width: 900px; }
.hero__title {
  font-size: clamp(2.5rem, 7.2vw, 6rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
}
.hero__sub {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  font-weight: 400;
  color: var(--ink-2);
  max-width: 620px;
  margin: 0 auto 40px;
  line-height: 1.5;
}
.hero__sub em { color: var(--gold-bright); }
.hero__actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.hero__scroll {
  position: absolute; bottom: 34px; left: 50%;
  transform: translateX(-50%);
  width: 1px; height: 56px;
  overflow: visible;
}
.hero__scroll span {
  position: absolute; inset: 0;
  background: linear-gradient(var(--gold), transparent);
  animation: scrollHint 2.4s ease-in-out infinite;
}
@keyframes scrollHint { 0%, 100% { transform: scaleY(0.4); transform-origin: top; } 50% { transform: scaleY(1); } }

/* ---------- Intro statement ---------- */
.intro { text-align: center; background: var(--bg); }
.intro__statement {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.6vw, 2.7rem);
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
  margin: 0;
}
.intro__statement em { color: var(--gold-bright); }
.intro .rule { margin-top: 40px; }

/* ---------- Signature dishes ---------- */
.platos { background: var(--bg-2); border-block: 1px solid var(--line-soft); }
.plato {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(36px, 6vw, 90px);
  align-items: center;
  padding: clamp(44px, 6vw, 80px) 0;
}
.plato + .plato { border-top: 1px solid var(--line-soft); }
.plato--flip .plato__media { order: 2; }
.plato__media { overflow: hidden; }
.plato__media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.plato:hover .plato__media img { transform: scale(1.04); }
.plato__num {
  font-family: var(--serif);
  font-size: 3rem; font-weight: 400;
  color: var(--gold);
  display: block; line-height: 1;
  margin-bottom: 18px;
}
.plato__body p:not(.kicker) { color: var(--ink-2); max-width: 46ch; }
.plato__body .text-link { display: inline-block; margin-top: 10px; }

/* ---------- Menu / La Carta ---------- */
.filter {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-bottom: 48px;
}
.filter button {
  background: transparent;
  border: 1px solid var(--line-soft);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  padding: 10px 20px;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.filter button:hover { color: var(--gold-bright); border-color: var(--line); }
.filter button.is-active { color: #14100a; background: var(--gold); border-color: var(--gold); }

.dishes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px 22px;
}
.dish.hide { display: none; }
.dish__img { overflow: hidden; background: var(--panel); }
.dish__img img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.dish:hover .dish__img img { transform: scale(1.06); }
.dish__body { padding: 14px 2px 16px; border-bottom: 1px solid var(--line-soft); }
.dish__tag {
  font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gold);
}
.dish__name {
  font-size: 1.25rem; font-weight: 500;
  margin: 5px 0 0;
}
.menu__note {
  text-align: center;
  color: var(--ink-3);
  font-size: 0.92rem;
  max-width: 560px;
  margin: 54px auto 0;
}

/* ---------- Interlude ---------- */
.interlude {
  position: relative;
  padding: clamp(120px, 16vw, 220px) 0;
  text-align: center;
  isolation: isolate;
  overflow: hidden;
}
.interlude__media { position: absolute; inset: 0; z-index: -1; }
.interlude__media img { width: 100%; height: 100%; object-fit: cover; }
.interlude__media::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(16, 14, 12, 0.72);
}
.interlude__quote {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.45;
  margin: 0;
}

/* ---------- Story / casa ---------- */
.casa__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.casa__media { overflow: hidden; border: 1px solid var(--line); padding: 14px; }
.casa__media img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; }
.casa__body p:not(.kicker) { color: var(--ink-2); }
.casa__actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 30px; }

/* ---------- Gallery ---------- */
.comedor { background: var(--bg-2); border-block: 1px solid var(--line-soft); }
.gallery {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-auto-rows: clamp(190px, 24vw, 250px);
  gap: 18px;
  margin-top: clamp(36px, 5vw, 60px);
}
.gallery figure { overflow: hidden; border: 1px solid var(--line-soft); position: relative; }
.gallery img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s var(--ease);
}
.gallery figure:hover img { transform: scale(1.05); }
.g-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 44px 20px 18px;
  font-family: var(--sans);
  font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold-bright);
  background: linear-gradient(to top, rgba(16, 14, 12, 0.82), rgba(16, 14, 12, 0));
  transform: translateY(8px); opacity: 0;
  transition: transform 0.6s var(--ease), opacity 0.6s var(--ease);
  pointer-events: none;
}
.gallery figure:hover .g-cap,
.gallery figure:focus-within .g-cap { transform: none; opacity: 1; }
.g-lead { grid-row: span 2; }

/* ---------- Reserve CTA ---------- */
.reserve { text-align: center; }
.reserve__lead { color: var(--ink-2); font-size: 1.05rem; }
.reserve__phone {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 400;
  color: var(--gold-bright);
  letter-spacing: 0.04em;
  margin: 18px 0 36px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  transition: color 0.3s, border-color 0.3s;
}
.reserve__phone:hover { color: var(--ink); border-color: var(--ink); }
.reserve__actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

/* ---------- Visit ---------- */
.visit { background: var(--bg-2); border-top: 1px solid var(--line-soft); }
.visit__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  max-width: 960px;
  margin-inline: auto;
}
.visit__card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  padding: clamp(28px, 4vw, 44px);
}
.visit__card h3 {
  font-family: var(--sans);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold);
  margin: 26px 0 10px;
}
.visit__card h3:first-child { margin-top: 0; }
.visit__card p { color: var(--ink-2); }
.amenities { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.amenities li {
  font-size: 0.78rem;
  color: var(--ink-2);
  border: 1px solid var(--line-soft);
  padding: 6px 13px;
}
.hours { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.hours th, .hours td { padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.hours th { text-align: left; font-weight: 500; color: var(--ink); }
.hours td { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hours tr.is-today th, .hours tr.is-today td { color: var(--gold-bright); font-weight: 600; }
.visit__note { font-size: 0.82rem; color: var(--ink-3); margin: 16px 0 0; }

/* ---------- Footer ---------- */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--line-soft);
  padding: 70px 0 40px;
  font-size: 0.92rem;
}
.footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line-soft);
}
.footer__brand p { color: var(--ink-3); max-width: 40ch; margin-top: 14px; }
.footer h4 {
  font-family: var(--sans);
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 16px;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer ul li { margin-bottom: 10px; color: var(--ink-2); }
.footer ul a { color: var(--ink-2); }
.footer ul a:hover { color: var(--gold-bright); }
.footer__social { display: flex; gap: 14px; margin-top: 18px; }
.footer__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line-soft);
  color: var(--ink-2);
  transition: color 0.3s, border-color 0.3s;
}
.footer__social a:hover { color: var(--gold-bright); border-color: var(--line); }
.footer__social svg { width: 17px; height: 17px; }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  padding-top: 26px;
  color: var(--ink-3);
  font-size: 0.8rem;
}
.footer__bottom p { margin: 0; }
.footer__legal { display: flex; flex-wrap: wrap; gap: 18px; }
.footer__legal a { color: var(--ink-3); }
.footer__legal a:hover { color: var(--gold-bright); }

/* ---------- Mobile call bar ---------- */
.callbar {
  position: fixed; inset: auto 0 0 0; z-index: 90;
  display: none;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(16, 14, 12, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-soft);
}
.callbar .btn { flex: 1; padding: 13px 10px; }

/* ---------- Consent ---------- */
.consent {
  position: fixed; z-index: 110;
  bottom: 20px; right: 20px;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 24px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.consent.show { opacity: 1; transform: none; }
.consent h2 { font-size: 1.25rem; margin-bottom: 8px; }
.consent p { font-size: 0.86rem; color: var(--ink-2); }
.consent__actions { display: flex; gap: 10px; }
.consent .btn { padding: 10px 20px; font-size: 0.7rem; }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }
.reveal[data-delay="3"] { transition-delay: 0.36s; }
.reveal.in { opacity: 1; transform: none; }

.sr-live { position: absolute; left: -9999px; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .dishes { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 210px; }
  .g-lead { grid-column: 1 / -1; grid-row: auto; }
}

@media (max-width: 860px) {
  .nav__links {
    position: fixed; inset: 0;
    background: rgba(16, 14, 12, 0.98);
    flex-direction: column;
    align-items: center; justify-content: center;
    gap: 30px;
    transform: translateY(-102%);
    transition: transform 0.5s var(--ease);
    visibility: hidden;
  }
  body.nav-open .nav__links { transform: none; visibility: visible; }
  .nav__links a { font-size: 1rem; letter-spacing: 0.3em; }
  .nav__links-cta { display: block; margin-top: 12px; }
  .nav__links-cta a { color: var(--gold-bright); }
  .nav__toggle { display: block; position: relative; z-index: 5; }
  .nav__actions .btn { display: none; }

  .plato, .plato--flip { grid-template-columns: 1fr; gap: 26px; }
  .plato--flip .plato__media { order: 0; }
  .casa__grid { grid-template-columns: 1fr; }
  .visit__grid { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; gap: 36px; }
  .callbar { display: flex; }
  .footer { padding-bottom: 150px; }
  .consent { left: 16px; right: 16px; bottom: 86px; max-width: none; }
}

@media (max-width: 600px) {
  .dishes { grid-template-columns: repeat(2, 1fr); gap: 24px 14px; }
  .dish__name { font-size: 1.05rem; }
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 200px; gap: 12px; }
  .g-lead { grid-column: auto; }
  .hero__actions .btn, .reserve__actions .btn { width: 100%; max-width: 320px; }
  .brand__name { font-size: 1.2rem; }
  .brand__sub { font-size: 0.52rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__media img { animation: none; }
  .hero__scroll span { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .plato__media img, .dish__img img, .gallery img { transition: none; }
  .consent { transition: none; }
}
