/*
  La Papa de Tu Ex - Menú digital
  Edita colores principales aquí.
*/
:root {
  --bg: #fff3c7;
  --bg-2: #ffbd2e;
  --brown: #4a1009;
  --brown-2: #6f1d10;
  --red: #ee1d28;
  --cream: #fff8df;
  --white: #fffdf7;
  --shadow: 0 24px 60px rgba(74, 16, 9, 0.2);
  --shadow-soft: 0 12px 32px rgba(74, 16, 9, 0.14);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --container: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--brown);
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.8), transparent 24rem),
    radial-gradient(circle at 85% 0%, rgba(238, 29, 40, 0.14), transparent 24rem),
    linear-gradient(160deg, var(--bg), var(--bg-2) 52%, #ffa825);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.1;
  background-image:
    radial-gradient(var(--brown) 1px, transparent 1px),
    radial-gradient(var(--brown) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: 0 0, 16px 16px;
  z-index: -1;
}

a {
  color: inherit;
}

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

button {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--brown);
  color: white;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  z-index: 30;
}

.skip-link:focus {
  top: 1rem;
}

/* —— Header —— */

.hero {
  padding: 1rem 1.2rem 0;
}

.header-bar {
  position: sticky;
  top: 0.75rem;
  z-index: 20;
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  gap: 0.45rem;
}

.topbar {
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: rgba(255, 253, 247, 0.92);
  border: 1.5px solid rgba(74, 16, 9, 0.1);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.topbar-meta {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex: 1;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 800;
  color: rgba(74, 16, 9, 0.72);
}

.contact-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  padding: 0.5rem 0.85rem;
  background: rgba(255, 253, 247, 0.9);
  border: 1.5px solid rgba(74, 16, 9, 0.08);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  color: rgba(74, 16, 9, 0.75);
  box-shadow: var(--shadow-soft);
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.contact-item--link {
  text-decoration: none;
  color: var(--brown);
  transition: color 0.2s ease;
}

.contact-item--link:hover {
  color: var(--red);
}

.contact-item__icon {
  font-size: 0.9em;
  line-height: 1;
}

.contact-divider {
  opacity: 0.35;
  font-weight: 900;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 950;
  letter-spacing: -0.04em;
  min-width: 0;
}

.brand img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 50%;
  background: var(--bg-2);
}

.brand span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-grid {
  width: min(100%, var(--container));
  margin: 1.75rem auto 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(1.25rem, 4vw, 3rem);
}

.hero-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brown-2);
}

.hero-copy h1 {
  margin: 0;
  color: var(--brown);
  line-height: 0.95;
  letter-spacing: -0.07em;
  font-size: clamp(2.2rem, 7vw, 4.2rem);
  text-wrap: balance;
}

.hero-tagline {
  margin: 0.75rem 0 0;
  font-size: clamp(0.98rem, 2vw, 1.1rem);
  line-height: 1.6;
  max-width: 30rem;
  color: rgba(74, 16, 9, 0.75);
}

.primary-btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 950;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--brown), var(--red));
  padding: 1rem 1.25rem;
  box-shadow: 0 10px 24px rgba(74, 16, 9, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.primary-btn.small {
  padding: 0.72rem 1rem;
  font-size: 0.92rem;
}

.logo-stage {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
}

.logo-stage img {
  position: relative;
  z-index: 1;
  width: min(92%, 380px);
  border-radius: 42px;
  filter: drop-shadow(0 28px 45px rgba(74, 16, 9, 0.28));
  animation: floaty 5s ease-in-out infinite;
  transform-origin: center;
}

.blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.92;
}

.blob-one {
  width: 220px;
  height: 220px;
  background: rgba(238, 29, 40, 0.22);
  right: 2rem;
  top: 2rem;
  animation: blobMove 8s ease-in-out infinite alternate;
}

.blob-two {
  width: 280px;
  height: 280px;
  background: rgba(255, 255, 255, 0.36);
  left: 0;
  bottom: 0.5rem;
  animation: blobMove 10s ease-in-out infinite alternate-reverse;
}

/* —— Menú —— */

.section {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

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

.dish-card {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.dish-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.dish-card__hit {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(74, 16, 9, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.dish-card__hit:hover,
.dish-card__hit:focus-visible {
  outline: none;
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(74, 16, 9, 0.18);
}

.dish-card__hit:focus-visible {
  box-shadow: 0 16px 40px rgba(74, 16, 9, 0.18), 0 0 0 3px rgba(238, 29, 40, 0.35);
}

.dish-card__photo {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f3e4bc;
}

.dish-card__photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(
    to top,
    rgba(20, 4, 2, 0.72) 0%,
    rgba(74, 16, 9, 0.28) 45%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

.dish-card__photo picture,
.dish-card__photo .dish-card__img {
  display: block;
  width: 100%;
  height: 100%;
}

.dish-card__img {
  object-fit: cover;
  object-position: center center;
  transition: transform 0.45s ease;
}

.dish-card__hit:hover .dish-card__img,
.dish-card__hit:focus-visible .dish-card__img {
  transform: scale(1.05);
}

.dish-card__overlay {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 0.85rem 1rem 1rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem;
}

.dish-card__overlay h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 950;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: white;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.dish-card__overlay .price {
  flex-shrink: 0;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 950;
  background: rgba(255, 248, 223, 0.95);
  color: var(--brown);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.dish-card__overlay .price--pending {
  font-size: 0.75rem;
  font-weight: 850;
  color: rgba(74, 16, 9, 0.55);
  background: rgba(255, 255, 255, 0.9);
}

.price {
  font-weight: 1000;
  color: var(--brown);
}

.price--pending {
  font-size: 0.86rem;
  font-weight: 800;
  color: rgba(74, 16, 9, 0.42);
}

/* —— Modal —— */

.item-modal {
  width: min(calc(100% - 1.5rem), 440px);
  border: 0;
  padding: 0;
  border-radius: 22px;
  color: var(--brown);
  background: #fffdf7;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.item-modal::backdrop {
  background: rgba(74, 16, 9, 0.6);
  backdrop-filter: blur(8px);
}

.modal-close {
  position: absolute;
  right: 0.85rem;
  top: 0.85rem;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(74, 16, 9, 0.75);
  backdrop-filter: blur(4px);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
}

.modal-hero {
  position: relative;
  aspect-ratio: 1 / 1;
  max-height: 50vh;
  overflow: hidden;
  background: #f3e4bc;
}

.modal-hero picture,
.modal-hero__img {
  display: block;
  width: 100%;
  height: 100%;
}

.modal-hero__img {
  object-fit: cover;
  object-position: center center;
  filter: saturate(1.05) contrast(1.02);
}

.modal-hero__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ffe9a8, #ffc84a);
  font-size: 4rem;
  font-weight: 950;
  color: rgba(74, 16, 9, 0.15);
}

.modal-body {
  padding: 1.25rem 1.35rem 1.5rem;
}

.modal-body h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 5vw, 2rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.modal-desc {
  margin: 0 0 1.1rem;
  line-height: 1.65;
  font-size: 0.98rem;
  color: rgba(74, 16, 9, 0.78);
}

.modal-section {
  margin-bottom: 1rem;
}

.modal-section__title {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(74, 16, 9, 0.45);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 850;
  background: rgba(255, 189, 46, 0.28);
  color: var(--brown);
}

.modal-price {
  margin: 0.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(74, 16, 9, 0.1);
  font-size: 1.25rem;
  font-weight: 1000;
}

.price {
  font-weight: 1000;
  color: var(--brown);
}

/* —— Footer —— */

.footer {
  display: grid;
  place-items: center;
  gap: 0.35rem;
  text-align: center;
  padding: 1.5rem 1rem 2.5rem;
  color: rgba(74, 16, 9, 0.65);
}

.footer img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.footer p {
  margin: 0;
  font-size: 0.88rem;
}

/* —— WhatsApp FAB —— */

.whatsapp-fab {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 1.1rem 0.85rem 0.95rem;
  border-radius: 999px;
  text-decoration: none;
  color: white;
  font-weight: 950;
  font-size: 0.92rem;
  background: linear-gradient(135deg, #1faf53, #128c3e);
  box-shadow: 0 12px 32px rgba(18, 140, 62, 0.38);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.whatsapp-fab:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 16px 40px rgba(18, 140, 62, 0.45);
}

.whatsapp-fab:focus-visible {
  outline: 3px solid rgba(18, 140, 62, 0.45);
  outline-offset: 3px;
}

.whatsapp-fab__icon {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}

.whatsapp-fab__label {
  line-height: 1;
}

/* —— Animaciones —— */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-16px) rotate(1.2deg); }
}

@keyframes blobMove {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(20px, -16px, 0) scale(1.05); }
}

@keyframes cardIn {
  to { transform: translateY(0); opacity: 1; }
}

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

  .dish-card__img {
    transform: none !important;
  }
}

@media (min-width: 900px) {
  .topbar-meta {
    display: flex;
  }

  .contact-bar {
    display: none;
  }
}

@media (max-width: 720px) {
  .hero-grid {
    grid-template-columns: 1fr;
    margin-top: 1.25rem;
  }

  .logo-stage {
    min-height: 260px;
    order: -1;
    margin-bottom: 0.5rem;
  }

  .logo-stage img {
    width: min(72%, 280px);
  }

  .blob-one {
    width: 160px;
    height: 160px;
    right: 1rem;
  }

  .blob-two {
    width: 200px;
    height: 200px;
  }

  .dish-card__overlay h3 {
    font-size: 1.05rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 0.65rem 0.75rem 0;
  }

  .header-bar {
    top: 0.5rem;
  }

  .topbar {
    border-radius: 20px;
    padding: 0.55rem 0.7rem;
  }

  .contact-bar {
    font-size: 0.74rem;
    padding: 0.45rem 0.65rem;
    gap: 0.35rem 0.5rem;
  }

  .brand span {
    display: none;
  }

  .hero-copy h1 {
    font-size: clamp(1.9rem, 10vw, 2.6rem);
  }

  .whatsapp-fab {
    right: 0.85rem;
    bottom: 0.85rem;
    padding: 0.8rem;
    border-radius: 50%;
  }

  .whatsapp-fab__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
}
