:root {
  --black: #18191b;
  --white: #f7f7f4;
  --green: #3f5d35;
  --red: #bd453d;
  --font-futura: Futura, "Futura PT", "Avenir Next", Avenir, Montserrat, Arial, sans-serif;
  --app-height: 100dvh;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--black);
  font-family: var(--font-futura);
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: var(--app-height);
}

.app {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: var(--app-height);
  background: var(--black);
  overflow: hidden;
}

/* Primera pantalla */
.splash {
  position: fixed;
  inset: 0;
  z-index: 10;
  width: 100vw;
  height: var(--app-height);
  background-color: var(--black);
  background-image: url("assets/splash.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  animation: splashFade 1.85s ease forwards;
}

@keyframes splashFade {
  0%, 55% {
    opacity: 1;
    filter: blur(0);
    visibility: visible;
  }
  100% {
    opacity: 0;
    filter: blur(12px);
    visibility: hidden;
    pointer-events: none;
  }
}

/* Segunda pantalla: 100% vertical móvil, sin scroll */
.menu-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: var(--app-height);
  display: grid;
  grid-template-rows: repeat(4, 1fr) clamp(54px, 8.5dvh, 76px);
  opacity: 0;
  overflow: hidden;
  animation: contentIn 0.7s ease forwards;
  animation-delay: 1.15s;
}

@keyframes contentIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.menu-button,
.logo-footer {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 7vw;
  text-decoration: none;
  text-align: center;
  touch-action: manipulation;
}

.menu-button::before,
.logo-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("assets/pattern-dark.jpg");
  background-repeat: repeat;
  background-size: 120% auto;
  background-position: center;
  opacity: 0.14;
  z-index: -1;
  pointer-events: none;
}

.menu-button span {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 100%;
  color: inherit;
  font-size: clamp(2.05rem, 9.2vw, 3.75rem);
  line-height: 0.92;
  font-weight: 800;
  letter-spacing: -0.055em;
  text-transform: lowercase;
  white-space: normal;
  overflow-wrap: normal;
}

.comida span,
.callejera span {
  font-size: clamp(1.55rem, 7.4vw, 3rem);
  letter-spacing: -0.05em;
}

.desayuno { color: var(--white); background: var(--green); }
.comida { color: var(--white); background: var(--red); }
.callejera { color: var(--white); background: var(--black); }
.bebidas { color: var(--black); background: var(--white); }

.bebidas::before,
.logo-footer::before {
  opacity: 0.06;
  filter: invert(1);
}

.menu-button:active {
  filter: brightness(1.08);
  transform: scale(0.998);
}

.logo-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--white);
  border-bottom: 0;
}

.brand-logo {
  display: block;
  width: clamp(54px, 17vw, 82px);
  max-width: 22vw;
  max-height: 70%;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

/* iPhones o Androids bajos: baja texto y logo para que todo quepa */
@media (max-height: 700px) {
  .menu-screen {
    grid-template-rows: repeat(4, 1fr) clamp(46px, 8dvh, 62px);
  }

  .menu-button span {
    font-size: clamp(1.7rem, 8.3vw, 3rem);
  }

  .comida span,
  .callejera span {
    font-size: clamp(1.3rem, 6.6vw, 2.45rem);
  }

  .brand-logo {
    width: clamp(46px, 15vw, 68px);
  }
}

/* Pantallas muy angostas */
@media (max-width: 360px) {
  .menu-button span {
    font-size: clamp(1.65rem, 8.4vw, 2.9rem);
  }

  .comida span,
  .callejera span {
    font-size: clamp(1.25rem, 6.5vw, 2.3rem);
  }
}

/* Si alguien lo abre en computadora, aun así queda vertical y centrado */
@media (min-width: 720px) {
  .app,
  .splash,
  .menu-screen {
    width: min(100vw, calc(var(--app-height) * 0.5625));
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .splash {
    background-size: cover;
  }

  .menu-button {
    padding: 0 44px;
  }

  .menu-button span {
    font-size: clamp(2.2rem, 4.5vw, 4rem);
  }

  .comida span,
  .callejera span {
    font-size: clamp(1.75rem, 3.6vw, 3.25rem);
  }

  .brand-logo {
    width: clamp(58px, 7vw, 88px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash,
  .menu-screen {
    animation-duration: 0.01ms;
    animation-delay: 0.01ms;
  }
}
