:root {
  --accent: #7c6af7;
  --accent-2: color-mix(in srgb, var(--accent) 55%, #ff7ac6);
  --accent-soft: color-mix(in srgb, var(--accent) 18%, transparent);
  --bg: #07060b;
  --card: #110f18;
  --card-2: #161320;
  --text: #f4f2fb;
  --muted: #a39fb5;
  --faint: #6f6b82;
  --line: rgba(255, 255, 255, 0.08);
  --error: #ff8a80;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 22px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Soft colored glow behind the page, plus a fine grain for depth */
body::before {
  content: "";
  position: fixed;
  inset: -20% -20% auto;
  height: 90vh;
  z-index: -2;
  background:
    radial-gradient(40% 50% at 30% 40%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%),
    radial-gradient(35% 45% at 72% 30%, color-mix(in srgb, var(--accent-2) 30%, transparent), transparent 70%);
  filter: blur(40px);
  opacity: 0.8;
  animation: drift 18s ease-in-out infinite alternate;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift { to { transform: translate3d(4%, 6%, 0) scale(1.08); } }

a { color: var(--accent-2); }
main { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* Gradient-edged glass card, used throughout */
.glass {
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03) 40%, var(--accent-soft)) border-box;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

/* Top bar */
.top { max-width: 720px; margin: 0 auto; padding: 20px 20px 0; }
.brand { color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; letter-spacing: 0.01em; }
.brand span { color: var(--faint); font-weight: 500; }

/* Hero */
.hero { text-align: center; padding: 56px 0 8px; }
.hero .logo {
  width: 76px; height: 76px; margin: 0 auto 22px;
  display: grid; place-items: center; font-size: 38px;
  background: linear-gradient(160deg, var(--card-2), var(--card));
  border: 1px solid var(--line); border-radius: 24px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.02), 0 20px 50px -10px color-mix(in srgb, var(--accent) 55%, transparent);
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 22px; padding: 6px 14px 6px 12px;
  font-size: 13px; font-weight: 500; color: var(--muted);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: 999px;
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
.wordmark {
  margin: 0 0 6px; font-size: 15px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent-2);
}
.hero h1, .home h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(42px, 11vw, 72px); line-height: 1.02; letter-spacing: -0.015em;
  margin: 0 0 20px;
}
h1 em {
  font-style: italic;
  background: linear-gradient(100deg, var(--accent-2), #c9bfff 50%, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: 0.05em;
}
.lede { color: var(--muted); font-size: 17px; line-height: 1.65; margin: 0 auto 30px; max-width: 33em; }
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.meta { margin: 0; font-size: 13px; color: var(--faint); }

/* Buttons */
.btn, .signup button, .float-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 28px; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 16px/1 var(--sans); color: #fff; text-decoration: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 85%, #fff), var(--accent) 45%, color-mix(in srgb, var(--accent) 70%, #000));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 10px 30px -6px color-mix(in srgb, var(--accent) 70%, transparent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover, .signup button:hover, .float-cta:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 14px 36px -6px color-mix(in srgb, var(--accent) 85%, transparent); }
.btn span, .float-cta .arrow { transition: transform 0.2s ease; }
.btn:hover span, .float-cta:hover .arrow { transform: translateX(3px); }

/* Dialogue preview, framed as an app window */
.demo { margin: 64px 0 0; overflow: hidden; }
.demo { background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(160deg, rgba(255,255,255,.18), rgba(255,255,255,.03) 45%, var(--accent-soft)) border-box; border: 1px solid transparent; border-radius: var(--radius); box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--accent) 45%, transparent); }
.window-bar {
  display: flex; align-items: center; gap: 7px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.02);
}
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.window-bar span { margin-left: auto; font-size: 12px; color: var(--faint); }
.demo-body { padding: 22px 18px 20px; }
.kicker { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-2); }
.demo h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.2; margin: 8px 0 20px; }
.chat { display: flex; flex-direction: column; gap: 12px; }
.line { display: flex; gap: 10px; align-items: flex-end; max-width: 90%; }
.line.right { flex-direction: row-reverse; align-self: flex-end; }
.avatar {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center; font-size: 17px;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 50%;
}
.bubble { padding: 11px 15px; border-radius: 18px; background: var(--card-2); border: 1px solid var(--line); }
.line.left .bubble { border-bottom-left-radius: 5px; }
.line.right .bubble {
  border-bottom-right-radius: 5px; border-color: transparent;
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 38%, var(--card-2)), color-mix(in srgb, var(--accent) 20%, var(--card-2)));
}
.bubble b { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-2); }
.line.right .bubble b { color: #ddd6ff; }
.bubble p { margin: 3px 0 0; font-size: 15px; line-height: 1.5; }
.demo-note { margin: 18px 0 0; font-size: 13px; color: var(--faint); text-align: center; }

/* Highlights */
.highlights ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
@media (min-width: 680px) { .highlights ul { grid-template-columns: repeat(3, 1fr); } }
.highlights li {
  padding: 20px;
  background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.03) 50%) border-box;
  border: 1px solid transparent; border-radius: var(--radius);
}
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.highlights .icon {
  width: 42px; height: 42px; display: grid; place-items: center; font-size: 21px;
  background: var(--accent-soft); border-radius: 13px;
}
.num { font-size: 12px; font-weight: 600; color: var(--faint); letter-spacing: 0.08em; }
.highlights h3 { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.highlights p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55; }

/* Signup */
.join { margin: 64px 0 0; scroll-margin-top: 20px; position: relative; }
.join::before {
  content: ""; position: absolute; inset: 10% 5% -5%; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 40%, transparent), transparent);
  filter: blur(30px);
}
.signup, .done {
  padding: 30px 22px;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(150deg, var(--accent-2), rgba(255, 255, 255, 0.06) 45%, var(--accent)) border-box;
  border: 1px solid transparent; border-radius: 26px;
}
.signup h2, .done h2 { font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.1; margin: 0 0 6px; }
.sub { margin: 0 0 22px; color: var(--muted); font-size: 15px; }
.signup label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 14px; letter-spacing: 0.01em; }
.signup label small { color: var(--faint); font-weight: 400; }
.signup input {
  display: block; width: 100%; margin-top: 7px; padding: 15px 16px;
  font: 400 16px var(--sans); color: var(--text);
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.signup input::placeholder { color: var(--faint); }
.signup input:focus {
  outline: none; background: rgba(255, 255, 255, 0.05); border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}
.or { display: flex; align-items: center; gap: 12px; margin: -4px 0 10px; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup button { width: 100%; margin-top: 8px; padding: 17px; font-size: 17px; border-radius: 14px; }
.signup button:disabled { opacity: 0.7; cursor: progress; transform: none; }
.status { min-height: 1.4em; margin: 12px 0 0; font-size: 14px; text-align: center; }
.status.error { color: var(--error); }
.fine { margin: 2px 0 0; font-size: 12px; color: var(--faint); text-align: center; }
.done { text-align: center; }
.check {
  width: 60px; height: 60px; margin: 0 auto 14px; display: grid; place-items: center;
  font-size: 28px; font-weight: 700; color: #fff; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 12px 30px -8px color-mix(in srgb, var(--accent) 80%, transparent);
}
.done-text { margin: 6px 0 0; color: var(--muted); }
.position { margin: 12px 0 0; font-weight: 600; color: var(--accent-2); }
.launch {
  display: block; margin: 0 0 14px; padding: 14px; text-align: center; font-weight: 600;
  border-radius: 14px; background: var(--accent-soft); color: var(--text); text-decoration: none;
}

/* Floating "Get early access" button */
.float-cta {
  position: fixed; z-index: 50;
  left: 16px; right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  padding: 17px 24px; font-size: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 12px 40px -6px color-mix(in srgb, var(--accent) 80%, transparent),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  opacity: 0; transform: translateY(140%); pointer-events: none;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.float-cta.show { opacity: 1; transform: none; pointer-events: auto; }
@media (min-width: 720px) {
  .float-cta { left: auto; right: 28px; bottom: 28px; padding: 15px 24px; }
}

/* Home */
.home { padding-top: 64px; }
.home h1 { font-size: clamp(40px, 10vw, 64px); }
.home .lede { margin: 0 0 30px; }
.projects { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.projects a {
  display: flex; align-items: center; gap: 16px; padding: 18px;
  color: var(--text); text-decoration: none;
  background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(150deg, rgba(255,255,255,.14), rgba(255,255,255,.03) 50%, var(--accent-soft)) border-box;
  border: 1px solid transparent; border-radius: var(--radius);
  transition: transform 0.2s ease;
}
.projects a:hover { transform: translateY(-2px); }
.projects .logo {
  flex: none; width: 54px; height: 54px; display: grid; place-items: center; font-size: 28px;
  background: var(--accent-soft); border-radius: 17px;
}
.projects b { display: block; font-size: 18px; font-weight: 600; }
.projects em { display: block; font-style: normal; color: var(--muted); font-size: 14px; line-height: 1.45; }
.projects small { display: inline-block; margin-top: 5px; font-size: 12px; font-weight: 500; color: var(--accent-2); }
.projects i { margin-left: auto; font-style: normal; color: var(--faint); }
.projects .empty { color: var(--muted); }

.foot { max-width: 720px; margin: 0 auto; padding: 56px 20px 110px; text-align: center; font-size: 13px; color: var(--faint); }
.foot p { margin: 3px 0; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }

/* Entrance motion (only when JS runs, so content never stays hidden) */
.js .hero > * { animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.js .hero > :nth-child(2) { animation-delay: 0.06s; }
.js .hero > :nth-child(3) { animation-delay: 0.12s; }
.js .hero > :nth-child(4) { animation-delay: 0.18s; }
.js .hero > :nth-child(5) { animation-delay: 0.24s; }
.js .hero > :nth-child(6) { animation-delay: 0.3s; }
.reveal-ready .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal-ready .reveal.in { opacity: 1; transform: none; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before, .pulse, .js .hero > * { animation: none; }
  .reveal-ready .reveal { opacity: 1; transform: none; transition: none; }
  .float-cta { transition: opacity 0.2s; transform: none; }
}
