/* ===== Antojo Peñasco — Intro 3D y animaciones (Motion) ===== */

.intro {
  position: fixed; inset: 0; z-index: 5000; overflow: hidden;
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 2vw;
  padding: max(28px, env(safe-area-inset-top)) clamp(20px, 6vw, 90px) 90px;
  background: var(--bg); color: var(--text);
}
body.intro-abierta { overflow: hidden; }

/* Fondo: brillos + rejilla tipo mapa que se mueve */
.intro-fondo { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60vmax 50vmax at 85% 10%, rgba(234, 88, 12, .32), transparent 60%),
    radial-gradient(50vmax 45vmax at 5% 95%, rgba(230, 57, 70, .26), transparent 60%),
    radial-gradient(40vmax 30vmax at 55% 55%, rgba(245, 158, 11, .08), transparent 70%);
}
.intro-rejilla { position: absolute; inset: -60px;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 60px 60px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  animation: rejilla 18s linear infinite;
}
@keyframes rejilla { to { transform: translate(60px, 60px); } }

.intro-saltar { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 18px; z-index: 3;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); color: #cfd3da;
  border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.intro-saltar:hover { color: #fff; background: rgba(255, 255, 255, .12); }

/* Texto */
.intro-texto { position: relative; z-index: 2; max-width: 600px; }
.intro-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); font-size: 12.5px; font-weight: 700; color: #e5e7eb; letter-spacing: .02em; }
.vivo { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(34, 197, 94, .7); animation: ping 1.8s infinite; }
.intro-titulo { margin: 0; font-family: var(--display); font-weight: 800; line-height: .95; letter-spacing: -.02em;
  font-size: clamp(46px, 7.4vw, 112px); perspective: 600px; }
.intro-titulo > span { display: inline-block; transform-origin: 50% 100%; }
.intro-titulo .dorado { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 24px rgba(255, 140, 0, .35)); }
.intro-sub { margin: 20px 0 28px; font-size: clamp(15px, 1.35vw, 18px); color: #b9bec8; max-width: 520px; line-height: 1.5; }
.intro-sub strong { color: #86efac; }
.intro-pasos { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; }
.intro-pasos li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 7px 8px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #e5e7eb;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); counter-increment: paso; }
.intro-pasos li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); font-size: 13px; }
.intro-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.intro-cta { font-size: 17px; padding: 1em 1.6em; box-shadow: 0 10px 40px rgba(255, 150, 0, .35); }
.intro-cta .flecha { display: inline-block; transition: transform .2s; }
.intro-cta:hover .flecha { transform: translateX(4px); }

/* Escena 3D */
.intro-escena { position: relative; z-index: 1; height: min(78vh, 640px); display: grid; place-items: center; perspective: 1100px; }
.orbita { position: relative; width: min(470px, 40vw, 62vh); aspect-ratio: 1 / 1.08; transform-style: preserve-3d; will-change: transform; }
.ifoto { position: absolute; margin: 0; transform-style: preserve-3d; transform: translateZ(var(--z)) rotate(var(--r)); }
.ifoto-in { background: #fbf7ef; padding: 8px 8px 0; border-radius: 10px; box-shadow: 0 30px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .2); will-change: transform; }
.ifoto img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 5px; background: #222; }
.ifoto figcaption { font-family: "Caveat", cursive; font-size: clamp(16px, 1.6vw, 22px); color: #2b2118; text-align: center; padding: 4px 4px 7px; line-height: 1.1; white-space: nowrap; }
.f1 { left: 2%; top: 0; width: 46%; }
.f2 { right: 0; top: 7%; width: 42%; }
.f3 { left: 8%; bottom: -2%; width: 36%; }
.f4 { right: 9%; bottom: -6%; width: 42%; }
.iemoji { position: absolute; left: var(--x); top: var(--y); font-size: clamp(30px, 3.4vw, 50px); transform: translateZ(var(--z));
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .5)); will-change: transform; }

/* Cinta de antojos */
.intro-marquee { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; overflow: hidden; padding: 14px 0 max(14px, env(safe-area-inset-bottom));
  background: var(--gold-grad); color: #1a1100; transform: rotate(-1.2deg) translateY(6px) scale(1.03); }
.marquee-pista { display: flex; gap: 34px; width: max-content; font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: .04em; white-space: nowrap; }
html:not(.con-motion) .marquee-pista { animation: marquee 26s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Pin dorado: anillo que gira */
.pin.dorado .pin-in::before { content: ""; position: absolute; left: -2px; top: -5px; width: 52px; height: 52px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(255, 220, 120, .9) 85%, transparent 100%); animation: gira 2.4s linear infinite;
  -webkit-mask: radial-gradient(circle, transparent 22px, #000 23px); mask: radial-gradient(circle, transparent 22px, #000 23px); }
@keyframes gira { to { transform: rotate(360deg); } }

/* Celular */
@media (max-width: 820px) {
  .intro { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: start; gap: 0; padding: max(14px, env(safe-area-inset-top)) 20px 80px; }
  .intro-escena { order: -1; height: 42vh; min-height: 290px; margin-top: 46px; }
  .orbita { width: min(330px, 74vw, 34vh); }
  .ifoto-in { padding: 5px 5px 0; }
  .intro-titulo { font-size: clamp(42px, 12.5vw, 64px); }
  .intro-kicker { margin-bottom: 12px; }
  .intro-sub { margin: 12px 0 18px; font-size: 14.5px; }
  .intro-btns .btn { flex: 1; }
  .intro-pasos { margin-bottom: 16px; gap: 6px; }
  .intro-pasos li { font-size: 12px; padding: 5px 10px 5px 6px; }
  .intro-pasos li span { width: 20px; height: 20px; font-size: 11px; }
  .marquee-pista { font-size: 15px; }
}
@media (max-height: 640px) and (max-width: 820px) {
  .intro-escena { height: 36vh; min-height: 220px; }
  .intro-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-rejilla, .marquee-pista { animation: none !important; }
}
