:root {
  --mk-bg: #050712;
  --mk-bg-elevated: #0b0f1f;
  --mk-fg: #f8fafc;
  --mk-fg-subtle: #9ca3af;
  --mk-accent: #38bdf8;
  --mk-accent-soft: rgba(56, 189, 248, 0.25);
  --mk-border-subtle: rgba(148, 163, 184, 0.3);
  --mk-glass-border: rgba(255, 255, 255, 0.06);
  --mk-radius-lg: 18px;
  --mk-radius-card: 16px;
  --mk-radius-sm: 10px;
  --mk-radius-pill: 999px;
  --mk-shadow-soft: 0 24px 80px rgba(15, 23, 42, 0.7);
  --mk-font-sans:
    system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter",
    "Segoe UI", sans-serif;
}

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

html {
  margin: 0;
  padding: 0;
  background: var(--mk-bg);
}

body {
  margin: 0;
  padding: 0;
}

body.mk-body {
  min-height: 100vh;
  background: radial-gradient(
    circle at top,
    #020617 0,
    #020617 40%,
    #020416 100%
  );
  color: var(--mk-fg);
  font-family: var(--mk-font-sans);
  -webkit-font-smoothing: antialiased;
}

.mk-page {
  min-height: 100vh;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Mobile: full-height layout so brain fills under waitlist; scroll when keyboard opens */
@media (max-width: 880px) {
  html,
  body {
    min-height: 100%;
  }

  .mk-page {
    height: 100vh;
    min-height: 100vh;
    overflow: auto;
  }
}

@supports (height: 100dvh) {
  @media (max-width: 880px) {
    .mk-page {
      height: 100dvh;
      min-height: 100dvh;
    }
  }
}

.mk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mk-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", var(--mk-font-sans);
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 14px;
  color: var(--mk-fg-subtle);
}

.mk-logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mk-fg-subtle);
}

.mk-logo-mark svg {
  width: 24px;
  height: 24px;
  display: block;
}

.mk-header-pill {
  border-radius: var(--mk-radius-pill);
  border: 1px solid var(--mk-border-subtle);
  padding: 6px 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mk-fg-subtle);
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.8),
    rgba(15, 23, 42, 0.2)
  );
}

.mk-hero {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
  overflow: visible;
}

.mk-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 520px;
}

.mk-hero-title {
  font-size: clamp(2.4rem, 3.1vw, 3.2rem);
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.04em;
}

.mk-hero-subtitle {
  margin: 0;
  color: var(--mk-fg-subtle);
  font-size: 0.98rem;
  max-width: 34rem;
}

/* Rotating tagline: brand font + accent so it reads as key takeaway (trend: one accent for hero “punch line”) */
.mk-hero-reinforce {
  margin-top: 6px;
  font-family: "Space Grotesk", var(--mk-font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--mk-accent);
}

.mk-hero-reinforce-inner {
  position: relative;
  min-height: 1.5em;
}

.mk-hero-reinforce-phrase {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  font-weight: inherit;
  opacity: 0;
  pointer-events: none;
}

.mk-hero-reinforce-phrase.is-visible {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}

/* Waitlist: dark glassmorphism (frosted card), bento-style soft corners */
.mk-waitlist {
  margin-top: 14px;
  padding: 20px 20px 22px;
  border-radius: var(--mk-radius-card);
  border: 1px solid var(--mk-glass-border);
  background: rgba(11, 15, 31, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mk-waitlist-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mk-fg-subtle);
}

.mk-waitlist-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

/* Unified pill shape + aligned padding for input + button (one visual unit) */
.mk-waitlist-row .mk-input {
  border-radius: var(--mk-radius-pill);
  padding: 12px 18px;
}

.mk-waitlist-row .mk-button-primary {
  border-radius: var(--mk-radius-pill);
}

.mk-input {
  flex: 1;
  min-width: 0;
  border-radius: var(--mk-radius-sm);
  border: 1px solid var(--mk-glass-border);
  background: rgba(5, 7, 18, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--mk-fg);
  padding: 12px 16px;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.mk-input::placeholder {
  color: var(--mk-fg-subtle);
}

.mk-input:hover {
  border-color: rgba(148, 163, 184, 0.25);
}

.mk-input:focus-visible {
  border-color: var(--mk-accent);
  box-shadow: 0 0 0 2px var(--mk-accent-soft);
  background: rgba(5, 7, 18, 0.7);
}

/* Outline/ghost primary: light at rest, fills on hover (common in product UIs) */
.mk-button-primary {
  border-radius: var(--mk-radius-sm);
  border: 1.5px solid rgba(56, 189, 248, 0.5);
  padding: 12px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(56, 189, 248, 0.08);
  color: var(--mk-accent);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.mk-button-primary:hover {
  background: var(--mk-accent);
  border-color: var(--mk-accent);
  color: var(--mk-bg);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.2);
}

.mk-button-primary:active {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: var(--mk-bg);
  box-shadow: none;
}

.mk-waitlist-note {
  margin: 0;
  font-size: 0.75rem;
  color: var(--mk-fg-subtle);
}

.mk-waitlist-message {
  margin: 0;
  font-size: 0.8rem;
  min-height: 1em;
}

/* Brevo form: hide honeypot, keep our card/input/button look */
#sib-form-container .input--hidden,
#sib-form-container input[name="email_address_check"] {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
#sib-container.sib-container--large {
  background: transparent !important;
  border: none !important;
  max-width: none !important;
  padding: 0 !important;
}
#sib-form-container .sib-form-message-panel {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: var(--mk-radius-card);
  font-size: 0.8rem;
}
#sib-form-container .sib-form-message-panel svg {
  display: none;
}
#sib-form-container .sib-form-block__button .sib-hide-loader-icon {
  display: none;
}
/* Brevo form: match waitlist glass look; pill + focus handled by .mk-waitlist-row + .mk-input */
#sib-form #EMAIL,
#sib-form input.mk-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--mk-border-subtle);
  background: rgba(15, 23, 42, 0.8);
  color: var(--mk-fg);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* 16px on mobile so iOS Safari doesn't zoom in on focus */
@media (max-width: 880px) {
  #sib-form #EMAIL,
  #sib-form input.mk-input,
  .mk-input {
    font-size: 16px;
  }
}
#sib-form #EMAIL::placeholder,
#sib-form input.mk-input::placeholder {
  color: var(--mk-fg-subtle);
}
#sib-form #EMAIL:hover,
#sib-form input.mk-input:hover {
  border-color: rgba(148, 163, 184, 0.4);
}
#sib-form #EMAIL:focus-visible,
#sib-form input.mk-input:focus-visible {
  border-color: var(--mk-accent);
  box-shadow: 0 0 0 2px var(--mk-accent-soft);
  background: rgba(15, 23, 42, 0.95);
}

/* Square frame for the brain — in place, no visible chrome; reset inherited body color so no light flash */
.mk-brain-frame.mk-brain-floating {
  position: absolute;
  top: 50%;
  left: 520px;
  right: auto;
  width: 520px;
  height: 520px;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: #020617;
  color: #020617; /* override body.mk-body color (--mk-fg) so nothing inherits light */
}

.mk-brain-frame .mk-brain-canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: #020617;
  color: #020617;
  transition: opacity 0.15s ease-out;
}

.mk-hero {
  position: relative;
  z-index: 1;
}

.mk-hero-copy {
  position: relative;
  z-index: 2;
  pointer-events: auto; /* ensure form is clickable even if canvas overlaps */
}

.mk-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--mk-fg-subtle);
  border-top: 1px solid rgba(15, 23, 42, 0.9);
  padding-top: 12px;
}

@media (max-width: 880px) {
  .mk-page {
    padding: 14px 16px 10px;
    gap: 14px;
  }

  .mk-hero {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    min-height: 0;
    flex: 1;
  }

  .mk-hero-copy {
    max-width: none;
    gap: 12px;
    min-height: 0;
    flex-shrink: 0;
  }

  /* Brain in flow below copy; fills remaining space so page fits viewport */
  .mk-brain-frame.mk-brain-floating {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: 0;
    min-height: 140px;
    flex: 1;
    margin: 0 auto;
    transform: none;
  }
}

@media (max-width: 640px) {
  .mk-page {
    padding: 10px 14px 8px;
    gap: 10px;
  }

  .mk-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .mk-hero-copy {
    gap: 10px;
  }

  .mk-hero-title {
    font-size: clamp(1.75rem, 5vw, 2.2rem);
  }

  .mk-hero-subtitle {
    font-size: 0.9rem;
  }

  .mk-brain-frame.mk-brain-floating {
    min-height: 100px;
  }

  .mk-waitlist-row {
    flex-direction: column;
    align-items: stretch;
  }

  .mk-button-primary {
    width: 100%;
    justify-content: center;
  }

  .mk-footer {
    padding-top: 8px;
    font-size: 0.72rem;
  }
}
