/* =========================================================
   Machu Picchu Cocina Peruana — Design tokens & base styles
   ========================================================= */

:root {
  /* --- Color: inspired by Andean textiles --- */
  --color-orange: #E8622C;
  --color-orange-dark: #C94E1E;
  --color-turquoise: #0E9C9C;
  --color-turquoise-dark: #0B7A7A;
  --color-fuchsia: #D6266E;
  --color-fuchsia-dark: #AD1B58;

  --color-cream: #FFF8F0;
  --color-cream-soft: #FBEFE1;
  --color-card: #FFFFFF;
  --color-ink: #2B1B14;
  --color-ink-soft: #5C493F;
  --color-border: #EFDFCB;

  --color-focus: #0E9C9C;

  /* --- Typography --- */
  --font-display: "Cinzel", "Cormorant Garamond", "Georgia", serif;
  --font-script: "Alex Brush", "Brush Script MT", cursive;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --fs-body: 1rem;          /* 16px */
  --fs-small: 0.875rem;     /* 14px */
  --fs-price: 1.05rem;
  --fs-h1: clamp(2.2rem, 8vw, 3.6rem);
  --fs-h2: clamp(1.7rem, 6vw, 2.4rem);
  --fs-h3: clamp(1.15rem, 4vw, 1.4rem);

  /* --- Spacing scale (8px rhythm) --- */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-card: 0 8px 24px rgba(43, 27, 20, 0.12);
  --shadow-soft: 0 4px 14px rgba(43, 27, 20, 0.08);

  --container-max: 1180px;
  --nav-height: 60px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@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(--color-cream);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Fondo textil andino: capa fija detrás de todo el contenido */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url('../assets/img/misc/fondo.webp');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 var(--space-2);
  color: var(--color-ink);
}
h1 { letter-spacing: 0.04em; }
h2 { letter-spacing: 0.03em; }
h3, h4 {
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 700;
}

.hero-script {
  font-family: var(--font-script);
  font-weight: 400;
  text-transform: none;
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  color: #fff;
  margin: -0.6rem 0 0.6rem;
  line-height: 1;
  text-shadow: 0 4px 18px rgba(0,0,0,0.45);
}

p { margin: 0 0 var(--space-2); }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

section { position: relative; }

.section-inner { padding: var(--space-6) 0; }

.section-title {
  font-size: var(--fs-h2);
  text-align: center;
  margin-bottom: var(--space-1);
}

.section-subtitle {
  text-align: center;
  color: var(--color-ink-soft);
  max-width: 46ch;
  margin: 0 auto var(--space-4);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-orange-dark);
  background: color-mix(in srgb, var(--color-orange) 14%, white);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-2);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  min-height: 44px;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--color-orange);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: var(--color-orange-dark); }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.8);
}
.btn-outline:hover { background: rgba(255,255,255,0.15); }
.btn-whatsapp {
  background: #25D366;
  color: #fff;
}
.btn-whatsapp:hover { background: #1DAE52; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: #1a1108;
}

.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media video,
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,10,5,0.55) 0%, rgba(20,10,5,0.35) 45%, rgba(20,10,5,0.75) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.hero-logo {
  width: min(46vw, 190px);
  height: auto;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.45));
  margin-bottom: var(--space-1);
}

.hero-content h1 {
  color: #fff;
  font-size: var(--fs-h1);
  text-shadow: 0 4px 18px rgba(0,0,0,0.45);
}

.hero-content .hero-tagline {
  color: #FBEFE1;
  font-size: 1.1rem;
  max-width: 34ch;
  margin: 0 0 var(--space-3);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
}

.hero-scroll-cue {
  position: absolute;
  bottom: var(--space-3);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-cue { animation: none; }
}

/* =========================================================
   Sticky category nav
   ========================================================= */
.menu-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 240, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.menu-nav-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.7rem var(--space-3);
}
.menu-nav-scroll::-webkit-scrollbar { display: none; }
.menu-nav a {
  flex: 0 0 auto;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  color: var(--color-ink-soft);
  background: transparent;
  border: 1.5px solid var(--color-border);
  white-space: nowrap;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.menu-nav a:hover { border-color: var(--color-orange); color: var(--color-orange-dark); }
.menu-nav a.active {
  background: var(--color-orange);
  border-color: var(--color-orange);
  color: #fff;
}

/* =========================================================
   Menu categories
   ========================================================= */
.menu-category { scroll-margin-top: calc(var(--nav-height) + 10px); }

.category-header {
  text-align: center;
  padding: var(--space-4) var(--space-3);
  margin: var(--space-3) auto 0;
  max-width: 640px;
  background: rgba(255, 248, 240, 0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--radius-lg);
}
.category-header h2 { font-size: var(--fs-h2); }
.category-header .rule {
  width: 64px;
  height: 3px;
  margin: var(--space-1) auto 0;
  background: linear-gradient(90deg, var(--color-orange), var(--color-fuchsia), var(--color-turquoise));
  border-radius: var(--radius-pill);
}

.dish-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  padding: 0 var(--space-3) var(--space-5);
  max-width: var(--container-max);
  margin: 0 auto;
}

@media (min-width: 700px) {
  .dish-grid.style-a { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1040px) {
  .dish-grid.style-a { grid-template-columns: 1fr 1fr 1fr; }
}

/* Tarjeta de plato: foto arriba (móvil) / a la izquierda, info abajo/derecha */
.dish-card {
  background: var(--color-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.dish-card:hover, .dish-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(43, 27, 20, 0.18);
}
.dish-card:active { transform: translateY(-1px) scale(0.99); }
.dish-card .dish-photo-wrap {
  aspect-ratio: 4 / 3;
  background: var(--color-cream-soft);
  overflow: hidden;
}
.dish-card .dish-photo-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 400ms ease;
}
.dish-card:hover .dish-photo-wrap img { transform: scale(1.05); }
.dish-card .dish-body { padding: var(--space-2) var(--space-2) var(--space-3); flex: 1; display: flex; flex-direction: column; }
.dish-name-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-1);
  margin-bottom: 0.35rem;
}
.dish-name-row h3 { font-size: 1.05rem; margin: 0; }
.dish-price {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: var(--fs-price);
  color: var(--color-orange-dark);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.dish-desc { color: var(--color-ink-soft); font-size: 0.92rem; margin: 0; }

/* --- Simple list categories (adiciones, bebidas, postres) --- */
.simple-list-section { background: transparent; }
.simple-list-wrap {
  max-width: 900px;
  margin: var(--space-5) auto;
  padding: var(--space-4) var(--space-3) var(--space-5);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.simple-list-wrap .category-header {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  margin: 0 auto var(--space-2);
  padding: var(--space-2) var(--space-3) 0;
}
.simple-list-group { margin-bottom: var(--space-4); }
.simple-list-group:last-child { margin-bottom: 0; }
.simple-list-group h3 {
  font-size: 1.2rem;
  color: var(--color-turquoise-dark);
  margin-bottom: 0.25rem;
}
.simple-list-note { color: var(--color-ink-soft); font-size: 0.9rem; margin-bottom: var(--space-2); }
.simple-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem 2rem;
}
@media (min-width: 640px) { .simple-list { grid-template-columns: 1fr 1fr; } }
.simple-list-item {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--color-border);
}
.simple-list-item .name { font-weight: 600; }
.simple-list-item .price {
  font-weight: 800;
  color: var(--color-orange-dark);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Beer grid with bottle photos */
.beer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
@media (min-width: 640px) { .beer-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .beer-grid { grid-template-columns: repeat(6, 1fr); } }
.beer-card {
  background: var(--color-card);
  border-radius: var(--radius-md);
  text-align: center;
  padding: var(--space-2) var(--space-1) var(--space-2);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.beer-card:hover, .beer-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(43, 27, 20, 0.18);
}
.beer-card img { height: 130px; width: auto; margin: 0 auto var(--space-1); object-fit: contain; }
.beer-card .name { font-weight: 700; font-size: 0.85rem; min-height: 2.2em; }
.beer-card .price { color: var(--color-orange-dark); font-weight: 800; font-size: 0.9rem; }

/* =========================================================
   Ubicación / Reserva
   ========================================================= */
.location-section {
  position: relative;
  color: #fff;
  background-image:
    linear-gradient(180deg, rgba(20,12,6,0.78), rgba(20,12,6,0.88)),
    url('../assets/img/misc/visitanos.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
@media (min-width: 900px) {
  .location-section { background-attachment: fixed; }
}
.location-section .section-title { color: #fff; }
.location-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-3);
  max-width: var(--container-max);
  margin: 0 auto;
}
@media (min-width: 900px) { .location-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

.info-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
}
.info-row { display: flex; gap: var(--space-2); margin-bottom: var(--space-3); }
.info-row:last-child { margin-bottom: 0; }
.info-row .icon {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: #FF9E5E;
}
.info-row .icon svg { width: 26px; height: 26px; }
.info-row h4 { margin: 0 0 0.2rem; font-family: var(--font-body); font-weight: 700; font-size: 1rem; color: #fff; }
.info-row p { margin: 0; color: rgba(255,255,255,0.78); font-size: 0.95rem; }

.map-embed {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: var(--space-3);
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(255,255,255,0.12);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }

.reserva-form {
  background: #fff;
  color: var(--color-ink);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  box-shadow: var(--shadow-card);
}
.reserva-form h3 { font-size: 1.3rem; margin-bottom: 0.2rem; }
.reserva-form .form-sub { color: var(--color-ink-soft); font-size: 0.9rem; margin-bottom: var(--space-3); }

.form-row { margin-bottom: var(--space-2); }
.form-row label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--color-ink);
}
.form-row .req { color: var(--color-fuchsia-dark); }
.form-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }

.reserva-form input,
.reserva-form select,
.reserva-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--color-cream);
  color: var(--color-ink);
}
.reserva-form textarea { min-height: 88px; resize: vertical; }
.reserva-form input:focus, .reserva-form select:focus, .reserva-form textarea:focus {
  border-color: var(--color-turquoise);
}

.form-hint {
  display: none;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-fuchsia-dark);
  background: color-mix(in srgb, var(--color-fuchsia) 10%, white);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  margin-bottom: var(--space-2);
}
.form-hint.visible { display: flex; }

.reserva-form .btn-whatsapp { width: 100%; font-size: 1.05rem; }

/* =========================================================
   Redes sociales
   ========================================================= */
.social-section { text-align: center; padding: var(--space-6) 0; }
.social-icons {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
}
.social-icons a {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.45));
  transition: transform 180ms ease, color 180ms ease;
}
.social-icons a svg { width: 30px; height: 30px; }
.social-icons a:hover { transform: translateY(-4px); color: #FFD9A8; }

/* =========================================================
   Reviews / Google
   ========================================================= */
.reviews-section {
  position: relative;
  background-image:
    linear-gradient(180deg, rgba(20,12,6,0.55) 0%, rgba(20,12,6,0.72) 100%),
    url('../assets/img/misc/visitanos.webp');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  color: #fff;
  text-align: center;
  padding: var(--space-6) var(--space-3);
}
@media (min-width: 900px) {
  .reviews-section { background-attachment: fixed; }
}
.reviews-section .section-title { color: #fff; text-shadow: 0 3px 12px rgba(0,0,0,0.35); }
.stars { display: flex; justify-content: center; gap: 0.35rem; margin-bottom: var(--space-2); }
.stars svg { width: 32px; height: 32px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)); }
.reviews-section p { max-width: 44ch; margin: 0 auto var(--space-3); color: rgba(255,255,255,0.95); text-shadow: 0 2px 8px rgba(0,0,0,0.3); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--color-ink);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: var(--space-4) var(--space-3);
  font-size: 0.85rem;
}
.site-footer strong { color: #fff; }

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

@media (max-width: 480px) {
  .form-two-col { grid-template-columns: 1fr; }
}

/* =========================================================
   Modal de plato: foto grande + descripción + precio
   ========================================================= */
body.modal-open { overflow: hidden; }

.dish-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
}
.dish-modal[aria-hidden="true"] { display: none; }

.dish-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 12, 6, 0.72);
}

.dish-modal-panel {
  position: relative;
  z-index: 1;
  background: var(--color-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  animation: dish-modal-in 220ms ease;
}
@keyframes dish-modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dish-modal-panel { animation: none; }
}

.dish-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(20, 12, 6, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-height: 40px;
}
.dish-modal-close:hover { background: rgba(20, 12, 6, 0.8); }

.dish-modal-media {
  aspect-ratio: 4 / 3;
  background: var(--color-cream-soft);
}
.dish-modal-media img { width: 100%; height: 100%; object-fit: cover; }

.dish-modal-body { padding: var(--space-3); }
.dish-modal-name-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: 0.5rem;
}
.dish-modal-name-row h3 { font-size: 1.5rem; margin: 0; }
.dish-modal-price {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--color-orange-dark);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.dish-modal-body p {
  color: var(--color-ink-soft);
  margin: 0;
  line-height: 1.65;
}
