/* ===== Variables ===== */
:root {
  --bg: #faf6f0;
  --bg-alt: #f1e9dd;
  --dark: #1c1714;
  --dark-2: #2a221d;
  --text: #2b2420;
  --muted: #74675d;
  --line: #e2d6c6;
  --accent: #c4561c;
  --accent-dark: #a2440f;
  --gold: #e3b062;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(28, 23, 20, .08);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --header-h: 72px;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { font-family: var(--sans); color: var(--text); background: var(--bg); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
em { font-style: italic; color: var(--accent); }

.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .8rem;
}

.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.section__head { text-align: center; margin-bottom: 3rem; }

/* ===== Botones ===== */
.btn {
  display: inline-block; padding: .95rem 1.8rem; border: 2px solid var(--accent); border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; letter-spacing: .02em;
  transition: background .25s, border-color .25s, transform .25s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-2px); }
.btn--ghost { background: transparent; border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { background: #fff; border-color: #fff; color: var(--dark); }
.btn--small { padding: .55rem 1.2rem; font-size: .9rem; }
.btn--full { width: 100%; border: 0; padding: 1.05rem; font-size: 1rem; }

/* ===== Cabecera ===== */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  color: #fff; transition: background .3s, box-shadow .3s;
}
.header.is-scrolled { background: rgba(28, 23, 20, .97); box-shadow: 0 2px 20px rgba(0,0,0,.2); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }

.logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--serif); font-size: 1.6rem; font-weight: 600; }
.logo em { color: var(--gold); }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a:not(.btn) { text-decoration: none; font-size: .95rem; font-weight: 500; opacity: .85; position: relative; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav a:not(.btn):hover { opacity: 1; }
.nav a:not(.btn):hover::after { transform: scaleX(1); }

.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; position: relative; z-index: 60; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px auto; transition: transform .3s, opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== 1. Hero ===== */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  background: url("img/hero.jpg") center / cover no-repeat; color: #fff;
}
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,15,12,.85) 0%, rgba(20,15,12,.55) 55%, rgba(20,15,12,.25) 100%); }
.hero__content { position: relative; padding-top: var(--header-h); }
.hero .eyebrow { color: var(--gold); }
.hero h1 { font-size: clamp(3rem, 8vw, 6rem); font-weight: 500; margin-bottom: 1.5rem; }
.hero h1 em { color: var(--gold); }
.hero__text { max-width: 30rem; font-size: 1.1rem; opacity: .9; margin-bottom: 2.2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__scroll {
  position: absolute; bottom: 2rem; left: 50%; translate: -50% 0; text-decoration: none; font-size: 1.4rem;
  width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.4); border-radius: 50%;
  animation: bounce 2s infinite;
}
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ===== 2. Sobre nosotros ===== */
.about__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.about__img { position: relative; }
.about__img img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; box-shadow: var(--shadow); }
.about__img::before {
  content: ""; position: absolute; inset: 1.5rem -1.5rem -1.5rem 1.5rem; border: 2px solid var(--gold);
  border-radius: var(--radius); z-index: -1;
}
.about__img figcaption {
  position: absolute; left: 1rem; bottom: 1rem; background: var(--dark); color: #fff;
  padding: .5rem 1rem; border-radius: 999px; font-size: .85rem;
}
.about__text p { color: var(--muted); margin-bottom: 1rem; }
.stats { display: flex; gap: 2.5rem; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.stats strong { display: block; font-family: var(--serif); font-size: 2.4rem; color: var(--accent); line-height: 1; }
.stats span { font-size: .85rem; color: var(--muted); }

/* ===== 3. Carta ===== */
.menu { background: var(--dark); color: #f3ebe1; }
.menu h2 { color: #fff; }
.menu .eyebrow { color: var(--gold); }

.tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; margin-bottom: 3rem; }
.tab {
  background: transparent; color: #cbbfb2; border: 1px solid #4a3e36; border-radius: 999px;
  padding: .6rem 1.4rem; font-weight: 500; transition: all .25s;
}
.tab:hover { color: #fff; border-color: var(--gold); }
.tab.is-active { background: var(--gold); border-color: var(--gold); color: var(--dark); }

.tab-panel { animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.dishes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 4rem; max-width: 980px; margin-inline: auto; }
.dishes li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: 1.2rem; border-bottom: 1px dashed #4a3e36; }
.dishes h3 { font-size: 1.45rem; color: #fff; margin-bottom: .25rem; }
.dishes p { font-size: .9rem; color: #a99b8e; }
.price { font-family: var(--serif); font-size: 1.35rem; color: var(--gold); white-space: nowrap; font-weight: 600; }
.tag { display: inline-block; font-size: .65rem; font-weight: 700; background: #3d5a3a; color: #cfe8c6; padding: .1rem .4rem; border-radius: 4px; margin-left: .3rem; vertical-align: middle; }
.menu__note { text-align: center; margin-top: 3rem; font-size: .85rem; color: #8f8276; }

/* ===== 4. Galería ===== */
.gallery__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: 1rem;
}
.gallery__item { border: 0; padding: 0; overflow: hidden; border-radius: var(--radius); background: var(--bg-alt); cursor: zoom-in; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, filter .3s; }
.gallery__item:hover img { transform: scale(1.07); filter: brightness(1.05); }
.gallery__item--wide { grid-column: span 2; }
.gallery__item--tall { grid-row: span 2; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  border: 0; background: rgba(15,11,9,.92); place-items: center; padding: 2rem;
}
.lightbox[open] { display: grid; }
.lightbox::backdrop { background: transparent; }
.lightbox img { max-height: 85vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); animation: fadeIn .3s; }
.lightbox__close { position: absolute; top: 1rem; right: 1.5rem; background: none; border: 0; color: #fff; font-size: 2.5rem; line-height: 1; }

/* ===== 5. Reseñas ===== */
.reviews { background: var(--bg-alt); }
.reviews__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.review {
  background: #fff; border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: transform .3s;
}
.review:hover { transform: translateY(-6px); }
.stars { color: var(--gold); font-size: 1.15rem; letter-spacing: .15em; margin-bottom: 1rem; }
.star-off { color: var(--line); }
.review p { font-family: var(--serif); font-size: 1.25rem; font-style: italic; line-height: 1.45; flex: 1; margin-bottom: 1.5rem; }
.review footer { display: flex; align-items: center; gap: .8rem; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--dark); color: var(--gold); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.review small { display: block; color: var(--muted); font-size: .8rem; }

/* ===== 6. Reservas ===== */
.booking__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.booking__intro p { color: var(--muted); }
.booking__intro a { color: var(--accent); font-weight: 700; }
.booking__perks { margin-top: 1.8rem; display: grid; gap: .7rem; }
.booking__perks li { padding-left: 1.8rem; position: relative; }
.booking__perks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

.form { background: #fff; padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 4px solid var(--accent); }
.form__row { margin-bottom: 1.2rem; }
.form__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: .4rem; }
.form input, .form select {
  width: 100%; font: inherit; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--text); transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(196,86,28,.15); }
.form .is-invalid { border-color: #c0392b; }
.form__error { display: block; color: #c0392b; font-size: .8rem; min-height: 1em; margin-top: .25rem; }

.stepper { display: flex; }
.stepper button { width: 48px; border: 1.5px solid var(--line); background: var(--bg-alt); font-size: 1.2rem; }
.stepper button:first-child { border-radius: 10px 0 0 10px; }
.stepper button:last-child { border-radius: 0 10px 10px 0; }
.stepper input { border-radius: 0; text-align: center; border-inline: 0; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; }

.form__success { margin-top: 1rem; padding: 1rem; background: #edf6ea; color: #2f5d2a; border-radius: 10px; font-size: .95rem; }

/* ===== 7. Ubicación ===== */
.location { background: var(--bg-alt); }
.location__grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(2rem, 5vw, 4rem); align-items: stretch; }
.hours { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.hours th, .hours td { text-align: left; padding: .75rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.hours th { font-weight: 700; padding-right: 1rem; }
.hours td { color: var(--muted); text-align: right; }
.open-status { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .9rem; margin-bottom: 1.5rem; }
.open-status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.open-status.is-open { color: #2f7d32; }
.open-status.is-closed { color: #b23b2b; }
address { font-style: normal; line-height: 1.8; color: var(--muted); }
address strong { color: var(--text); }
address a { color: var(--accent); }
.location__map { min-height: 420px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.location__map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; filter: grayscale(.3) sepia(.15); }

/* ===== 8. Footer ===== */
.footer { background: var(--dark); color: #b9ab9d; padding: 4rem 0 2rem; }
.footer .logo { color: #fff; margin-bottom: 1rem; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding-bottom: 3rem; border-bottom: 1px solid #3a302a; }
.footer__grid p { max-width: 22rem; font-size: .95rem; }
.footer h3 { font-family: var(--sans); font-weight: 700; color: #fff; font-size: .8rem; letter-spacing: .15em; text-transform: uppercase; margin-bottom: 1rem; }
.footer li { margin-bottom: .5rem; }
.footer a { text-decoration: none; transition: color .2s; }
.footer a:hover { color: var(--gold); }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding-top: 1.5rem; font-size: .8rem; }

/* ===== Animación al hacer scroll ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 0; background: var(--dark); flex-direction: column; justify-content: center; gap: 1.8rem;
    font-size: 1.3rem; transform: translateX(100%); visibility: hidden;
    transition: transform .35s ease, visibility .35s;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .hero__overlay { background: linear-gradient(180deg, rgba(20,15,12,.55) 0%, rgba(20,15,12,.8) 60%, rgba(20,15,12,.9) 100%); }
  .nav a:not(.btn) { font-size: 1.4rem; }

  .about__grid, .booking__grid, .location__grid { grid-template-columns: 1fr; }
  .about__img { max-width: 460px; }
  .dishes { grid-template-columns: 1fr; }
  .reviews__grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .stats { gap: 1.5rem; }
  .stats strong { font-size: 2rem; }
  .form__cols { grid-template-columns: 1fr; }
  .gallery__grid { grid-auto-rows: 140px; gap: .6rem; }
  .gallery__item--tall { grid-row: span 1; }
  .hours td { text-align: left; }
  .hours tr { display: grid; }
  .hours th { padding-bottom: 0; border: 0; }
  .about__img::before { inset: 1rem -.6rem -.6rem 1rem; }
}
