/* =============================================================
   RESTAURANTE LA FAMILIA — Editorial Light Cream
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #f4efe6;   /* crema cálida */
  --bg-2:      #ebe2d2;   /* arena */
  --bg-3:      #e2d6c1;
  --paper:     #fffdf8;
  --ink:       #221d17;   /* casi-negro cálido */
  --ink-soft:  #3a332b;
  --ink-mute:  #756c5e;
  --accent:    #b5502f;   /* terracota */
  --accent-2:  #5c6b3c;   /* oliva / romero */
  --gold:      #c08b3e;   /* dorado tostado */
  --line:      rgba(34, 29, 23, 0.12);
  --line-soft: rgba(34, 29, 23, 0.07);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --container: 1200px;
  --gutter: clamp(1.15rem, 4vw, 3rem);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
  overflow-x: clip;
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.04; letter-spacing: -0.02em; font-weight: 400; }
::selection { background: var(--accent); color: var(--bg); }

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

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: var(--bg);
  z-index: 9999; border-radius: 8px; font-weight: 500;
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.kicker, .section-kicker {
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 5.2vw, 3.6rem);
  line-height: 1.02;
  margin: .5rem 0 1.4rem;
  max-width: 22ch;
}
.section-title em {
  font-style: italic;
  font-optical-sizing: auto;
  color: var(--accent);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
/* Defensa: nunca ocultar por conflicto split/reveal */
.reveal[data-split] { opacity: 1; transform: none; }

/* =============================================================
   4. Buttons
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.6rem;
  border-radius: 100px;
  font-weight: 500;
  font-size: .95rem;
  letter-spacing: .01em;
  transition: transform .35s var(--ease-out), background .35s var(--ease-out),
              color .35s var(--ease-out), box-shadow .35s var(--ease-out);
  will-change: transform;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 10px 30px -12px rgba(181, 80, 47, .6);
}
.btn-primary:hover {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 16px 40px -14px rgba(34, 29, 23, .55);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

/* =============================================================
   5. Cursor
   ============================================================= */
.cursor { position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  opacity: 0; transition: opacity .3s var(--ease-out); }
.cursor.is-ready { opacity: 1; }
.cursor-dot, .cursor-ring { position: absolute; top: 0; left: 0; border-radius: 50%;
  transform: translate3d(-50%, -50%, 0); }
.cursor-dot { width: 6px; height: 6px; background: var(--accent); }
.cursor-ring { width: 34px; height: 34px; border: 1.5px solid rgba(181,80,47,.55);
  transition: width .3s var(--ease-out), height .3s var(--ease-out),
              background .3s var(--ease-out), border-color .3s var(--ease-out); }
.cursor.is-hover .cursor-ring { width: 56px; height: 56px; background: rgba(181,80,47,.08);
  border-color: rgba(181,80,47,.8); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* =============================================================
   6. Splash
   ============================================================= */
.splash {
  position: fixed; inset: 0; z-index: 9500;
  background: var(--bg);
  display: grid; place-items: center;
  animation: splashSafety .01s 4s forwards;
}
.splash.is-out {
  opacity: 0; pointer-events: none;
  transform: translateY(-2%);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
@keyframes splashSafety { to { opacity: 0; pointer-events: none; visibility: hidden; } }
.splash-inner { display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.splash-mark {
  font-family: var(--serif); font-style: italic; font-size: 4rem; color: var(--accent);
  width: 92px; height: 92px; border-radius: 50%;
  border: 1.5px solid var(--line); display: grid; place-items: center;
  animation: splashPulse 1.4s var(--ease-soft) infinite;
}
.splash-word {
  font-family: var(--serif); font-size: 1.1rem; letter-spacing: .3em;
  text-transform: uppercase; color: var(--ink-mute);
  opacity: 0; animation: splashFade .8s .3s var(--ease-out) forwards;
}
@keyframes splashPulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.94); opacity: .7; } }
@keyframes splashFade { to { opacity: 1; } }

/* =============================================================
   7. Nav
   ============================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 800;
  transition: background .4s var(--ease-out), box-shadow .4s var(--ease-out),
              backdrop-filter .4s var(--ease-out);
}
.nav-inner {
  max-width: var(--container); margin-inline: auto;
  padding: 1.1rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav.is-scrolled {
  background: rgba(244, 239, 230, .85);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--line-soft);
}
.nav-logo { display: flex; align-items: center; gap: .55rem; }
.nav-logo-mark {
  font-family: var(--serif); font-style: italic; font-size: 1.3rem; line-height: 1;
  color: var(--bg); background: var(--accent);
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
}
.nav-logo-text { font-family: var(--serif); font-size: 1.25rem; letter-spacing: .01em; }
.nav-links { display: none; gap: 2rem; }
.nav-links a { position: relative; font-size: .95rem; color: var(--ink-soft); padding: .2rem 0; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 0;
  background: var(--accent); transition: width .35s var(--ease-out);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: none; }

.nav-toggle { display: flex; flex-direction: column; gap: 5px; padding: .4rem; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .35s var(--ease-out), opacity .25s var(--ease-out); }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 790;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.6rem;
  opacity: 0; pointer-events: none; transform: translateY(-8px);
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out);
}
.mobile-menu.is-open { opacity: 1; pointer-events: auto; transform: none; }
.mobile-menu a { font-family: var(--serif); font-size: 1.8rem; color: var(--ink); }
.mobile-menu .btn { font-family: var(--sans); font-size: 1rem; margin-top: 1rem; }

/* =============================================================
   8. Hero
   ============================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  padding-bottom: clamp(3rem, 9vh, 7rem);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-img {
  width: 100%; height: 116%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}
.hero-tint {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(30,22,16,.28) 0%, rgba(30,22,16,.05) 30%, rgba(30,22,16,.35) 72%, rgba(30,22,16,.78) 100%),
    radial-gradient(120% 80% at 20% 90%, rgba(30,22,16,.5), transparent 60%);
}
.hero-content { position: relative; z-index: 1; color: var(--bg); }
.hero .kicker { color: #f0d9c4; }
.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.9rem, 9vw, 6.4rem);
  line-height: .98;
  letter-spacing: -0.025em;
  margin: 1rem 0 1.4rem;
  max-width: 16ch;
  text-shadow: 0 4px 40px rgba(0,0,0,.35);
}
.hero-title em { font-style: italic; color: #f2c48f; }
.hero-sub {
  font-size: clamp(1.02rem, 2vw, 1.25rem);
  max-width: 46ch; color: rgba(255,253,248,.9);
  text-shadow: 0 2px 20px rgba(0,0,0,.4);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.hero .btn-ghost { color: var(--bg); border-color: rgba(255,253,248,.5); }
.hero .btn-ghost:hover { background: var(--bg); color: var(--ink); border-color: var(--bg); }

.hero-scroll {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  z-index: 1; width: 26px; height: 42px; border: 1.5px solid rgba(255,253,248,.55);
  border-radius: 20px; display: grid; place-items: start center; padding-top: 8px;
}
.hero-scroll span { width: 4px; height: 8px; border-radius: 4px; background: var(--bg);
  animation: scrollDot 1.8s var(--ease-soft) infinite; }
@keyframes scrollDot { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* =============================================================
   9. Marquee
   ============================================================= */
.marquee {
  background: var(--accent); color: var(--bg);
  padding: .9rem 0; overflow: hidden; white-space: nowrap;
  border-block: 1px solid rgba(0,0,0,.08);
}
.marquee-track {
  display: inline-flex; align-items: center; gap: 2rem;
  font-family: var(--serif); font-style: italic; font-size: 1.35rem;
  animation: marquee 26s linear infinite;
}
.marquee-track .sep { color: #f2c48f; font-style: normal; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* =============================================================
   10. About
   ============================================================= */
.about { padding: clamp(4rem, 10vh, 8rem) 0; }
.about-grid { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.about-figure { position: relative; }
.about-figure img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 14px;
  filter: saturate(1.08);
}
.about-badge {
  position: absolute; right: -12px; bottom: -18px;
  background: var(--paper); border-radius: 50%;
  width: 128px; height: 128px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  box-shadow: 0 20px 50px -20px rgba(34,29,23,.4);
  border: 1px solid var(--line-soft);
}
.about-badge-num { font-family: var(--serif); font-size: 2.4rem; color: var(--accent); line-height: 1; }
.about-badge-label { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-mute); margin-top: .2rem; }
.about-text p { color: var(--ink-soft); margin-bottom: 1.1rem; max-width: 52ch; }

.stats { display: flex; flex-wrap: wrap; gap: 2rem 2.6rem; margin-top: 2rem;
  padding-top: 1.8rem; border-top: 1px solid var(--line); }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: var(--serif); font-size: 2.4rem; color: var(--ink); line-height: 1; display: inline; }
.stat-suffix { font-family: var(--serif); font-size: 1.4rem; color: var(--accent); }
.stat-label { font-size: .82rem; color: var(--ink-mute); margin-top: .35rem; max-width: 16ch; }

/* =============================================================
   11. Menu
   ============================================================= */
.menu { padding: clamp(4rem, 10vh, 8rem) 0; background: var(--bg-2); }
.menu-head { text-align: center; display: flex; flex-direction: column; align-items: center; }
.menu-head .section-title { max-width: 18ch; }
.menu-intro { color: var(--ink-mute); max-width: 46ch; }

.menu-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem;
  margin: 2.4rem 0 2.8rem; }
.menu-tab {
  padding: .55rem 1.25rem; border-radius: 100px; font-size: .9rem; font-weight: 500;
  color: var(--ink-soft); background: transparent; border: 1px solid var(--line);
  transition: all .3s var(--ease-out);
}
.menu-tab:hover { border-color: var(--accent); color: var(--accent); }
.menu-tab.is-active { background: var(--accent); color: var(--bg); border-color: var(--accent); }

.menu-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.2rem;
}
.dish {
  background: var(--paper); border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line-soft);
  transition: transform .2s var(--ease-out), box-shadow .5s var(--ease-out);
  will-change: transform;
  transform-style: preserve-3d;
  display: flex; flex-direction: column;
}
.dish:hover {
  box-shadow: 0 26px 60px -30px rgba(34,29,23,.5);
}
.dish-media { position: relative; overflow: hidden; aspect-ratio: 16/10; }
.dish-media img { width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease-out), filter .6s var(--ease-out); }
.dish:hover .dish-media img { transform: scale(1.07); filter: saturate(1.14); }
.dish-tag {
  position: absolute; top: .8rem; left: .8rem;
  background: var(--paper); color: var(--accent);
  font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
  padding: .3rem .7rem; border-radius: 100px;
  box-shadow: 0 6px 18px -8px rgba(34,29,23,.5);
}
.dish-body { padding: 1.15rem 1.25rem 1.35rem; }
.dish-row { display: flex; align-items: baseline; gap: .8rem; justify-content: space-between; }
.dish-row h3 { font-family: var(--serif); font-size: 1.3rem; }
.dish-price { font-family: var(--serif); font-size: 1.15rem; color: var(--accent); white-space: nowrap; }
.dish-body p { font-size: .9rem; color: var(--ink-mute); margin-top: .4rem; line-height: 1.55; }

.dish-text { background: transparent; border: none; border-bottom: 1px solid var(--line);
  border-radius: 0; padding-bottom: .3rem; }
.dish-text:hover { box-shadow: none; }
.dish-text .dish-body { padding: 1rem .2rem 1.1rem; }
.dish-text .dish-row { border-bottom: none; }
.dish-text .dish-price { color: var(--accent); }

.dish.is-hidden { display: none; }

.menu-note { text-align: center; color: var(--ink-mute); margin-top: 2.6rem; font-size: .95rem; }
.menu-note strong { color: var(--accent); }

/* =============================================================
   12. Ambiente
   ============================================================= */
.ambiente { padding: clamp(4rem, 10vh, 8rem) 0; }
.ambiente-head { max-width: 40ch; margin-bottom: 2.4rem; }
.ambiente-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.amb { overflow: hidden; border-radius: 14px; }
.amb img { width: 100%; height: 100%; object-fit: cover;
  transition: transform .9s var(--ease-out); aspect-ratio: 3/2; }
.amb:hover img { transform: scale(1.05); }
.amb-big img { aspect-ratio: 16/10; }

/* =============================================================
   13. Quotes
   ============================================================= */
.quotes { padding: clamp(3rem, 8vh, 6rem) 0; background: var(--ink); color: var(--bg); }
.quotes .container { display: grid; gap: 2.5rem; }
.quote p {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.4rem, 3.2vw, 2.1rem); line-height: 1.28;
  max-width: 24ch;
}
.quote cite { display: block; margin-top: 1rem; font-style: normal; font-size: .85rem;
  letter-spacing: .1em; text-transform: uppercase; color: #d8b48f; }

/* =============================================================
   14. Reservar
   ============================================================= */
.reservar { position: relative; padding: clamp(4rem, 10vh, 8rem) 0; overflow: hidden;
  background: var(--bg-2); }
.reservar-halo {
  position: absolute; inset: -40% -10% auto -10%; height: 120%;
  background: radial-gradient(50% 45% at 70% 30%, rgba(181,80,47,.16), transparent 70%),
              radial-gradient(40% 40% at 20% 80%, rgba(92,107,60,.14), transparent 70%);
  filter: blur(30px); pointer-events: none;
}
.reservar-grid { position: relative; display: grid; gap: clamp(2.4rem, 5vw, 4.5rem);
  align-items: start; }
.reservar-info p { color: var(--ink-soft); max-width: 44ch; }
.reservar-details { list-style: none; margin-top: 2rem; display: grid; gap: 1.2rem; }
.reservar-details li { display: grid; gap: .2rem; padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line); }
.rd-label { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.rd-value { font-size: 1.02rem; color: var(--ink); line-height: 1.5; }
a.rd-value:hover { color: var(--accent); }

.reservar-form {
  background: var(--paper); padding: clamp(1.6rem, 4vw, 2.4rem);
  border-radius: 18px; border: 1px solid var(--line-soft);
  box-shadow: 0 30px 70px -40px rgba(34,29,23,.5);
  display: grid; gap: 1.1rem;
}
.field { display: grid; gap: .4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { font-size: .8rem; letter-spacing: .04em; color: var(--ink-soft); font-weight: 500; }
.field label .opt { color: var(--ink-mute); font-weight: 400; }
.field input, .field select {
  width: 100%; padding: .8rem .9rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg);
  font-size: .95rem; color: var(--ink);
  transition: border-color .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(181,80,47,.15);
}
.field input::placeholder { color: #a99e8d; }

.reservar-submit { margin-top: .4rem; width: 100%; position: relative; overflow: hidden; }
.submit-check { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 30; stroke-dashoffset: 30; opacity: 0; }
.reservar-submit.is-done .submit-label { opacity: .0; }
.reservar-submit.is-done .submit-check { opacity: 1; animation: drawCheck .5s var(--ease-out) forwards; }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.reservar-submit.is-sending { pointer-events: none; opacity: .8; }

.reservar-feedback { font-size: .9rem; color: var(--accent-2); min-height: 1.2rem; margin-top: .2rem; }
.reservar-feedback.is-error { color: var(--accent); }

/* =============================================================
   15. Footer
   ============================================================= */
.footer { background: var(--ink); color: var(--bg); padding: clamp(3rem, 7vh, 5rem) 0 2.5rem; }
.footer-inner { display: grid; gap: 1rem; text-align: center; justify-items: center; }
.footer-brand { display: flex; align-items: center; gap: .55rem; font-family: var(--serif);
  font-size: 1.3rem; }
.footer-brand .nav-logo-mark { background: var(--accent); }
.footer-tag { color: rgba(255,253,248,.7); max-width: 40ch; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem;
  margin: .6rem 0; }
.footer-links a { color: rgba(255,253,248,.85); font-size: .95rem; position: relative; }
.footer-links a:hover { color: #f2c48f; }
.footer-legal { font-size: .8rem; color: rgba(255,253,248,.5); }
.footer-legal a { color: rgba(255,253,248,.7); text-decoration: underline; text-underline-offset: 3px; }

/* =============================================================
   16. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .menu-grid { grid-template-columns: 1fr 1fr; }
  .dish-text { grid-column: auto; }
}

@media (min-width: 720px) {
  .ambiente-grid { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
  .amb-big { grid-row: span 2; }
  .quotes .container { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .about-grid { grid-template-columns: 0.85fr 1fr; }
  .menu-grid { grid-template-columns: repeat(3, 1fr); }
  .dish-feature { grid-row: span 1; }
  .reservar-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1280px) {
  .menu-grid { gap: 1.5rem; }
}

/* =============================================================
   17. Reduced motion — solo lo intrusivo
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-scroll span { animation: none; }
  .splash-mark { animation: none; }
  .marquee-track { animation-duration: 60s; }
}
