@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;600;700&family=Space+Mono:wght@400;700&family=Inter:wght@300;400;500&display=swap');

:root {
  --bg-void: #020203;
  --text-main: #FFFFFF;
  --text-muted: #71717A;
  --accent: #FFFFFF;
  --accent-glow: #8B5CF6; /* Violet energetic glow */
  --accent-glow-2: #4C1D95; /* Deep violet for aurora depth */
  --accent-cyan: #22D3EE;  /* Cool counter-accent for synapse sparks */
  --border-subtle: rgba(255, 255, 255, 0.12);
}

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

html { background-color: var(--bg-void); }

body {
  background-color: var(--bg-void);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================
   BACKGROUND LAYER STACK
   0: aurora (css gradients, cognitive glow)
   1: canvas (synapse / neural particle mesh)
   2: noise (film-grain texture for depth)
   10: content
   ========================================== */

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  display: none; /* only shown by script.js if WebGL isn't available */
}

.aurora--visible { display: block; }

#nebula-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  display: block;
  background: var(--bg-void);
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  mix-blend-mode: screen;
  opacity: 0.55;
  will-change: transform;
}

.blob-1 {
  width: 55vmax;
  height: 55vmax;
  top: -18vmax;
  left: -12vmax;
  background: radial-gradient(circle at 30% 30%, var(--accent-glow), transparent 70%);
  animation: drift-1 26s ease-in-out infinite alternate;
}

.blob-2 {
  width: 45vmax;
  height: 45vmax;
  bottom: -16vmax;
  right: -10vmax;
  background: radial-gradient(circle at 60% 60%, var(--accent-cyan), transparent 70%);
  opacity: 0.28;
  animation: drift-2 32s ease-in-out infinite alternate;
}

.blob-3 {
  width: 38vmax;
  height: 38vmax;
  top: 35%;
  left: 50%;
  background: radial-gradient(circle, var(--accent-glow-2), transparent 72%);
  opacity: 0.4;
  animation: drift-3 22s ease-in-out infinite alternate;
}

@keyframes drift-1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(8vmax, 10vmax) scale(1.15); }
}

@keyframes drift-2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-6vmax, -8vmax) scale(1.1); }
}

@keyframes drift-3 {
  0%   { transform: translate(-50%, -30%) scale(1); }
  100% { transform: translate(-58%, -22%) scale(1.2); }
}

#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  display: block;
}

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Main Centered UI */
.container {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 10;
  padding: 2rem 1.5rem;
  pointer-events: none; /* Allows mouse to pass through empty space to the canvas */
}

.container > * {
  pointer-events: auto; /* Re-enables clicking on forms and links */
}

.badge {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-subtle);
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  color: #A1A1AA;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 3.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  backdrop-filter: blur(8px);
}

.badge-dot {
  width: 4px;
  height: 4px;
  background-color: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.brand-word {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  margin-bottom: 1.5rem;
  background: linear-gradient(100deg, #FFFFFF 0%, #E9E4FF 35%, var(--accent-glow) 60%, var(--accent-cyan) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(139, 92, 246, 0.35));
  animation: brand-sheen 7s ease-in-out infinite;
}

@keyframes brand-sheen {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-word { animation: none; }
}

.subtitle {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 5rem;
  letter-spacing: 0.05em;
}

/* Precision HUD Countdown */
.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 5vw, 4rem);
  margin-bottom: 5rem;
  position: relative;
  width: 100%;
}

.count-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.count-num {
  font-family: 'Space Mono', monospace;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 400;
  color: #FFFFFF;
  line-height: 1;
  margin-bottom: 1rem;
  letter-spacing: -0.05em;
}

.count-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #52525B;
  letter-spacing: 0.3em;
}

/* Minimalist Input Form */
.form-wrapper {
  width: 100%;
  max-width: 440px;
  position: relative;
  margin-bottom: 5rem;
}

.form-group {
  display: flex;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.25rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.form-group:focus-within {
  border-color: #FFFFFF;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
}

.form-group input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 1rem 1.5rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-main);
  outline: none;
}

.form-group input::placeholder { color: #52525B; letter-spacing: 0.05em; }

/* Honeypot field: kept out of the normal stylesheet cascade and off-screen
   rather than using an inline style attribute, so the page can run under a
   strict Content-Security-Policy with no 'unsafe-inline' for styles. */
.bot-trap {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  display: none !important;
}

.form-group button {
  background: #FFFFFF;
  color: #000000;
  border: none;
  border-radius: 2px;
  padding: 0 2.5rem;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-group button:hover:not(:disabled) {
  background: #D4D4D8;
}

.form-group button:disabled {
  background: #27272A;
  color: #52525B;
  cursor: not-allowed;
}

.status-msg {
  position: absolute;
  bottom: -2.5rem;
  left: 0;
  right: 0;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  display: none;
}

/* Centered Founder Layer */
.founder-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.founder-title {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: #52525B;
  margin-bottom: 1rem;
}

.founder-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #A1A1AA;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.founder-contact {
  display: flex;
  gap: 2rem;
  font-size: 0.8rem;
  font-family: 'Space Mono', monospace;
}

.founder-contact a {
  color: #52525B;
  text-decoration: none;
  transition: color 0.2s ease;
}

.founder-contact a:hover { color: #FFFFFF; }

/* Visible keyboard focus, kept consistent with the brand's violet glow */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-glow);
  outline-offset: 2px;
}

/* Respect reduced-motion preferences: calm the aurora and hand the canvas
   engine a flag (read in script.js) to drop to a near-static render. */
@media (prefers-reduced-motion: reduce) {
  .aurora-blob { animation: none; }
}

/* Responsiveness */
@media (max-width: 600px) {
  body { padding: 1rem; overflow-y: auto; overflow-x: hidden; }
  .subtitle { margin-bottom: 3.5rem; }
  .countdown { gap: 1rem; margin-bottom: 4rem; }
  .count-num { font-size: 2.5rem; }
  .form-wrapper { margin-bottom: 4rem; }
  .form-group { flex-direction: column; background: transparent; border: none; padding: 0; backdrop-filter: none; }
  .form-group input { background: #000000; border: 1px solid var(--border-subtle); margin-bottom: 0.75rem; padding: 1.25rem; }
  .form-group button { width: 100%; padding: 1.25rem; }
  .status-msg { bottom: -2.5rem; }
  .founder-contact { flex-direction: column; gap: 0.5rem; align-items: center; }
  .aurora-blob { filter: blur(60px); }
}