/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Primary — Green */
  --green: #00F8B8;
  --green-dim: rgba(0, 248, 184, 0.15);
  --green-glow: rgba(0, 248, 184, 0.4);

  /* Surfaces — Neutral scale */
  --navy: #171721;
  --navy-mid: #1E1E2A;
  --navy-light: #252533;

  /* Text */
  --text: #FFFFFF;
  --text-secondary: #B8B8C7;
  --text-dim: #8C8CA3;

  /* Secondary accents */
  --purple: #8C14E8;
  --purple-glow: rgba(140, 20, 232, 0.4);
  --blue: #501FEB;
  --pink: #E8145B;

  /* Semantic */
  --error: #E8145B;

  --radius: 12px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  height: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  font-family: 'Lexend Deca', sans-serif;
  background: var(--navy);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  background: rgba(23, 23, 33, 0.8);
  border-bottom: 1px solid rgba(0, 248, 184, 0.08);
}

.nav-title {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: -0.03em;
  color: var(--green);
}


/* ===== Hero ===== */
.hero {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 64px 2rem 0.5rem;
}

/* ===== Sliding Game Covers Background ===== */
.slider-bg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  opacity: 0.12;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, transparent 20%, black 80%);
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, transparent 20%, black 80%);
}

.slider-row {
  overflow: hidden;
  white-space: nowrap;
}

.slider-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: slideLeft 40s linear infinite;
}

.slider-track-reverse {
  animation: slideRight 45s linear infinite;
}

@keyframes slideLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes slideRight {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.game-tile {
  width: 140px;
  height: 100px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: contain;
  background: rgba(30, 30, 42, 0.8);
  padding: 4px;
}

/* Floating orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: orbFloat 8s ease-in-out infinite;
}

.orb-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(0, 248, 184, 0.1), transparent 70%);
  top: -10%;
  right: -5%;
}

.orb-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(140, 20, 232, 0.1), transparent 70%);
  bottom: 10%;
  left: -10%;
  animation-delay: -4s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 640px;
}


/* Logo in hero */
.logo-wrapper {
  margin-bottom: 0.5rem;
}

.hero-logo {
  width: clamp(120px, 18vw, 180px);
  height: auto;
}

/* Slot machine reel animation — continuous loop */
.letter {
  will-change: transform;
}

/*
  Total cycle: 5s per letter
  0-14% (0.7s): drop in with bounce
  14-90% (3.8s): hold in place
  90-100% (0.5s): slide out downward
  Then loops back to drop in from above
*/
.letter-r {
  animation: reelLoop 5s ease-out 0.3s 2.85 both;
}

.letter-t {
  animation: reelLoop 5s ease-out 0.55s 2.85 both;
}

.letter-p {
  animation: reelLoop 5s ease-out 0.8s 2.85 both;
}

@keyframes reelLoop {
  0% {
    transform: translateY(-200px);
    opacity: 0;
  }
  4% {
    opacity: 1;
  }
  13% {
    transform: translateY(8px);
  }
  15.5% {
    transform: translateY(-4px);
  }
  18% {
    transform: translateY(0);
  }
  /* Hold in place */
  88% {
    transform: translateY(0);
    opacity: 1;
  }
  /* Slide out downward */
  96% {
    opacity: 0;
  }
  100% {
    transform: translateY(200px);
    opacity: 0;
  }
}

.hero-headline {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 800;
  letter-spacing: -0.06em;
  font-size: clamp(1.3rem, 3.2vw, 2rem);
  line-height: 1.1;
  margin-bottom: 0.4rem;
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.hero-headline .green {
  color: var(--green);
}

.hero-sub {
  font-size: clamp(0.78rem, 1.5vw, 0.88rem);
  color: var(--text-secondary);
  font-weight: 300;
  max-width: 520px;
  margin: 0 auto 1rem;
  line-height: 1.5;
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

/* ===== Form ===== */
.hero .signup-form {
  max-width: 460px;
  margin: 0 auto;
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
  background: rgba(23, 23, 33, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 1.2rem;
}


.form-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.form-input {
  flex: 1;
  padding: 0.7rem 1rem;
  background: var(--navy-light);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  outline: none;
  color: var(--text);
  font-family: 'Lexend Deca', sans-serif;
  font-size: 0.85rem;
  font-weight: 300;
  min-width: 0;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(140, 20, 232, 0.12);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.form-input.valid {
  border-color: var(--green);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%2300F8B8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 36px;
}

.submit-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1.6rem;
  margin-top: 8px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: var(--text);
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: -0.03em;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.submit-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--purple-glow);
}

.submit-btn:hover::after {
  opacity: 1;
}

.submit-btn:not(:hover) {
  animation: ctaPulse 2.5s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(140, 20, 232, 0.3); }
  50% { box-shadow: 0 0 20px 4px rgba(140, 20, 232, 0.15); }
}

.submit-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.submit-btn.loading::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.form-error {
  color: var(--error);
  font-size: 0.75rem;
  margin-top: 0.2rem;
  min-height: 0.9em;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-6px); }
  30% { transform: translateX(5px); }
  45% { transform: translateX(-4px); }
  60% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
}

.signup-form.shake {
  animation: shake 0.4s ease-out;
}

.waitlist-note {
  font-size: 0.68rem;
  color: var(--text-dim);
  max-width: 440px;
  margin: 0.4rem auto 0;
  line-height: 1.45;
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.5s both;
}

/* Turnstile invisible container */
.cf-turnstile {
  height: 0;
  overflow: hidden;
}

/* Position badge in success heading */
#success-position {
  font-size: 1.3em;
  color: #fff;
}

/* Success state */
.form-success {
  display: none;
  animation: fadeInUp 0.6s ease-out;
}

.form-success.show {
  display: block;
}

.form-success h3 {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 800;
  letter-spacing: -0.05em;
  font-size: 1.1rem;
  color: var(--green);
  margin-bottom: 0.2rem;
}

.form-success p {
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 300;
}


.edit-details {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.7rem;
  font-family: 'Lexend Deca', sans-serif;
  cursor: pointer;
  margin-top: 0.5rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s;
}

.edit-details:hover {
  color: var(--green);
}

.edit-details:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* Waitlist counter */
.waitlist-count {
  font-size: 0.75rem;
  color: var(--green);
  font-weight: 400;
  margin-bottom: 0.6rem;
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.35s both;
}

.waitlist-count span {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* Confetti */
.confetti-piece {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  border-radius: 2px;
  animation: confettiFall 2.5s cubic-bezier(0.25, 0, 0.5, 1) forwards;
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translateY(0) translateX(0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) translateX(var(--drift, 0px)) rotate(720deg) scale(0.5);
  }
}

/* Success checkmark animation */
.success-check {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.5rem;
}

.check-circle {
  stroke-dasharray: 150;
  stroke-dashoffset: 150;
  animation: drawCircle 0.6s ease-out 0.2s forwards;
}

.check-mark {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: drawCheck 0.4s ease-out 0.7s forwards;
}

@keyframes drawCircle {
  to { stroke-dashoffset: 0; }
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

/* Typewriter effect */
.hero-headline .char {
  opacity: 0;
  animation: charReveal 0.05s ease-out forwards;
  animation-delay: calc(0.4s + var(--i) * 0.025s);
}

@keyframes charReveal {
  to { opacity: 1; }
}

/* Waitlist counter urgency */
.waitlist-count em {
  font-style: normal;
  color: var(--text-secondary);
}

/* ===== Stats Bar ===== */
.stats-bar {
  border-top: 1px solid rgba(0, 248, 184, 0.08);
  border-bottom: 1px solid rgba(0, 248, 184, 0.08);
  background: rgba(0, 248, 184, 0.02);
  padding: 14px 32px;
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 6vw, 5rem);
  flex-wrap: wrap;
}

.stat {
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.stat.visible {
  opacity: 1;
  transform: translateY(0);
}

.stat-value {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 800;
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  color: var(--purple);
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-label {
  font-size: 0.6rem;
  color: var(--text-dim);
  margin-top: 2px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ===== Providers Strip ===== */
.providers-strip {
  text-align: center;
  padding: 10px 20px;
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.providers-strip span {
  color: var(--text);
  font-weight: 400;
  margin: 0 2px;
}

.providers-strip span + span::before {
  content: '·';
  color: var(--text-dim);
  margin-right: 6px;
}

/* ===== Features ===== */
.features {
  position: relative;
  z-index: 2;
  padding: 1rem 2rem 0.8rem;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
}

.feature-card {
  background: linear-gradient(135deg, var(--navy-mid), var(--navy-light));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  padding: 0.9rem 0.7rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s, box-shadow 0.4s;
  opacity: 0;
  transform: translateY(20px);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--card-accent, var(--green)), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.feature-card:nth-child(1) { --card-accent: var(--green); }
.feature-card:nth-child(2) { --card-accent: var(--purple); }
.feature-card:nth-child(3) { --card-accent: var(--blue); }
.feature-card:nth-child(4) { --card-accent: var(--pink); }

.feature-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out, border-color 0.4s, box-shadow 0.4s;
}

.feature-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, color-mix(in srgb, var(--card-accent, var(--green)) 6%, transparent) 45%, color-mix(in srgb, var(--card-accent, var(--green)) 3%, transparent) 55%, transparent 60%);
  transform: translateX(-150%);
  transition: transform 0.7s ease-out;
  pointer-events: none;
}

.feature-card:hover::after {
  transform: translateX(150%);
}

.feature-icon {
  width: 36px;
  height: 36px;
  background: var(--green-dim);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.4rem;
  font-size: 16px;
  transition: transform 0.3s;
}

.feature-card:hover .feature-icon {
  animation: iconWiggle 0.5s ease-in-out;
}

@keyframes iconWiggle {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-12deg) scale(1.15); }
  40% { transform: rotate(10deg) scale(1.15); }
  60% { transform: rotate(-6deg); }
  80% { transform: rotate(4deg); }
}

.feature-card h3 {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 0.72rem;
  margin-bottom: 0.2rem;
  color: var(--text);
}

.feature-card p {
  color: var(--text-dim);
  font-size: 0.66rem;
  line-height: 1.4;
  font-weight: 300;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.7rem 2rem;
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  width: 50px;
  height: auto;
  opacity: 0.4;
}

.footer-copy {
  color: var(--text-dim);
  font-size: 0.65rem;
}


.footer-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.footer-legal {
  font-size: 0.55rem;
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 1000px;
  margin: 0.5rem auto 0;
  text-align: center;
  opacity: 0.7;
}

.footer-legal a {
  color: var(--green);
  text-decoration: none;
}

.footer-legal a:hover {
  text-decoration: underline;
}

.badge-18 {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 800;
  font-size: 10px;
  color: var(--text-dim);
  flex-shrink: 0;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .stats-bar {
    gap: 1.5rem;
    padding: 10px 20px;
  }

  .footer-content {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 0.4rem;
  }

  .footer-left {
    width: 100%;
    justify-content: center;
  }

  .nav {
    padding: 12px 20px;
  }

  .game-tile {
    width: 110px;
    height: 80px;
  }
}

@media (max-width: 480px) {
  .form-row {
    flex-direction: column;
    gap: 6px;
  }

  .hero {
    padding: 58px 1.5rem 0.5rem;
  }

  .features {
    padding: 0.6rem 1rem 0.5rem;
  }

  .hero-headline {
    font-size: 1.4rem;
  }

  .hero-headline br {
    display: none;
  }

  .slider-bg {
    opacity: 0.08;
  }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .slider-track,
  .slider-track-reverse {
    animation: none;
  }

  .orb {
    animation: none;
  }

  .feature-card,
  .stat {
    opacity: 1;
    transform: none;
  }

  .hero-headline .char {
    opacity: 1;
  }

  .letter {
    animation: none;
    transform: translateY(0);
    opacity: 1;
  }

  .submit-btn:not(:hover) {
    animation: none;
  }
}
