:root {
  --bg: #030604;
  --text: #eef1ff;
  --muted: #a3aac4;
  --accent: #3d57ff;
  --accent-hover: #5670ff;
  --highlight: #9bb4fd;
  --success: #22c76a;
  --success-hover: #36d87c;
  --success-soft: #a7f3c4;
  --font: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.nav-wrap {
  position: relative; z-index: 2;
  pointer-events: none; /* its items slide away; don't block clicks on what's beneath */
  max-width: 1200px; margin: 0 auto; padding: 0 32px;
}
.nav {
  height: 76px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; letter-spacing: -0.03em; }
.brand img { display: block; }

.nav-actions { display: flex; align-items: center; gap: 6px; }
.nav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 38px; padding: 0 16px;
  border: 0; border-radius: 10px;
  background: transparent; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 500; letter-spacing: -0.01em;
  transition: color .2s, background-color .2s;
}
.nav-btn--ghost { color: var(--muted); }
.nav-btn--ghost:hover { color: var(--text); background: rgba(155, 180, 253, .08); }
.nav-btn--primary {
  color: #fff; background: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 6px 18px -8px rgba(61, 87, 255, .7);
}
.nav-btn--primary:hover { background: var(--accent-hover); }
.nav-btn:focus-visible { outline: 2px solid var(--highlight); outline-offset: 2px; }

/* Content sits in the open sky above the range (the highest peaks reach ~58% down) */
.hero-content {
  position: relative; z-index: 1;
  max-width: 760px; margin: 0 auto; padding: 0 24px;
  padding-top: max(32px, calc(17svh - 76px));
  text-align: center;
  pointer-events: none;
}
.hero-content a { pointer-events: auto; }

h1 {
  margin: 0;
  font-size: clamp(40px, 6.4vw, 76px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.045em;
}
.lede {
  max-width: 540px; margin: 22px auto 0;
  font-size: 18px; line-height: 1.6; color: var(--muted);
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }

/* ---------- Primary button ----------
   Adapted from the RainbowButton: an animated gradient border that's brightest along
   the bottom edge, with a soft glow underneath — in our blues instead of a rainbow. */
.glow-btn {
  --b1: #26359e;
  --b2: #3d57ff;
  --b3: #b4c6ff;

  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  height: 50px; padding: 0 32px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  color: #fff; font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  background:
    linear-gradient(180deg, #07080f, #030406) padding-box,
    /* Plain outline on the top half that fades into the shimmer on the bottom half */
    linear-gradient(#1b2036 0%, #1b2036 35%, rgba(27,32,54,0) 70%) border-box,
    linear-gradient(90deg, var(--b1), var(--b2), var(--b3), var(--b2), var(--b1)) border-box;
  background-size: 100% 100%, 100% 100%, 200% 100%;
  /* Subtle glow as a shadow, so it can never render inside the button */
  box-shadow: 0 6px 22px -10px rgba(61, 87, 255, .45);
  animation: glow-sweep 4s linear infinite;
  transition: transform .2s ease, box-shadow .2s ease;
}
.glow-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 26px -10px rgba(61, 87, 255, .6);
}
.glow-btn:focus-visible { outline: 2px solid var(--b3); outline-offset: 4px; }

@keyframes glow-sweep {
  to { background-position: 0 0, 0 0, -200% 0; }
}

/* ---------- View transitions ----------
   Only the foreground slides; the ridge canvas never moves. Each .slide sits at
   left / center / right, and main.js moves whole panels between those spots. */
.slide {
  --dur: .85s;
  --ease: cubic-bezier(.65, 0, .25, 1);
  transition: transform var(--dur) var(--ease) var(--d, 0ms), visibility 0s linear 0s;
}
.slide[data-pos="left"]  { transform: translateX(-100vw); }
.slide[data-pos="right"] { transform: translateX(100vw); }
.slide[data-pos="left"], .slide[data-pos="right"] {
  visibility: hidden;
  /* Stay visible until the slide finishes, then drop out of the tab order */
  transition: transform var(--dur) var(--ease) var(--d, 0ms), visibility 0s linear calc(var(--dur) + var(--d, 0ms));
}
.slide.no-anim { transition: none !important; }

/* ---------- Auth views ----------
   Modeled on Linear / Vercel sign-in: no boxed card, just a narrow centered column
   with the mark, a plain heading, flat full-width controls and quiet fine print. */
.auth-layer {
  position: absolute; inset: 0; z-index: 1;
  display: grid;
  pointer-events: none;
}
.auth-view {
  --d: 90ms;
  grid-area: 1 / 1;
  position: relative;
  display: flex; justify-content: center;
  padding: max(72px, 10svh) 24px 32px;
}
.auth-view > * { pointer-events: auto; }

/* Sits where the brand was, so the top-left corner never goes empty */
.auth-back {
  position: absolute; top: 19px; left: max(20px, calc((100vw - 1200px) / 2 + 20px));
  z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  height: 38px; padding: 0 12px 0 8px;
  border: 0; border-radius: 10px;
  background: transparent;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--muted);
  cursor: pointer;
  pointer-events: auto;
}
/* Keep the slide transition from .slide and add the hover fades on top */
.auth-back[data-pos="center"] {
  transition: transform var(--dur) var(--ease) var(--d, 0ms), visibility 0s, color .2s, background-color .2s;
}
.auth-back:hover { color: var(--text); background: rgba(155, 180, 253, .08); }
.auth-back:focus-visible { outline: 2px solid var(--highlight); outline-offset: 2px; }

.auth-col {
  position: relative; isolation: isolate;
  width: min(340px, 100%);
  display: flex; flex-direction: column; align-items: stretch;
  text-align: center;
}
.auth-mark { display: block; margin: 0 auto 22px; }
.auth-col h2 {
  margin: 0;
  font-size: 22px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.3;
}
.auth-sub {
  margin: 10px auto 0; max-width: 310px;
  font-size: 14px; line-height: 1.55; color: var(--muted);
}

.auth-stack, .auth-form, .auth-fields { display: grid; gap: 10px; }
.auth-stack { margin-top: 28px; }
.auth-form { margin-top: 24px; }

.auth-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 44px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 10px;
  font: inherit; font-size: 14px; font-weight: 500; letter-spacing: -0.005em;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.auth-btn svg { flex: none; }
.auth-btn--primary { color: #fff; background: var(--accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16); }
.auth-btn--primary:hover { background: var(--accent-hover); }
.auth-btn--secondary { color: var(--text); background: #0b0d16; border-color: #1e2335; }
.auth-btn--secondary:hover { background: #111422; border-color: #2a3050; }
.auth-btn--ghost { color: var(--muted); background: transparent; }
.auth-btn--ghost:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.auth-btn:focus-visible { outline: 2px solid var(--highlight); outline-offset: 2px; }

.auth-input {
  width: 100%; height: 44px; padding: 0 14px;
  border: 1px solid #1e2335; border-radius: 10px;
  background: #07080f;
  color: var(--text); font: inherit; font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.auth-input::placeholder { color: #6b7290; }
.auth-input:hover { border-color: #2a3050; }
.auth-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(61, 87, 255, .2); }
.auth-form .auth-btn, .auth-fields .auth-btn { margin-top: 4px; }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0;
  font-size: 12px; color: #6b7290; text-transform: uppercase; letter-spacing: .08em;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: #1a1e2e; }

.auth-forgot { align-self: center; margin-top: 16px; font-size: 13px; color: var(--muted); transition: color .15s; }
.auth-forgot:hover { color: var(--text); }
.auth-fine { margin: 14px 0 0; font-size: 12px; line-height: 1.5; color: #6b7290; }
/* Form feedback reuses the fine-print line; it brightens while it carries a message */
.auth-status:empty { display: none; }
.auth-status[data-active="true"] { color: var(--text); }

.auth-switch { margin: 28px 0 0; font-size: 14px; color: var(--muted); }
.auth-fine + .auth-switch { margin-top: 14px; }
.auth-switch a { color: var(--text); font-weight: 500; transition: color .15s; }
.auth-switch a:hover { color: var(--highlight); }

/* ---------- Waitlist success (the range turns green behind it) ---------- */
.auth-check { margin: 0 auto 20px; width: 52px; height: 52px; }
.auth-check-ring { stroke: var(--success); opacity: .35; }
.auth-check-tick {
  stroke: var(--success);
  stroke-dasharray: 32; stroke-dashoffset: 32;
}
[data-panel="joined"][data-pos="center"] .auth-check-tick {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset .5s cubic-bezier(.65, 0, .35, 1) .75s;
}
.joined-email { color: var(--text); font-weight: 500; word-break: break-all; }

.auth-offer {
  display: grid; gap: 10px;
  margin-top: 28px; padding-top: 24px;
  border-top: 1px solid #1a1e2e;
}
.auth-offer-title { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.auth-offer-text { margin: 0 0 8px; font-size: 14px; line-height: 1.55; color: var(--muted); }
[data-panel="joined"] .auth-btn--primary { background: var(--success); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); color: #03140a; font-weight: 600; }
[data-panel="joined"] .auth-btn--primary:hover { background: var(--success-hover); }
[data-panel="joined"] .auth-btn:focus-visible { outline-color: var(--success-soft); }

/* ---------- Signed-in dashboard ----------
   The farthest ridge can peak at ~55% of the canvas height (uTop .56 + .26 - .17 * 1.6 in
   arc.js). The card shows everything (no inner scroll), so it's kept compact: at laptop
   heights (~750px+) it ends above 52% of the viewport, clear of the range. */
.dash-view { --dash-top: max(88px, 12svh); padding-top: var(--dash-top); }
.dash-top {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(1200px, 100%); height: 76px; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 3; /* keep the account menu above the card */
}

/* Account menu (Vercel / Linear style): one trigger holding avatar + email, Sign out inside */
.dash-account { position: relative; }
.dash-account-btn {
  display: inline-flex; align-items: center; gap: 10px;
  max-width: 280px; height: 38px; padding: 0 10px 0 5px;
  border: 1px solid #1e2335; border-radius: 10px;
  background: rgba(8, 10, 17, .9);
  color: var(--text); font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.dash-account-btn:hover, .dash-account[data-open="true"] .dash-account-btn { border-color: #2a3050; background: #0d1019; }
.dash-account-btn:focus-visible { outline: 2px solid var(--highlight); outline-offset: 2px; }
.dash-avatar {
  flex: none; display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 7px;
  background: #1a2140; color: var(--highlight);
  font-size: 12px; font-weight: 600;
}
.dash-account-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-chevron { flex: none; color: var(--muted); transition: transform .15s; }
.dash-account[data-open="true"] .dash-chevron { transform: rotate(180deg); }

.dash-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  width: 248px; padding: 4px;
  border: 1px solid #1e2335; border-radius: 12px;
  background: #0a0c14;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .8);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .12s, transform .12s, visibility 0s linear .12s;
}
.dash-account[data-open="true"] .dash-menu {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .12s, transform .12s;
}
.dash-menu-head { padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid #1a1e2e; }
.dash-menu-head p { margin: 0; font-size: 12px; color: #6b7290; }
.dash-menu-head .dash-email {
  margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; font-weight: 500; color: var(--text);
}
.dash-menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; height: 34px; padding: 0 10px;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 500; text-align: left;
  cursor: pointer; transition: color .15s, background-color .15s;
}
.dash-menu-item:hover, .dash-menu-item:focus-visible { outline: none; color: var(--text); background: rgba(155, 180, 253, .08); }

.dash-card {
  align-self: flex-start;
  width: min(900px, 100%);
  border: 1px solid #181c2b; border-radius: 18px;
  background: rgba(6, 8, 13, .94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03), 0 24px 60px -30px rgba(0, 0, 0, .9);
  text-align: left;
}

/* Status header, modeled on Stripe / Vercel summary rows: quiet label, the status as the headline */
.dash-release {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #151927;
}
.dash-open { flex: none; width: auto; }
.dash-label {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: 13px; font-weight: 500; color: var(--muted);
}
.dash-badge {
  display: inline-flex; align-items: center;
  height: 20px; padding: 0 7px;
  border: 1px solid #242a40; border-radius: 6px;
  font-size: 11px; font-weight: 500; line-height: 1; color: var(--muted);
}
.dash-status { margin: 4px 0 0; font-size: 24px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.25; }

.dash-features { padding: 18px 24px 22px; }
.dash-features h3 {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: 13px; font-weight: 500; color: var(--muted);
}
.dash-count {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 5px;
  background: #151a2a; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums;
}
/* One bordered grid with hairline dividers (the gap shows the border colour through) */
.dash-features ul {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  margin: 12px 0 0; padding: 0; list-style: none;
  border: 1px solid #1a1e2e; border-radius: 12px; overflow: hidden;
  background: #1a1e2e;
}
.dash-features li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: #080a12;
}
.dash-icon { flex: none; display: grid; place-items: center; width: 18px; height: 20px; color: var(--muted); }
.dash-features li p { margin: 2px 0 0; font-size: 13px; line-height: 1.45; color: #6b7290; }
.dash-features li .dash-feature-title {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 0;
  font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--text);
}

/* Short laptop windows: drop the one-line descriptions so the card still clears the range */
@media (max-height: 780px) and (min-width: 721px) {
  .dash-view { --dash-top: 80px; }
  .dash-release { padding-top: 14px; padding-bottom: 14px; }
  .dash-status { font-size: 22px; }
  .dash-features { padding-top: 14px; padding-bottom: 16px; }
  .dash-features li { align-items: center; padding: 11px 14px; }
  .dash-features li p:not(.dash-feature-title) { display: none; }
}

@media (max-width: 720px) {
  .dash-features ul { grid-template-columns: 1fr; }
  .dash-account-label { display: none; }
}
@media (max-width: 640px) {
  .dash-top { padding: 0 16px; }
  .dash-release, .dash-features { padding-left: 18px; padding-right: 18px; }
  .auth-view { padding: 76px 16px 24px; }
  .dash-view { padding-top: var(--dash-top); }
  .auth-back { top: 19px; left: 8px; }
  .nav-wrap { padding: 0 16px; }
  .brand { font-size: 16px; }
  .nav-btn { height: 36px; padding: 0 12px; }
  .hero-content { padding: 0 16px; padding-top: 48px; }
  .lede { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .glow-btn { animation: none; }
}
