:root {
  --sky-top: #4ec4ff;
  --sky-bot: #9ad9ff;
  --deep: #0b3d66;
  --mid: #1a7ab8;
  --foam: #e8fbff;
  --sand: #f2d39a;
  --sun: #ffd24a;
  --ink: #102a43;
  --brand: #fff8e7;
}

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

html, body {
  height: 100%;
  background: var(--deep);
  color: var(--brand);
  font-family: "Press Start 2P", monospace;
  image-rendering: pixelated;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: end center;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bot) 42%, var(--mid) 42%, var(--deep) 100%);
}

.sky {
  position: absolute;
  inset: 0 0 55% 0;
  pointer-events: none;
}

.sun {
  position: absolute;
  top: 8%;
  right: 12%;
  width: 64px;
  height: 64px;
  background: var(--sun);
  box-shadow:
    0 0 0 8px #ffe28a,
    0 0 0 16px rgba(255, 210, 74, 0.35);
  animation: sun-pulse 3.2s ease-in-out infinite;
}

.cloud {
  position: absolute;
  height: 24px;
  background: #fff;
  box-shadow:
    16px 0 0 #fff,
    32px 0 0 #fff,
    8px -12px 0 #fff,
    24px -12px 0 #fff;
  opacity: 0.9;
  animation: cloud-drift 28s linear infinite;
}

.c1 { top: 18%; left: -10%; width: 24px; animation-duration: 34s; }
.c2 { top: 28%; left: -20%; width: 24px; animation-duration: 46s; animation-delay: -12s; opacity: 0.75; }

.hero-art {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.hero-img {
  width: min(1200px, 100%);
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  image-rendering: auto;
  filter: contrast(1.05) saturate(1.1);
  mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}

.pixel-surfer {
  position: absolute;
  left: 58%;
  top: 48%;
  width: 48px;
  height: 40px;
  transform: translate(-50%, -50%);
  animation: ride 2.4s ease-in-out infinite;
  z-index: 2;
}

.pixel-surfer .board {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 8px;
  background: #ff8a3d;
  box-shadow: inset 0 -2px 0 #c45a12;
}

.pixel-surfer .body {
  position: absolute;
  left: 18px;
  bottom: 8px;
  width: 12px;
  height: 16px;
  background: #2f6fed;
}

.pixel-surfer .head {
  position: absolute;
  left: 18px;
  bottom: 24px;
  width: 12px;
  height: 12px;
  background: #ffcc99;
  box-shadow: 0 -4px 0 #1b1b1b;
}

.spray {
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  background: var(--foam);
  animation: spray 2.4s ease-in-out infinite;
}
.s1 { left: -6px; animation-delay: 0s; }
.s2 { left: -12px; bottom: 8px; animation-delay: 0.2s; }
.s3 { left: 50px; animation-delay: 0.35s; }

.waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  pointer-events: none;
  z-index: 1;
}

.wave {
  position: absolute;
  left: -50%;
  width: 200%;
  height: 70px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--foam) 0 12px,
    transparent 12px 24px
  );
  background-size: 48px 12px;
  background-repeat: repeat-x;
  background-position: 0 0;
  border-top: 12px solid var(--foam);
  opacity: 0.55;
  animation: wave-scroll 7s linear infinite;
}

.w1 { bottom: 18%; background-color: #2b9ad6; animation-duration: 9s; opacity: 0.45; }
.w2 { bottom: 8%; background-color: #1879b3; animation-duration: 6.5s; animation-direction: reverse; }
.w3 { bottom: 0; height: 90px; background-color: var(--deep); opacity: 0.85; animation-duration: 11s; }

.brand {
  position: relative;
  z-index: 3;
  width: min(920px, 92vw);
  padding: 0 1rem 12vh;
  text-align: center;
  text-shadow: 3px 3px 0 #0a2744;
}

.brand h1 {
  font-size: clamp(1.1rem, 3.6vw, 2.4rem);
  line-height: 1.35;
  letter-spacing: 0.04em;
  color: var(--brand);
  margin-bottom: 0.9rem;
  animation: title-glow 2.8s ease-in-out infinite;
}

.brand p {
  font-size: clamp(0.55rem, 1.5vw, 0.75rem);
  color: #d7f3ff;
  line-height: 1.7;
}

@keyframes ride {
  0%, 100% { transform: translate(-50%, -50%) rotate(-4deg); }
  50% { transform: translate(-42%, -62%) rotate(5deg); }
}

@keyframes spray {
  0%, 100% { opacity: 0.2; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-10px); }
}

@keyframes wave-scroll {
  from { background-position: 0 0; transform: translateX(0); }
  to { background-position: 96px 0; transform: translateX(4%); }
}

@keyframes cloud-drift {
  from { transform: translateX(0); }
  to { transform: translateX(140vw); }
}

@keyframes sun-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@keyframes title-glow {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50% { filter: drop-shadow(0 0 10px rgba(255, 248, 231, 0.35)); }
}

@media (max-width: 640px) {
  .pixel-surfer { left: 62%; top: 52%; transform: scale(0.9) translate(-50%, -50%); }
  .brand { padding-bottom: 16vh; }
}
