@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("/fonts/Newsreader-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 300 500;
  font-display: swap;
  src: url("/fonts/Newsreader-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/Inter-normal.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/JetBrainsMono-normal.woff2") format("woff2");
}

:root {
  --bg: #0f0e18;
  --surface: #1b1628;
  --raised: #241e37;
  --lavender: #b89aff;
  --secondary: #c79bcb;
  --pink: #e6b4d7;
  --blue: #94b0ff;
  --text: #f4ecff;
  --muted: #a99cc3;
  --line: rgba(184, 154, 255, 0.14);
  --line-strong: rgba(184, 154, 255, 0.28);
  --iris: linear-gradient(90deg, var(--pink), var(--lavender) 50%, var(--blue));
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 1240px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--raised) var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(184, 154, 255, 0.34); color: var(--text); }

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

a { color: inherit; text-underline-offset: 0.2em; }

:focus-visible {
  outline: 1.5px solid var(--lavender);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--raised);
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 14, 24, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem var(--gutter);
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav__links {
  display: none;
  gap: 2rem;
  margin-left: auto;
  font-size: 0.875rem;
}
.nav__links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--text); }
.nav .btn { margin-left: auto; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand__mark { width: 22px; height: auto; }
.brand__word {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding-left: 0.1em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.875rem;
  padding: 0 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 500 0.9375rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s, box-shadow 0.3s var(--ease), border-color 0.2s, color 0.2s;
}
.btn--sm { min-height: 2.25rem; padding: 0 1rem; font-size: 0.8125rem; }
.btn--primary {
  background: var(--lavender);
  color: var(--bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn--primary:hover {
  background: #c6adff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 18px -4px rgba(184, 154, 255, 0.55);
}
.btn--primary:active { background: #a688f0; box-shadow: inset 0 1px 3px rgba(15, 14, 24, 0.35); }
.btn--ghost {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(36, 30, 55, 0.4);
}
.btn--ghost:hover { border-color: rgba(184, 154, 255, 0.5); background: rgba(36, 30, 55, 0.8); }
.btn[disabled] { cursor: progress; opacity: 0.75; }

.hero {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter) clamp(4rem, 9vw, 7.5rem);
  display: grid;
  gap: 3rem;
  align-items: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -10% -20% auto;
  height: 900px;
  background: radial-gradient(42% 46% at 72% 40%, rgba(122, 92, 214, 0.2), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.display {
  font-family: var(--serif);
  font-weight: 350;
  font-size: clamp(2.75rem, 7.2vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-optical-sizing: auto;
}
.lede {
  margin-top: 1.75rem;
  max-width: 34rem;
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  color: var(--muted);
}
.actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.status {
  margin-top: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8125rem;
  color: var(--muted);
}
.status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lavender);
  box-shadow: 0 0 0 3px rgba(184, 154, 255, 0.16);
}

.hero__art { margin: 0; }
.hero__stage {
  position: relative;
  aspect-ratio: 1;
  width: min(100%, 620px);
  margin: 0 auto;
  transform: translate3d(0, var(--drift, 0px), 0);
  opacity: var(--fade, 1);
  will-change: transform;
}
.hero__stage canvas, .hero__still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__still {
  padding: 13% 9% 15% 11%;
  object-fit: contain;
  opacity: 0.9;
}
.js .hero__still { opacity: 0; }
.formula {
  margin: 1.25rem auto 0;
  max-width: 30rem;
  text-align: center;
  display: grid;
  gap: 0.5rem;
}
.formula__eq {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: 0.01em;
}
.formula__eq sub, .formula__eq sup { font-size: 0.62em; }
.sum { display: inline-grid; justify-items: center; vertical-align: middle; line-height: 1; margin: 0 0.15em; }
.sum sub, .sum sup { line-height: 1; vertical-align: 0; }
.sum__op { font-size: 1.5em; line-height: 0.9; }
.formula__note { font-size: 0.8125rem; color: var(--muted); line-height: 1.55; }

.section-head {
  max-width: 44rem;
  display: grid;
  gap: 1.25rem;
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 350;
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}
.section-head p { color: var(--muted); font-size: 1.0625rem; max-width: 38rem; }

.product, .how {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 8rem) var(--gutter);
}
.product { border-top: 1px solid var(--line); }

.viewer { margin-top: clamp(2.5rem, 5vw, 4rem); }
.tabs {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.tab {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 500 0.875rem/1 var(--sans);
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] {
  color: var(--text);
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 30%;
  right: 30%;
  bottom: 3px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--iris);
  box-shadow: 0 0 8px rgba(184, 154, 255, 0.4);
}

.window {
  position: relative;
  margin-top: 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  padding: clamp(0.35rem, 0.8vw, 0.6rem);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8), 0 18px 60px -30px rgba(122, 92, 214, 0.35);
}
.window::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 12%;
  right: 12%;
  height: 1px;
  background: var(--iris);
  opacity: 0.8;
}
.window__panel img {
  width: 100%;
  height: auto;
  border-radius: 9px;
  background: var(--bg);
}
.window__panel:not([hidden]) img { animation: reveal 0.6s var(--ease); }
.window__caption {
  padding: 1rem 0.6rem 0.5rem;
  font-size: 0.9375rem;
  color: var(--muted);
  max-width: 62rem;
}
@keyframes reveal {
  from { opacity: 0.2; filter: blur(6px); }
  to { opacity: 1; filter: none; }
}

.how { border-top: 1px solid var(--line); }
.graph {
  width: 100%;
  height: auto;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  overflow: visible;
}
.g-line { fill: none; stroke-width: 1.5; stroke-linecap: round; }
.g-main { stroke: rgba(169, 156, 195, 0.55); }
.g-branch { stroke: url(#iris); stroke-width: 2; }
.g-compare { stroke: var(--secondary); stroke-width: 1.25; stroke-dasharray: 3 5; opacity: 0.8; }
.g-node { fill: var(--bg); stroke: rgba(169, 156, 195, 0.8); stroke-width: 1.5; }
.g-node--on { stroke: var(--lavender); fill: var(--raised); }
.g-node--cmp { stroke: var(--pink); fill: var(--raised); }
.g-node--merge { stroke: var(--lavender); stroke-width: 2; fill: var(--raised); }
.g-label { font: 400 13px var(--mono); fill: var(--muted); }

.js .graph .g-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .graph .g-compare, .js .graph .g-node, .js .graph .g-label { opacity: 0; }
.js .graph.is-in .g-line { stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s var(--ease); }
.js .graph.is-in .g-branch { transition-delay: 0.35s; transition-duration: 2.2s; }
.js .graph.is-in .g-compare { opacity: 0.8; transition: opacity 0.8s 1.5s; }
.js .graph.is-in .g-node, .js .graph.is-in .g-label { opacity: 1; transition: opacity 0.6s 0.5s; }
.js .graph.is-in .g-node--cmp { transition-delay: 1.3s; }
.js .graph.is-in .g-node--merge { transition-delay: 2.1s; animation: pulse 3.2s 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse {
  0%, 100% { stroke-opacity: 1; }
  50% { stroke-opacity: 0.45; }
}

.steps {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 2.25rem;
}
.step h3 {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.step p { margin-top: 0.6rem; color: var(--muted); max-width: 26rem; }

.access {
  position: relative;
  padding: clamp(5rem, 11vw, 9rem) var(--gutter);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(50% 70% at 50% 0%, rgba(122, 92, 214, 0.18), transparent 70%),
    var(--surface);
  overflow: hidden;
}
.access__inner {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
}
.access h2 {
  font-family: var(--serif);
  font-weight: 350;
  font-size: clamp(2.25rem, 5.4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.022em;
}
.access__inner > p { margin: 1.25rem auto 0; color: var(--muted); max-width: 32rem; font-size: 1.0625rem; }

.signup { margin-top: 2.5rem; text-align: left; }
.signup__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 0.5rem 1.1rem;
}
.signup__row {
  display: grid;
  gap: 0.6rem;
}
.signup input[type="email"] {
  width: 100%;
  min-height: 3.25rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(15, 14, 24, 0.7);
  color: var(--text);
  font: 400 1rem var(--sans);
  caret-color: var(--lavender);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.signup input::placeholder { color: #8d81a6; }
.signup input:hover { border-color: rgba(184, 154, 255, 0.45); }
.signup input:focus { outline: none; border-color: var(--lavender); box-shadow: 0 0 0 3px rgba(184, 154, 255, 0.24); }
.signup input[aria-invalid="true"] { border-color: #f08aa8; box-shadow: 0 0 0 3px rgba(240, 138, 168, 0.2); }
.signup .btn { min-height: 3.25rem; }
.signup__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.signup__status {
  min-height: 1.6em;
  margin: 0.9rem 0 0 1.1rem;
  font-size: 0.9375rem;
}
.signup__status[data-state="success"] { color: var(--text); }
.signup__status[data-state="error"] { color: #f6a3bc; }
.signup__note { margin: 0.25rem 0 0 1.1rem; font-size: 0.8125rem; color: var(--muted); }
.signup.is-done .signup__row, .signup.is-done .signup__label { display: none; }
.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(15, 14, 24, 0.3);
  border-top-color: var(--bg);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.footer { border-top: 1px solid var(--line); }
.footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 3rem;
  display: grid;
  gap: 1.25rem;
  font-size: 0.8125rem;
  color: var(--muted);
}
.footer .brand { color: var(--text); }
.footer__privacy { max-width: 36rem; }

@media (min-width: 640px) {
  .signup__row { grid-template-columns: 1fr auto; }
}

@media (min-width: 760px) {
  .nav__links { display: flex; }
  .nav .btn { margin-left: 0; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .footer__inner { grid-template-columns: auto 1fr auto; align-items: center; gap: 3rem; }
}

@media (min-width: 1000px) {
  .hero { grid-template-columns: 1.05fr 1fr; gap: 2rem; min-height: calc(100svh - 4rem); }
  .hero__copy { padding-bottom: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .graph .g-line { stroke-dashoffset: 0; }
  .js .graph .g-compare { opacity: 0.8; }
  .js .graph .g-node, .js .graph .g-label { opacity: 1; }
}

.notfound { min-height: 100svh; display: grid; place-items: center; }
.notfound__back { margin-top: 2rem; }

@media (max-width: 759px) {
  .graph { width: 112%; margin-left: -6%; }
  .g-line { stroke-width: 3; }
  .g-branch { stroke-width: 3.5; }
  .g-compare { stroke-width: 2.5; stroke-dasharray: 6 8; }
  .g-node { stroke-width: 3; }
  .g-label { font-size: 30px; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.try {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 8rem) var(--gutter);
  border-top: 1px solid var(--line);
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  filter: blur(8px);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease), filter 1s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; filter: none; }
.reveal[data-reveal="frame"] {
  filter: none;
  transform: translate3d(0, 48px, 0) scale(0.97);
  clip-path: inset(8% 4% 0 4% round 18px);
  transition: opacity 0.9s var(--ease), transform 1.4s var(--ease), clip-path 1.4s var(--ease);
}
.reveal[data-reveal="frame"].is-in { transform: none; clip-path: inset(0 0 0 0 round 0); }
.reveal[data-reveal="art"] {
  transform: scale(0.92);
  filter: blur(14px);
  transition: opacity 1.6s var(--ease) 0.2s, transform 2s var(--ease) 0.2s, filter 1.6s var(--ease) 0.2s;
}
.reveal[data-reveal="art"].is-in { transform: none; filter: none; }
.reveal[data-reveal="stagger"] { opacity: 1; transform: none; filter: none; }
.reveal[data-reveal="stagger"] > * {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  filter: blur(6px);
  transition: opacity 0.9s var(--ease), transform 1.1s var(--ease), filter 0.9s var(--ease);
}
.reveal[data-reveal="stagger"].is-in > * { opacity: 1; transform: none; filter: none; }
.reveal[data-reveal="stagger"].is-in > :nth-child(2) { transition-delay: 0.1s; }
.reveal[data-reveal="stagger"].is-in > :nth-child(3) { transition-delay: 0.2s; }
.reveal[data-reveal="stagger"].is-in > :nth-child(4) { transition-delay: 0.3s; }
