/* ---------- Reset & base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
  --bg: #0e0c0a;
  --bg-alt: #17140f;
  --text: #ffffff;
  --text-muted: #d8d4cc;
  --accent: #3aa3cf;
  --accent-hover: #5fb8dd;
  --accent-soft: rgba(58, 163, 207, 0.15);
  --border: rgba(255, 255, 255, 0.14);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Lato', -apple-system, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; }

/* ---------- Splash ---------- */
#splash {
  position: fixed; inset: 0; background: var(--bg); z-index: 999;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; /* nunca debe bloquear clics, ni siquiera durante el fade */
  animation: splashHide 0.6s ease-out 1.4s forwards;
}
#splash img { width: auto; height: 90px; object-fit: contain; animation: splashPulse 1.2s ease-in-out infinite; }
@keyframes splashPulse { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
@keyframes splashHide { to { opacity: 0; visibility: hidden; pointer-events: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: 2px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}
.btn-primary { background: var(--accent); color: #0e0c0a; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-outline { border-color: var(--text); color: var(--text); }
.btn-outline:hover { background: var(--text); color: var(--bg); }
.btn-ghost { color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }
.btn-large { padding: 1.1rem 2.4rem; font-size: 0.9rem; }
.btn-header { padding: 0.6rem 1.3rem; font-size: 0.75rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: linear-gradient(to bottom, rgba(14,12,10,0.92), transparent);
  padding: 0.5rem 0;
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.logo-img { height: clamp(70px, 11vw, 130px); width: auto; object-fit: contain; }

#nosotros, #menu, #contacto { scroll-margin-top: 110px; }
.header-right { display: flex; align-items: center; gap: 0.8rem; }
.lang-toggle {
  background: transparent; border: 1px solid var(--text-muted); color: var(--text);
  border-radius: 999px; padding: 0.4rem 0.75rem; font-family: var(--font-body);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; cursor: pointer;
  transition: all 0.25s ease;
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }
.main-nav { display: flex; gap: 2rem; }
.main-nav a {
  font-size: 0.88rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text); font-weight: 600; transition: color 0.2s;
}
.main-nav a:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative; height: 100vh; min-height: 560px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(14,12,10,0.55) 0%, rgba(14,12,10,0.35) 40%, rgba(14,12,10,0.9) 100%);
}
.hero-content {
  position: relative; z-index: 1; text-align: center; max-width: 720px; padding: 0 1.5rem;
}
.hero-eyebrow {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 1.2rem; font-weight: 700;
}
.hero-title { font-size: clamp(2.6rem, 7vw, 4.8rem); margin-bottom: 1.4rem; color: #ffffff; }
.hero-sub { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 2.2rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-scroll-hint { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 1; }
.hero-scroll-hint span {
  display: block; width: 1px; height: 42px; background: var(--text-muted);
  animation: scrollHint 1.8s ease-in-out infinite;
}
@keyframes scrollHint { 0% { opacity: 0; transform: scaleY(0); transform-origin: top; } 40% { opacity: 1; transform: scaleY(1); } 100% { opacity: 0; transform: scaleY(1); transform-origin: bottom; } }

/* ---------- Sobre nosotros ---------- */
.nosotros { padding: 7rem 1.5rem; background: var(--bg); }
.nosotros-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.nosotros-img img { border-radius: 4px; }
.section-eyebrow {
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 0.8rem; font-weight: 600;
}
.nosotros-text h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1.2rem; }
.nosotros-text p { color: var(--text-muted); margin-bottom: 1.6rem; }
.nosotros-datos { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; font-size: 0.92rem; }

/* ---------- Menu destacado (reemplaza prensa) ---------- */
.menu-destacado { padding: 7rem 1.5rem; background: var(--bg-alt); }
.menu-header { max-width: 640px; margin: 0 auto 4rem; text-align: center; }
.menu-header h2 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 1.2rem; }
.menu-header-sub { color: var(--text-muted); }

.menu-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
}
.menu-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 4px; overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.menu-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.menu-card-img { aspect-ratio: 4/3; overflow: hidden; }
.menu-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.menu-card:hover .menu-card-img img { transform: scale(1.06); }
.menu-card-body { padding: 1.3rem 1.4rem; }
.menu-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; margin-bottom: 0.5rem; }
.menu-card-top h3 { font-size: 1.15rem; }
.menu-price { color: var(--accent); font-weight: 700; white-space: nowrap; font-family: var(--font-body); }
.menu-card-body p { font-size: 0.88rem; color: var(--text-muted); }

.menu-cta { text-align: center; margin-top: 3.5rem; }

/* ---------- Instagram CTA ---------- */
.instagram-cta {
  padding: 6rem 1.5rem; text-align: center; background: var(--bg);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.instagram-cta h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1.6rem; }

/* ---------- Contacto ---------- */
.contacto { padding: 7rem 1.5rem; background: var(--bg-alt); text-align: center; }
.contacto-inner { max-width: 560px; margin: 0 auto; }
.contacto h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 1.6rem; color: var(--accent); }
.contacto p { color: var(--text-muted); margin-bottom: 0.3rem; font-size: 0.92rem; }
.contacto-botones { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; margin-top: 1.8rem; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 3rem 1.5rem 2rem; text-align: center; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.footer-logo { width: auto; height: 44px; object-fit: contain; opacity: 0.75; }
.footer-legal { display: flex; gap: 1.2rem; flex-wrap: wrap; justify-content: center; }
.footer-legal button {
  background: none; border: none; color: var(--text-muted); font-size: 0.76rem;
  text-decoration: underline; cursor: pointer; font-family: var(--font-body);
}
.footer-legal button:hover { color: var(--accent); }
.footer-copy { color: #8a8a8a; font-size: 0.7rem; }

/* ---------- Legal modal ---------- */
.legal-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 1.2rem;
}
.legal-modal.open { display: flex; }
.legal-modal-box {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 6px;
  padding: 2rem; max-width: 520px; max-height: 78vh; overflow-y: auto; position: relative;
}
.legal-modal-box h2 { color: var(--accent); margin-bottom: 1rem; font-size: 1.2rem; }
.legal-modal-box pre { white-space: pre-wrap; font-family: var(--font-body); font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }
.legal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--text); font-size: 1.3rem; cursor: pointer; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
/* Defensive: force-reveal after a few seconds regardless of JS (Hard Rule 5) */
.reveal { animation: forceReveal 0.01s linear 2.5s forwards; }
@keyframes forceReveal { to { opacity: 1; transform: translateY(0); } }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .main-nav { display: none; }
  .nosotros-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .menu-grid { grid-template-columns: 1fr 1fr; gap: 1.2rem; }
}
@media (max-width: 560px) {
  .menu-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.4rem; }
  .btn-header { padding: 0.5rem 0.9rem; font-size: 0.68rem; }
}
