/* Antojazo · landing de prelanzamiento. Tokens del kit oficial (packages/brand). Solo transform y opacity animan. */
@font-face { font-family: "Fredoka"; src: url("/fonts/Fredoka_600SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("/fonts/Fredoka_700Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --orange: #F92B00;
  --orange-text: #C92300;
  --orange-soft: #FFE9E3;
  --ink: #1D1D1D;
  --bg: #FAF8F5;
  --muted: #5F5B57;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(20px, 5vw, 56px);
  --tile: min(54vw, 240px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
img { display: block; max-width: 100%; height: auto; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* Barra superior */
.top {
  width: 100%; max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px var(--gutter) 0;
}
.brand { display: block; border-radius: 8px; }
.brand img { height: 34px; width: auto; }
.soon {
  margin: 0; display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 12px; border-radius: 999px;
  background: var(--orange-soft); color: var(--orange-text);
  font: 600 0.9375rem/1 "Fredoka", system-ui, sans-serif; letter-spacing: 0.01em; white-space: nowrap;
}
.soon-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); }
.soon-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--orange);
  animation: pulse 2s var(--ease) 1.2s 2;
}

/* Portada */
.hero {
  width: 100%; max-width: 1200px; margin: 0 auto;
  display: grid; align-content: center; justify-items: center; gap: clamp(28px, 6vw, 48px);
  padding: clamp(28px, 6vh, 64px) var(--gutter);
  text-align: center;
}

.stage { position: relative; width: var(--tile); aspect-ratio: 1; display: grid; place-items: center; }
.halo { position: absolute; inset: -22%; border-radius: 50%; background: var(--orange-soft); transform: scale(0.6); opacity: 0; animation: grow 900ms var(--ease) 80ms both; }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--orange); opacity: 0; pointer-events: none; }
.tile {
  position: relative; z-index: 1; width: 100%; border-radius: 23%; overflow: hidden;
  box-shadow: 0 1px 2px rgba(29, 29, 29, 0.08), 0 18px 40px -18px rgba(201, 35, 0, 0.45);
  transform-origin: 50% 70%;
  animation: tile-in 700ms var(--ease) 150ms both, squish 420ms var(--ease) 1050ms;
  cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.tile img { width: 100%; pointer-events: none; }
/* El punto naranja de la «j» cae y «toca» el ícono */
.drop {
  position: absolute; z-index: 2; left: 50%; top: -20%; width: 15%; aspect-ratio: 1; margin-left: -7.5%;
  border-radius: 50%; background: var(--orange); opacity: 0; box-shadow: 0 0 0 4px var(--bg);
  animation: drop 900ms var(--ease) 450ms both;
}
.stage.tapped .tile { animation: squish 420ms var(--ease); }
.stage .ring:nth-of-type(2) { animation: ripple 2.4s var(--ease) 1.05s 1; }
.stage .ring:nth-of-type(3) { animation: ripple 2.4s var(--ease) 1.45s 1; }
.stage .ring:nth-of-type(4) { animation: ripple 2.4s var(--ease) 1.85s 1; }
.stage.tapped .ring:nth-of-type(2) { animation: ripple 1.6s var(--ease) 0s 1; }
.stage.tapped .ring:nth-of-type(3) { animation: ripple 1.6s var(--ease) 0.18s 1; }
.stage.tapped .ring:nth-of-type(4) { animation: ripple 1.6s var(--ease) 0.36s 1; }

.copy { display: grid; justify-items: center; max-width: 34rem; }
h1 {
  margin: 0; font: 700 clamp(2.75rem, 11.5vw, 5.75rem)/0.98 "Fredoka", system-ui, sans-serif;
  letter-spacing: -0.015em; text-wrap: balance;
}
.accent { color: var(--orange); }
.slogan { margin: 18px 0 0; font: 600 clamp(1.25rem, 4.6vw, 1.625rem)/1.2 "Fredoka", system-ui, sans-serif; }
.lead { margin: 12px 0 0; max-width: 30rem; color: var(--muted); font-size: 1.0625rem; text-wrap: balance; }

.cta { margin-top: 28px; display: grid; justify-items: center; gap: 10px; width: 100%; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; max-width: 360px; min-height: 58px; padding: 0 28px; border-radius: 18px;
  background: var(--ink); color: #fff; text-decoration: none;
  font: 600 1.125rem/1 "Fredoka", system-ui, sans-serif; letter-spacing: 0.01em;
  transition: transform 150ms var(--ease), background-color 150ms var(--ease), box-shadow 150ms var(--ease);
  box-shadow: 0 10px 24px -14px rgba(29, 29, 29, 0.6);
  touch-action: manipulation;
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible, .brand:focus-visible { outline: 3px solid var(--orange-text); outline-offset: 3px; }
.btn[aria-disabled="true"] { background: #6E6A66; cursor: not-allowed; }
.hint { margin: 0; font-size: 0.875rem; color: var(--muted); }

.foot { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter) 24px; text-align: center; }
.foot p { margin: 0; font-size: 0.8125rem; color: var(--muted); }

/* Entrada única al cargar */
[data-enter] { animation: rise 560ms var(--ease) both; }
[data-enter="1"] { animation-delay: 120ms; }
[data-enter="2"] { animation-delay: 260ms; }
[data-enter="3"] { animation-delay: 360ms; }
[data-enter="4"] { animation-delay: 440ms; }
[data-enter="5"] { animation-delay: 520ms; }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); background: #000; box-shadow: 0 16px 30px -16px rgba(29, 29, 29, 0.7); }
  .btn:active { transform: translateY(0) scale(0.97); }
}

/* Tableta y escritorio */
@media (min-width: 600px) {
  :root { --tile: min(38vw, 280px); }
  .brand img { height: 40px; }
  .top { padding-top: 28px; }
}
@media (min-width: 960px) {
  :root { --tile: min(32vw, 420px); }
  .hero { grid-template-columns: 1.15fr 0.85fr; justify-items: stretch; text-align: left; gap: 48px; }
  .copy { order: 1; justify-items: start; max-width: none; }
  .stage { order: 2; justify-self: center; }
  .cta { justify-items: start; }
  .btn { width: auto; }
  .foot { text-align: left; }
}
@media (max-height: 640px) and (max-width: 959px) {
  :root { --tile: min(40vw, 170px); }
}

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes grow { to { opacity: 1; transform: scale(1); } }
@keyframes tile-in { from { opacity: 0; transform: translateY(18px) scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes squish { 0% { transform: scale(1); } 35% { transform: scale(0.94, 0.9); } 70% { transform: scale(1.02); } 100% { transform: scale(1); } }
@keyframes drop {
  0% { opacity: 0; transform: translateY(-140%); }
  20% { opacity: 1; }
  62% { opacity: 1; transform: translateY(95%) scale(1.12, 0.84); }
  76% { opacity: 1; transform: translateY(80%) scale(0.95, 1.05); }
  100% { opacity: 0; transform: translateY(120%) scale(0.3); }
}
@keyframes ripple { 0% { opacity: 0.55; transform: scale(0.9); } 100% { opacity: 0; transform: scale(1.75); } }
@keyframes pulse { 0% { opacity: 0.6; transform: scale(1); } 100% { opacity: 0; transform: scale(2.6); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .halo { opacity: 1; transform: none; }
  .drop { display: none; }
}

@media (pointer: fine) { html { overscroll-behavior: none; } }
