/* Landing de Paws Apart / Huellitas. Mismos colores y letras que el juego. */
@font-face { font-family: 'Nunito'; font-weight: 400; font-display: swap; src: url('assets/fonts/nunito-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 700; font-display: swap; src: url('assets/fonts/nunito-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url('assets/fonts/nunito-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Baloo 2'; font-weight: 700; font-display: swap; src: url('assets/fonts/baloo-2-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Baloo 2'; font-weight: 800; font-display: swap; src: url('assets/fonts/baloo-2-latin-800-normal.woff2') format('woff2'); }

:root {
  --bg: #FFF8EE;
  --bg-2: #FFF1DF;
  --card: #FFFDF8;
  --ink: #4A3428;
  --ink-soft: #7A6052;
  --ink-faint: rgba(74, 52, 40, 0.13);
  --line: #4A3428;
  --on-pastel: #4A3428;
  --on-pastel-soft: #6A5244;
  --yellow: #FFF1B0;
  --blue: #C4E3F7;
  --pink: #F9C9D9;
  --mint: #BDE7D1;
  --lavender: #D9CCF5;
  --peach: #FFD3B5;
  --coral: #FFB8A8;
  --good: #3E9B6E;
  --bad: #E0605A;
  --btn: #4A3428;
  --btn-ink: #FFF8EE;
  --header: rgba(255, 248, 238, 0.82);
  --font-ui: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-title: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  --radius: 24px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2A201A;
    --bg-2: #33271F;
    --card: #382B23;
    --ink: #F4E6D4;
    --ink-soft: #CDB7A2;
    --ink-faint: rgba(244, 230, 212, 0.12);
    --line: #18110D;
    --btn: #FFD3B5;
    --btn-ink: #2A201A;
    --header: rgba(42, 32, 26, 0.85);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.55 var(--font-ui);
  background-image: radial-gradient(var(--ink-faint) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
svg { display: block; }
h1, h2, h3 { font-family: var(--font-title); line-height: 1.08; margin: 0; }
a { color: inherit; }

/* ---------- Cabecera ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--header); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid transparent; transition: border-color 0.2s;
}
.top.scrolled { border-bottom-color: var(--ink-faint); }
.top-in {
  max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top)) 20px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-title); font-weight: 800; font-size: 22px; }
.brand img { width: 40px; height: 40px; border-radius: 12px; border: 3px solid var(--line); }
.lang {
  font: 800 15px var(--font-ui); color: var(--ink); background: var(--card); cursor: pointer;
  border: 3px solid var(--line); border-radius: 999px; padding: 4px 14px; box-shadow: 0 3px 0 var(--line);
}
.lang:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.lang:focus-visible, .play-btn:focus-visible, .foot a:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

main { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
section { margin: 0 0 96px; }
h2 { font-size: clamp(32px, 6vw, 46px); text-align: center; margin-bottom: 32px; text-wrap: balance; }
.eyebrow {
  text-align: center; margin: 0 0 6px; font-weight: 800; font-size: 14px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-soft);
}

/* ---------- Botón de Google Play ---------- */
.play-btn {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  background: var(--btn); color: var(--btn-ink); border: 3px solid var(--line); border-radius: 18px;
  padding: 10px 24px 10px 18px; box-shadow: 0 5px 0 rgba(0, 0, 0, 0.28); transition: transform 0.12s, box-shadow 0.12s;
}
.play-btn svg { width: 26px; height: 26px; flex: none; }
.play-btn span { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.play-btn small { font-size: 12px; font-weight: 700; opacity: 0.85; }
.play-btn b { font-family: var(--font-title); font-size: 22px; }
.play-btn:not([aria-disabled]):hover { transform: translateY(-2px); box-shadow: 0 7px 0 rgba(0, 0, 0, 0.28); }
.play-btn[aria-disabled] { cursor: default; }
.play-btn.light { background: var(--card); color: var(--ink); }

/* ---------- Aviso de reto o visita ---------- */
.invite {
  display: flex; align-items: center; gap: 22px; margin: 18px 0 8px; padding: 22px 24px;
  background: var(--yellow); color: var(--on-pastel); border: 4px solid var(--line); border-radius: 26px; box-shadow: 0 6px 0 var(--line);
}
.invite[hidden] { display: none; }
.invite h2 { font-size: clamp(26px, 5vw, 34px); text-align: left; margin: 0 0 6px; }
.invite p { margin: 0 0 14px; font-weight: 700; }
.invite .invite-note { margin: 10px 0 0; font-size: 14px; opacity: 0.8; }
.invite-dogs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 170px; flex: none; }
.invite-dogs img { width: 64px; height: 64px; object-fit: contain; animation: hop 1.6s ease-in-out infinite; }
.invite-dogs img:nth-child(2n) { animation-delay: 0.25s; }
.invite-dogs img:nth-child(3n) { animation-delay: 0.5s; }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-8px); } }

/* ---------- Portada ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; padding-top: 40px; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; letter-spacing: 0.02em;
  background: var(--mint); color: var(--on-pastel); border: 2.5px solid var(--line); border-radius: 999px; padding: 3px 14px 3px 10px; margin: 0 0 16px;
}
.kicker svg { width: 16px; height: 16px; }
.hero h1 { font-size: clamp(40px, 6.6vw, 64px); margin-bottom: 18px; text-wrap: balance; }
.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--ink-soft); margin: 0 0 28px; max-width: 32em; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.cta-note { margin: 0; font-size: 14px; color: var(--ink-soft); font-weight: 700; max-width: 14em; line-height: 1.35; }

.stats { list-style: none; margin: 34px 0 0; padding: 0; display: flex; gap: 12px; flex-wrap: wrap; }
.stats li {
  display: flex; flex-direction: column; min-width: 104px; padding: 10px 16px 9px;
  background: var(--card); border: 3px solid var(--line); border-radius: 18px; box-shadow: 0 4px 0 var(--line);
}
.stats b { font: 800 26px/1 var(--font-title); }
.stats span { font-size: 13px; font-weight: 800; color: var(--ink-soft); line-height: 1.25; margin-top: 3px; }

/* Tablero de ejemplo */
.board-wrap { position: relative; max-width: 440px; width: 100%; justify-self: center; padding: 64px 10px 10px; isolation: isolate; }
.blob { position: absolute; border-radius: 50%; z-index: -2; filter: blur(2px); }
.blob.b1 { width: 62%; aspect-ratio: 1; background: var(--pink); right: -6%; top: 6%; opacity: 0.75; }
.blob.b2 { width: 48%; aspect-ratio: 1; background: var(--blue); left: -8%; bottom: -6%; opacity: 0.75; }
.board {
  display: grid; grid-template-columns: repeat(5, 1fr); aspect-ratio: 1;
  background: var(--card); border: 4px solid var(--line); border-radius: 22px; overflow: hidden;
  box-shadow: 0 9px 0 var(--line); transform: rotate(2deg);
}
.cell { position: relative; display: grid; place-items: center; border-right: 1px solid rgba(74, 52, 40, 0.18); border-bottom: 1px solid rgba(74, 52, 40, 0.18); }
.cell:nth-child(5n) { border-right: 0; }
.cell:nth-last-child(-n + 5) { border-bottom: 0; }
.cell.br { border-right: 3px solid var(--line); }
.cell.bb { border-bottom: 3px solid var(--line); }
.cell img { width: 78%; }
.cell img.paw { width: 34%; opacity: 0.45; }
.cell.dog img { animation: pop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) both; animation-delay: inherit; }
.peek { position: absolute; top: 4px; left: 14%; width: 30%; z-index: -1; transform: rotate(-6deg); animation: peek 4s ease-in-out infinite; }
.badge-solved {
  position: absolute; left: -2px; bottom: 30px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--good); color: #fff; font: 800 17px var(--font-title); padding: 6px 14px 6px 10px;
  border: 3px solid var(--line); border-radius: 999px; box-shadow: 0 4px 0 var(--line); transform: rotate(-5deg);
  animation: pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) 1.3s both;
}
.badge-solved svg { width: 20px; height: 20px; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes peek { 0%, 100% { transform: rotate(-6deg) translateY(10px); } 50% { transform: rotate(-3deg) translateY(0); } }

/* ---------- Cómo se juega ---------- */
.rules { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.rules li {
  display: flex; flex-direction: column; gap: 16px; background: var(--card);
  border: 3px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: 0 6px 0 var(--line);
}
.rule-text { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.rule-text h3 { font-size: 22px; }
.rule-text p { grid-column: 1 / -1; margin: 8px 0 0; color: var(--ink-soft); }
.num { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: var(--on-pastel); border: 3px solid var(--line); font: 800 18px var(--font-title); }

/* Mini tableros que ilustran cada regla */
.mini {
  position: relative; display: grid; grid-template-columns: repeat(4, 1fr); aspect-ratio: 1; width: 100%; max-width: 230px; margin: 0 auto;
  border: 3px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card);
}
.mini .c { display: grid; place-items: center; border-right: 1px solid rgba(74, 52, 40, 0.16); border-bottom: 1px solid rgba(74, 52, 40, 0.16); }
.mini .c:nth-child(4n) { border-right: 0; }
.mini .c:nth-last-child(-n + 4) { border-bottom: 0; }
.mini .c.br { border-right: 2.5px solid var(--line); }
.mini .c.bb { border-bottom: 2.5px solid var(--line); }
.mini .c img { width: 76%; }
.mini .c.ok { box-shadow: inset 0 0 0 3px var(--good); }
.mini .c.ko { box-shadow: inset 0 0 0 3px var(--bad); }
.mini .verdict {
  position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; border: 2.5px solid var(--line);
}
.mini .verdict svg { width: 20px; height: 20px; }
.mini .verdict.ok { background: var(--good); }
.mini .verdict.ko { background: var(--bad); }
.mini .line { position: absolute; background: var(--bad); border-radius: 4px; opacity: 0.85; }

/* ---------- Funciones (bento) ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feat {
  position: relative; display: flex; flex-direction: column; gap: 6px; overflow: hidden;
  border: 3px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 6px 0 var(--line); color: var(--on-pastel);
}
.feat.wide { grid-column: span 2; flex-direction: row; align-items: center; gap: 24px; }
.feat.wide > div:first-child { flex: 1 1 0; min-width: 0; }
.feat .big { display: block; font: 800 46px/1 var(--font-title); }
.feat h3 { font-size: 23px; margin: 4px 0 4px; }
.feat p { margin: 0; color: var(--on-pastel-soft); }
.ico {
  display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.6); border: 3px solid var(--line); border-radius: 15px;
}
.ico svg { width: 26px; height: 26px; }
.c-yellow { background: var(--yellow); } .c-blue { background: var(--blue); } .c-pink { background: var(--pink); }
.c-mint { background: var(--mint); } .c-lavender { background: var(--lavender); } .c-peach { background: var(--peach); }

/* Tira de niveles */
.lv-strip { display: flex; gap: 8px; flex: none; flex-wrap: wrap; max-width: 380px; justify-content: center; }
.lv {
  position: relative; display: grid; place-items: center; min-width: 52px; height: 56px; padding: 0 8px 8px;
  background: var(--card); color: var(--ink); border: 3px solid var(--line); border-radius: 14px; box-shadow: 0 4px 0 var(--line);
  font: 800 20px var(--font-title);
}
.lv i { position: absolute; bottom: 5px; left: 50%; width: 34px; height: 10px; transform: translateX(-50%);
  background: radial-gradient(circle, #F5B83D 3.4px, transparent 3.8px) 0 0 / 11.3px 10px repeat-x; }
.lv.now { background: var(--coral); color: var(--on-pastel); padding-bottom: 0; animation: bob 1.8s ease-in-out infinite; }
.lv.dots { background: none; border: 0; box-shadow: none; color: var(--on-pastel); min-width: 0; padding: 0 2px; }
.lv.far { padding-bottom: 0; opacity: 0.85; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* Perritos durmiendo */
.nap { position: relative; display: flex; align-items: flex-end; flex: none; padding-top: 16px; }
.nap img { width: 76px; height: 76px; object-fit: contain; margin-left: -12px; }
.nap img:first-child { margin-left: 0; }
.nap img:nth-child(2) { transform: translateY(-6px) rotate(-6deg); }
.zz { position: absolute; top: -4px; right: -6px; font: 800 26px var(--font-title); color: var(--on-pastel); opacity: 0.7; animation: zz 2.6s ease-in-out infinite; }
.zz small { font-size: 18px; margin-left: 2px; vertical-align: super; }
@keyframes zz { 0%, 100% { transform: translateY(0); opacity: 0.45; } 50% { transform: translateY(-6px); opacity: 0.85; } }

/* Etiquetas de accesibilidad */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; max-width: 280px; flex: none; justify-content: center; }
.chips li { background: var(--card); color: var(--ink); border: 2.5px solid var(--line); border-radius: 999px; padding: 3px 12px; font-weight: 800; font-size: 14px; }

/* ---------- Desfile de perritos ---------- */
.marquee {
  display: flex; flex-direction: column; gap: 10px; margin: 0 -20px; padding: 10px 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.row { display: flex; width: max-content; animation: slide 60s linear infinite; }
.row.rev { animation-direction: reverse; animation-duration: 70s; }
.marquee:hover .row { animation-play-state: paused; }
.row img { width: 84px; height: 84px; object-fit: contain; margin-right: 14px; transition: transform 0.2s; }
.row img:hover { transform: translateY(-8px) rotate(-5deg) scale(1.08); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Cierre ---------- */
.final { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.final-card {
  position: relative; width: 100%; overflow: hidden; display: flex; flex-direction: column; align-items: center;
  background: var(--lavender); color: var(--on-pastel); border: 4px solid var(--line); border-radius: 32px;
  box-shadow: 0 8px 0 var(--line); padding: 44px 20px 112px;
  background-image: radial-gradient(rgba(74, 52, 40, 0.12) 1.4px, transparent 1.4px); background-size: 20px 20px;
}
.final-icon { border-radius: 24px; border: 4px solid var(--line); box-shadow: 0 6px 0 var(--line); margin-bottom: 18px; }
.final-card h2 { margin-bottom: 8px; }
.final-card p { margin: 0 0 22px; font-weight: 700; color: var(--on-pastel-soft); }
.final-dogs { position: absolute; left: 0; right: 0; bottom: -14px; display: flex; justify-content: center; gap: 4px; }
.final-dogs img { width: 96px; height: 96px; object-fit: contain; animation: hop 2.4s ease-in-out infinite; }
.final-dogs img:nth-child(2) { animation-delay: 0.3s; }
.final-dogs img:nth-child(3) { animation-delay: 0.6s; }
.final-dogs img:nth-child(4) { animation-delay: 0.9s; }

/* ---------- Pie ---------- */
.foot { border-top: 3px dashed var(--ink-faint); text-align: center; padding: 26px 20px max(30px, env(safe-area-inset-bottom)); color: var(--ink-soft); font-size: 15px; }
.foot nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 8px; font-weight: 800; }
.foot p { margin: 0; }

/* ---------- Aparición al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Pantallas medianas y móviles ---------- */
@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .feat.wide { grid-column: span 2; }
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 24px; text-align: center; padding-top: 16px; }
  .kicker { margin-bottom: 14px; }
  .lead { margin-left: auto; margin-right: auto; }
  .cta { justify-content: center; flex-direction: column; }
  .cta-note { max-width: none; }
  .stats { justify-content: center; margin-top: 26px; }
  .board-wrap { max-width: 340px; }
  .rules { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .rules li { flex-direction: row; align-items: center; }
  .mini { width: 128px; flex: none; margin: 0; border-radius: 12px; }
  .mini .verdict { width: 26px; height: 26px; right: 5px; bottom: 5px; }
  .mini .verdict svg { width: 15px; height: 15px; }
  section { margin-bottom: 72px; }
}
@media (max-width: 640px) {
  .invite { flex-direction: column; text-align: center; padding: 18px 16px; }
  .invite h2 { text-align: center; }
  .bento { grid-template-columns: 1fr; }
  .feat.wide { grid-column: auto; flex-direction: column; align-items: stretch; }
  .lv-strip, .chips { max-width: none; justify-content: flex-start; }
  .nap { align-self: center; }
  .stats li { min-width: 0; flex: 1 1 0; padding: 8px 10px; }
  .stats b { font-size: 22px; }
  .row img { width: 68px; height: 68px; }
  .final-card { padding: 36px 16px 100px; }
  .final-dogs img { width: 78px; height: 78px; }
}
@media (max-width: 420px) {
  .rules li { flex-direction: column; align-items: stretch; }
  .mini { width: 100%; max-width: 200px; margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cell.dog img, .peek, .badge-solved, .invite-dogs img, .final-dogs img, .lv.now, .zz { animation: none; }
  .row { animation: none; width: auto; flex-wrap: wrap; justify-content: center; }
  .row .dup { display: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; margin: 0; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
