:root {
  --site-brand: #635bff;
  --site-brand-hover: #5046e5;
  --site-brand-rgb: 99, 91, 255;
  --site-brand-subtle: rgba(99, 91, 255, 0.12);
  --site-brand-border: rgba(99, 91, 255, 0.35);
  --site-brand-focus-glow: 0 0 0 2px rgba(99, 91, 255, 0.4),
    0 0 28px rgba(99, 91, 255, 0.25);
  --ai-accent: #8b8bff;
  --ai-cyan: #22d3ee;
  --ai-cyan-glow: rgba(34, 211, 238, 0.4);
  --bg: #07070d;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-subtle: #6b6b78;
  --border: rgba(255, 255, 255, 0.1);
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.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;
}

.page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

/* ── Background layers ───────────────────────────────────────── */

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.bg-glow--purple {
  width: 600px;
  height: 600px;
  top: -160px;
  left: -120px;
  background: radial-gradient(
    circle,
    rgba(var(--site-brand-rgb), 0.5) 0%,
    transparent 70%
  );
  opacity: 0.6;
  animation: drift-purple 14s ease-in-out infinite;
}

.bg-glow--cyan {
  width: 480px;
  height: 480px;
  bottom: -140px;
  right: -100px;
  background: radial-gradient(circle, var(--ai-cyan-glow) 0%, transparent 70%);
  opacity: 0.45;
  animation: drift-cyan 18s ease-in-out infinite;
}

.bg-grid {
  position: fixed;
  inset: -2px;
  background-image: linear-gradient(
      rgba(var(--site-brand-rgb), 0.12) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(var(--site-brand-rgb), 0.12) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 80% at 30% 20%, black 0%, transparent 75%);
  pointer-events: none;
  animation: grid-scroll 20s linear infinite;
}

.bg-scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.25) 3px,
    transparent 4px
  );
  opacity: 0.4;
  mix-blend-mode: overlay;
}

.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Layout ──────────────────────────────────────────────────── */

.content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 880px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 2rem;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3.5rem;
}

.wordmark {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}

.wordmark__brand {
  color: var(--site-brand);
}

.wordmark__ai {
  color: var(--text);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--text-subtle);
}

.status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
  animation: blink 1.6s ease-in-out infinite;
}

/* ── Hero ────────────────────────────────────────────────────── */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 2.5rem;
}

.badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  margin-bottom: 1.75rem;
  background: var(--site-brand-subtle);
  border: 1px solid var(--site-brand-border);
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--ai-accent);
  clip-path: polygon(
    8px 0,
    100% 0,
    100% calc(100% - 8px),
    calc(100% - 8px) 100%,
    0 100%,
    0 8px
  );
}

.badge__bracket {
  color: var(--ai-cyan);
  font-weight: 700;
}

.headline {
  margin: 0 0 1.5rem;
  font-size: clamp(2.75rem, 11vw, 6.5rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.headline__line {
  display: block;
}

.headline__accent {
  background: linear-gradient(
    100deg,
    var(--site-brand) 0%,
    var(--ai-accent) 45%,
    var(--ai-cyan) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}

.headline__muted {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text-subtle);
}

.subcopy {
  margin: 0 0 2.5rem;
  max-width: 560px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.subcopy__tag {
  font-family: var(--mono);
  color: var(--ai-cyan);
  font-weight: 700;
}

/* ── Waitlist form ───────────────────────────────────────────── */

.waitlist-form {
  width: 100%;
  max-width: 540px;
}

.waitlist-form__row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

.waitlist-form__prompt {
  display: none;
}

@media (min-width: 540px) {
  .waitlist-form__row {
    flex-direction: row;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.4rem 0.4rem 0.4rem 1rem;
  }

  .waitlist-form__row:focus-within {
    border-color: var(--site-brand);
    box-shadow: var(--site-brand-focus-glow);
  }

  .waitlist-form__prompt {
    display: block;
    font-family: var(--mono);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ai-cyan);
    margin-right: 0.6rem;
  }
}

.waitlist-form__input {
  flex: 1;
  min-width: 0;
  height: 3.25rem;
  padding: 0 1rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.waitlist-form__input::placeholder {
  color: var(--text-subtle);
}

.waitlist-form__input:focus {
  border-color: var(--site-brand);
  box-shadow: var(--site-brand-focus-glow);
}

@media (min-width: 540px) {
  .waitlist-form__input {
    height: 2.75rem;
    border: none;
    background: transparent;
    padding: 0;
  }

  .waitlist-form__input:focus {
    box-shadow: none;
  }
}

.waitlist-form__button {
  height: 3.25rem;
  padding: 0 1.75rem;
  border: none;
  background: var(--site-brand);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s, opacity 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 0 rgba(var(--site-brand-rgb), 0);
}

.waitlist-form__button:hover:not(:disabled) {
  background: var(--site-brand-hover);
  box-shadow: 0 0 24px rgba(var(--site-brand-rgb), 0.55);
}

.waitlist-form__button:active:not(:disabled) {
  transform: translateY(1px);
}

.waitlist-form__button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (min-width: 540px) {
  .waitlist-form__button {
    height: 2.75rem;
  }
}

.turnstile-wrap {
  margin-top: 1rem;
  min-height: 65px;
}

.form-message {
  min-height: 1.25rem;
  margin: 0.85rem 0 0;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.form-message--success {
  color: #4ade80;
}

.form-message--success::before {
  content: "[OK] ";
  font-weight: 700;
}

.form-message--error {
  color: #f87171;
}

.form-message--error::before {
  content: "[ERR] ";
  font-weight: 700;
}

.secondary-cta {
  margin: 2rem 0 0;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--text-subtle);
}

.link {
  color: var(--ai-cyan);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.link:hover {
  color: var(--text);
  border-bottom-color: var(--ai-cyan);
}

/* ── Footer ──────────────────────────────────────────────────── */

.footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 540px) {
  .footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer__copy {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
}

.footer__nav {
  display: flex;
  gap: 1.5rem;
}

.footer__link {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer__link:hover {
  color: var(--ai-cyan);
}

/* ── Animations ──────────────────────────────────────────────── */

@keyframes drift-purple {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.55;
  }
  50% {
    transform: translate(60px, 40px) scale(1.12);
    opacity: 0.7;
  }
}

@keyframes drift-cyan {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.4;
  }
  50% {
    transform: translate(-50px, -30px) scale(1.15);
    opacity: 0.6;
  }
}

@keyframes grid-scroll {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 48px 48px;
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-glow--purple,
  .bg-glow--cyan,
  .bg-grid,
  .status__dot {
    animation: none;
  }
}
