/* ============================
   CSS VARIABLES / TOKENS
============================ */
:root {
  --bg:        #141414;
  --card:      #1e1e1e;
  --border:    rgba(255,255,255,0.08);
  --fg:        #fafafa;
  --muted:     #888;
  --primary:   #7a2e2e;
  --accent:    #c9a96e;
  --radius:    4px;
}

/* ============================
   RESET & BASE
============================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ============================
   HEADER
============================ */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: background 0.4s, padding 0.4s, backdrop-filter 0.4s;
}
#header.scrolled {
  background: rgba(20,20,20,0.95);
  backdrop-filter: blur(12px);
  padding: 12px 24px;
  box-shadow: 0 2px 24px rgba(0,0,0,0.5);
}
#header img {
  width: 160px;
  height: auto;
  object-fit: contain;
  transition: width 0.4s;
}
#header.scrolled img { width: 120px; }

.header-login {
  position: absolute;
  top: 50%;
  right: 28px;
  transform: translateY(-50%);
  padding: 8px 20px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 100px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  color: var(--fg);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.header-login:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--fg);
}

/* ============================
   HERO
============================ */
#hero {
  position: relative;
  height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#hero-bg {
  position: absolute;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
#hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(20,20,20,0.5) 0%, transparent 40%, rgba(20,20,20,0.9) 90%, var(--bg) 100%);
}
#scroll-arrow {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: dropArrow 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}
@keyframes dropArrow {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.3; }
  50% { transform: translate(-50%, 10px); opacity: 1; }
}

/* ============================
   TAGLINE SECTION
============================ */
#tagline {
  padding: 80px 24px;
  text-align: center;
}
#tagline h1 {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  animation: fadeUp 0.8s ease both;
}
#tagline h1 em {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 300;
  font-style: normal;
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
#tagline p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
  letter-spacing: 0.05em;
}

/* ============================
   CATEGORY NAV
============================ */
#category-nav {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
}
.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}
#menu-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 32px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}
#menu-btn:hover { border-color: var(--primary); color: var(--accent); }
#menu-btn svg { transition: transform 0.3s; flex-shrink: 0; }
#menu-btn.open svg { transform: rotate(180deg); }
#nav-dropdown {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(100% + 8px);
  min-width: 280px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  padding: 8px 0;
  opacity: 0;
  transform: translateX(-50%) scaleY(0.9);
  transform-origin: top;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
#nav-dropdown.open {
  opacity: 1;
  transform: translateX(-50%) scaleY(1);
  pointer-events: auto;
}
.dropdown-item {
  display: block;
  width: 100%;
  padding: 12px 24px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.dropdown-item:hover { background: rgba(255,255,255,0.04); color: var(--fg); }
.dropdown-item.active { background: rgba(122,46,46,0.15); color: var(--primary); font-weight: 600; }
.nav-indicator {
  text-align: center;
  margin-top: 12px;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-indicator span { color: var(--fg); font-weight: 400; }

/* ============================
   MENU SECTIONS
============================ */
#menu-content { padding-bottom: 80px; }
.menu-section { padding: 64px 24px; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 300; letter-spacing: 0.05em; margin-bottom: 12px; }
.section-divider { width: 80px; height: 1px; background: var(--primary); margin: 0 auto 14px; }
.section-desc { font-size: 1rem; font-style: italic; font-weight: 300; color: var(--muted); }
.dish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}
.dish-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(.25,.8,.25,1);
  opacity: 0;
  transform: translateY(16px);
}
.dish-card.visible { animation: fadeUp 0.5s ease forwards; }
.dish-card:hover { transform: translateY(-4px); }
.dish-img-wrap { aspect-ratio: 4/3; overflow: hidden; position: relative; border-radius: var(--radius); margin-bottom: 12px; border: 1px solid var(--border); }
.dish-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; display: block; }
.dish-card:hover .dish-img-wrap img { transform: scale(1.04); }
.dish-info {
  padding: 8px 4px;
  text-align: left;
}
.dish-name {
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 4px;
  transition: color 0.3s;
  line-height: 1.3;
  color: var(--fg);
}
.dish-card:hover .dish-name { color: var(--accent); }
.dish-price {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--accent);
  letter-spacing: 0.05em;
}

/* ============================
   DETAIL OVERLAY (modal)
============================ */
#detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}
#detail-overlay.open { display: block; }
.detail-inner { min-height: 100%; display: flex; flex-direction: column; }
.detail-hero { position: relative; height: 55vh; overflow: hidden; flex-shrink: 0; }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(20,20,20,0.5) 60%, var(--bg) 100%); }
.detail-back {
  position: fixed;
  top: 20px; left: 20px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(20,20,20,0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s;
}
.detail-back:hover { background: var(--card); }
.detail-back svg { transition: transform 0.3s; }
.detail-back:hover svg { transform: translateX(-3px); }
.detail-content {
  position: relative;
  margin-top: -80px;
  padding: 0 24px 80px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  flex: 1;
}
.detail-badge {
  display: inline-block;
  padding: 4px 16px;
  background: rgba(122,46,46,0.2);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  border-radius: 100px;
  margin-bottom: 20px;
  animation: fadeUp 0.4s 0.1s both;
}
.detail-title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 300; line-height: 1.2; margin-bottom: 20px; animation: fadeUp 0.4s 0.2s both; }
.detail-price { font-size: clamp(2rem, 5vw, 2.5rem); font-weight: 300; color: var(--accent); margin-bottom: 28px; animation: fadeUp 0.4s 0.3s both; }
.detail-line { width: 80px; height: 1px; background: var(--primary); margin-bottom: 28px; animation: fadeUp 0.4s 0.4s both; }
.detail-desc { font-size: 1.1rem; font-weight: 300; color: var(--muted); line-height: 1.8; margin-bottom: 40px; animation: fadeUp 0.4s 0.5s both; }
.detail-quote { border-left: 2px solid rgba(122,46,46,0.4); padding: 16px 20px; font-style: italic; font-weight: 300; color: rgba(250,250,250,0.5); font-size: 1rem; animation: fadeUp 0.4s 0.6s both; }

/* ============================
   FOOTER
============================ */
footer { background: var(--card); border-top: 1px solid var(--border); padding: 64px 24px; text-align: center; }
footer img { width: 120px; height: auto; object-fit: contain; margin-bottom: 20px; opacity: 0.75; }
footer blockquote { font-style: italic; font-weight: 300; color: var(--muted); max-width: 420px; margin: 0 auto 24px; font-size: 1rem; line-height: 1.7; }
.footer-links { display: flex; align-items: center; justify-content: center; gap: 20px; color: var(--muted); font-size: 0.85rem; margin-bottom: 16px; }
.footer-links a { color: var(--muted); text-decoration: none; transition: color 0.3s; }
.footer-links a:hover { color: var(--primary); }
.footer-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
footer small { color: rgba(255,255,255,0.25); font-size: 0.75rem; font-weight: 300; }

/* ============================
   LOADER
============================ */
#loader {
  position: fixed;
  inset: 0;
  background: #141414;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#loader.hide {
  opacity: 0;
  visibility: hidden;
}
#loader-logo-wrap {
  position: relative;
  width: 180px;
  aspect-ratio: 2185 / 743;
  opacity: 0;
  transform: scale(0.85);
  animation: logoReveal 1.4s cubic-bezier(0.22,1,0.36,1) 0.2s forwards;
}
#loader-logo-outline,
#loader-logo-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
#loader-logo-outline {
  filter: brightness(0) invert(1);
  opacity: 0.15;
}
#loader-logo-fill {
  clip-path: inset(100% 0 0 0);
  animation: liquidFill 3.6s cubic-bezier(0.65,0,0.35,1) 0.5s forwards;
}
#loader.loaded #loader-logo-fill {
  animation: none;
  clip-path: inset(0% 0 0 0);
  transition: clip-path 0.5s cubic-bezier(0.22,1,0.36,1);
}
#loader-bar {
  width: 0px;
  height: 1px;
  background: var(--accent);
  margin-top: 28px;
  animation: barGrow 1.2s ease 0.5s forwards;
}
@keyframes logoReveal {
  0%   { opacity: 0; transform: scale(0.82); }
  60%  { opacity: 1; transform: scale(1.03); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes barGrow {
  from { width: 0px; }
  to   { width: 120px; }
}
@keyframes liquidFill {
  0%   { clip-path: inset(100% 0 0 0); }
  100% { clip-path: inset(6% 0 0 0); }
}

/* ============================
   ANIMATIONS
============================ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================
   RESPONSIVE — MÓVIL
============================ */
@media (max-width: 600px) {
  .dish-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .detail-hero { height: 45vh; }
  .dish-name { font-size: 1rem; }
  .dish-price { font-size: 1.1rem; }
  .dish-img-wrap { margin-bottom: 8px; }
}
