/*
  Chamorros y Cochinita Pibil — menú digital (Dark Kitchen)
  Identidad: negro + crema papel + naranja y verde de la tradición
  yucateca, acento rosa de cebolla morada. Mismo mecanismo de
  carrito/WhatsApp que el demo de La Muñeca, identidad propia.
*/

:root {
  --negro: #0D0D0C;
  --negro-2: #1A1917;
  --crema: #F3E8D2;
  --crema-2: #EAD9B2;
  --blanco: #FFFFFF;
  --ink: #241B14;
  --ink-mid: #6B5C46;
  --linea: #D8C4A0;

  --naranja: #E8752C;
  --naranja-deep: #B8541A;
  --verde: #3F7D3B;
  --verde-deep: #2A5B27;
  --rosa: #D45C86;
  --rosa-deep: #A83D63;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 2px 4px rgba(0, 0, 0, 0.25), 0 10px 22px -12px rgba(0, 0, 0, 0.5);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 58px;
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--crema);
  color: var(--ink);
  font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, .brand-word {
  font-family: 'Baloo 2', 'Segoe UI', system-ui, sans-serif;
}

img { max-width: 100%; display: block; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 18px;
}

/* — SKIP LINK — */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--crema);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  text-decoration: none;
  font-weight: 700;
  transition: top 150ms var(--ease);
}
.skip-link:focus { top: 12px; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--naranja);
  outline-offset: 2px;
  border-radius: 6px;
}

/* — HERO — */
.hero {
  position: relative;
  background: var(--negro);
  overflow: hidden;
  padding: 40px 0 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(232, 117, 44, 0.14) 2px, transparent 2.5px);
  background-size: 26px 26px;
  opacity: 0.6;
  pointer-events: none;
}

.hero-badge {
  position: absolute;
  top: 22px;
  right: 18px;
  z-index: 2;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--naranja);
  border: 2px dashed rgba(255, 255, 255, 0.55);
  color: var(--negro);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transform: rotate(8deg);
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  line-height: 1.15;
  box-shadow: var(--shadow-soft);
}
.hero-badge-small { font-size: 11px; font-weight: 600; }

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding-bottom: 30px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--naranja);
  margin: 0 0 6px;
}
.hero-eyebrow svg { width: 18px; height: 18px; flex-shrink: 0; }

.hero-title {
  font-size: clamp(2rem, 8vw, 3.4rem);
  font-weight: 800;
  line-height: 1.02;
  color: var(--crema);
  margin: 2px 0 12px;
  letter-spacing: 0.01em;
  max-width: 14ch;
}
.hero-title-y {
  display: block;
  font-family: 'Caveat', cursive;
  font-size: 0.55em;
  font-weight: 600;
  color: var(--naranja);
  line-height: 1;
  margin: 2px 0;
}

.hero-tagline {
  font-family: 'Caveat', cursive;
  font-size: clamp(22px, 4.5vw, 30px);
  font-weight: 700;
  color: var(--verde);
  filter: brightness(1.4);
  line-height: 1.15;
  max-width: 26ch;
  margin: 0 0 10px;
}

.hero-sub {
  font-size: 14.5px;
  font-weight: 700;
  color: rgba(243, 232, 210, 0.75);
  max-width: 30ch;
  margin: 0 0 18px;
}

.hero-scroll-cue {
  margin-top: 6px;
  color: rgba(243, 232, 210, 0.6);
  animation: bob 1.8s ease-in-out infinite;
}
.hero-scroll-cue svg { width: 22px; height: 22px; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* Borde festoneado tipo papel picado, en verde hoja de plátano */
.zigzag {
  height: 16px;
  background-color: var(--crema);
  background-image:
    linear-gradient(135deg, var(--verde-deep) 25%, transparent 25%),
    linear-gradient(225deg, var(--verde-deep) 25%, transparent 25%);
  background-position: 0 0;
  background-size: 18px 18px;
  background-repeat: repeat-x;
}

@media (min-width: 700px) {
  .hero-inner { padding: 20px 0 44px; }
}

/* — NAV — */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--blanco);
  border-bottom: 3px solid var(--naranja);
}

.nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px 14px;
  -webkit-overflow-scrolling: touch;
}
.nav::-webkit-scrollbar { display: none; }

.nav-chip {
  flex-shrink: 0;
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: var(--crema);
  border: 2px solid var(--linea);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 140ms var(--ease), background 140ms ease, color 140ms ease, border-color 140ms ease;
}
.nav-chip:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) {
  .nav-chip:hover { border-color: var(--naranja); color: var(--naranja-deep); }
}
.nav-chip.is-active {
  background: var(--naranja);
  border-color: var(--naranja);
  color: var(--blanco);
}

/* — AVISO DE SERVICIO — */
.service-bar {
  background: var(--crema-2);
  border-bottom: 1px dashed var(--naranja-deep);
  padding: 10px 0;
}
.service-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.service-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--verde-deep);
}
.service-item svg { width: 17px; height: 17px; flex-shrink: 0; }

/* — SECCIONES DE MENÚ — */
.menu-section {
  padding: 34px 0 8px;
  scroll-margin-top: calc(var(--nav-h) + 10px);
}

.section-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.section-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--accent, var(--naranja));
  transform: rotate(45deg);
  flex-shrink: 0;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.section-note {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-deep, var(--naranja-deep));
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section-foot {
  font-family: 'Caveat', cursive;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-deep, var(--naranja-deep));
  margin: 10px 2px 0;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

.menu-grid.single {
  grid-template-columns: minmax(0, 320px);
}

.dish-card {
  background: var(--blanco);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 160ms var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .dish-card:hover { transform: translateY(-3px); }
}

.dish-name {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.dish-price {
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-deep, var(--naranja-deep));
}

/* — SELECTOR DE CANTIDAD (carrito) — */
.dish-qty {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.qty-btn {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--linea);
  background: var(--crema);
  color: var(--ink);
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 140ms var(--ease), background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.qty-btn:active { transform: scale(0.9); }
.qty-btn:disabled { opacity: 0.35; cursor: default; }

.qty-btn.qty-plus {
  background: var(--accent, var(--naranja));
  border-color: var(--accent, var(--naranja));
  color: var(--blanco);
}
@media (hover: hover) and (pointer: fine) {
  .qty-btn.qty-plus:not(:disabled):hover { background: var(--accent-deep, var(--naranja-deep)); }
  .qty-btn.qty-minus:not(:disabled):hover { border-color: var(--accent-deep, var(--naranja-deep)); color: var(--accent-deep, var(--naranja-deep)); }
}

.qty-value {
  min-width: 18px;
  text-align: center;
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: var(--ink);
}

.dish-card.is-selected {
  box-shadow: 0 0 0 2px var(--accent, var(--naranja)) inset, var(--shadow-soft);
}

/* acentos por categoría */
#cochinita { --accent: var(--naranja); --accent-deep: var(--naranja-deep); }
#chamorros { --accent: var(--verde); --accent-deep: var(--verde-deep); }

/* — DIVISOR DECORATIVO — */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 26px 0 6px;
}
.divider-line {
  height: 4px;
  width: 46px;
  border-radius: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--naranja) 0 8px,
    var(--verde) 8px 16px,
    var(--rosa) 16px 24px
  );
}
.divider-icon {
  width: 26px;
  height: 26px;
  color: var(--verde-deep);
  flex-shrink: 0;
}

/* — PERFECTOS PARA — */
.perfect-section { padding: 30px 0 10px; }

.perfect-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 560px;
  margin: 0 auto;
}
@media (min-width: 640px) {
  .perfect-grid { grid-template-columns: repeat(4, 1fr); max-width: none; }
}

.perfect-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  background: var(--blanco);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 18px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.perfect-item svg {
  width: 30px;
  height: 30px;
  color: var(--verde-deep);
}

/* — CÓMO PEDIR — */
.order-section { padding: 30px 0 40px; }

.order-card {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  background: var(--blanco);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.order-stripes {
  height: 14px;
  background-color: var(--blanco);
  background-image:
    linear-gradient(135deg, var(--naranja-deep) 25%, transparent 25%),
    linear-gradient(225deg, var(--naranja-deep) 25%, transparent 25%);
  background-position: 0 0;
  background-size: 16px 16px;
  background-repeat: repeat-x;
}

.order-body { padding: 22px 22px 24px; }

.order-text {
  margin: 0 0 16px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-mid);
}
.order-text strong { color: var(--ink); }

.order-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--linea);
  border-bottom: 1px solid var(--linea);
  margin-bottom: 18px;
}

.order-label {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-mid);
}

.order-value {
  font-weight: 800;
  color: var(--ink);
  text-align: right;
}
.order-value.mono {
  font-family: ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 15.5px;
  letter-spacing: 0.03em;
}

.order-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--blanco);
  background: var(--verde-deep);
  border: none;
  border-radius: 999px;
  padding: 13px 18px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 150ms var(--ease), background 150ms ease;
}
.order-btn svg { width: 19px; height: 19px; flex-shrink: 0; }
.order-btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .order-btn:hover { background: var(--verde); }
}

/* — BARRA DE PEDIDO — */
body.has-cart-bar { padding-bottom: 84px; }

.cart-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  display: flex;
  justify-content: center;
  padding: 12px 16px;
  background: var(--negro);
  border-top: 3px solid var(--naranja);
  transform: translateY(120%);
  transition: transform 220ms var(--ease);
}
.cart-bar.is-visible { transform: translateY(0); }

.cart-bar-inner {
  width: 100%;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.cart-summary {
  flex: 0 0 auto;
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: rgba(243, 232, 210, 0.75);
  line-height: 1.3;
}
.cart-summary strong {
  display: block;
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-size: 17px;
  color: var(--crema);
}

.cart-send-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--blanco);
  background: var(--naranja);
  border: 2px solid var(--negro);
  border-radius: 999px;
  padding: 13px 16px;
  cursor: pointer;
  transition: transform 150ms var(--ease), background 150ms ease;
}
.cart-send-btn svg { width: 19px; height: 19px; flex-shrink: 0; }
.cart-send-btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .cart-send-btn:hover { background: var(--naranja-deep); }
}

/* — FOOTER — */
.site-footer {
  background: var(--negro);
  color: rgba(243, 232, 210, 0.82);
  padding: 34px 0 26px;
  text-align: center;
}

.footer-brand {
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--crema);
  margin: 0 0 4px;
}

.footer-note {
  font-size: 13px;
  margin: 0;
  color: rgba(243, 232, 210, 0.6);
}

.footer-tagline-script {
  font-family: 'Caveat', cursive;
  font-size: 24px;
  font-weight: 700;
  color: var(--naranja);
  margin: 4px 0 0;
}

.footer-contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.footer-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(243, 232, 210, 0.2);
  color: var(--crema);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 140ms var(--ease), background 140ms ease, border-color 140ms ease;
}
.footer-contact-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.footer-contact-btn:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) {
  .footer-contact-btn:hover { background: rgba(243, 232, 210, 0.08); border-color: var(--naranja); }
}

.footer-credit {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(243, 232, 210, 0.12);
  font-size: 11px;
  color: rgba(243, 232, 210, 0.4);
}
.footer-credit a {
  color: rgba(243, 232, 210, 0.65);
  font-weight: 700;
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .footer-credit a:hover { color: var(--naranja); }
}

/* — MOTION — */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-scroll-cue { animation: none; }
  .dish-card, .nav-chip, .qty-btn, .cart-bar, .cart-send-btn, .order-btn { transition: none; }
}
