/* ============ NIO BRAIN — Dala register ============ */
:root {
  --void: #000000;
  --bone: #ffffff;
  --ash: #9a9a9a;
  --mist: #bdbdbd;
  --iris: #8052ff;
  --saffron: #ffb829;
  --verdant: #15846e;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }

body {
  background: var(--void);
  color: var(--bone);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01" on;
  overflow-x: hidden;
}

::selection { background: var(--iris); color: #fff; }

/* ---------- nav ---------- */
.nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 36px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px clamp(18px, 3vw, 30px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--bone);
}
.brand-word { font-size: 14px; font-weight: 400; letter-spacing: 0.01em; }
.nav-links {
  display: flex;
  gap: 30px;
  margin-left: auto;
}
.nav-links a {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--ash);
  text-decoration: none;
  transition: color 0.3s ease;
}
.nav-links a:hover { color: var(--bone); }

/* ---------- the one violet pill ---------- */
.pill {
  display: inline-block;
  background: var(--iris);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  text-decoration: none;
  border: none;
  border-radius: 22.5px;
  padding: 14.4px 16px;
  cursor: pointer;
  transition: transform 0.35s var(--ease), filter 0.35s ease;
}
.pill:hover { transform: translateY(-2px); filter: brightness(1.1); }

.ghost {
  background: none;
  border: none;
  color: var(--ash);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: color 0.3s ease;
}
.ghost:hover { color: var(--bone); }
.ghost-hint {
  font-size: 14px;
  font-weight: 200;
  color: var(--ash);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  min-height: calc(100dvh - 66px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
  padding: 0 clamp(18px, 3vw, 30px);
}

.hero-copy { position: relative; z-index: 2; max-width: 560px; }

.kicker {
  display: block;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  color: var(--saffron);
  margin-bottom: 24px;
}

.display {
  font-weight: 400;
  font-size: clamp(44px, 6.2vw, 78px);
  line-height: 1.1;
  letter-spacing: clamp(-1.8px, -0.04em, -3.12px);
  color: var(--bone);
  margin-bottom: 30px;
  text-wrap: balance;
}

.body {
  font-size: 18px;
  font-weight: 200;
  line-height: 1.5;
  color: var(--bone);
  max-width: 480px;
}
.tertiary { color: var(--mist); }

.actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 36px;
  flex-wrap: wrap;
}

/* views crossfade */
.view { transition: opacity 0.55s var(--ease), transform 0.55s var(--ease); }
.view.leaving { opacity: 0; transform: translateY(10px); pointer-events: none; }
.view[hidden] { display: none; }
.view-b .rows { display: grid; gap: 18px; margin-top: 8px; }
.view-b h3 {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.48px;
  line-height: 1.25;
  margin-bottom: 4px;
}
.view-b .body { font-size: 15px; color: var(--mist); max-width: 52ch; }

/* ---------- constellation ---------- */
.constellation {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: calc(100dvh - 120px);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.constellation:focus-visible { outline: 1px solid var(--iris); outline-offset: 8px; border-radius: 24px; }
.constellation canvas { display: block; width: 100%; height: 100%; }

/* ---------- statement ---------- */
.statement {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(90px, 14vh, 120px) clamp(18px, 3vw, 30px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 60px);
  align-items: start;
}
.h-sm {
  font-weight: 400;
  font-size: clamp(30px, 3.6vw, 42px);
  line-height: 1.2;
  letter-spacing: -1.68px;
  color: var(--bone);
  text-wrap: balance;
}

/* ---------- footer ---------- */
.foot {
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px clamp(18px, 3vw, 30px) 36px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  color: var(--ash);
}

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .nav { gap: 18px; }
  .nav-links { display: none; }
  .hero {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 12px;
    padding-top: 12px;
    min-height: auto;
  }
  .constellation {
    order: -1;
    max-height: 52dvh;
    aspect-ratio: 1.2 / 1;
  }
  .statement { grid-template-columns: 1fr; }
}

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