/* ═══════════════════════════════════════════════════════════════
   LIEVITUM — EFECTOS PREMIUM
   Hero 3D, intro de marca, micro-interacciones y animaciones.
   Los estados iniciales "ocultos" solo aplican cuando js/effects.js
   añade la clase .fx al <html>, así el sitio nunca queda en blanco
   si el JavaScript falla.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --gold-light: #f3d98b;
}

/* ─── INTRO DE MARCA ─────────────────────────────────── */
.intro {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: radial-gradient(ellipse at center, #15324c 0%, #0f2235 45%, #08161f 100%);
  transition: opacity .8s ease, visibility .8s;
  /* Seguro: si el JS no corre, la intro desaparece sola */
  animation: introFailsafe .01s 4.5s forwards;
}
.intro img {
  width: min(190px, 48vw); height: auto;
  filter: drop-shadow(0 6px 24px rgba(0,0,0,.5));
  animation: introLogo 1.3s var(--ease-out) both;
  transition: transform .9s var(--ease-out);
}
.intro-bar {
  width: 150px; height: 1px; overflow: hidden;
  background: rgba(255,255,255,.14);
}
.intro-bar span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0); transform-origin: left;
  animation: introBar 1.3s cubic-bezier(.6,0,.2,1) .15s forwards;
}
.intro p {
  font-size: .58rem; letter-spacing: 5px; text-transform: uppercase;
  color: rgba(201,168,76,.85);
  animation: introText 1s ease .35s both;
}
.intro.done { opacity: 0; visibility: hidden; }
.intro.done img { transform: scale(1.18); }
.no-intro .intro { display: none; }
@keyframes introLogo { from { opacity: 0; transform: scale(.82); filter: blur(10px); } to { opacity: 1; transform: none; filter: drop-shadow(0 6px 24px rgba(0,0,0,.5)); } }
@keyframes introBar  { to { transform: scaleX(1); } }
@keyframes introText { from { opacity: 0; letter-spacing: 10px; } to { opacity: 1; letter-spacing: 5px; } }
@keyframes introFailsafe { to { opacity: 0; visibility: hidden; } }

/* ─── BARRA DE PROGRESO DE SCROLL ────────────────────── */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 1001;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
  transform: scaleX(0); transform-origin: left;
  box-shadow: 0 0 10px rgba(201,168,76,.55);
  pointer-events: none;
}

/* ─── HERO 3D ─────────────────────────────────────────── */
.hero-gl {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; display: block;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.4s ease;
  will-change: transform;
}
#hero.gl-on .hero-gl { opacity: 1; }
#hero.gl-on .hero-bg { opacity: 0; transition: opacity 1.4s ease; }

/* Fallback sin WebGL: la foto se ve más y se inclina en 3D con CSS */
.fx .hero-bg {
  animation: none;
  opacity: .62;
  transform: scale(1.1);
  will-change: transform;
}

.hero-embers {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* Overlay rediseñado: deja ver la pizza en los bordes y protege el texto al centro */
.fx .hero-overlay {
  background:
    radial-gradient(ellipse 42% 40% at 50% 54%, rgba(8,22,31,.78) 0%, rgba(8,22,31,.50) 50%, rgba(8,22,31,0) 100%),
    linear-gradient(to bottom, rgba(8,22,31,.75) 0%, rgba(8,22,31,.10) 22%, rgba(8,22,31,.12) 68%, rgba(15,34,53,1) 100%);
}

/* Legibilidad del texto sobre la foto */
.fx .hero-content { text-shadow: 0 2px 18px rgba(0,0,0,.6); }
.fx .hero-eyebrow { color: var(--gold-light); }
.fx #hero .btn-secondary,
.fx #hero .btn-outline,
.fx .hero-branches {
  background: rgba(8,22,31,.48);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}
.fx .branch-current { background: rgba(8,22,31,.45); }

/* Navbar: limpio y elegante, sin apiñamientos */
.nav-logo { white-space: nowrap; }
.nav-status { display: none !important; }
.nav-links { gap: 26px; }
.nav-links a { font-size: 0.72rem; letter-spacing: 1.6px; }

/* Barra unificada de sucursales en Hero */
.hero-branch-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 auto 26px;
}
.hero-branches {
  margin: 0 !important;
  border-radius: 30px;
  padding: 4px !important;
  background: rgba(8,22,31,.65) !important;
  border: 1px solid rgba(201,168,76,.35) !important;
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
}
.hero-branch-btn {
  border-radius: 24px;
  padding: 8px 20px !important;
  font-size: 0.7rem !important;
  letter-spacing: 1.6px !important;
}
.hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 24px;
  background: rgba(8,22,31,.65);
  border: 1px solid rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
}
.hero-status-pill .open-status {
  margin: 0 !important;
  font-size: 0.7rem !important;
  letter-spacing: 1.2px !important;
}
.branch-current { display: none !important; }

/* Botones del Hero con diseño más moderno y consistente */
.hero-buttons {
  gap: 14px;
}
.fx #hero .btn-primary,
.fx #hero .btn-secondary,
.fx #hero .btn-outline {
  border-radius: 2px;
  padding: 13px 28px;
  font-size: 0.72rem;
  letter-spacing: 2px;
}
.fx #hero .btn-primary {
  box-shadow: 0 4px 20px rgba(201,168,76,0.35);
}
.fx #hero .btn-secondary,
.fx #hero .btn-outline {
  background: rgba(8,22,31,.55) !important;
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}

.fx .hero-content {
  animation: none;
  will-change: transform, opacity;
}
.fx .hero-content > * { opacity: 0; }
.fx-ready .hero-content > * { animation: heroIn 1.1s var(--ease-out) both; }
.fx-ready .hero-content > :nth-child(1) { animation-delay: .05s; }
.fx-ready .hero-content > :nth-child(2) { animation-delay: .18s; animation-name: heroLogoIn; animation-duration: 1.4s; }
.fx-ready .hero-content > :nth-child(3) { animation-delay: .38s; }
.fx-ready .hero-content > :nth-child(4) { animation-delay: .50s; }
.fx-ready .hero-content > :nth-child(5) { animation-delay: .60s; }
.fx-ready .hero-content > :nth-child(6) { animation-delay: .68s; }
.fx-ready .hero-content > :nth-child(7) { animation-delay: .80s; }
@keyframes heroIn {
  from { opacity: 0; transform: translateY(28px); filter: blur(8px); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes heroLogoIn {
  from { opacity: 0; transform: perspective(800px) rotateX(40deg) translateY(36px) scale(.88); filter: blur(12px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* Eyebrow con líneas doradas */
.fx .hero-eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
}
.fx .hero-eyebrow::before,
.fx .hero-eyebrow::after {
  content: ""; width: 38px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.fx .hero-eyebrow::after { background: linear-gradient(90deg, var(--gold), transparent); }

/* Logo: flota suavemente con un halo dorado */
.fx .hero-logo { position: relative; }
.fx .hero-logo::before {
  content: ""; position: absolute; inset: -35% -20%; z-index: -1;
  background: radial-gradient(closest-side, rgba(201,168,76,.20), rgba(201,168,76,0));
  animation: heroGlow 5s ease-in-out infinite alternate;
  pointer-events: none;
}
.fx .hero-logo img { animation: logoFloat 7s ease-in-out infinite; }
@keyframes logoFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes heroGlow  { from { opacity: .55; transform: scale(.95); } to { opacity: 1; transform: scale(1.06); } }

/* Indicador de scroll más elegante */
.fx .hero-scroll::after {
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollLine 2.2s var(--ease-out) infinite;
  transform-origin: top;
}
@keyframes scrollLine { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ─── CINTA DE MARCA (marquee) ───────────────────────── */
.ribbon {
  position: relative; z-index: 3;
  overflow: hidden;
  padding: 18px 0;
  background: linear-gradient(90deg, #0b1a29, #0f2235 50%, #0b1a29);
  border-top: 1px solid rgba(201,168,76,.22);
  border-bottom: 1px solid rgba(201,168,76,.22);
}
.ribbon-track {
  display: flex; align-items: center;
  width: max-content;
  animation: ribbonMove 42s linear infinite;
}
.ribbon:hover .ribbon-track { animation-play-state: paused; }
.ribbon-track span {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  color: rgba(255,255,255,.86);
  padding: 0 26px;
  white-space: nowrap;
}
.ribbon-track i {
  font-style: normal;
  color: var(--gold);
  font-size: .75rem;
}
@keyframes ribbonMove { to { transform: translateX(-50%); } }

/* ─── REVEALS MÁS CINEMATOGRÁFICOS ───────────────────── */
.fx .reveal,
.fx .reveal-left,
.fx .reveal-right {
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out), filter 1s var(--ease-out);
}
@media (min-width: 769px) {
  .fx .reveal:not(.visible),
  .fx .reveal-left:not(.visible),
  .fx .reveal-right:not(.visible) { filter: blur(6px); }
}

/* Títulos y divisores: entrada suave y elegante */
.fx .fx-in.section-title {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease-out), transform 1s var(--ease-out);
}
.fx .fx-in.section-title.in {
  opacity: 1;
  transform: translateY(0);
}
.fx .fx-in.section-label {
  opacity: 0;
  letter-spacing: 8px;
  transition: opacity 0.8s ease, letter-spacing 1s var(--ease-out);
}
.fx .fx-in.section-label.in {
  opacity: 1;
  letter-spacing: 5px;
}
.fx .fx-in.section-divider {
  transform: scaleX(0);
  transition: transform 1.1s var(--ease-out) 0.15s;
}
.fx .fx-in.section-divider.in {
  transform: scaleX(1);
}

/* ─── NAV ─────────────────────────────────────────────── */
.fx .nav-links a:not(.nav-cta) { position: relative; }
.fx .nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--gold);
  transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.fx .nav-links a:not(.nav-cta):hover::after { transform: scaleX(1); transform-origin: left; }

/* ─── BOTONES: MAGNÉTICOS + DESTELLO ─────────────────── */
.magnetic {
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0);
  transition: transform .35s var(--ease-out), box-shadow .3s, border-color .3s, color .3s, background .3s;
}
.magnetic:hover { transform: translate3d(var(--mx, 0px), calc(var(--my, 0px) - 2px), 0); }

.fx .btn-primary,
.fx .contact-action.primary,
.fx .modal-action.primary {
  position: relative; overflow: hidden; isolation: isolate;
}
.fx .btn-primary::after,
.fx .contact-action.primary::after,
.fx .modal-action.primary::after {
  content: ""; position: absolute; top: 0; left: -70%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg);
  animation: btnShine 5s ease-in-out 3s infinite;
  pointer-events: none;
}
@keyframes btnShine { 0% { left: -70%; } 16%, 100% { left: 135%; } }

/* WhatsApp con pulso de atención */
.fx .whatsapp-float::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: 50%;
  background: #25d366;
  animation: waPulse 2.6s ease-out infinite;
}
@keyframes waPulse { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.7); opacity: 0; } }

/* ─── TARJETAS CON INCLINACIÓN 3D + REFLEJO ──────────── */
.tilt { position: relative; overflow: hidden; }
.tilt.is-tilting {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px) !important;
  transition: transform .15s ease-out, box-shadow .3s !important;
  box-shadow: 0 22px 50px rgba(8,22,31,.22);
  z-index: 2;
}
.tilt-glare,
.favorite-card > .tilt-glare {
  position: absolute; inset: 0; z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,244,220,.26), rgba(255,244,220,0) 55%);
}
.tilt.is-tilting .tilt-glare { opacity: 1; }

/* Ingredientes: entran girando desde abajo */
.fx .ingredient-card.reveal:not(.visible) {
  transform: perspective(1000px) rotateX(22deg) translateY(50px);
  transform-origin: bottom center;
}
.fx .ingredient-card .ingredient-name { transition: transform .45s var(--ease-out); }
.fx .ingredient-card:hover .ingredient-name { transform: translateY(-4px); }

/* Favoritas: etiqueta "ver" que aparece en hover */
.fx .favorite-card .favorite-title { transition: transform .45s var(--ease-out); }
.fx .favorite-card:hover .favorite-title { transform: translateX(4px); }

/* ─── PROCESO: línea que se dibuja + números en 3D ───── */
.fx .proceso-steps::after {
  content: ""; position: absolute; top: 40px; left: 0; right: 0; height: 2px; margin-top: -.5px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
  box-shadow: 0 0 14px rgba(201,168,76,.6);
  transform: scaleX(var(--line, 0)); transform-origin: left;
  pointer-events: none;
}
.fx .step-card .step-number {
  opacity: 0;
  transform: perspective(600px) rotateY(-100deg) scale(.6);
  transition: transform 1.1s var(--ease-out), opacity .6s ease;
}
.fx .step-card.visible .step-number { opacity: 1; transform: none; }
.fx .step-card:nth-child(2) .step-number { transition-delay: .12s; }
.fx .step-card:nth-child(3) .step-number { transition-delay: .24s; }
.fx .step-card:nth-child(4) .step-number { transition-delay: .36s; }
.fx .step-card:nth-child(5) .step-number { transition-delay: .48s; }
.fx .step-number::after {
  content: ""; position: absolute; inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,.55);
  animation: stepRing 3s ease-out infinite;
  pointer-events: none;
}
.fx .step-card:nth-child(2) .step-number::after { animation-delay: .6s; }
.fx .step-card:nth-child(3) .step-number::after { animation-delay: 1.2s; }
.fx .step-card:nth-child(4) .step-number::after { animation-delay: 1.8s; }
.fx .step-card:nth-child(5) .step-number::after { animation-delay: 2.4s; }
@keyframes stepRing { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.4); opacity: 0; } }

/* ─── GALERÍA ─────────────────────────────────────────── */
.gallery-viewport {
  padding: 14px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.fx .gallery-track img {
  transition: transform .55s var(--ease-out), filter .55s ease, box-shadow .55s ease;
  filter: saturate(.92);
}
.fx .gallery-track img:hover {
  transform: translateY(-10px) scale(1.04) rotate(-1deg);
  filter: saturate(1.12);
  box-shadow: 0 18px 40px rgba(8,22,31,.28);
}

/* ─── RESEÑAS ─────────────────────────────────────────── */
.fx .review-card { position: relative; }
.fx .review-card::before {
  content: "\201C";
  position: absolute; top: -18px; right: 18px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 7rem; line-height: 1;
  color: rgba(201,168,76,.14);
  pointer-events: none;
}

/* ─── TEXTURA DE GRANO (sutil, sólo escritorio) ──────── */
@media (min-width: 769px) {
  html.fx body::after {
    content: ""; position: fixed; inset: 0; z-index: 9990;
    pointer-events: none;
    opacity: .045;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  }
}

/* ─── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 768px) {
  .fx .proceso-steps::after { display: none; }
  .fx .hero-eyebrow::before,
  .fx .hero-eyebrow::after { width: 20px; }
  .ribbon { padding: 14px 0; }
  .ribbon-track span { padding: 0 18px; }
}

/* ─── MOVIMIENTO REDUCIDO ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
  .ribbon-track { animation: none; }
  .fx .hero-content > * { opacity: 1; }
  .fx .fx-in.section-title,
  .fx .fx-in.section-label,
  .fx .fx-in.section-divider { clip-path: none; opacity: 1; transform: none; letter-spacing: 5px; }
  .fx .step-card .step-number { opacity: 1; transform: none; }
}

/* ─── FASE 1 · Correcciones ─────────────────────────── */
/* Logo: el texto hereda el color; solo el punto va en dorado */
.nav-logo .nav-logo-text { color: inherit; }
.nav-logo .nav-logo-text span { color: var(--gold); }
/* Tablet / laptop chica: solo el ícono para que no choque con los enlaces */
@media (min-width: 769px) and (max-width: 1180px) {
  .nav-logo .nav-logo-text { display: none; }
  .nav-links { gap: 20px; }
}

/* Proceso: los 5 pasos en una sola fila en escritorio */
@media (min-width: 960px) {
  .proceso-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; }
}

/* Reseñas: calificación real de Google arriba de las citas */
.reviews-summary {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px;
  margin-top: 40px;
}
.reviews-score {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 24px;
  border: 1px solid rgba(201,168,76,0.35);
  transition: border-color 0.3s, background 0.3s;
}
.reviews-score:hover { border-color: var(--gold); background: rgba(201,168,76,0.08); }
.reviews-score-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.8rem; line-height: 1; color: var(--gold);
}
.reviews-score-meta {
  display: grid; gap: 2px;
  font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.reviews-score-meta .review-stars { margin-bottom: 0; font-size: 0.9rem; }
.reviews-grid .review-platform { display: inline-block; transition: color 0.3s; }
.reviews-grid .review-platform:hover { color: var(--gold); }
.reviews-note {
  margin-top: 32px; text-align: center;
  font-size: 0.78rem; color: rgba(255,255,255,0.45);
}
.reviews-note a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

/* Pizza del mes */
.month-pizza {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 20px 32px;
  margin: 0 0 40px;
  padding: 28px 32px;
  background: var(--navy);
  border-left: 3px solid var(--gold);
  color: var(--white);
}
.month-pizza-text { flex: 1 1 380px; min-width: 0; }
.month-pizza-kicker {
  font-size: 0.66rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 6px;
}
.month-pizza-title { font-family: 'Cormorant Garamond', serif; font-size: 1.7rem; line-height: 1.2; margin-bottom: 8px; }
.month-pizza p { font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; line-height: 1.6; color: rgba(255,255,255,0.72); max-width: 60ch; }
.month-pizza-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.month-pizza-btn {
  padding: 12px 20px;
  border: 1px solid var(--gold);
  font-size: 0.7rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--gold);
  transition: background 0.3s, color 0.3s;
}
.month-pizza-btn.primary, .month-pizza-btn:hover { background: var(--gold); color: var(--navy); }
.month-pizza-btn.primary:hover { background: transparent; color: var(--gold); }
@media (max-width: 600px) {
  .month-pizza { padding: 24px 20px; }
  .month-pizza-actions, .month-pizza-btn { width: 100%; text-align: center; }
}
.menu-panel-intro {
  text-align: center; color: var(--muted); font-style: italic;
  font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; margin-bottom: 32px;
}
.review-card.featured .review-location { justify-self: start; }

/* Tablet (769–960 px): los 8 enlaces no caben; se usa el menú hamburguesa como en celular */
@media (min-width: 769px) and (max-width: 960px) {
  .nav-logo .nav-logo-text { display: inline; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(82vw, 320px); background: rgba(8,22,31,0.98);
    padding: 92px 32px 32px;
    gap: 24px; z-index: 999;
    box-shadow: -16px 0 50px rgba(0,0,0,0.28);
  }
  .nav-links.open a { font-size: 0.82rem; }
  .hamburger { display: flex; }
}
.pizza-filters[hidden] { display: none !important; }
