:root {
  --bg: #0b1a3a;
  --bg-2: #122a5c;
  --blue: #1e5bd8;
  --blue-light: #4f8dff;
  --cream: #f7e3b0;
  --orange: #e8962e;
  --text: #eef3ff;
  --muted: #a9b8d9;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: "Outfit", system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(ellipse at 50% 0%, var(--bg-2) 0%, var(--bg) 65%);
  overflow-x: hidden;
  position: relative;
}

/* ---------- Estrellas ---------- */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 10% 20%, #fff8 50%, transparent 51%),
    radial-gradient(2px 2px at 80% 15%, #fff6 50%, transparent 51%),
    radial-gradient(2px 2px at 30% 70%, #fff5 50%, transparent 51%),
    radial-gradient(2px 2px at 65% 45%, #fff7 50%, transparent 51%),
    radial-gradient(2px 2px at 90% 60%, #fff5 50%, transparent 51%),
    radial-gradient(2px 2px at 45% 12%, #fff6 50%, transparent 51%);
  animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle { from { opacity: .5; } to { opacity: 1; } }

/* ---------- Marca ---------- */
.brand { margin-top: 32px; z-index: 1; }

.brand__img { display: block; height: 64px; width: auto; }

/* ---------- Hero ---------- */
.hero {
  flex: 1;
  width: 100%;
  max-width: 720px;
  padding: 24px 16px 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 1;
}

.pup { position: relative; margin-bottom: 28px; }

#pup {
  display: block;
  width: min(380px, 82vw);
  height: auto;
  image-rendering: pixelated;
  animation: breathe 3s ease-in-out infinite;
  transform-origin: 70% 100%;
  filter: drop-shadow(0 12px 24px #0008);
}

@keyframes breathe {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(1.025); }
}

.zzz {
  position: absolute;
  top: 0;
  right: 8%;
  font-family: "Press Start 2P", monospace;
  color: var(--blue-light);
}
.zzz span {
  position: absolute;
  opacity: 0;
  animation: float 3.6s ease-in infinite;
}
.zzz span:nth-child(1) { font-size: 12px; animation-delay: 0s; }
.zzz span:nth-child(2) { font-size: 16px; animation-delay: 1.2s; }
.zzz span:nth-child(3) { font-size: 22px; animation-delay: 2.4s; }

@keyframes float {
  0%   { transform: translate(0, 20px); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translate(40px, -50px); opacity: 0; }
}

.tag {
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  color: var(--orange);
  margin-bottom: 16px;
  letter-spacing: .05em;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 16px;
}

.hl {
  color: var(--cream);
  background: linear-gradient(transparent 62%, #1e5bd8aa 62%);
}

.lead { color: var(--muted); font-size: 1.1rem; max-width: 520px; line-height: 1.6; }

/* ---------- Barra de carga pixel ---------- */
.loader {
  margin-top: 32px;
  width: min(360px, 100%);
  height: 22px;
  border: 3px solid var(--text);
  padding: 3px;
  box-shadow: 4px 4px 0 #000a;
  overflow: hidden;
}

.loader__bar {
  height: 100%;
  width: 40%;
  background: repeating-linear-gradient(90deg, var(--blue-light) 0 10px, transparent 10px 14px);
  animation: load 2.4s steps(24) infinite;
}

@keyframes load {
  from { transform: translateX(-100%); }
  to   { transform: translateX(260%); }
}

.loader__msg {
  margin-top: 12px;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  color: var(--muted);
  min-height: 1em;
}

/* ---------- Footer y mar ---------- */
.foot {
  position: absolute;
  bottom: 16px;
  z-index: 2;
  font-size: .85rem;
  color: #dbe6ffcc;
  padding: 0 16px;
  text-align: center;
}

.sea {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 140px;
  display: block;
  z-index: 0;
  animation: sail 14s linear infinite;
}
.sea--back  { fill: #1e5bd855; }
.sea--front { fill: #1e5bd8aa; }

/* Velero: su posición la calcula js/main.js siguiendo la curva de la ola de frente */
.harbor {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 140px;           /* igual que .sea */
  overflow: visible;        /* el mástil sobresale por arriba */
  pointer-events: none;
}

.boat {
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: auto;
  image-rendering: pixelated;
  transform-origin: 50% 88%;
  will-change: transform;
  filter: drop-shadow(0 0 10px #4f8dff55);
}

@keyframes sail { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}
