/* =========================================================
   La Mesa de Olmo — estilos
   Mobile first. Breakpoints: 640px, 900px, 1200px
   ========================================================= */

:root {
  --bg: #14110F;
  --bg-soft: #1C1815;
  --bg-card: #221D19;
  --text: #F3EBDD;
  --text-muted: #BFB4A3;
  --accent: #C8702A;
  --accent-hover: #DB8239;
  --line: rgba(243, 235, 221, 0.14);

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --header-h: 68px;
  --mobile-bar-h: 72px;
  --radius: 4px;
  --section-space: clamp(5rem, 12vw, 9rem);
  --gutter: 1.25rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--mobile-bar-h);
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  letter-spacing: 0.01em;
}

h2 { font-size: clamp(2.25rem, 6vw, 3.5rem); }

p { margin: 0; }

figure { margin: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 36rem;
}

.section { padding-block: var(--section-space); }

.section-head {
  text-align: center;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.8rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }

.btn-outline {
  border-color: rgba(243, 235, 221, 0.55);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-sm { min-height: 40px; padding: 0.5rem 1rem; font-size: 0.875rem; }

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- 1. Cabecera ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: background-color 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(20, 17, 15, 0.96);
  border-bottom-color: var(--line);
}

@supports (backdrop-filter: blur(8px)) {
  .site-header.is-scrolled { background: rgba(20, 17, 15, 0.85); backdrop-filter: blur(8px); }
  /* backdrop-filter rompería la posición fija del menú móvil */
  .site-header.is-open { background: rgba(20, 17, 15, 0.96); backdrop-filter: none; }
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  margin-right: auto;
}

.header-cta { display: none; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Menú móvil desplegable */
.main-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  padding: 2rem var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s, visibility 0.25s;
}
.main-nav.is-open { visibility: visible; opacity: 1; }

.main-nav ul { display: flex; flex-direction: column; }
.main-nav li a {
  display: block;
  padding: 1rem 0;
  font-family: var(--font-display);
  font-size: 1.9rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.main-nav li a:hover { color: var(--accent); }

body.nav-open { overflow: hidden; }

/* ---------- 2. Portada ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-img,
.band-img,
.reserve-img,
.menu-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 17, 15, 0.55) 0%, rgba(20, 17, 15, 0.45) 40%, rgba(20, 17, 15, 0.92) 100%);
}

.hero-content {
  position: relative;
  padding-top: var(--header-h);
  padding-bottom: 3rem;
}

.hero h1 {
  font-size: clamp(3.25rem, 13vw, 7rem);
  font-weight: 600;
  line-height: 1;
}

.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.4rem, 4.5vw, 2rem);
  margin: 1rem 0 2.25rem;
  color: var(--text);
}

/* ---------- 3. Accesos rápidos ---------- */

.quick {
  position: relative;
  z-index: 2;
  margin-top: -2rem;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  height: 100%;
  min-height: 110px;
  padding: 1.25rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  transition: border-color 0.2s, color 0.2s;
}
.quick-card .icon { width: 30px; height: 30px; color: var(--accent); }
.quick-card:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 4. Sobre nosotros ---------- */

.about-grid {
  display: grid;
  gap: 3rem;
}

.about-text h2 { margin-bottom: 1.5rem; }
.about-text .lead { margin-bottom: 2rem; }

.about-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ---------- 5. Platos estrella ---------- */

.dishes { background: var(--bg-soft); }

/* Móvil y tablet: carrusel horizontal solo con CSS */
.dish-grid {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  /* A sangre hasta el borde de la pantalla, conservando el margen lateral */
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
}
.dish-grid::-webkit-scrollbar { display: none; }

.dish-card {
  flex: 0 0 80vw;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
}

.dish-media { position: relative; }
.dish-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(20, 17, 15, 0.85);
  color: var(--text);
  border: 1px solid var(--accent);
  padding: 0.3rem 0.7rem;
  border-radius: 2px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dish-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}
.dish-body h3 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.dish-body p { color: var(--text-muted); }
.dish-body .price {
  margin-top: auto;
  padding-top: 1rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}

/* ---------- 6. Franja brasa ---------- */

.band {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-align: center;
}
.band-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 17, 15, 0.62);
}
.band-content {
  position: relative;
  padding-block: 6rem;
}
.band h2 {
  font-size: clamp(2.6rem, 9vw, 5.25rem);
  font-style: italic;
  font-weight: 500;
  margin-bottom: 1.25rem;
}
.band-content > p:last-child {
  font-size: 1.125rem;
  max-width: 34rem;
  margin-inline: auto;
}

/* ---------- 7. Carta ---------- */

.menu {
  position: relative;
  overflow: hidden;
}
.menu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 17, 15, 0.9);
}
.menu-inner { position: relative; }

.menu-grid {
  display: grid;
  gap: 3rem;
}

.menu-block h3 {
  font-size: 2rem;
  color: var(--accent);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.menu-list li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding-block: 0.7rem;
}
.menu-list .item { flex: 0 1 auto; }
.menu-list .dots {
  flex: 1 1 1.5rem;
  min-width: 1.5rem;
  border-bottom: 1px dotted rgba(243, 235, 221, 0.35);
  transform: translateY(-0.3em);
}
.menu-list .amount {
  flex-shrink: 0;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- 8. Menú del día ---------- */

.daily-card {
  max-width: 860px;
  margin-inline: auto;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 5vw, 4rem);
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  text-align: center;
}

.daily-head h2 { margin-bottom: 1rem; }

.daily-price {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 12vw, 5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}

.daily-when {
  margin-top: 0.75rem;
  color: var(--text-muted);
}

.daily-courses {
  display: grid;
  gap: 2rem;
  margin: 2.5rem 0;
  padding-block: 2.5rem;
  border-block: 1px solid var(--line);
}
.daily-courses h3 { font-size: 1.75rem; margin-bottom: 1rem; }
.daily-courses h3 small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.35rem;
}
.daily-courses li { padding-block: 0.35rem; font-size: 1.05rem; }

.daily-includes { margin-bottom: 2rem; }
.daily-includes strong { color: var(--accent); }

/* ---------- 9. Opiniones ---------- */

.reviews { background: var(--bg-soft); }

.rating {
  text-align: center;
  margin-bottom: 3rem;
}
.rating-score {
  font-family: var(--font-display);
  font-size: clamp(4rem, 14vw, 6rem);
  font-weight: 700;
  line-height: 1;
}
.rating-score .star { color: var(--accent); font-size: 0.7em; }
.rating-meta { color: var(--text-muted); margin-top: 0.5rem; letter-spacing: 0.04em; }

.review-grid {
  display: grid;
  gap: 1.25rem;
}

.review {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: var(--radius);
}
.review .stars {
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}
.review .star-off { color: rgba(243, 235, 221, 0.25); }
.review blockquote {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.3;
  font-style: italic;
}
.review .author {
  margin-top: auto;
  font-weight: 600;
  color: var(--text-muted);
}

/* ---------- 10. Reservas ---------- */

.reserve {
  position: relative;
  overflow: hidden;
  padding-block: var(--section-space);
}
.reserve-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 17, 15, 0.78);
}
.reserve-inner {
  position: relative;
  display: grid;
  gap: 3rem;
}
.reserve-text h2 { font-size: clamp(2.6rem, 8vw, 4.5rem); margin-bottom: 1rem; }
.reserve-text .lead { color: var(--text); margin-bottom: 2rem; }

.hours {
  background: rgba(20, 17, 15, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
}
.hours h3 { font-size: 1.9rem; margin-bottom: 1rem; }
.hours dl { margin: 0; }
.hours dl > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-block: 0.8rem;
  border-bottom: 1px solid var(--line);
}
.hours dl > div:last-child { border-bottom: 0; }
.hours dt { font-weight: 600; }
.hours dd { margin: 0; color: var(--text-muted); }
.hours .closed { color: var(--accent); font-weight: 600; }

/* ---------- 11. Pie ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 4rem;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
}

.footer-brand .logo { margin-bottom: 0.5rem; display: inline-block; }
.footer-brand p:last-child { color: var(--text-muted); font-style: italic; }

.footer-title {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.site-footer address { font-style: normal; }
.site-footer address p,
.footer-hours li,
.footer-links li { padding-block: 0.2rem; color: var(--text-muted); }

.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

.footer-bottom {
  margin-top: 3rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- 12. Barra fija móvil ---------- */

.mobile-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 90;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  padding: 0.6rem var(--gutter);
  padding-bottom: calc(0.6rem + env(safe-area-inset-bottom));
  background: #14110F;
  border-top: 1px solid var(--line);
}
.mobile-bar .btn { min-height: 50px; padding-inline: 0.5rem; }
.mobile-bar .icon { width: 20px; height: 20px; }

/* ---------- Aparición al hacer scroll ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   Tablet (≥ 640px)
   ========================================================= */
@media (min-width: 640px) {
  :root { --gutter: 2rem; }

  .header-cta { display: inline-flex; }

  .quick-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; }

  .daily-courses { grid-template-columns: 1fr 1fr; }

  .review-grid { grid-template-columns: repeat(3, 1fr); }
  .review blockquote { font-size: 1.35rem; }

  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   Escritorio (≥ 900px)
   ========================================================= */
@media (min-width: 900px) {
  :root { --header-h: 84px; }

  body { padding-bottom: 0; }

  .mobile-bar { display: none; }

  .nav-toggle,
  .header-cta { display: none; }

  .main-nav {
    position: static;
    visibility: visible;
    opacity: 1;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    padding: 0;
    background: none;
    overflow: visible;
  }
  .main-nav ul { flex-direction: row; gap: 1.75rem; }
  .main-nav li a {
    padding: 0.5rem 0;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    border-bottom: 0;
  }

  .logo { font-size: 1.85rem; }

  .quick { margin-top: -3.5rem; }
  .quick-card { flex-direction: row; min-height: 96px; gap: 0.85rem; font-size: 1rem; }

  .about-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 5rem;
  }

  .dish-grid {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    overflow-x: visible;
    scroll-snap-type: none;
    margin-inline: 0;
    padding-inline: 0;
  }
  .dish-card { flex: 0 1 calc((100% - 3rem) / 3); }

  .menu-grid { grid-template-columns: repeat(3, 1fr); gap: 3.5rem; }

  .reserve-inner {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 4rem;
  }
  .hours { padding: 2.5rem; }

  .footer-grid { grid-template-columns: 1.3fr 1fr 1.2fr 1fr; }
}

@media (min-width: 1200px) {
  .main-nav ul { gap: 2.25rem; }
}
