/* mAImate — expert landing v3
   One visual idea: sparse neural field. Quiet type. Two products. */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #0c0e14;
  --ink-2: #3d4450;
  --muted: #6e7583;
  --line: rgba(12, 14, 20, 0.08);
  --line-2: rgba(12, 14, 20, 0.14);
  --accent: #4f8ff7;
  --accent-2: #3a7aef;
  --accent-soft: rgba(79, 143, 247, 0.12);
  --shadow: 0 1px 2px rgba(12, 14, 20, 0.04), 0 20px 48px rgba(12, 14, 20, 0.06);
  --radius: 1.15rem;
  --header: 4.15rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --display: "Instrument Serif", Georgia, serif;
  --neural-intensity: 0.72;
  --neural-x: 0;
  --neural-y: 0;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  isolation: isolate;
}

body > header,
body > main,
body > footer {
  position: relative;
  z-index: 2;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 300;
  padding: 0.55rem 0.85rem;
  border-radius: 0.5rem;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  top: 1rem;
}

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

.wrap {
  width: min(1080px, calc(100% - 2.5rem));
  margin-inline: auto;
}

/* Neural field */
.neural {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.neural canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: calc(0.82 + var(--neural-intensity) * 0.18);
  transition: opacity 0.8s var(--ease);
}

.neural__glow {
  position: absolute;
  inset: -15%;
  background:
    radial-gradient(
      ellipse 48% 38% at calc(72% + var(--neural-x) * 6%) calc(22% + var(--neural-y) * 4%),
      rgba(79, 143, 247, calc(0.16 + var(--neural-intensity) * 0.14)),
      transparent 62%
    ),
    radial-gradient(
      ellipse 36% 32% at calc(18% - var(--neural-x) * 4%) 78%,
      rgba(251, 146, 60, 0.08),
      transparent 60%
    );
}

.neural__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(246, 247, 249, 0.05), rgba(246, 247, 249, 0.42)),
    radial-gradient(ellipse 70% 55% at 50% 35%, transparent 28%, rgba(246, 247, 249, 0.28) 100%);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header);
  display: flex;
  align-items: center;
  background: rgba(246, 247, 249, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(246, 247, 249, 0.9);
}

.site-header__inner {
  width: min(1080px, calc(100% - 2.5rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.logo img {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.4rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.nav a {
  padding: 0.5rem 0.72rem;
  border-radius: 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  background: rgba(12, 14, 20, 0.04);
}

.nav a.is-cta {
  margin-left: 0.35rem;
  padding-inline: 0.95rem;
  color: #fff;
  background: var(--accent);
}

.nav a.is-cta:hover,
.nav a.is-cta:focus-visible {
  color: #fff;
  background: var(--accent-2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.lang-toggle {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
}

.lang-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.38rem 0.62rem;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}

.menu-btn {
  display: none;
  width: 2.45rem;
  height: 2.45rem;
  border: 1px solid var(--line-2);
  border-radius: 0.65rem;
  background: var(--surface);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  display: block;
  width: 1rem;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
}

.menu-btn span::before,
.menu-btn span::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-btn span::before {
  top: -5px;
}

.menu-btn span::after {
  top: 5px;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4.5rem 0 5.5rem;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.hero__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1.35rem;
  color: var(--ink-2);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero__brand img {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.32rem;
}

.hero h1 {
  margin: 0 0 1rem;
  max-width: 11ch;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.1rem, 7.2vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.hero__sub {
  margin: 0 0 2rem;
  max-width: 28rem;
  color: var(--ink-2);
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hero__stage {
  position: relative;
  width: min(100%, 22rem);
  aspect-ratio: 1;
  margin-inline: auto;
  display: grid;
  place-items: center;
}

.core {
  position: relative;
  z-index: 2;
  width: 8.5rem;
  height: 8.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  background: linear-gradient(160deg, #fff, #eef4ff);
  border: 1px solid rgba(79, 143, 247, 0.22);
  box-shadow:
    0 0 0 12px rgba(79, 143, 247, 0.05),
    0 18px 50px rgba(79, 143, 247, 0.16);
  transform: translate3d(calc(var(--neural-x) * 8px), calc(var(--neural-y) * 6px), 0);
}

.core strong {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.core span {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.core-ring {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px solid rgba(79, 143, 247, 0.18);
  animation: ring-breathe 7s var(--ease) infinite;
}

.core-ring--delayed {
  inset: 0;
  border-style: dashed;
  opacity: 0.7;
  animation-delay: 1.2s;
}

@keyframes ring-breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.035);
    opacity: 0.95;
  }
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__scroll:hover {
  color: var(--ink);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.95rem;
  padding: 0 1.2rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--accent-2);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: rgba(12, 14, 20, 0.03);
  border-color: rgba(79, 143, 247, 0.35);
}

.btn--dark {
  background: var(--ink);
  color: #fff;
}

.btn--dark:hover,
.btn--dark:focus-visible {
  background: #1b2030;
}

/* Sections */
.section {
  padding: 6rem 0;
}

.section--panel {
  background: rgba(255, 255, 255, 0.55);
  border-block: 1px solid var(--line);
}

.section__head {
  max-width: 34rem;
  margin-bottom: 2.5rem;
}

.section__head h2,
.prose h2 {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 4.2vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section__head p,
.prose p {
  margin: 0 0 1rem;
  color: var(--ink-2);
  font-size: 1.05rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prose {
  max-width: 38rem;
}

.prose__cta {
  margin-top: 1.6rem;
}

/* Constellation */
.constellation {
  position: relative;
  min-height: 26rem;
  border-radius: calc(var(--radius) + 0.35rem);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.constellation::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(79, 143, 247, 0.08), transparent 42%);
  pointer-events: none;
}

.constellation__hub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8.8rem;
  height: 8.8rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background: linear-gradient(155deg, #fff, #edf3ff);
  border: 1px solid rgba(79, 143, 247, 0.25);
  box-shadow: 0 0 0 10px rgba(79, 143, 247, 0.05), var(--shadow);
  z-index: 2;
}

.constellation__hub strong {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.constellation__hub span {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.node {
  position: absolute;
  z-index: 2;
  min-width: 8.5rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.node strong {
  display: block;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.node span {
  color: var(--muted);
  font-size: 0.78rem;
}

.node--tl {
  top: 12%;
  left: 8%;
}

.node--tr {
  top: 12%;
  right: 8%;
}

.node--bl {
  bottom: 12%;
  left: 10%;
}

.node--br {
  bottom: 12%;
  right: 10%;
}

.node--action {
  top: 42%;
  right: 3%;
  border-color: rgba(79, 143, 247, 0.28);
  background: linear-gradient(160deg, #fff, #eef4ff);
}

/* Products */
.chooser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}

.product {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  padding: 1.7rem;
  border-radius: calc(var(--radius) + 0.15rem);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: border-color 0.25s ease, transform 0.35s var(--ease);
}

.product:hover {
  border-color: rgba(79, 143, 247, 0.32);
  transform: translateY(-2px);
}

.product h3 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.product__lead {
  margin: -0.25rem 0 0;
  color: var(--ink-2);
}

.product ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
  flex: 1;
}

.product li {
  position: relative;
  padding-left: 1.05rem;
  color: var(--ink-2);
  font-size: 0.96rem;
}

.product li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58rem;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--accent);
}

.product .btn {
  width: fit-content;
  margin-top: 0.35rem;
}

/* Trust */
.trust {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.trust__card {
  padding: 1.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.trust__card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.trust__card p {
  margin: 0;
  color: var(--ink-2);
}

/* Final */
.final {
  padding: 4.5rem 0 5.5rem;
}

.final__panel {
  text-align: center;
  padding: clamp(2rem, 5vw, 3.4rem);
  border-radius: calc(var(--radius) + 0.35rem);
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 55% 70% at 100% 0%, rgba(79, 143, 247, 0.1), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow);
}

.final__panel h2 {
  margin: 0 0 0.7rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.8vw, 3.2rem);
  letter-spacing: -0.03em;
}

.final__panel > p {
  margin: 0 auto 1.6rem;
  max-width: 28rem;
  color: var(--ink-2);
}

.waitlist-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  max-width: 32rem;
  margin: 0 auto;
}

.waitlist-form input[type="email"] {
  flex: 1 1 14rem;
  min-height: 2.95rem;
  padding: 0 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line-2);
  background: #fff;
  outline: none;
}

.waitlist-form input[type="email"]:focus {
  border-color: rgba(79, 143, 247, 0.5);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.waitlist-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.waitlist-message {
  margin: 0.85rem 0 0;
  min-height: 1.3rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.waitlist-message.is-success {
  color: #0f766e;
}

.waitlist-message.is-error {
  color: #b42318;
}

.final__alt {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.final__alt a {
  color: var(--accent-2);
  font-weight: 600;
}

.final__alt a:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.3rem 0 2rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 2rem;
  justify-content: space-between;
}

.site-footer__brand {
  display: grid;
  gap: 0.3rem;
}

.site-footer__brand span,
.site-footer__note {
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.1rem;
}

.footer-links a {
  color: var(--ink-2);
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--ink);
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Mobile */
@media (max-width: 900px) {
  .hero__inner,
  .chooser,
  .trust {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 3rem 0 4rem;
  }

  .hero__stage {
    order: -1;
    width: min(100%, 16rem);
  }

  .hero h1 {
    max-width: none;
  }

  .nav {
    position: fixed;
    inset: var(--header) 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding: 0.9rem 1.15rem 1.15rem;
    background: rgba(246, 247, 249, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
  }

  body.nav-open .nav {
    display: flex;
  }

  .nav a.is-cta {
    margin-left: 0;
    text-align: center;
  }

  .menu-btn {
    display: inline-flex;
  }

  .constellation {
    min-height: auto;
    padding: 1.2rem;
    display: grid;
    gap: 0.65rem;
  }

  .constellation__hub,
  .node {
    position: relative;
    inset: auto;
    transform: none;
    width: 100%;
    height: auto;
    min-width: 0;
  }

  .constellation__hub {
    margin-bottom: 0.35rem;
    padding: 1.1rem;
    border-radius: 1.1rem;
  }
}

@media (max-width: 560px) {
  .wrap,
  .site-header__inner {
    width: min(1080px, calc(100% - 1.4rem));
  }

  .section {
    padding: 4.2rem 0;
  }

  .waitlist-form {
    flex-direction: column;
  }

  .waitlist-form .btn {
    width: 100%;
  }
}
