/* ==================================
   LA PAELLA DE XAVI — Menu Cartilla
   Image-based scroll SPA
   ================================== */

/* ── Design Tokens ── */
:root {
  --color-bg: #1a1410;
  --color-bg-warm: #2d1f14;
  --color-accent: #e8431e;
  --color-accent-glow: rgba(232, 67, 30, 0.3);
  --color-text: #f5f0eb;
  --color-text-muted: rgba(245, 240, 235, 0.5);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

/* ── Dark Wood Background ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(
      90deg, transparent, transparent 2px,
      rgba(255, 255, 255, 0.006) 2px, rgba(255, 255, 255, 0.006) 4px
    ),
    repeating-linear-gradient(
      0deg, transparent, transparent 40px,
      rgba(139, 90, 43, 0.03) 40px, rgba(139, 90, 43, 0.03) 41px
    ),
    radial-gradient(ellipse at 50% 0%, var(--color-bg-warm) 0%, var(--color-bg) 70%),
    var(--color-bg);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 80%, rgba(232, 67, 30, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(232, 67, 30, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

/* ── Page Sections ── */
.page-section {
  scroll-snap-align: start;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem;
}

/* ── Menu Page (Image Card) ── */
.menu-page {
  max-width: 90vw;
  border-radius: 8px;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.3),
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 100px rgba(0, 0, 0, 0.2);
  transition: all 0.5s var(--ease-smooth);
  position: relative;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.08);

  /* Entry animation */
  opacity: 0;
  transform: translateY(30px) scale(0.97);
}

.menu-page.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.menu-page:hover {
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.35),
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 120px rgba(0, 0, 0, 0.25);
  transform: scale(1.01);
  border-color: rgba(255, 255, 255, 0.12);
}

.menu-page.visible:hover {
  transform: scale(1.01);
}

.menu-page img {
  display: block;
  width: auto;
  height: auto;
  max-height: calc(100vh - 4rem);
  max-width: 100%;
  border-radius: 5px;
}

/* ── Navigation Dots ── */
.nav-dots {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  z-index: 100;
}

.nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.4s var(--ease-smooth);
  position: relative;
  outline: none;
}

.nav-dot::before {
  content: attr(data-label);
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.nav-dot:hover::before {
  opacity: 1;
}

.nav-dot.active {
  background: var(--color-accent);
  border-color: var(--color-accent-glow);
  box-shadow: 0 0 14px var(--color-accent-glow);
  transform: scale(1.4);
}

.nav-dot:hover:not(.active) {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.2);
}

.nav-dot:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* ── Scroll Indicator ── */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: fadeInUp 1s ease 0.8s both;
  transition: opacity 0.6s ease;
}

.scroll-indicator.hidden {
  opacity: 0;
  pointer-events: none;
}

.scroll-indicator span {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--color-text-muted);
  border-bottom: 2px solid var(--color-text-muted);
  transform: rotate(45deg);
  animation: bounceDown 2s ease-in-out infinite;
}

/* ── Keyframes ── */
@keyframes bounceDown {
  0%, 20%, 50%, 80%, 100% { transform: rotate(45deg) translateY(0); }
  40% { transform: rotate(45deg) translateY(8px); }
  60% { transform: rotate(45deg) translateY(4px); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .page-section {
    padding: 0.5rem;
  }

  .menu-page {
    max-width: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .menu-page img {
    width: 100%;
    max-height: calc(100vh - 1rem);
    object-fit: contain;
    border-radius: 0;
  }

  .menu-page:hover {
    transform: none;
    box-shadow: none;
  }

  .menu-page.visible:hover {
    transform: none;
  }

  .scroll-indicator {
    bottom: 1rem;
  }

  .nav-dots {
    right: 0.75rem;
    gap: 1rem;
  }

  .nav-dot {
    width: 10px;
    height: 10px;
  }

  .nav-dot::before {
    display: none;
  }
}

@media (max-width: 480px) {
  .menu-page {
    max-width: 100vw;
  }

  .menu-page img {
    max-height: calc(100vh - 1rem);
  }

  .nav-dots {
    right: 0.4rem;
  }

  .nav-dot {
    width: 8px;
    height: 8px;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .menu-page {
    max-width: 40vw;
  }

  .menu-page img {
    max-height: 85vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .menu-page { transition: none; opacity: 1; transform: none; }
  .scroll-arrow { animation: none; }
  .scroll-indicator { animation: none; opacity: 1; }
}
