/* Shared by every page: tokens, type, nav and mobile menu, buttons, waitlist form, footer.
   home.css adds the landing page, blog.css the blog. */
:root {
  --accent: #7b5cfa;
  --accent-2: #f0559a;
  /* The accent for text and small marks: the brand purple is 4.4:1 on white, this is 6:1. */
  --accent-ink: #6440ee;
  --blue: #3b5cd9;
  --teal: #30b0c7;
  --green: #33bd61;
  --yellow: #f5b500;
  --orange: #ff7a1a;
  --red: #f24038;
  --pink: #ff2e78;
  --purple: #b052de;
  --indigo: #5856d6;

  --bg: #fbf9f6;
  --surface: #ffffff;
  --surface-2: #f3f1f7;
  --text: #16151c;
  --text-2: #55535f;
  --text-3: #6f6c7b;
  --line: rgba(20, 18, 40, 0.09);
  --ink: #1b1530;
  --ink-2: #261e44;
  --on-ink: #f4f2fa;
  --on-ink-2: #c9c3dd;
  --shadow: 0 1px 2px rgba(30, 20, 60, .05), 0 12px 40px -12px rgba(60, 40, 120, .18);
  --shadow-lg: 0 40px 80px -24px rgba(40, 24, 90, .35);
  --glass: rgba(255, 255, 255, 0.66);
  --mesh-a: #ffd9b8;
  --mesh-b: #ffedc7;
  --mesh-c: #dcd6ff;
  --radius: 22px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #9d88ff;
    --accent-ink: #b3a3ff;
    --bg: #0d0c12;
    --surface: #18171f;
    --surface-2: #211f2a;
    --text: #f4f2fa;
    --text-2: #b9b6c6;
    --text-3: #9a97a8;
    --line: rgba(255, 255, 255, 0.09);
    --ink: #1b1530;
    --ink-2: #2a2148;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 50px -16px rgba(0, 0, 0, .6);
    --shadow-lg: 0 40px 80px -24px rgba(0, 0, 0, .7);
    --glass: rgba(30, 28, 40, 0.66);
    --mesh-a: #4a2a2a;
    --mesh-b: #3a2c18;
    --mesh-c: #2b2560;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.025em; line-height: 1.08; margin: 0; }
h2 { font-size: clamp(32px, 4.4vw, 48px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.narrow { max-width: 620px; margin-left: auto; margin-right: auto; }
.muted { color: var(--text-3); }
.grad {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.kicker { font-size: 13px; font-weight: 750; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.lede { color: var(--text-2); font-size: clamp(17px, 1.6vw, 20px); margin-top: 20px; max-width: 560px; }

/* Soft mesh behind the top of the page, like the app's onboarding */
.backdrop {
  position: absolute; inset: 0 0 auto 0; height: 1000px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 50% at 8% 8%, var(--mesh-a) 0%, transparent 70%),
    radial-gradient(45% 45% at 50% 0%, var(--mesh-b) 0%, transparent 70%),
    radial-gradient(45% 55% at 95% 12%, var(--mesh-c) 0%, transparent 70%);
  opacity: .9;
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent);
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1200px; margin: 0 auto; padding: 14px 24px;
}
.nav::before {
  content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1;
  backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  mask-image: linear-gradient(#000 70%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; text-decoration: none; letter-spacing: -0.02em; }
.brand img { border-radius: 7px; box-shadow: 0 4px 12px -4px rgba(123, 92, 250, .5); }
.nav-links { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.nav-links a { text-decoration: none; color: var(--text-2); transition: color .2s; }
.nav-links a:hover, .nav-links a.current { color: var(--text); }
.nav-links a.current { font-weight: 650; }
.nav-end { display: flex; align-items: center; gap: 8px; }

.menu-btn { display: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--glass); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; place-items: center; }
.menu-btn svg { width: 20px; height: 20px; }
.mobile-menu {
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column;
  padding: 14px 16px 32px; background: var(--bg);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu-top { display: flex; justify-content: space-between; align-items: center; }
.mobile-menu nav { display: flex; flex-direction: column; margin-top: 28px; }
.mobile-menu nav a { font-family: var(--font-display); font-size: 30px; font-weight: 750; letter-spacing: -0.02em; text-decoration: none; padding: 12px 4px; border-bottom: 1px solid var(--line); min-height: 44px; }
.mobile-menu .btn { margin-top: auto; width: 100%; min-height: 54px; font-size: 17px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; min-height: 48px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--text); color: var(--bg);
  font: inherit; font-weight: 650; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform .2s, box-shadow .2s, opacity .2s;
  box-shadow: 0 10px 30px -10px rgba(40, 20, 90, .45);
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-small { padding: 9px 18px; min-height: 44px; font-size: 14px; box-shadow: none; }
.btn-ghost { background: var(--glass); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(10px); }

/* Waitlist form (the one primary call to action) */
.waitlist { width: 100%; max-width: 480px; }
.waitlist label { display: block; font-size: 14px; font-weight: 650; color: var(--text-2); margin-bottom: 8px; }
.wl-row { display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.wl-row:focus-within { box-shadow: var(--shadow), inset 0 0 0 2px var(--accent); }
.wl-row input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 16px; padding: 0 14px; min-height: 44px; outline: none;
}
.wl-row input::placeholder { color: var(--text-3); }
.wl-row .btn { box-shadow: none; padding: 12px 22px; }
.wl-note { font-size: 14px; color: var(--text-3); margin-top: 10px; }
.wl-status { font-size: 15px; font-weight: 600; margin-top: 10px; min-height: 1.2em; }
.wl-status:empty { display: none; }
.wl-status.ok { color: #1f8a46; }
.wl-status.err { color: #c62f2f; }
@media (prefers-color-scheme: dark) {
  .wl-status.ok { color: #5fd88a; }
  .wl-status.err { color: #ff8a80; }
}
.waitlist.done .wl-row { opacity: .55; }

/* Footer */
.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-3); }
.footer .brand { font-size: 16px; color: var(--text); }
.footer .brand img { border-radius: 6px; box-shadow: none; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

/* Scroll reveal: only hidden once JS has marked the page, so nothing is lost without it. */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .5s cubic-bezier(.2, .7, .2, 1), transform .5s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); }
.js [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .menu-btn { display: grid; }
}
@media (max-width: 560px) {
  .wrap, .nav { padding-left: 16px; padding-right: 16px; }
  .wl-row { flex-direction: column; border-radius: 22px; padding: 6px; }
  .wl-row input { min-height: 48px; }
  .wl-row .btn { width: 100%; }
}
