/* ============================================================
   RESTAURANTE LACHANS — Web oficial · Design system (editorial, dark)
   ============================================================ */

:root {
  --black:         #000000;
  --black-1:       #0a0a0a;
  --black-2:       #121212;
  --black-3:       #181818;
  --black-4:       #1f1f1f;
  --line:          rgba(255,255,255,0.08);
  --line-strong:   rgba(255,255,255,0.16);
  --gold:          #bf9b30;
  --gold-2:        #d4af37;
  --gold-soft:     rgba(191,155,48,0.12);
  --text:          #e8e6e1;
  --text-dim:      #9a968d;
  --text-muted:    #5e5b55;
  --serif:         'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --sans:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:          'JetBrains Mono', ui-monospace, monospace;
  --max:           1240px;
  --pad:           40px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: color .2s; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
img { max-width: 100%; display: block; }

::selection { background: var(--gold); color: var(--black); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background .3s, border-color .3s;
}
.nav.scrolled { background: rgba(0,0,0,0.94); }
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-brand img { height: 30px; opacity: 0.95; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-2); }
.nav-cta {
  padding: 10px 20px;
  border: 1px solid var(--gold);
  color: var(--gold-2) !important;
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 600;
  transition: background .2s, color .2s;
}
.nav-cta:hover { background: var(--gold); color: var(--black) !important; }

/* Hamburguesa */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px; background: var(--text);
  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); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 32px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--gold); color: var(--black); border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-2); border-color: var(--gold-2); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: 120px var(--pad) 96px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 40% at 85% 20%, rgba(191,155,48,0.10), transparent 70%),
    radial-gradient(ellipse 50% 60% at 10% 80%, rgba(191,155,48,0.06), transparent 60%),
    var(--black);
  border-bottom: 1px solid var(--line);
}
.hero-grain {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.22;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.45 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}
.hero-inner { max-width: var(--max); margin: 0 auto; position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 11px; color: var(--gold-2);
  letter-spacing: 0.15em; margin-bottom: 38px; font-weight: 500;
}
.hero-eyebrow .line { width: 44px; height: 1px; background: var(--gold); display: inline-block; }
.hero-title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(48px, 8vw, 110px); line-height: 0.98;
  letter-spacing: -0.02em; color: #fff; margin-bottom: 32px;
}
.hero-title em { font-style: italic; color: var(--gold-2); font-weight: 500; }
.hero-sub { max-width: 560px; font-size: 17px; color: var(--text-dim); line-height: 1.7; margin-bottom: 42px; }
.hero-ctas { display: flex; gap: 14px; margin-bottom: 80px; flex-wrap: wrap; }
.hero-stats {
  display: grid; grid-template-columns: repeat(3, auto); gap: 64px;
  padding-top: 36px; border-top: 1px solid var(--line); max-width: 760px;
}
.hero-stats > div { display: flex; flex-direction: column; }
.hero-stats .num {
  font-family: var(--serif); font-size: 34px; font-weight: 500;
  color: #fff; line-height: 1; margin-bottom: 8px; font-style: italic;
}
.hero-stats .lbl {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--text-muted); text-transform: uppercase;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 120px var(--pad); max-width: var(--max); margin: 0 auto; position: relative; }
.section.dark {
  background: var(--black-1); max-width: none;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.section.dark > *:not(.contact-wrap) { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section.dark .contact-wrap { max-width: var(--max); margin: 0 auto; }

.section-head { max-width: 720px; margin-bottom: 60px; }
.kicker {
  display: inline-block; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; color: var(--gold-2); text-transform: uppercase;
  margin-bottom: 20px; font-weight: 500;
}
.section h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(36px, 5.5vw, 68px); line-height: 1.05;
  letter-spacing: -0.015em; color: #fff; margin-bottom: 22px;
}
.section h2 em { font-style: italic; color: var(--gold-2); }
.section-head p { font-size: 16px; color: var(--text-dim); line-height: 1.75; max-width: 620px; }
.section-head p strong { color: var(--text); font-weight: 500; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   PLACEHOLDERS de foto
   ============================================================ */
.ph {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center;
  background:
    repeating-linear-gradient(45deg, rgba(191,155,48,0.04) 0 12px, transparent 12px 24px),
    var(--black-2);
  border: 1px dashed var(--line-strong);
  color: var(--text-dim); min-height: 240px; overflow: hidden;
}
.ph::before {
  content: "◭"; font-size: 30px; color: var(--gold); opacity: .55; margin-bottom: 4px;
}
.ph-label { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--text); }
.ph-sub { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; color: var(--text-muted); }
.ph-tall { min-height: 100%; }

/* ============================================================
   NOSOTROS
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: stretch; }
.about-text h2 { margin-top: 6px; }
.about-text p { color: var(--text-dim); line-height: 1.8; margin-bottom: 18px; max-width: 540px; }
.about-feats { margin-top: 34px; display: flex; flex-direction: column; gap: 16px; }
.about-feats > div { display: flex; align-items: baseline; gap: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.feat-n { font-family: var(--mono); font-size: 12px; color: var(--gold-2); letter-spacing: .1em; }
.about-photo { overflow: hidden; min-height: 100%; border: 1px solid var(--line); }
.about-photo img { width: 100%; height: 100%; min-height: 340px; object-fit: cover; }

/* ============================================================
   CARTA
   ============================================================ */
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 52px; }
.menu-cat {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 28px; color: var(--gold-2);
  margin: 0 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.menu-col .menu-cat:not(:first-child) { margin-top: 44px; }
.menu-note { font-family: var(--mono); font-size: 11px; color: var(--text-muted); letter-spacing: .04em; margin: -10px 0 16px; }
.menu-list { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.menu-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.dish { display: flex; flex-direction: column; gap: 3px; }
.dish-name { font-size: 16px; color: var(--text); font-weight: 500; }
.dish-desc { font-size: 13px; color: var(--text-muted); line-height: 1.4; }
.dish-price {
  font-family: var(--serif); font-size: 19px; color: var(--gold-2);
  white-space: nowrap; flex-shrink: 0;
}
.dish-price::after { content: " €"; font-size: 13px; color: var(--gold); }
.dish-price small { font-size: 11px; color: var(--text-muted); }
.dish-price small::before { content: ""; }

/* Menú del día */
.menudia {
  margin-top: 72px; display: grid; grid-template-columns: 1fr auto; gap: 40px;
  align-items: center; padding: 44px; background: var(--black-2);
  border: 1px solid var(--gold); border-left-width: 3px;
}
.menudia-info h3 { font-family: var(--serif); font-size: 40px; font-weight: 500; color: #fff; margin: 4px 0 10px; }
.menudia-info p { color: var(--text-dim); max-width: 520px; }
.menudia-price { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.md-amount { font-family: var(--serif); font-size: 56px; color: var(--gold-2); line-height: 1; }
.md-lbl { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; }

/* ============================================================
   GALERÍA (mosaico)
   ============================================================ */
.gallery {
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
}
.gallery .ph { min-height: 0; height: 100%; }
.gallery figure { height: 100%; overflow: hidden; background: var(--black-2); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery figure:hover img { transform: scale(1.04); }
.g1 { grid-column: span 2; grid-row: span 2; }
.g2 { grid-column: span 1; grid-row: span 2; }
.g3 { grid-column: span 1; }
.g4 { grid-column: span 2; }
.g5 { grid-column: span 1; }

/* ============================================================
   HORARIO + UBICACIÓN
   ============================================================ */
.horario-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: stretch; }
.horario-card { background: var(--black-2); border: 1px solid var(--line); padding: 38px; }
.horario-card h3 { font-family: var(--serif); font-size: 30px; font-weight: 500; color: #fff; margin-bottom: 22px; }
.hours { width: 100%; border-collapse: collapse; margin-bottom: 30px; }
.hours th, .hours td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.hours th { font-weight: 500; color: var(--text); width: 42%; }
.hours td { color: var(--gold-2); font-family: var(--mono); font-size: 13px; text-align: right; }
.loc-dl { margin-bottom: 26px; }
.loc-dl dt { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-top: 16px; }
.loc-dl dd { color: var(--text); line-height: 1.6; margin-top: 4px; }
.loc-dl a:hover { color: var(--gold-2); }

#map { min-height: 460px; height: 100%; border: 1px solid var(--line); background: #111; }

/* Leaflet dark skin */
.leaflet-container { background: #0a0a0a; font-family: var(--sans); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: var(--black-3); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
.leaflet-popup-content { margin: 14px 18px; font-size: 13px; }
.leaflet-popup-content strong { color: var(--gold-2); display: block; margin-bottom: 4px; font-size: 14px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--text-dim); }
.leaflet-control-attribution { background: rgba(0,0,0,0.7) !important; color: var(--text-muted) !important; font-size: 10px; }
.leaflet-control-attribution a { color: var(--text-dim) !important; }

/* ============================================================
   RESERVAS / CONTACTO
   ============================================================ */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact-info h2 { margin-top: 6px; }
.reserva-lead { color: var(--text-dim); line-height: 1.8; max-width: 440px; margin-bottom: 28px; }
.reserva-direct { display: flex; flex-direction: column; gap: 12px; max-width: 320px; }
.reserva-direct .btn { width: 100%; }

.contact-form { display: flex; flex-direction: column; gap: 18px; background: var(--black-2); border: 1px solid var(--line); padding: 38px; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label { display: flex; flex-direction: column; gap: 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); font-weight: 500; }
.contact-form input, .contact-form textarea, .contact-form select {
  padding: 13px 15px; background: var(--black); border: 1px solid var(--line-strong);
  color: #fff; font-size: 15px; text-transform: none; letter-spacing: 0; transition: border-color .2s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--gold); }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--text-muted); }
.contact-form input[type="date"], .contact-form input[type="time"] { color-scheme: dark; }
.contact-form .btn { margin-top: 6px; }
.form-ok { color: var(--gold-2); font-size: 14px; font-family: var(--mono); line-height: 1.5; }
.form-mini { font-size: 11px; color: var(--text-muted); line-height: 1.5; text-transform: none; letter-spacing: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--black); border-top: 1px solid var(--line); padding: 72px var(--pad) 48px; }
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-logo { height: 34px; opacity: .9; margin-bottom: 44px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.footer-cols h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); font-weight: 500; margin-bottom: 14px; }
.footer-cols p { color: var(--text-dim); line-height: 1.8; font-size: 15px; }
.footer-cols a:hover { color: var(--gold-2); }
.footer-social a { color: var(--text); }
.footer .muted { color: var(--text-muted); font-size: 12px; margin-top: 28px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .menu-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .menu-col:last-child { grid-column: span 2; }
  .menu-col:last-child .menu-cat:first-child { margin-top: 0; }
}

@media (max-width: 860px) {
  :root { --pad: 22px; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    flex-direction: column; align-items: flex-start; gap: 8px;
    background: var(--black-1); border-left: 1px solid var(--line);
    padding: 96px 30px 30px; transform: translateX(100%); transition: transform .3s ease;
    z-index: 40;
  }
  .nav-links.open { transform: none; }
  .nav-links a { font-size: 15px; padding: 10px 0; width: 100%; }
  .nav-cta { margin-top: 12px; width: 100%; text-align: center; }

  .section { padding: 80px var(--pad); }
  .hero { padding: 80px var(--pad) 64px; }
  .hero-stats { grid-template-columns: 1fr; gap: 22px; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .ph-tall { min-height: 320px; }
  .menu-grid { grid-template-columns: 1fr; gap: 36px; }
  .menu-col { grid-column: auto !important; }
  .menu-col .menu-cat:not(:first-child) { margin-top: 38px; }
  .menudia { grid-template-columns: 1fr; text-align: left; gap: 24px; padding: 32px; }
  .menudia-price { text-align: left; align-items: flex-start; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .g1, .g2, .g3, .g4, .g5 { grid-column: auto; grid-row: auto; }
  .g1 { grid-column: span 2; }
  .horario-grid { grid-template-columns: 1fr; }
  #map { min-height: 360px; }
  .contact-wrap { grid-template-columns: 1fr; gap: 40px; }
  .contact-form { padding: 28px; }
  .reserva-direct { max-width: none; }
  .footer-cols { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 460px) {
  .contact-form .row { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .g1 { grid-column: auto; }
}
