:root {
  --ocean-deep: #083d77;
  --ocean: #0f74bd;
  --aqua: #48d4c2;
  --sky: #bff7ff;
  --land: #71d94f;
  --land-dark: #24984d;
  --seafoam: #d9ffe0;
  --cream: #fff5c7;
  --ink: #062d3f;
  --shadow: #031b2b;
  --coral: #ff9f8f;
  --panel: rgba(245, 255, 239, 0.94);
  --pixel: 4px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--seafoam);
  background:
    linear-gradient(180deg, rgba(8, 61, 119, 0.96), rgba(15, 116, 189, 0.86) 42%, rgba(113, 217, 79, 0.78)),
    radial-gradient(circle at 18% 12%, rgba(217, 255, 224, 0.34), transparent 26%),
    var(--ocean-deep);
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  transform: translateY(-140%);
  padding: 12px 14px;
  color: var(--ink);
  background: var(--cream);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--shadow);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(16px, 5vw, 72px);
  transition: background 160ms ease, box-shadow 160ms ease, padding 160ms ease;
}

.site-header.is-scrolled,
.site-header:focus-within {
  background: rgba(4, 32, 56, 0.88);
  box-shadow: 0 4px 0 rgba(3, 27, 43, 0.65);
  backdrop-filter: blur(10px);
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  text-decoration: none;
  letter-spacing: 0;
}

.brand-icon {
  width: 42px;
  height: 42px;
  image-rendering: pixelated;
}

.brand span,
.footer-brand {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(13px, 1.2vw, 18px);
  color: var(--cream);
  text-shadow: 3px 3px 0 var(--ocean-deep);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a,
.site-footer nav a,
.text-link {
  text-decoration: none;
  font-weight: 900;
}

.site-nav a {
  padding: 10px 12px;
  color: var(--seafoam);
  border: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--cream);
  border-color: currentColor;
  background: rgba(217, 255, 224, 0.12);
}

.menu-toggle {
  display: none;
  min-height: 44px;
  padding: 10px 12px;
  font: 900 12px/1 "Press Start 2P", monospace;
  color: var(--ink);
  background: var(--cream);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--shadow);
}

main {
  outline: none;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  min-height: 100vh;
  padding: 110px clamp(16px, 5vw, 72px) 78px;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero::before {
  left: 0;
  right: 0;
  bottom: 0;
  height: 86px;
  background:
    linear-gradient(90deg, var(--land-dark) 0 11%, var(--land) 11% 21%, var(--cream) 21% 25%, var(--land) 25% 38%, var(--land-dark) 38% 48%, var(--land) 48% 100%);
  background-size: 260px 100%;
  border-top: 6px solid rgba(6, 45, 63, 0.72);
  opacity: 0.82;
}

.hero::after {
  left: 0;
  right: 0;
  bottom: 86px;
  height: 28px;
  background:
    linear-gradient(90deg, transparent 0 22px, rgba(217, 255, 224, 0.5) 22px 86px, transparent 86px 132px),
    linear-gradient(90deg, transparent 0 60px, rgba(217, 255, 224, 0.32) 60px 118px, transparent 118px 190px);
  background-size: 190px 8px, 240px 8px;
  background-position: 0 5px, 40px 18px;
  background-repeat: repeat-x;
  opacity: 0.7;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.level-label {
  margin: 0 0 18px;
  font: 900 clamp(10px, 1.1vw, 13px)/1.6 "Press Start 2P", monospace;
  color: var(--cream);
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  color: #ffffff;
  font-family: "Press Start 2P", monospace;
  line-height: 0.96;
  text-shadow: 5px 5px 0 var(--shadow);
}

.hero-title span {
  display: block;
  font-size: clamp(32px, 5.4vw, 82px);
}

.hero-title strong {
  display: block;
  margin-top: 12px;
  color: var(--land);
  font-size: clamp(62px, 10vw, 154px);
  line-height: 0.82;
  text-align: center;
  text-shadow: 6px 6px 0 var(--ocean-deep), 10px 10px 0 rgba(3, 27, 43, 0.45);
}

.hero-body,
.section-copy p,
.dialog-box p,
.feature-card p {
  font-size: clamp(17px, 1.35vw, 22px);
  line-height: 1.58;
}

.hero-body {
  max-width: 540px;
  margin: 28px 0 30px;
  color: #f5fff4;
  font-weight: 800;
  text-shadow: 2px 2px 0 rgba(3, 27, 43, 0.28);
}

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  min-width: 172px;
  padding: 14px 20px;
  color: var(--ink);
  background: var(--cream);
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--shadow);
  font: 900 14px/1.2 "Press Start 2P", monospace;
  text-decoration: none;
  transition: transform 140ms steps(2, end), box-shadow 140ms steps(2, end);
}

.button-primary:hover,
.button-primary:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--shadow);
}

.hero-stage {
  position: relative;
  min-height: min(680px, 72vw);
  isolation: isolate;
}

.planet-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(310px, 41vw, 620px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  animation: float-y 3.6s steps(6, end) infinite;
}

.planet {
  position: absolute;
  inset: 8%;
  overflow: hidden;
  border: 6px solid var(--ink);
  border-radius: 50%;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.14) 0 8%, transparent 8% 100%),
    linear-gradient(180deg, var(--aqua), var(--ocean) 56%, var(--ocean-deep));
  box-shadow: 0 0 0 10px rgba(217, 255, 224, 0.18), 18px 18px 0 rgba(3, 27, 43, 0.38);
}

.land,
.globe-link,
.pin,
.map-pin,
.map-link,
.frog-sprite,
.frog-large,
.feature-icon,
.star,
.cloud {
  position: absolute;
  display: block;
}

.land {
  background: linear-gradient(135deg, var(--land), var(--land-dark));
  box-shadow: inset -10px -10px 0 rgba(6, 45, 63, 0.14), 0 0 0 4px rgba(6, 45, 63, 0.18);
}

.land-one {
  top: 17%;
  left: 11%;
  width: 34%;
  height: 28%;
  clip-path: polygon(5% 25%, 35% 5%, 72% 18%, 91% 46%, 74% 72%, 48% 64%, 28% 92%, 10% 68%);
}

.land-two {
  right: 13%;
  top: 24%;
  width: 32%;
  height: 38%;
  clip-path: polygon(30% 0, 70% 10%, 94% 35%, 82% 70%, 55% 100%, 28% 78%, 8% 48%);
}

.land-three {
  left: 28%;
  bottom: 10%;
  width: 39%;
  height: 23%;
  clip-path: polygon(8% 42%, 30% 8%, 64% 14%, 92% 38%, 78% 78%, 42% 92%, 16% 76%);
}

.globe-link {
  height: 5px;
  background: rgba(217, 255, 224, 0.72);
  transform-origin: left center;
  z-index: 2;
  box-shadow: 0 0 0 2px rgba(15, 116, 189, 0.18);
}

.globe-link::before,
.globe-link::after {
  content: "";
  position: absolute;
  top: -7px;
  width: 18px;
  height: 18px;
  background: var(--cream);
  border: 4px solid rgba(6, 45, 63, 0.75);
  border-radius: 50%;
}

.globe-link::before { left: -9px; }
.globe-link::after { right: -9px; }

.globe-link-a {
  top: 35%;
  left: 18%;
  width: 58%;
  transform: rotate(8deg);
}

.globe-link-b {
  top: 38%;
  left: 28%;
  width: 46%;
  transform: rotate(52deg);
}

.globe-link-c {
  top: 65%;
  left: 22%;
  width: 54%;
  transform: rotate(-18deg);
}

.globe-link-d {
  top: 72%;
  left: 34%;
  width: 35%;
  transform: rotate(33deg);
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 86%;
  height: 34%;
  border: 4px solid rgba(255, 245, 199, 0.82);
  border-radius: 50%;
  transform-origin: center;
  pointer-events: none;
}

.orbit-one {
  transform: translate(-50%, -50%) rotate(-14deg);
  animation: orbit-spin 7s steps(20, end) infinite;
}

.orbit-two {
  width: 72%;
  height: 27%;
  transform: translate(-50%, -50%) rotate(28deg);
  border-color: rgba(217, 255, 224, 0.58);
  animation: orbit-spin-reverse 8s steps(18, end) infinite;
}

.pin,
.map-pin {
  width: 22px;
  height: 22px;
  background: var(--coral);
  border: 4px solid var(--ink);
  transform: rotate(45deg);
  box-shadow: 4px 4px 0 var(--shadow);
  animation: pin-bob 1.6s steps(3, end) infinite;
  z-index: 4;
}

.pin::after,
.map-pin::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--cream);
  border-radius: 50%;
}

.pin-one { top: 13%; left: 25%; }
.pin-two { top: 27%; right: 10%; animation-delay: 200ms; }
.pin-three { bottom: 22%; left: 13%; animation-delay: 400ms; }
.pin-four { bottom: 15%; right: 26%; animation-delay: 600ms; }

.frog-sprite {
  right: 10%;
  bottom: 9%;
  width: 74px;
  height: 74px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(6px 6px 0 var(--shadow));
  animation: frog-hop 1.8s steps(4, end) infinite;
}

.cloud {
  width: 110px;
  height: 38px;
  background:
    linear-gradient(var(--seafoam), var(--seafoam)) 12px 18px / 86px 18px no-repeat,
    radial-gradient(circle, var(--seafoam) 0 62%, transparent 63%) 0 8px / 42px 42px no-repeat,
    radial-gradient(circle, var(--seafoam) 0 62%, transparent 63%) 34px 0 / 48px 48px no-repeat,
    radial-gradient(circle, var(--seafoam) 0 62%, transparent 63%) 72px 10px / 38px 38px no-repeat;
  opacity: 0.72;
  filter: drop-shadow(4px 4px 0 rgba(3, 27, 43, 0.2));
  animation: cloud-drift 9s steps(18, end) infinite;
}

.cloud-one { top: 12%; left: 0; }
.cloud-two { right: 3%; bottom: 13%; animation-delay: 2s; }

.star {
  width: 18px;
  height: 18px;
  background: var(--cream);
  clip-path: polygon(50% 0, 61% 36%, 100% 50%, 61% 64%, 50% 100%, 39% 64%, 0 50%, 39% 36%);
  animation: blink 1.4s steps(2, end) infinite;
}

.star-one { top: 21%; right: 12%; }
.star-two { bottom: 29%; left: 4%; animation-delay: 300ms; }
.star-three { top: 9%; left: 37%; animation-delay: 600ms; }

.level-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1.15fr);
  align-items: center;
  gap: clamp(28px, 6vw, 78px);
  padding: 96px clamp(16px, 5vw, 72px);
  background: rgba(3, 27, 43, 0.22);
  border-top: 4px solid rgba(217, 255, 224, 0.22);
  scroll-margin-top: 92px;
}

.section-copy {
  max-width: 620px;
}

h2,
h3 {
  margin: 0;
  color: var(--cream);
  font-family: "Press Start 2P", monospace;
  line-height: 1.35;
}

h2 {
  font-size: clamp(24px, 4vw, 54px);
  text-shadow: 4px 4px 0 var(--shadow);
}

h3 {
  font-size: clamp(15px, 1.55vw, 21px);
}

.section-copy p {
  color: #f4fff0;
  font-weight: 800;
}

.text-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--cream);
}

.pixel-map {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 6px solid var(--ink);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.14) 0 1px, transparent 1px 48px),
    linear-gradient(0deg, rgba(255,255,255,0.14) 0 1px, transparent 1px 48px),
    var(--aqua);
  box-shadow: 10px 10px 0 var(--shadow);
}

.tile {
  position: absolute;
  border: 4px solid rgba(6, 45, 63, 0.24);
}

.tile.water {
  inset: 0;
  background: linear-gradient(135deg, var(--aqua), var(--ocean));
}

.tile.land {
  top: 52px;
  left: 36px;
  width: 62%;
  height: 64%;
  background: var(--land);
  clip-path: polygon(0 16%, 38% 4%, 66% 18%, 100% 12%, 88% 54%, 100% 82%, 54% 100%, 20% 88%, 8% 54%);
}

.tile.land-b {
  top: auto;
  left: auto;
  right: 30px;
  bottom: 28px;
  width: 36%;
  height: 32%;
  background: #45bd5f;
}

.road {
  position: absolute;
  background: var(--cream);
  border: 3px solid rgba(6, 45, 63, 0.35);
  z-index: 2;
  display: none;
}

.road-a {
  left: 18%;
  top: 43%;
  width: 70%;
  height: 20px;
  transform: rotate(-9deg);
}

.road-b {
  left: 42%;
  top: 18%;
  width: 20px;
  height: 68%;
  transform: rotate(18deg);
}

.map-link {
  height: 5px;
  background: rgba(217, 255, 224, 0.74);
  border: 0;
  transform-origin: left center;
  z-index: 3;
  box-shadow: 0 0 0 2px rgba(15, 116, 189, 0.18);
}

.map-link-a {
  left: 33%;
  top: 36%;
  width: 22%;
  transform: rotate(28deg);
}

.map-link-b {
  left: 49%;
  top: 47%;
  width: 25%;
  transform: rotate(-37deg);
}

.map-link-c {
  left: 50%;
  top: 48%;
  width: 29%;
  transform: rotate(28deg);
}

.map-link-d {
  left: 26%;
  top: 70%;
  width: 31%;
  transform: rotate(-38deg);
}

.map-link-e {
  left: 74%;
  top: 66%;
  width: 18%;
  transform: rotate(31deg);
}

.pixel-map .map-pin {
  width: 28px;
  height: 28px;
  background: var(--cream);
  border: 5px solid rgba(6, 45, 63, 0.78);
  border-radius: 50%;
  box-shadow: 4px 4px 0 rgba(3, 27, 43, 0.32);
  transform: none;
}

.pixel-map .map-pin::after {
  display: none;
}

.map-pin-a { top: 30%; left: 31%; }
.map-pin-b { top: 44%; left: 47%; animation-delay: 400ms; }
.map-pin-c { top: 32%; right: 34%; animation-delay: 200ms; }
.map-pin-d { left: 23%; bottom: 24%; animation-delay: 600ms; }
.map-pin-e { right: 26%; bottom: 28%; animation-delay: 800ms; }
.map-pin-f { right: 12%; bottom: 16%; animation-delay: 1000ms; }

.map-card {
  position: absolute;
  max-width: 230px;
  padding: 12px 14px;
  color: var(--ink);
  background: #f5ffef;
  border: 4px solid var(--ink);
  box-shadow: 5px 5px 0 var(--shadow);
  font-weight: 900;
  z-index: 5;
}

.card-a { top: 10%; right: 6%; }
.card-b { left: 7%; bottom: 7%; }

.feature-level {
  display: block;
  background: rgba(8, 61, 119, 0.34);
}

.feature-level .section-copy {
  max-width: 900px;
  margin-bottom: 38px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.feature-card {
  min-height: 410px;
  padding: 28px 22px;
  color: var(--ink);
  background: var(--panel);
  border: 5px solid var(--ink);
  box-shadow: 8px 8px 0 var(--shadow);
}

.feature-card-lift {
  margin-top: 34px;
}

.feature-card h3 {
  color: var(--ocean-deep);
}

.feature-card p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 800;
}

.feature-icon {
  position: relative;
  width: 54px;
  height: 54px;
  margin-bottom: 22px;
  background: var(--aqua);
  border: 4px solid var(--ink);
  box-shadow: 4px 4px 0 var(--shadow);
}

.icon-map::after {
  content: "";
  position: absolute;
  inset: 10px;
  background: linear-gradient(90deg, var(--land) 0 42%, var(--cream) 42% 52%, var(--ocean) 52%);
}

.icon-people::after {
  content: "";
  position: absolute;
  inset: 11px 8px;
  background:
    radial-gradient(circle at 30% 25%, var(--cream) 0 8px, transparent 9px),
    radial-gradient(circle at 70% 25%, var(--cream) 0 8px, transparent 9px),
    linear-gradient(var(--land), var(--land)) 6px 26px / 32px 12px no-repeat;
}

.icon-mask::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  top: 18px;
  height: 18px;
  background: var(--ink);
  box-shadow: inset 9px 0 0 var(--cream), inset -9px 0 0 var(--cream);
}

.final-cta {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 640px;
  padding: 112px 16px 130px;
  overflow: hidden;
}

.dialog-box {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  padding: clamp(24px, 5vw, 48px);
  color: var(--ink);
  background: var(--panel);
  border: 6px solid var(--ink);
  box-shadow: 12px 12px 0 var(--shadow);
  text-align: center;
}

.dialog-box h2 {
  color: var(--ocean-deep);
  text-shadow: none;
}

.dialog-box .level-label,
.dialog-box p {
  color: var(--ink);
}

.frog-large {
  z-index: 3;
  top: 58px;
  left: 50%;
  width: 112px;
  height: 112px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(8px 8px 0 var(--shadow));
  transform: translateX(-50%);
  animation: frog-hop 1.8s steps(4, end) infinite;
}

.pixel-horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 118px;
  background:
    linear-gradient(90deg, var(--land-dark) 0 9%, var(--land) 9% 17%, var(--cream) 17% 21%, var(--land) 21% 32%, var(--land-dark) 32% 40%, var(--land) 40% 100%);
  background-size: 220px 100%;
  border-top: 6px solid var(--ink);
}

.site-footer {
  display: grid;
  gap: 18px;
  justify-items: center;
  padding: 38px clamp(16px, 5vw, 72px) 42px;
  color: var(--seafoam);
  background: var(--shadow);
  text-align: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.site-footer p {
  margin: 0;
  font-weight: 800;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 360ms steps(5, end), transform 360ms steps(5, end);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float-y {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% - 18px)); }
}

@keyframes orbit-spin {
  to { transform: translate(-50%, -50%) rotate(346deg); }
}

@keyframes orbit-spin-reverse {
  to { transform: translate(-50%, -50%) rotate(-332deg); }
}

@keyframes pin-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

@keyframes frog-hop {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -16px; }
}

@keyframes cloud-drift {
  0% { translate: -18px 0; }
  50% { translate: 18px 0; }
  100% { translate: -18px 0; }
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.25; }
}

@media (max-width: 900px) {
  .hero,
  .level-section {
    grid-template-columns: 1fr;
  }

  .hero {
    align-content: start;
    padding-top: 104px;
  }

  .hero-copy {
    max-width: none;
    text-align: center;
  }

  .hero-stage {
    min-height: 480px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .feature-card-lift {
    min-height: 0;
    margin-top: 0;
  }
}

@media (max-width: 680px) {
  .site-header {
    padding: 14px 16px;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
  }

  .site-nav {
    position: fixed;
    top: 76px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    background: var(--shadow);
    border: 4px solid var(--seafoam);
    box-shadow: 8px 8px 0 var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    min-height: 44px;
  }

  .hero {
    min-height: auto;
    padding: 100px 16px 58px;
  }

  .level-label {
    font-size: 9px;
  }

  .hero-title span {
    font-size: clamp(27px, 9vw, 46px);
  }

  .hero-title strong {
    font-size: clamp(58px, 20vw, 100px);
    text-align: center;
  }

  .hero-body,
  .section-copy p,
  .dialog-box p {
    font-size: 16px;
  }

  .hero-stage {
    min-height: 360px;
  }

  .planet-wrap {
    width: min(88vw, 380px);
  }

  .cloud {
    width: 82px;
    transform: scale(0.82);
  }

  .level-section {
    padding: 76px 16px;
  }

  .pixel-map {
    min-height: 470px;
  }

  .map-card {
    max-width: 190px;
    font-size: 14px;
  }

  .card-a {
    top: 10%;
    right: 5%;
  }

  .card-b {
    left: 5%;
    bottom: 10%;
  }

  .final-cta {
    min-height: 560px;
    padding-top: 104px;
  }

  .dialog-box {
    box-shadow: 8px 8px 0 var(--shadow);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
