:root {
  --ink: #fff8e8;
  --muted: rgba(255, 248, 232, 0.82);
  --gold: #ffe08a;
  --card: #fffdf7;
  --felt: #0f766e;
  --font-display: 'Bebas Neue', Impact, sans-serif;
  --font-body: 'DM Sans', Georgia, serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #115e59;
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: calc(1.5rem + env(safe-area-inset-top, 0px)) 1.25rem
    calc(2rem + env(safe-area-inset-bottom, 0px));
}

.lagoon {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 140% 90% at 50% -25%, #7ef5ea 0%, #3ad1c5 18%, transparent 52%),
    radial-gradient(circle at 92% 8%, #ffe08a 0%, transparent 26%),
    radial-gradient(circle at 4% 92%, #ff8f6b 0%, transparent 34%),
    linear-gradient(180deg, #2dd4bf 0%, #14b8a6 20%, #0d9488 45%, #0f766e 70%, #115e59 100%);
  animation: lagoon-shift 14s ease-in-out infinite alternate;
}

.lagoon::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0 1.5px, transparent 2.5px);
  background-size: 48px 48px;
}

.haze {
  position: absolute;
  inset: 0 0 auto;
  height: 45vh;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(255, 255, 255, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 80% 20%, rgba(255, 255, 255, 0.16), transparent 50%);
}

.hero {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 0.35rem;
}

.fan {
  position: relative;
  width: min(100%, 22rem);
  height: 8.5rem;
  margin: 0 auto 0.2rem;
  isolation: isolate;
}

.card {
  position: absolute;
  top: 0.35rem;
  left: 50%;
  width: 4.1rem;
  height: 5.7rem;
  margin-left: -2.05rem;
  border-radius: 0.55rem;
  background: var(--card);
  color: #1a1a1a;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
  display: grid;
  place-content: center;
  gap: 0.1rem;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  animation: fan-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.card .rank {
  font-size: 1.55rem;
  line-height: 1;
}

.card .suit {
  font-size: 1.05rem;
  line-height: 1;
  font-family: var(--font-body);
  font-weight: 700;
}

.card .suit.hearts,
.card .suit.diamonds {
  color: #d62828;
}

.card .suit.balls {
  color: #c45c00;
}

.card.degen {
  background: linear-gradient(160deg, #1a1a1a, #333);
  color: var(--gold);
  border: 1px solid rgba(255, 224, 138, 0.45);
}

.card.degen .suit {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.card.c1 {
  --rot: -18deg;
  transform: rotate(var(--rot));
  animation-delay: 0.05s;
}
.card.c2 {
  --rot: -9deg;
  transform: rotate(var(--rot));
  animation-delay: 0.12s;
}
.card.c3 {
  --rot: 0deg;
  transform: rotate(var(--rot)) translateY(-0.35rem);
  animation-delay: 0.18s;
  z-index: 2;
}
.card.c4 {
  --rot: 9deg;
  transform: rotate(var(--rot));
  animation-delay: 0.24s;
}
.card.c5 {
  --rot: 18deg;
  transform: rotate(var(--rot));
  animation-delay: 0.3s;
}

.pineapple {
  width: min(58vw, 220px);
  height: auto;
  display: block;
  margin: 0.15rem auto 0.35rem;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.4));
  animation:
    rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both,
    bob 4.5s ease-in-out 1.2s infinite;
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 14vw, 5.2rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.35), 0 14px 32px rgba(0, 0, 0, 0.3);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}

.headline {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 6.5vw, 2.2rem);
  letter-spacing: 0.06em;
  font-weight: 400;
  color: var(--gold);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.36s both;
}

.support {
  margin: 0.55rem 0 0;
  max-width: 22rem;
  font-size: 1.05rem;
  line-height: 1.45;
  font-weight: 600;
  color: var(--muted);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.44s both;
}

.cta {
  margin: 1.15rem 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  opacity: 0.92;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.52s both;
}

@keyframes fan-in {
  from {
    opacity: 0;
    transform: rotate(var(--rot)) translateY(1.4rem) scale(0.92);
  }
  to {
    opacity: 1;
    transform: rotate(var(--rot)) translateY(0) scale(1);
  }
}

.card.c3 {
  animation-name: fan-in-center;
}

@keyframes fan-in-center {
  from {
    opacity: 0;
    transform: rotate(0deg) translateY(1.6rem) scale(0.92);
  }
  to {
    opacity: 1;
    transform: rotate(0deg) translateY(-0.35rem) scale(1);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.85rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.45rem);
  }
}

@keyframes lagoon-shift {
  from {
    filter: saturate(1);
  }
  to {
    filter: saturate(1.08) brightness(1.03);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lagoon,
  .pineapple,
  .card,
  .brand,
  .headline,
  .support,
  .cta {
    animation: none !important;
  }
}
