/* ════════════════════════════════════════════
   CASA BRASA — parrilla criolla
   Canvas: carbón cálido · Acento: brasa
   Type: Fraunces (display) · Inter (body)
   ════════════════════════════════════════════ */
:root {
  --bg: #171310;
  --raise: #201a14;
  --line: rgba(243, 234, 217, 0.11);
  --text: #f3ead9;
  --muted: #a1917c;
  --ember: #e8833a;
  --ember-soft: #f2a468;
  --dark: #0f0c09;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --container: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--ember); color: var(--dark); }
img { max-width: 100%; display: block; }
a { color: inherit; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ember);
}
.display {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2.9rem, 7.5vw, 5.8rem); line-height: 1.02; letter-spacing: -0.01em;
}
.display em, .title em { font-style: italic; font-weight: 400; color: var(--ember-soft); }
.title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.08;
}
.lead { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.2rem); max-width: 30em; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.2, 0.6, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ══════════ NAV ══════════ */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 100; transition: background 0.3s, border-color 0.3s; border-bottom: 1px solid transparent; }
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(23, 19, 16, 0.88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); opacity: 0; transition: opacity 0.3s; }
.nav.scrolled::before { opacity: 1; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter);
  height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.logo {
  font-family: var(--font-display); font-weight: 500; font-size: 1.3rem;
  text-decoration: none; letter-spacing: 0.01em;
}
.logo em { font-style: italic; color: var(--ember-soft); }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  text-decoration: none; font-size: 0.92rem; font-weight: 500; color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  text-decoration: none; font-size: 0.88rem; font-weight: 600;
  color: var(--dark); background: var(--ember);
  padding: 11px 22px; border-radius: 999px; transition: background 0.2s;
}
.nav-cta:hover { background: var(--ember-soft); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 40px; z-index: 102; }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--text); margin: 5px auto; transition: transform 0.3s, opacity 0.3s; }
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 0; background: var(--bg);
    flex-direction: column; align-items: center; justify-content: center; gap: 7vh;
    transform: translateY(-100%); transition: transform 0.4s cubic-bezier(0.7, 0, 0.2, 1); z-index: 101;
  }
  .nav.open .nav-links { transform: none; }
  .nav-links a { font-size: 1.7rem; font-family: var(--font-display); color: var(--text); }
  .nav-cta { display: none; }
}

/* ══════════ BOTONES ══════════ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  color: var(--dark); background: var(--ember);
  padding: 16px 34px; border-radius: 999px;
  transition: background 0.2s; will-change: transform;
}
.btn:hover { background: var(--ember-soft); }
.btn--big { padding: 19px 42px; font-size: 1.05rem; }
.link-arrow { color: var(--text); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--line); padding-bottom: 3px; transition: border-color 0.2s; }
.link-arrow:hover { border-color: var(--ember); }

/* ══════════ HERO ══════════ */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(1.05) contrast(1.02) brightness(0.9);
  transform: scale(1.06);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 12, 9, 0.55) 0%, rgba(15, 12, 9, 0.15) 40%, rgba(15, 12, 9, 0.88) 100%),
    linear-gradient(90deg, rgba(15, 12, 9, 0.45), transparent 60%);
}
.hero-content { position: relative; z-index: 1; padding-bottom: clamp(60px, 10vh, 120px); width: 100%; }
.hero-content .label { display: block; margin-bottom: 22px; }
.hero-content .lead { margin-top: 26px; }
.hero-actions { margin-top: 40px; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }

/* ══════════ SECCIONES ══════════ */
.section { padding: 110px 0; }
.section--raise { background: var(--raise); }
.section-head { margin-bottom: 60px; }
.section-head .label { display: block; margin-bottom: 16px; }

/* ══════════ MENÚ ══════════ */
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 44px); }
@media (max-width: 900px) { .menu-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .menu-grid { grid-template-columns: 1fr; } }
.dish-img {
  aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; margin-bottom: 20px;
}
.dish-img img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
  transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1), clip-path 0.95s cubic-bezier(0.65, 0, 0.35, 1);
}
.dish:hover .dish-img img { transform: scale(1.05); }
.dish-row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.dish h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; }
.dish-price { font-family: var(--font-display); font-style: italic; color: var(--ember-soft); font-size: 1.15rem; flex-shrink: 0; }
.dish p { color: var(--muted); font-size: 0.93rem; margin-top: 8px; }
.menu-note { margin-top: 56px; text-align: center; color: var(--muted); font-size: 0.88rem; letter-spacing: 0.02em; }

/* ══════════ NOSOTROS ══════════ */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(36px, 6vw, 100px); align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.split-img { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 8px; }
@media (max-width: 820px) { .split-img { aspect-ratio: 16 / 10; } }
.split-img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.02) brightness(0.95); }
.split-text .label { display: block; margin-bottom: 16px; }
.split-text .title { margin-bottom: 24px; }
.split-text p { color: var(--muted); margin-bottom: 18px; max-width: 34em; }
.hours { margin-top: 34px; border-top: 1px solid var(--line); }
.hours-row {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem;
}
.hours-row span:first-child { color: var(--muted); }

/* ══════════ VISITA ══════════ */
.visit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 44px); }
@media (max-width: 700px) { .visit-grid { grid-template-columns: 1fr; } }
.visit-cell { border-top: 1px solid var(--line); padding-top: 22px; }
.visit-cell .label { display: block; margin-bottom: 12px; }
.visit-cell p { color: var(--muted); font-size: 0.97rem; }
.visit-cta { margin-top: 70px; text-align: center; }

/* ══════════ FOOTER ══════════ */
.footer { border-top: 1px solid var(--line); padding: 42px 0 36px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.foot-label { color: var(--muted); font-size: 0.82rem; text-decoration: none; }
.foot-credit { border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: color 0.2s, border-color 0.2s; }
.foot-credit:hover { color: var(--text); border-color: var(--ember); }
.foot-credits-photo { font-size: 0.68rem; opacity: 0.55; }

/* ══════════ MOTION ══════════ */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.wi {
  display: inline-block; transform: translateY(115%); will-change: transform;
  transition: transform 0.85s cubic-bezier(0.65, 0, 0.35, 1);
  transition-delay: var(--wd, 0ms);
}
.words-in .wi { transform: none; }

/* El clip-path va en los hijos: si recorta al elemento observado, IntersectionObserver lo ve con área 0 y nunca lo revela */
.ir > * { clip-path: inset(100% 0 0 0); transition: clip-path 0.95s cubic-bezier(0.65, 0, 0.35, 1); }
.ir.in > * { clip-path: inset(0 0 0 0); }

/* Hero: la imagen de fondo asienta lentamente al cargar */
.hero-bg img { transition: transform 1.8s cubic-bezier(0.2, 0.6, 0.2, 1), clip-path 0.95s cubic-bezier(0.65, 0, 0.35, 1); }
.hero-loaded .hero-bg img { transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .w, .wi { transform: none !important; transition: none !important; }
  .ir > * { clip-path: none !important; transition: none !important; }
  .hero-bg img { transform: none !important; transition: none !important; }
}
