/* ==========================================================================
   GoScroll Games — Pure Coming Soon Landing Page
   Palette: Ice Blue (#D7F5FF), Solid Black (#000000), Royal Blue (#3B82F6)
   ========================================================================== */

:root {
  /* Brand Colors */
  --bg-brand: #D7F5FF;
  --black: #000000;
  --white: #FFFFFF;
  --blue: #3B82F6;
  --blue-hover: #2563EB;
  --muted: #425260;
  --muted-light: #64748B;
  --border-color: #000000;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Crisp Shadows */
  --shadow-crisp: 0 4px 0 #000000;
  --shadow-crisp-hover: 0 6px 0 #000000;
  --shadow-pill: 0 2px 0 #000000;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

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

html {
  background-color: var(--bg-brand);
  color: var(--black);
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-brand);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

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

/* ==========================================================================
   Big Centered Logo Watermark Background
   ========================================================================== */
.bg-watermark-center {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(780px, 76vh, 90vw);
  height: min(780px, 76vh, 90vw);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
  opacity: 0.07;
  user-select: none;
}

.bg-watermark-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ==========================================================================
   Page Body & Hero
   ========================================================================== */
.page-body {
  flex: 1;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 75px);
  position: relative;
  z-index: 1;
}

.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 0 2rem;
  width: 100%;
}

/* ==========================================================================
   Falling Logo Animation (PC View)
   ========================================================================== */
.hero-logo-wrapper {
  margin-bottom: 3.25rem;
  position: relative;
  overflow: visible;
  width: 100%;
}

.hero-logo-svg {
  width: 100%;
  max-width: min(640px, 92vw);
  height: auto;
  display: block;
  margin: 0 auto;
  overflow: visible;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.05));
}

/* Default (Mobile / Tablet < 769px): static, instantaneous render */
.logo-letter {
  opacity: 1;
  transform: none;
}

/* PC View (>= 769px): falling letter-by-letter animation & larger logo */
@media (min-width: 769px) {
  .hero-logo-wrapper {
    padding-top: 15px;
    margin-bottom: 3.5rem;
  }

  .hero-logo-svg {
    max-width: min(940px, 92vw);
  }

  .hero-logo-svg.animate-fall .logo-letter {
    opacity: 0;
    transform: translateY(-240px);
    transform-box: view-box;
    animation: letterDrop 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }

  /* Word "Go": G, then o */
  .hero-logo-svg.animate-fall .letter-G {
    animation-delay: 0.08s;
  }
  .hero-logo-svg.animate-fall .letter-O1 {
    animation-delay: 0.20s;
  }

  /* Word "Scroll": S, c, r, o, l, l */
  .hero-logo-svg.animate-fall .letter-S {
    animation-delay: 0.38s;
  }
  .hero-logo-svg.animate-fall .letter-C {
    animation-delay: 0.48s;
  }
  .hero-logo-svg.animate-fall .letter-R {
    animation-delay: 0.58s;
  }
  .hero-logo-svg.animate-fall .letter-O2 {
    animation-delay: 0.68s;
  }
  .hero-logo-svg.animate-fall .letter-L1 {
    animation-delay: 0.78s;
  }
  .hero-logo-svg.animate-fall .letter-L2 {
    animation-delay: 0.88s;
  }

  /* Word "GAMES": Drops underneath */
  .hero-logo-svg.animate-fall .letter-GAMES {
    animation-delay: 1.08s;
    animation-duration: 0.9s;
  }
}

@keyframes letterDrop {
  0% {
    transform: translateY(-240px);
    opacity: 0;
  }
  60% {
    transform: translateY(16px);
    opacity: 1;
  }
  78% {
    transform: translateY(-5px);
  }
  90% {
    transform: translateY(2px);
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}



/* ==========================================================================
   Waitlist Form Card
   ========================================================================== */
.waitlist-card {
  width: 100%;
  max-width: 540px;
}

.waitlist-form {
  display: flex;
  background-color: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-crisp);
  padding: 0.4rem 0.45rem 0.4rem 1.25rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.waitlist-form:focus-within {
  transform: translateY(-2px);
  box-shadow: var(--shadow-crisp-hover);
}

.waitlist-form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--black);
  min-width: 0;
}

.waitlist-form input::placeholder {
  color: var(--muted-light);
}

.waitlist-form button {
  background-color: var(--black);
  color: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius-full);
  padding: 0.8rem 1.4rem;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.btn-arrow {
  width: 15px;
  height: 15px;
  transition: transform 0.15s ease;
}

.waitlist-form button:hover {
  background-color: var(--blue);
  border-color: var(--blue);
}

.waitlist-form button:hover .btn-arrow {
  transform: translateX(3px);
}

.waitlist-feedback {
  margin-top: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  min-height: 1.2rem;
}

.waitlist-feedback.success {
  color: var(--black);
}

.waitlist-feedback.error {
  color: #DC2626;
}

/* ==========================================================================
   Responsive Adaptations (Mobile View)
   ========================================================================== */
@media (max-width: 680px) {
  /* Watermark stays dead-center in the mobile screen */
  .bg-watermark-center {
    width: min(350px, 52vh, 88vw);
    height: min(350px, 52vh, 88vw);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  /* Full viewport flex container: logo at top, notify button at bottom */
  .page-body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3.5rem 1.25rem 2.5rem;
    box-sizing: border-box;
  }

  .hero-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0;
  }

  /* Logo positioned at the top on mobile */
  .hero-logo-wrapper {
    margin-top: 0.5rem;
    margin-bottom: 0;
  }

  /* Notify Me form pinned at the bottom on mobile */
  .waitlist-card {
    margin-top: auto;
    width: 100%;
    max-width: 440px;
    padding-bottom: 0.5rem;
  }

  .hide-mobile {
    display: none;
  }

  .waitlist-form {
    flex-direction: column;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    gap: 0.5rem;
  }

  .waitlist-form input {
    padding: 0.65rem 0.8rem;
    text-align: center;
    font-size: 0.95rem;
  }

  .waitlist-form button {
    width: 100%;
    justify-content: center;
    padding: 0.85rem;
    font-size: 0.95rem;
  }
}
