/* Portada de Esquarium: agua en franjas, paneles de 8 bits con esquinas en escalón y mucho movimiento
   (que se apaga entero con «reducir movimiento» del sistema). */
@font-face { font-family: 'Pixelify Sans'; src: url(/fonts/pixelify-sans-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Pixelify Sans'; src: url(/fonts/pixelify-sans-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Pixelify Sans'; src: url(/fonts/pixelify-sans-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --night: #0b1d3a; --deep: #0d3155; --ink: #e8f7ff; --muted: #9fc6dd; --cyan: #3fd2ff; --mint: #57e3a8;
  --gold: #ffd23f; --gold-dark: #c98a12; --coral: #ff6b6b; --violet: #c996f2; --panel: #10284a; --line: #1d4470;
  --font: 'Pixelify Sans', ui-monospace, 'Courier New', monospace;
  --notch: polygon(0 6px, 3px 6px, 3px 3px, 6px 3px, 6px 0, calc(100% - 6px) 0, calc(100% - 6px) 3px, calc(100% - 3px) 3px, calc(100% - 3px) 6px, 100% 6px, 100% calc(100% - 6px), calc(100% - 3px) calc(100% - 6px), calc(100% - 3px) calc(100% - 3px), calc(100% - 6px) calc(100% - 3px), calc(100% - 6px) 100%, 6px 100%, 6px calc(100% - 3px), 3px calc(100% - 3px), 3px calc(100% - 6px), 0 calc(100% - 6px));
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
/* La fuente une «fi» en un carácter: en inglés «fish» se leería «Ash» */
* { font-variant-ligatures: none; font-feature-settings: 'liga' 0, 'clig' 0, 'calt' 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--night); color: var(--ink); font: 400 17px/1.6 var(--font); }
img { image-rendering: pixelated; max-width: 100%; height: auto; display: block; }
picture img, .phone img, video { image-rendering: auto; }
a { color: var(--cyan); }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 16px; z-index: 99; background: var(--gold); color: var(--night); padding: 8px 12px; }
.kicker { display: inline-block; margin: 0 0 12px; padding: 2px 12px; background: var(--cyan); color: var(--night); font-weight: 600; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; clip-path: var(--notch); }
.center { text-align: center; }

/* ---------- Cabecera ---------- */
header.top { position: sticky; top: 0; z-index: 20; background: rgba(11, 29, 58, .9); backdrop-filter: blur(8px); border-bottom: 3px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--gold); font-weight: 700; font-size: 24px; text-decoration: none; text-shadow: 3px 3px 0 #3b2108; }
.brand img { width: 40px; transition: transform .3s var(--ease); }
.brand:hover img { transform: translateX(4px) rotate(-6deg); }
header nav.sections { margin-left: auto; display: flex; align-items: center; gap: 22px; }
header nav.sections a { color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1; padding: 6px 0; border-bottom: 3px solid transparent; transition: color .15s, border-color .15s; }
header nav.sections a:hover, header nav.sections a.on { color: var(--gold); border-color: var(--gold); }
.lang { display: flex; background: var(--panel); clip-path: var(--notch); padding: 3px; gap: 2px; }
.lang button { font: 600 14px var(--font); color: var(--muted); background: none; border: 0; padding: 6px 10px; cursor: pointer; clip-path: var(--notch); line-height: 1; }
.lang button[aria-pressed='true'] { background: var(--cyan); color: var(--night); }
@media (max-width: 920px) { header nav.sections { display: none; } .lang { margin-left: auto; } }
@media (max-width: 380px) { .brand { font-size: 0; gap: 0; } .brand img { width: 44px; } }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; font: 600 17px var(--font); text-decoration: none; color: var(--night); background: var(--gold); clip-path: var(--notch); box-shadow: inset -4px -4px 0 var(--gold-dark), inset 3px 3px 0 #fff3a8; border: 0; cursor: pointer; transition: transform .15s, filter .15s; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn.alt { background: var(--cyan); box-shadow: inset -4px -4px 0 #1592c2, inset 3px 3px 0 #c9f3ff; }
.btn.ghost { background: #173a66; color: var(--ink); box-shadow: inset -4px -4px 0 #071428, inset 3px 3px 0 #2b5f96; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn svg { width: 22px; height: 22px; flex: none; }
.ctas { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Portada ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; background:
  repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, .025) 3px 6px),
  linear-gradient(#2a8fc4 0 12%, #237fb6 12% 24%, #1d70a6 24% 36%, #196296 36% 48%, #155485 48% 60%, #124774 60% 72%, #0f3b63 72% 84%, #0d3155 84%); }
.hero::after { content: ''; position: absolute; inset: auto 0 0; height: 40px; background: linear-gradient(#f3d898 0 6px, #e9c77f 6px 18px, #dcb162 18px); z-index: 1; }
.hero .wrap { position: relative; z-index: 3; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding: 72px 0 120px; }
.hero h1 { font-size: clamp(38px, 6vw, 66px); line-height: 1.04; margin: 0 0 18px; text-shadow: 4px 4px 0 #071428; }
.hero h1 em { font-style: normal; color: var(--gold); display: inline-block; animation: bob 3s ease-in-out infinite; }
.hero .lead { font-size: 20px; color: #dff4ff; max-width: 34em; margin: 0 0 28px; text-shadow: 2px 2px 0 #071428; }
.note { font-size: 15px; color: #cfeaff; margin-top: 16px; text-shadow: 2px 2px 0 #071428; }
.note a { color: var(--gold); }
.rays i { position: absolute; top: -10%; width: 90px; height: 130%; background: linear-gradient(rgba(190, 240, 255, .16), transparent 80%); transform: skewX(-14deg); animation: ray 9s ease-in-out infinite alternate; z-index: 0; }
.rays i:nth-child(1) { left: 12%; } .rays i:nth-child(2) { left: 38%; width: 60px; animation-delay: -3s; } .rays i:nth-child(3) { left: 61%; width: 120px; animation-delay: -5s; } .rays i:nth-child(4) { left: 84%; animation-delay: -7s; }
@keyframes ray { from { opacity: .4; transform: skewX(-14deg) translateX(-20px); } to { opacity: 1; transform: skewX(-10deg) translateX(30px); } }
.school { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.swim { position: absolute; top: var(--y); left: 0; animation: swim var(--d) linear var(--w, 0s) infinite; }
.swim.l { animation-name: swim-l; }
@keyframes swim { from { transform: translateX(-200px); } to { transform: translateX(calc(100vw + 200px)); } }
@keyframes swim-l { from { transform: translateX(calc(100vw + 200px)) scaleX(-1); } to { transform: translateX(-200px) scaleX(-1); } }
.bub { position: absolute; left: var(--x); bottom: 40px; width: 8px; height: 8px; border: 2px solid rgba(220, 248, 255, .8); animation: rise 7s linear var(--w, 0s) infinite; }
@keyframes rise { from { transform: translateY(0); opacity: 1; } 50% { transform: translate(10px, -40vh); } to { transform: translateY(-85vh); opacity: 0; } }
.seabed { position: absolute; left: 0; right: 0; bottom: 26px; z-index: 2; display: flex; justify-content: space-around; align-items: flex-end; pointer-events: none; }
.seabed img { width: auto; height: auto; max-height: 72px; }
.seabed img:nth-child(1) { animation: sway 4s ease-in-out infinite alternate; transform-origin: bottom; }
@keyframes sway { from { transform: skewX(-4deg); } to { transform: skewX(4deg); } }
@keyframes bob { 50% { transform: translateY(-6px); } }
.phone { position: relative; justify-self: center; width: min(320px, 70vw); padding: 10px; background: #071428; clip-path: var(--notch); box-shadow: 0 0 0 4px #071428; }
.phone img, .phone video { width: 100%; aspect-ratio: 390 / 844; object-fit: cover; display: block; }
.hero-phone { animation: bob 5s ease-in-out infinite; }
.screens { position: relative; aspect-ratio: 390 / 844; }
.screens picture { position: absolute; inset: 0; opacity: 0; transition: opacity .8s; }
.screens picture.on { opacity: 1; }
.pop { position: absolute; left: var(--x); top: var(--y); font: 700 20px var(--font); color: var(--gold); text-shadow: 2px 2px 0 #3b2108; animation: pop 4s ease-out var(--w, 0s) infinite; pointer-events: none; }
.pop.gold { font-size: 24px; }
@keyframes pop { 0%, 55% { opacity: 0; transform: translateY(10px) scale(.6); } 62% { opacity: 1; transform: translateY(0) scale(1.15); } 85% { opacity: 1; transform: translateY(-26px) scale(1); } 100% { opacity: 0; transform: translateY(-40px); } }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding: 40px 0 120px; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero .ctas { justify-content: center; }
  .swim { opacity: .45; }
  .seabed img:nth-child(n+5) { display: none; }
}

/* ---------- Cifras ---------- */
.numbers { padding: 40px 0; background: var(--night); border-bottom: 3px solid var(--line); }
.numbers ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; text-align: center; }
.numbers b { display: block; font-size: clamp(38px, 5vw, 56px); line-height: 1; color: var(--gold); text-shadow: 3px 3px 0 #3b2108; font-variant-numeric: tabular-nums; }
.numbers span { color: var(--muted); font-size: 16px; }
@media (max-width: 700px) { .numbers ul { grid-template-columns: repeat(2, 1fr); row-gap: 26px; } }

/* ---------- Banda de peces ---------- */
.marquee { overflow: hidden; padding: 22px 0; background: var(--deep); border-bottom: 3px solid var(--line); }
.marquee .track { display: flex; gap: 48px; width: max-content; align-items: center; animation: marquee 40s linear infinite; }
.marquee img { height: 52px; width: auto; }
.marquee img:nth-child(odd) { animation: bob 2.6s ease-in-out infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */
section { padding: 84px 0; }
section.deep { background: var(--deep); }
section h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.12; margin: 0 0 14px; color: var(--gold); text-shadow: 3px 3px 0 #3b2108; }
section .sub { color: var(--muted); max-width: 42em; margin: 0 0 40px; font-size: 18px; }
.card { background: var(--panel); clip-path: var(--notch); box-shadow: inset -4px -4px 0 #071428, inset 3px 3px 0 #1d4470; padding: 24px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 36px; } }

/* Vídeo */
.video-phone { width: min(330px, 78vw); }
.video-phone video { height: auto; aspect-ratio: 9 / 16; object-fit: contain; background: #071428; }
.sound { position: absolute; right: 18px; bottom: 18px; font: 600 14px var(--font); color: var(--night); background: var(--gold); border: 0; padding: 8px 12px; clip-path: var(--notch); cursor: pointer; }
.sound[aria-pressed='true'] { background: var(--cyan); }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; color: var(--ink); }
.ticks li::before { content: ''; position: absolute; left: 0; top: .45em; width: 14px; height: 14px; background: var(--gold); clip-path: polygon(0 40%, 40% 40%, 40% 0, 60% 0, 60% 40%, 100% 40%, 100% 60%, 60% 60%, 60% 100%, 40% 100%, 40% 60%, 0 60%); }

/* Cómo se juega */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps .card, .howto .card { display: flex; flex-direction: column; transition: transform .2s var(--ease); }
.steps .card:hover, .howto .card:hover { transform: translateY(-4px); }
.steps h3, .howto h3 { margin: 10px 0 6px; font-size: 22px; }
.steps p, .howto p { margin: 0; color: var(--muted); }
.num { display: inline-grid; place-items: center; width: 42px; height: 42px; background: var(--cyan); color: var(--night); font-weight: 700; font-size: 22px; clip-path: var(--notch); }
.stages, .feed, .pearls { margin-top: auto; padding-top: 18px; min-height: 92px; display: flex; align-items: flex-end; gap: 10px; }
.stages img { min-width: 0; height: auto; }
.stages img:nth-child(1) { width: 12%; } .stages img:nth-child(2) { width: 19%; } .stages img:nth-child(3) { width: 28%; } .stages img:nth-child(4) { width: 36%; }
.goldfish { filter: sepia(1) saturate(4) hue-rotate(5deg) brightness(1.15); animation: shine 2s ease-in-out infinite; }
@keyframes shine { 50% { filter: sepia(1) saturate(5) hue-rotate(5deg) brightness(1.45); } }
.feed { position: relative; justify-content: center; }
.feed img { width: 90px; animation: nibble 2.4s ease-in-out infinite; }
.feed i { position: absolute; top: 10px; width: 8px; height: 8px; background: #e7a43c; animation: fall 2.4s linear infinite; }
.feed i:nth-child(1) { left: 30%; } .feed i:nth-child(2) { left: 52%; animation-delay: -.8s; } .feed i:nth-child(3) { left: 70%; animation-delay: -1.6s; }
@keyframes fall { from { transform: translateY(0); opacity: 1; } 80% { opacity: 1; } to { transform: translateY(70px); opacity: 0; } }
@keyframes nibble { 50% { transform: translateX(10px) translateY(-6px); } }
.pearls { justify-content: center; gap: 14px; }
.pearls i { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 18%, #e8eefc 30%, #b8c4e6 70%, #8d9cc8); animation: bob 2.4s ease-in-out infinite; }
.pearls i:nth-child(2) { animation-delay: -.6s; } .pearls i:nth-child(3) { animation-delay: -1.2s; }
.pearls i.g { width: 38px; height: 38px; background: radial-gradient(circle at 35% 30%, #fffbe0 0 16%, #ffe680 30%, #ffc23f 70%, #c98a12); animation: shinebob 2.4s ease-in-out -1.8s infinite; }
@keyframes shinebob { 50% { transform: translateY(-6px); filter: brightness(1.25); } }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Peces */
.species { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.species li { text-align: center; padding: 18px 10px 14px; transition: transform .2s var(--ease); }
.species li:hover { transform: translateY(-4px) rotate(-1deg); }
.species li:hover img { animation: wiggle .6s ease-in-out; }
.species .pic { height: 96px; display: grid; place-items: center; }
.species .pic img { max-height: 90px; width: auto; }
.species b { display: block; margin-top: 6px; }
.species small { color: var(--muted); }
.species li.star { background: linear-gradient(#2a2156, #1a1440); box-shadow: inset -4px -4px 0 #0e0a26, inset 3px 3px 0 #4a3c8f; }
@keyframes wiggle { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.rares { margin-top: 40px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: center; padding: 28px; background: linear-gradient(135deg, #1a1440, #2a2156 60%, #133b66); clip-path: var(--notch); }
.rares h3 { margin: 0 0 8px; font-size: 30px; color: var(--violet); text-shadow: 3px 3px 0 #0e0a26; }
.rares p { margin: 0; color: #d9ccff; }
.rares ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.rares li { display: grid; justify-items: center; gap: 8px; padding: 16px 8px; background: rgba(255, 255, 255, .06); clip-path: var(--notch); }
.rares li img { height: 70px; width: auto; animation: bob 3s ease-in-out infinite; }
.rares li:nth-child(2) img { animation-delay: -1s; }
.rares li.galaxy img { animation: bob 3s ease-in-out -2s infinite, glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { filter: drop-shadow(0 0 10px #b98cff); } }
@media (max-width: 760px) { .rares { grid-template-columns: 1fr; } }

/* Galería */
.gallery { overflow: hidden; }
.rail-wrap { position: relative; }
.rail { list-style: none; margin: 0; padding: 8px max(16px, calc((100% - 1120px) / 2)) 24px; display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail li { flex: none; scroll-snap-align: center; text-align: center; }
.rail .phone { width: 230px; transition: transform .25s var(--ease); }
.rail li:hover .phone { transform: translateY(-6px) rotate(-1deg); }
.rail p { margin: 12px 0 0; font-weight: 600; }
.rail-btn { position: absolute; top: 40%; z-index: 2; width: 48px; height: 48px; font: 700 30px/1 var(--font); color: var(--night); background: var(--gold); border: 0; clip-path: var(--notch); cursor: pointer; }
.rail-btn.prev { left: 12px; } .rail-btn.next { right: 12px; }
@media (hover: none), (max-width: 700px) { .rail-btn { display: none; } }

/* Clasificación */
.faces { display: flex; gap: 10px; margin: -14px 0 8px; flex-wrap: wrap; }
.faces canvas { width: 44px; height: 44px; image-rendering: pixelated; animation: bob 3s ease-in-out infinite; }
@media (max-width: 420px) { .faces { gap: 8px; } .faces canvas { width: 38px; height: 38px; } }
.faces canvas:nth-child(2n) { animation-delay: -1s; } .faces canvas:nth-child(3n) { animation-delay: -2s; }
.shots { display: flex; gap: 16px; justify-content: center; }
.shots .phone { width: min(240px, 42vw); }
.tilt-l { transform: rotate(-3deg); } .tilt-r { transform: rotate(3deg) translateY(28px); }
.facts { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 24px 0 0; padding: 0; }
.facts b { display: block; font-size: 34px; color: var(--cyan); line-height: 1.1; }
.facts span { color: var(--muted); }

/* Android */
.android { background: radial-gradient(circle at 80% 0, #1d4f86, transparent 60%), var(--night); }
.howto { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.howto .btn { margin-top: 18px; align-self: flex-start; }
.howto p { flex: 1; }
@media (max-width: 860px) { .howto { grid-template-columns: 1fr; } }

/* Seguridad y preguntas */
.safe { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.safe h3 { margin: 0 0 6px; font-size: 20px; }
.safe p { margin: 0; color: var(--muted); }
.faq details { margin-bottom: 12px; padding: 0 22px; }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 19px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--gold); font-size: 26px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p, .faq details ol { margin: 0 0 14px; color: var(--muted); }
.faq details > :last-child { padding-bottom: 6px; }
.faq ol { padding-left: 22px; }
.faq li { margin-bottom: 6px; }

/* Final y pie */
.final { position: relative; overflow: hidden; text-align: center; background: linear-gradient(var(--night), var(--deep)); }
.final .sub { margin-inline: auto; }
.final .ctas { justify-content: center; }
.final-fish { position: absolute; right: 6%; top: 30%; width: 110px; opacity: .6; animation: bob 4s ease-in-out infinite; }
@media (max-width: 760px) { .final-fish { display: none; } }
footer { border-top: 3px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { color: var(--ink); }

/* Aparecer al hacer scroll */
[data-reveal] { transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-reveal]:not(.in) { opacity: 0; transform: translateY(24px) scale(.98); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .swim, .bub, .pop { display: none; }
  html { scroll-behavior: auto; }
}
