:root {
  --sky-top: #7fe3ff;
  --sky-mid: #3ec4ef;
  --sky-deep: #2aa8d8;
  --ink: #3d4a6b;
  --ink-soft: #5a6788;
  --glow: #fff6c8;
  --shadow: #1a4a6a55;
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  color: var(--ink);
  font-synthesis: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--sky-mid);
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
}

.stage {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding:
    max(24px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    max(28px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
}

.sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, #fff9d8 0%, transparent 55%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 42%, var(--sky-deep) 100%);
}

.world {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  transform: scale(1.04);
  filter: saturate(1.1) contrast(1.03);
  animation: world-drift 18s ease-in-out infinite alternate;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 48% 36% at 50% 34%, #ffffff44 0%, #ffffff08 50%, transparent 70%),
    linear-gradient(180deg, #3ec4ef18 0%, transparent 18%, #0f5f8660 100%);
}

.sparkles {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.sparkles span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, var(--glow) 45%, #ffd24a 70%, transparent 72%);
  box-shadow: 0 0 12px #ffe58a;
  animation: twinkle 3.2s ease-in-out infinite;
}

.sparkles span:nth-child(1) { left: 14%; top: 22%; animation-delay: 0s; }
.sparkles span:nth-child(2) { left: 78%; top: 18%; width: 8px; height: 8px; animation-delay: .6s; }
.sparkles span:nth-child(3) { left: 22%; top: 68%; width: 7px; height: 7px; animation-delay: 1.1s; }
.sparkles span:nth-child(4) { left: 86%; top: 62%; animation-delay: 1.7s; }
.sparkles span:nth-child(5) { left: 48%; top: 12%; width: 6px; height: 6px; animation-delay: 2.1s; }
.sparkles span:nth-child(6) { left: 62%; top: 74%; width: 9px; height: 9px; animation-delay: .3s; }

.content {
  position: relative;
  z-index: 5;
  text-align: center;
  max-width: 34rem;
  margin-bottom: clamp(7rem, 22vh, 12rem);
}

.brand {
  margin: 0 0 0.35em;
  font-size: clamp(3.1rem, 11vw, 5.6rem);
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 0.95;
  text-shadow:
    0 3px 0 #fff,
    0 8px 0 #ffffffaa,
    0 14px 28px var(--shadow);
}

.brand span {
  display: inline-block;
  animation: letter-pop 2.8s ease-in-out infinite;
}

.brand span:nth-child(2) { animation-delay: .08s; }
.brand span:nth-child(3) { animation-delay: .16s; }
.brand span:nth-child(4) { animation-delay: .24s; }
.brand span:nth-child(5) { animation-delay: .32s; }
.brand span:nth-child(6) { animation-delay: .4s; }
.brand span:nth-child(7) { animation-delay: .48s; }
.brand span:nth-child(8) { animation-delay: .56s; }

h1 {
  margin: 0;
  font-size: clamp(1.65rem, 5.2vw, 2.55rem);
  font-weight: 550;
  color: #fff;
  letter-spacing: 0.01em;
  text-shadow:
    0 2px 0 #2a7aaa,
    0 8px 18px #145a7e88;
}

.lead {
  margin: 0.7em auto 0;
  max-width: 26rem;
  font-size: clamp(1rem, 2.8vw, 1.25rem);
  font-weight: 450;
  line-height: 1.35;
  color: #fffef8;
  text-shadow: 0 2px 10px #145a7ecc;
}

.hibo {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  margin: 0;
  transform: translateX(-50%);
  width: min(38vw, 220px);
  filter: drop-shadow(0 16px 20px var(--shadow));
  animation: wave-bob 3.4s ease-in-out infinite;
}

.hibo img {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes world-drift {
  from { transform: scale(1.06) translate(0, 0); }
  to { transform: scale(1.1) translate(-1.2%, 1%); }
}

@keyframes wave-bob {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-1.5deg); }
  50% { transform: translateX(-50%) translateY(-10px) rotate(1.5deg); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes letter-pop {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media (max-width: 640px) {
  .content {
    margin-bottom: clamp(8.5rem, 28vh, 11rem);
  }

  .hibo {
    width: min(46vw, 180px);
  }
}

@media (min-width: 900px) {
  .world {
    object-position: center 62%;
  }

  .hibo {
    width: min(22vw, 240px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .world,
  .hibo,
  .sparkles span,
  .brand span {
    animation: none !important;
  }

  .world {
    transform: scale(1.04);
  }
}
