/* ───────────────────────────────────────────
   JAZZ Landing Page
   Design system: Jazz iOS
   Composition ref: Tolan (massive wordmark + bottom bar)
   ─────────────────────────────────────────── */

/* Fonts */
@font-face {
  font-family: 'ABC Gravity';
  src: url('assets/fonts/ABCGravityVariable-Trial.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Haas Grotesk';
  src: url('assets/fonts/neuehaasgrottext-65medium-trial.otf') format('opentype');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'Suisse Intl Mono';
  src: url('assets/fonts/Suisse-Intl-Mono.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background: #05060b;
  color: #e9e9f2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Background Video ── */

.video-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(129, 140, 248, 0.06) 0%, transparent 60%),
    rgba(5, 6, 11, 0.55);
}

/* ── Layout: 3-row fullscreen grid ── */

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

.top-bar,
.hero,
.bottom-bar {
  position: relative;
  z-index: 1;
}

/* ── Top Bar ── */

.top-bar {
  display: flex;
  align-items: center;
  padding: 20px 32px;
  animation: fadeIn 1s ease-out both;
}

.icon-gif {
  height: 48px;
  width: auto;
  filter: invert(1);
  mix-blend-mode: screen;
  opacity: 0.85;
}

.discord-link {
  margin-left: auto;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: rgba(233, 233, 242, 0.4);
  transition: color 0.2s ease;
}

.discord-link:hover {
  color: rgba(233, 233, 242, 0.85);
}

.tagline {
  position: relative;
  z-index: 1;
  font-family: 'Neue Haas Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500;
  font-size: clamp(14px, 2.2vw, 18px);
  letter-spacing: 0.03em;
  color: rgba(233, 233, 242, 0.5);
  text-align: center;
  animation: fadeIn 1s ease-out 0.15s both;
}

/* ── Hero: Wordmark fills the middle ── */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  animation: fadeIn 1.2s ease-out 0.1s both;
}

.wordmark-text {
  font-family: 'ABC Gravity', -apple-system, sans-serif;
  font-weight: 900;
  font-size: clamp(120px, 30vw, 360px);
  letter-spacing: 0.01em;
  line-height: 0.85;
  color: rgba(233, 233, 242, 0.75);
  text-align: center;
  filter: drop-shadow(0 0 80px rgba(129, 140, 248, 0.06));
  animation: breathe 8s ease-in-out infinite;
}

/* ── Bottom Bar ── */

.bottom-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 32px;
  animation: fadeIn 1s ease-out 0.2s both;
}

.footer-note {
  font-family: 'Suisse Intl Mono', 'SF Mono', 'Menlo', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(233, 233, 242, 0.3);
}

.cta-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn {
  font-family: 'Neue Haas Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #e9e9f2;
  padding: 16px 40px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-primary {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(200, 181, 253, 0.18);
  box-shadow:
    0 0 0 0.5px rgba(200, 181, 253, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.btn-primary:hover {
  background: rgba(129, 140, 248, 0.12);
  border-color: rgba(200, 181, 253, 0.3);
  box-shadow:
    0 0 24px rgba(129, 140, 248, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(233, 233, 242, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(233, 233, 242, 0.2);
  transform: translateY(-1px);
}

/* ── Waitlist Form ── */

.waitlist-form {
  display: none;
  gap: 8px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.waitlist-input {
  font-family: 'Neue Haas Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #e9e9f2;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(233, 233, 242, 0.15);
  border-radius: 100px;
  padding: 16px 24px;
  outline: none;
  min-width: 260px;
  transition: border-color 0.25s ease;
}

.waitlist-input::placeholder {
  color: rgba(233, 233, 242, 0.3);
}

.waitlist-input:focus {
  border-color: rgba(200, 181, 253, 0.4);
}

.waitlist-submit {
  white-space: nowrap;
}

.waitlist-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.waitlist-msg {
  font-family: 'Neue Haas Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: rgba(233, 233, 242, 0.7);
  letter-spacing: 0.02em;
}

p.waitlist-msg {
  display: none;
}

.waitlist-success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: fadeIn 0.5s ease-out both;
  position: relative;
  z-index: 2;
}

/* ── Wordmark Letters (easter egg) ── */

.wm-letter {
  display: inline-block;
  cursor: pointer;
}

/* J — heavy drop into indigo haze */
.wm-letter.wave-0 { animation: driftJ 1.8s cubic-bezier(0.4, 0, 0.2, 1) both; }
/* A — violet bloom, soft swell */
.wm-letter.wave-1 { animation: driftA 1.6s cubic-bezier(0.4, 0, 0.2, 1) both; }
/* Z — woozy lateral wobble */
.wm-letter.wave-2 { animation: driftZ1 1.5s cubic-bezier(0.4, 0, 0.2, 1) both; }
/* Z — dissolve into deep fog */
.wm-letter.wave-3 { animation: driftZ2 2.2s cubic-bezier(0.4, 0, 0.2, 1) both; }

/* ── Animations ── */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.008); }
}

/* J — heavy drop: sinks into indigo haze */
@keyframes driftJ {
  0%   { color: rgba(233, 233, 242, 0.75); filter: blur(0); transform: translateY(0); text-shadow: none; }
  15%  { color: #4847ed; filter: blur(3px); transform: translateY(14px); text-shadow: 0 0 80px rgba(72, 71, 237, 0.6), 0 0 160px rgba(43, 26, 160, 0.3); }
  40%  { color: #2B1AA0; filter: blur(5px); transform: translateY(7px); text-shadow: 0 0 120px rgba(43, 26, 160, 0.5), 0 0 200px rgba(72, 71, 237, 0.15); }
  70%  { color: #818cf8; filter: blur(2px); transform: translateY(-3px); text-shadow: 0 0 60px rgba(129, 140, 248, 0.3); }
  100% { color: rgba(233, 233, 242, 0.75); filter: blur(0); transform: translateY(0); text-shadow: none; }
}

/* A — bloom: swells up in soft violet fog */
@keyframes driftA {
  0%   { color: rgba(233, 233, 242, 0.75); filter: blur(0); transform: scale(1); text-shadow: none; }
  20%  { color: #818cf8; filter: blur(4px); transform: scale(1.06); text-shadow: 0 0 100px rgba(129, 140, 248, 0.7), 0 0 180px rgba(72, 71, 237, 0.25); }
  50%  { color: #a78bfa; filter: blur(6px); transform: scale(1.03); text-shadow: 0 0 140px rgba(167, 139, 250, 0.4), 0 0 220px rgba(43, 26, 160, 0.15); }
  75%  { color: #6366f1; filter: blur(2px); transform: scale(1.01); text-shadow: 0 0 50px rgba(99, 102, 241, 0.25); }
  100% { color: rgba(233, 233, 242, 0.75); filter: blur(0); transform: scale(1); text-shadow: none; }
}

/* Z — wobble: drunken lateral drift through haze */
@keyframes driftZ1 {
  0%    { color: rgba(233, 233, 242, 0.75); filter: blur(0); transform: translateX(0); text-shadow: none; }
  12%   { color: #4847ed; filter: blur(2px); transform: translateX(-5px); text-shadow: 0 0 60px rgba(72, 71, 237, 0.5); }
  25%   { color: #6366f1; filter: blur(4px); transform: translateX(6px); text-shadow: 0 0 90px rgba(99, 102, 241, 0.6), 0 0 160px rgba(43, 26, 160, 0.2); }
  40%   { color: #2B1AA0; filter: blur(5px); transform: translateX(-3px); text-shadow: 0 0 120px rgba(43, 26, 160, 0.5); }
  55%   { color: #818cf8; filter: blur(3px); transform: translateX(3px); text-shadow: 0 0 80px rgba(129, 140, 248, 0.4); }
  70%   { color: #a78bfa; filter: blur(1.5px); transform: translateX(-1px); text-shadow: 0 0 40px rgba(167, 139, 250, 0.2); }
  100%  { color: rgba(233, 233, 242, 0.75); filter: blur(0); transform: translateX(0); text-shadow: none; }
}

/* Z — dissolve: melts into deep indigo fog */
@keyframes driftZ2 {
  0%   { color: rgba(233, 233, 242, 0.75); filter: blur(0); transform: translateY(0) scale(1); text-shadow: none; }
  15%  { color: #2B1AA0; filter: blur(6px); transform: translateY(-5px) scale(1.02); text-shadow: 0 0 140px rgba(43, 26, 160, 0.7), 0 0 240px rgba(72, 71, 237, 0.25); }
  35%  { color: #4847ed; filter: blur(8px); transform: translateY(3px) scale(1.01); text-shadow: 0 0 180px rgba(72, 71, 237, 0.5), 0 0 280px rgba(43, 26, 160, 0.2); }
  60%  { color: #818cf8; filter: blur(4px); transform: translateY(-1px) scale(1); text-shadow: 0 0 80px rgba(129, 140, 248, 0.3); }
  100% { color: rgba(233, 233, 242, 0.75); filter: blur(0); transform: translateY(0) scale(1); text-shadow: none; }
}

/* ── Responsive ── */

@media (max-width: 640px) {
  .top-bar {
    justify-content: center;
    padding: 16px 20px;
  }

  .top-bar-tagline {
    display: none;
  }

  .wordmark-text {
    font-size: clamp(80px, 24vw, 160px);
  }

  .bottom-bar {
    flex-direction: column;
    gap: 16px;
    padding: 16px 20px;
    text-align: center;
  }

  .cta-group {
    flex-direction: column;
    width: 100%;
    padding: 0 16px;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
    padding: 14px 24px;
  }

  .waitlist-form {
    flex-direction: column;
    width: 100%;
    padding: 0 16px;
  }

  .waitlist-input {
    width: 100%;
    max-width: 280px;
    min-width: unset;
  }
}

@media (max-height: 500px) {
  .wordmark-text {
    font-size: clamp(60px, 18vw, 120px);
  }

  .top-bar,
  .bottom-bar {
    padding: 12px 24px;
  }
}
