/* ==========================================================================
   BASE
   Colores, tipografía, reset y piezas comunes (contenedor, botones,
   encabezados de sección). Para otro cliente se cambian los colores de
   :root y listo. Mobile first: los @media agregan cosas para pantallas
   más grandes.
   ========================================================================== */

:root {
  /* Fondos (de más oscuro a más claro) */
  --bg: #0e0d0b;
  --bg-2: #14120f;
  --surface: #1b1814;
  --surface-2: #24201b;
  --line: rgba(255, 236, 210, 0.1);
  --line-strong: rgba(255, 236, 210, 0.2);

  /* Texto */
  --text: #f3ede4;
  --muted: #a8a093;
  --on-gold: #17120b;

  /* Acentos: dorado principal + cobre de apoyo */
  --gold: #c99a52;
  --gold-light: #e2bd7c;
  --copper: #b5693b;
  --gold-soft: rgba(201, 154, 82, 0.14);

  /* Estados */
  --ok: #6dbb84;
  --warn: #e0a54a;
  --danger: #e06a55;

  /* Tipografía */
  --font-display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Medidas */
  --container: 1180px;
  --gutter: 20px;
  --radius: 14px;
  --radius-sm: 9px;
  --header-h: 64px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Controles nativos (selects, fechas, scroll) en versión oscura */
  color-scheme: dark;
}

@media (min-width: 900px) {
  :root { --gutter: 32px; --header-h: 76px; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
svg { width: 1em; height: 1em; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--on-gold); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 700;
}
.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: 72px; }
.section--alt { background: var(--bg-2); }
@media (min-width: 900px) { .section { padding-block: 112px; } }

/* Encabezado de sección: etiqueta dorada + título grande + bajada */
.section-head { margin-bottom: 36px; max-width: 640px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--gold); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
}
.section-head__eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.section-head__title {
  margin-top: 10px;
  font-family: var(--font-display); font-weight: 400; line-height: 0.95; letter-spacing: 0.01em;
  font-size: clamp(2.7rem, 9vw, 4.4rem);
}
.section-head__intro { margin-top: 12px; color: var(--muted); font-size: 1.05rem; }
@media (min-width: 900px) { .section-head { margin-bottom: 52px; } }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border-radius: 999px;
  font-weight: 700; font-size: 0.98rem; letter-spacing: 0.02em;
  border: 1.5px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
  white-space: nowrap;
}
.btn svg { font-size: 1.15em; }
.btn:active { transform: scale(0.97); }
.btn--gold { background: var(--gold); color: var(--on-gold); }
.btn--gold:hover { background: var(--gold-light); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-light); }
.btn--whatsapp { background: #1fa855; color: #fff; }
.btn--whatsapp:hover { background: #22bb5f; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 0.9rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

/* ---------- Logo (monograma + nombre) ---------- */
.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo__mark {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid var(--gold); color: var(--gold);
  font-family: var(--font-display); font-size: 1.3rem; letter-spacing: 0.04em; line-height: 1;
  padding-top: 2px;
}
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__name { font-family: var(--font-display); font-size: 1.55rem; letter-spacing: 0.04em; }
.logo__tagline { margin-top: 3px; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }

/* ---------- Redes ---------- */
.socials { display: flex; gap: 10px; }
.social {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong); font-size: 1.2rem; transition: 0.2s;
}
.social:hover { border-color: var(--gold); color: var(--gold); }

/* Foto que no cargó: recuadro con iniciales (core/utils.js → fotoConRespaldo) */
.foto-respaldo {
  display: grid; place-items: center; width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--surface-2), var(--bg));
  color: var(--gold); font-family: var(--font-display); font-size: 3rem;
}

/* ---------- Formularios (reserva, login y panel) ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field label span { color: var(--muted); font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 52px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1.5px solid var(--line-strong);
  font-size: 16px; /* 16px evita el zoom automático de iPhone */
  transition: border-color 0.2s;
}
.field textarea { resize: vertical; min-height: 72px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); }
.field input::placeholder, .field textarea::placeholder { color: rgba(168, 160, 147, 0.6); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: 0.86rem; font-weight: 600; min-height: 0; }
.field__error:empty { display: none; }

/* Etiquetas chicas tipo "Más pedido" */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--gold-soft); color: var(--gold-light);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}

/* Aparición suave al hacer scroll (la clase la pone header.js) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
