/* =========================================================
   El Paisano — demo landing
   Todos los valores de contenido son de muestra (ver content/demo-data.json)
   ========================================================= */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=Inter:wght@400;500;600;700&display=swap');

/* ---------- Design tokens ---------- */
:root {
  /* base brand colors (source of truth, from the confirmed mascot palette) */
  --ink: #1A1512;
  --cream: #F7EEDD;
  --red: #D93A2B;       /* decorative / large text / backgrounds only */
  --red-deep: #B93223;  /* text-safe red, AA on cream and as button bg with white text */
  --green: #5B7A4F;     /* backgrounds / buttons with white text */
  --green-deep: #45603A;/* text-safe green on cream */
  --mustard: #D9A441;   /* backgrounds only — always pair with --ink text */

  --white: #FFFFFF;

  /* semantic surface tokens — redefined per theme below */
  --bg: var(--cream);
  --bg-alt: #EFE3CC;
  --surface-dark: var(--ink);
  --text: var(--ink);
  --text-on-dark: var(--cream);
  --text-muted: #55483C;
  --text-muted-on-dark: #C9BBA9;

  --accent: var(--red-deep);
  --accent-text: #FFFFFF;
  --accent-2: var(--green);
  --accent-2-text: #FFFFFF;
  --accent-3: var(--mustard);
  --accent-3-text: var(--ink);
  --link: var(--red-deep);

  --border: rgba(26, 21, 18, 0.14);
  --border-on-dark: rgba(247, 238, 221, 0.18);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --font-display: "Bricolage Grotesque", "Inter", sans-serif;
  --font-body: "Inter", "Public Sans", sans-serif;

  --shadow-soft: 0 12px 32px rgba(26, 21, 18, 0.16);
  --shadow-tight: 0 4px 14px rgba(26, 21, 18, 0.12);

  --container: 1180px;
  --transition-theme: background-color 220ms ease, color 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

/* ----- Theme: balanced (default, decided direction) ----- */
:root[data-theme="balanced"],
:root:not([data-theme]) {
  --accent: var(--red-deep);
  --accent-text: #FFFFFF;
  --accent-2: var(--green);
  --accent-2-text: #FFFFFF;
  --accent-3: var(--mustard);
  --accent-3-text: var(--ink);
  --link: var(--red-deep);
}

/* ----- Theme: rojo-forward ----- */
:root[data-theme="rojo"] {
  --accent: var(--red-deep);
  --accent-text: #FFFFFF;
  --accent-2: var(--red);
  --accent-2-text: #FFFFFF;
  --accent-3: var(--mustard);
  --accent-3-text: var(--ink);
  --link: var(--red-deep);
  --bg-alt: #F1DAD2;
}

/* ----- Theme: verde-forward ----- */
:root[data-theme="verde"] {
  --accent: var(--green-deep);
  --accent-text: #FFFFFF;
  --accent-2: var(--green);
  --accent-2-text: #FFFFFF;
  --accent-3: var(--mustard);
  --accent-3-text: var(--ink);
  --link: var(--green-deep);
  --bg-alt: #E4E9DC;
}

/* ----- Theme: mostaza-forward ----- */
:root[data-theme="mostaza"] {
  --accent: var(--mustard);
  --accent-text: var(--ink);
  --accent-2: var(--red-deep);
  --accent-2-text: #FFFFFF;
  --accent-3: var(--green);
  --accent-3-text: #FFFFFF;
  --link: var(--red-deep);
  --bg-alt: #F3E3BE;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: var(--transition-theme);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 0.5em; line-height: 1.08; }
p { margin: 0 0 1em; }
a { color: var(--link); }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}
@media (min-width: 768px) { .container { padding-inline: 32px; } }

.section { padding: 64px 0; }
@media (min-width: 768px) { .section { padding: 96px 0; } }

.section-dark { background: var(--surface-dark); color: var(--text-on-dark); transition: var(--transition-theme); }
.section-dark h2, .section-dark h3 { color: var(--text-on-dark); }
.section-alt { background: var(--bg-alt); transition: var(--transition-theme); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-dark .eyebrow { color: var(--accent-3); }

.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }
.section-dark .section-head p { color: var(--text-muted-on-dark); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--cream);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Focus visibility ---------- */
:focus-visible {
  outline: 3px solid var(--accent-3);
  outline-offset: 3px;
}

/* ---------- Demo banner ---------- */
.demo-banner {
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 8px 16px;
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 2px solid var(--accent-3);
}
.demo-banner strong { color: var(--accent-3); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 32px;
  z-index: 190;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition-theme);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}
.brand img { width: 36px; height: 36px; }

.nav-links {
  display: none;
  gap: 24px;
  align-items: center;
}
.nav-links a {
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--text);
}
.nav-links a:hover { color: var(--accent); }
@media (min-width: 900px) {
  .nav-links { display: flex; }
}

.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: inline-flex; }
@media (min-width: 900px) { .nav-toggle { display: none; } }

/* Below 900px the theme switcher and the header order-CTA move into the
   mobile nav panel (see .mobile-nav-actions) so the header never overflows
   at narrow widths; above 900px they live inline in the header instead. */
@media (max-width: 899px) {
  .header-actions > .theme-switcher,
  .header-actions > a.btn-primary {
    display: none;
  }
}
#mobile-nav { display: none; }
#mobile-nav:not([hidden]) { display: block; }
.mobile-nav-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.mobile-nav-actions .btn { width: 100%; }

/* ---------- Theme switcher ---------- */
.theme-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}
.theme-switcher button {
  border: none;
  background: transparent;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
}
.theme-switcher button .swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--white);
  box-shadow: 0 0 0 1px var(--border);
}
.theme-switcher button[aria-pressed="true"] {
  background: var(--surface-dark);
  box-shadow: 0 0 0 2px var(--accent-3);
}
.theme-switcher button[data-theme-btn="balanced"] .swatch { background: linear-gradient(135deg, #B93223 50%, #5B7A4F 50%); }
.theme-switcher button[data-theme-btn="rojo"] .swatch { background: #B93223; }
.theme-switcher button[data-theme-btn="verde"] .swatch { background: #45603A; }
.theme-switcher button[data-theme-btn="mostaza"] .swatch { background: #D9A441; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
  line-height: 1;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-tight); }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-secondary { background: transparent; color: var(--text-on-dark); border-color: var(--border-on-dark); }
.section:not(.section-dark) .btn-secondary { color: var(--text); border-color: var(--border); }
.btn-block { width: 100%; }
.btn-sm { padding: 10px 18px; font-size: 0.9rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  color: var(--cream);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  z-index: 0;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26,21,18,0.35) 0%, rgba(26,21,18,0.55) 55%, rgba(26,21,18,0.92) 100%);
  z-index: 1;
}
.hero-mascot-watermark {
  position: absolute;
  right: -40px;
  top: 8%;
  width: 46vw;
  max-width: 480px;
  opacity: 0.14;
  z-index: 1;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-block: 48px 56px;
}
.hero-content .eyebrow { color: var(--accent-3); }
.hero-content h1 {
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  color: var(--cream);
  max-width: 14ch;
}
.hero-content .lede {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  max-width: 46ch;
  color: var(--cream);
  opacity: 0.92;
}
.hero-cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* ---------- Menu ---------- */
.menu-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 28px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.menu-tabs button {
  flex: 0 0 auto;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  min-height: 44px;
}
.menu-tabs button[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.menu-category { margin-bottom: 8px; }
.menu-category-note { color: var(--text-muted); margin-top: -8px; margin-bottom: 20px; font-size: 0.95rem; }

.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .menu-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .menu-grid { grid-template-columns: repeat(3, 1fr); } }

.menu-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.menu-card-media {
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
  overflow: hidden;
}
.menu-card-media img { width: 100%; height: 100%; object-fit: cover; }
.menu-card-media.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 700;
  text-align: center;
  padding: 12px;
}
.menu-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.menu-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.menu-card-top h3 { font-size: 1.1rem; margin: 0; }
.menu-price { font-weight: 800; font-size: 1.05rem; color: var(--red-deep); white-space: nowrap; }
.menu-card-body p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-3);
  color: var(--accent-3-text);
}
.badge-outline {
  background: transparent;
  border: 1.5px solid currentColor;
}
.badge-coming {
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1.5px dashed var(--border);
}

/* ---------- Location / hours block ---------- */
.location-block {
  background: var(--accent-3);
  color: var(--accent-3-text);
  border-radius: var(--radius-lg);
  padding: 40px 28px;
  position: relative;
  overflow: hidden;
}
.location-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(26,21,18,0.1);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.location-status .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red-deep);
  animation: pulse 1.8s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .location-status .dot { animation: none; } }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.location-big {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1.02;
  max-width: 16ch;
}
.location-addr { font-size: 1.1rem; font-weight: 600; margin-top: 12px; }
.location-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 32px;
}
@media (min-width: 800px) { .location-grid { grid-template-columns: 1.3fr 1fr; align-items: end; } }

.hours-list { display: flex; flex-direction: column; gap: 6px; }
.hours-row { display: flex; justify-content: space-between; font-size: 0.98rem; padding: 6px 0; border-bottom: 1px solid rgba(26,21,18,0.12); }
.hours-row span:first-child { font-weight: 700; }

.mascot-anchor {
  position: absolute;
  right: -6%;
  bottom: -8%;
  width: 220px;
  opacity: 0.9;
  pointer-events: none;
}
@media (max-width: 640px) { .mascot-anchor { width: 130px; right: -10%; bottom: -6%; opacity: 0.7; } }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
@media (max-width: 480px) { .gallery-item:first-child { grid-column: span 2; aspect-ratio: 16/10; } }

/* ---------- Catering ---------- */
.catering-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) { .catering-grid { grid-template-columns: repeat(3, 1fr); } }
.catering-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
}
.catering-card h3 { color: var(--accent-2); font-size: 1.3rem; }
.catering-price { font-weight: 800; margin-top: 14px; color: var(--red-deep); }

/* ---------- Reviews ---------- */
.reviews-disclaimer {
  font-size: 0.85rem;
  color: var(--text-muted-on-dark);
  border: 1px dashed var(--border-on-dark);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 32px;
  max-width: 640px;
}
.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  position: relative;
}
@media (min-width: 768px) { .reviews-grid { grid-template-columns: repeat(3, 1fr); } }
.review-card {
  background: rgba(247,238,221,0.06);
  border: 1px solid var(--border-on-dark);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
}
.review-stars { color: var(--accent-3); letter-spacing: 2px; margin-bottom: 10px; }
.review-name { font-weight: 700; margin-top: 12px; font-size: 0.92rem; color: var(--text-muted-on-dark); }
.reviews-mascot {
  width: 96px;
  margin: 0 auto 8px;
  display: block;
}

/* ---------- Ordering ---------- */
.order-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 900px) { .order-grid { grid-template-columns: 1fr 1fr; } }
.order-channels { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.order-channel-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--white);
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  min-height: 44px;
}
.order-channel-btn:hover { border-color: var(--accent); }
.order-channel-btn small { display: block; font-weight: 500; color: var(--text-muted); font-size: 0.78rem; }

.commission-note {
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 20px;
  font-size: 0.92rem;
  border-left: 4px solid var(--accent-2);
}

.order-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
}
.order-form .form-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 0.88rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  font-family: inherit;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  min-height: 44px;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.form-status { margin-top: 14px; font-weight: 600; font-size: 0.92rem; }
.form-status[data-state="success"] { color: var(--green-deep); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; margin-bottom: 10px; }
.footer-brand img { width: 32px; }
.footer-col h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-3); margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--cream); text-decoration: none; opacity: 0.85; }
.footer-col a:hover { opacity: 1; }
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border-on-dark);
  font-size: 0.82rem;
  color: var(--text-muted-on-dark);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

/* ---------- Comparativa page ---------- */
.finding-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  margin-bottom: 20px;
}
.finding-card h3 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }
.finding-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 0.95rem;
  flex: 0 0 auto;
}
.finding-evidence {
  background: var(--bg-alt);
  border-left: 4px solid var(--accent-2);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-style: italic;
  margin-top: 12px;
}
.gap-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; }
.limitation-note {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 24px; text-decoration: none; }

/* ---------- Reveal animation hook (GSAP toggles this) ---------- */
.reveal { opacity: 0; transform: translateY(24px); }
.reveal.reveal-visible { opacity: 1; transform: translateY(0); }
.no-js .reveal, .reduced-motion .reveal { opacity: 1; transform: none; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
