/* Cyclops: light theme with faded blurple. White-ish lavender surfaces, deep indigo text, a
   blurple brand colour (the dashboard's brand hue, 277) and a blue → blurple → violet gradient
   for emphasis. Tokens first; keep new colours here. */
:root {
  color-scheme: light;
  --background: oklch(98.7% 0.006 280);
  --background-deep: oklch(96.4% 0.016 280);
  --foreground: oklch(23% 0.07 278);
  --card: oklch(100% 0 0);
  --muted: oklch(95% 0.02 280);
  --muted-foreground: oklch(47% 0.045 278);
  --border: oklch(50% 0.12 278 / 0.13);
  --input: oklch(50% 0.12 278 / 0.24);
  --blue: oklch(58% 0.17 255);
  --brand: oklch(52% 0.21 277);
  --violet: oklch(56% 0.2 302);
  --pass: oklch(56% 0.14 155);
  --brand-strong: oklch(55% 0.22 277);
  --brand-muted: oklch(55% 0.2 277 / 0.09);
  --brand-foreground: oklch(100% 0 0);
  --ring: oklch(55% 0.22 277 / 0.4);
  --gradient: linear-gradient(100deg, var(--blue), var(--brand) 50%, var(--violet));
  --critical: oklch(56% 0.2 25);
  --high: oklch(58% 0.13 65);
  --radius: 0.625rem;
  --max: 72rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after { box-sizing: border-box; border-color: var(--border); }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--background);
  color: var(--foreground);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; }
p { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }

.grad-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 50;
  background: var(--brand-strong);
  color: var(--brand-foreground);
  padding: 8px 12px;
  border-radius: 8px;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font: 500 14px/1 var(--font);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s, box-shadow 0.15s;
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }

.btn-primary {
  background: linear-gradient(100deg, oklch(58% 0.2 262), var(--brand-strong) 50%, oklch(56% 0.22 292));
  color: var(--brand-foreground);
  box-shadow: 0 6px 20px -6px oklch(55% 0.22 277 / 0.55);
}
.btn-primary:hover { opacity: 0.92; box-shadow: 0 8px 26px -6px oklch(55% 0.22 277 / 0.65); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }

.btn-outline { background: oklch(100% 0 0 / 0.8); border-color: var(--input); color: var(--foreground); }
.btn-outline:hover { background: var(--muted); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: oklch(98.7% 0.006 280 / 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}
.site-header .btn { margin-left: auto; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-decoration: none;
}
.brand img { width: 30px; height: 30px; display: block; }

.nav { display: flex; gap: 24px; font-size: 14px; }
.nav a { color: var(--muted-foreground); text-decoration: none; transition: color 0.15s; }
.nav a:hover { color: var(--foreground); }

/* ---------- Sections ---------- */

main > section { border-top: 1px solid var(--border); scroll-margin-top: 80px; }
main > section:first-child { border-top: 0; }
.section { padding: 96px 0; }

.label { font: 500 13px var(--mono); letter-spacing: 0.02em; color: var(--brand); }
.section-title {
  margin-top: 12px;
  max-width: 38rem;
  font-size: 32px;
  line-height: 1.2;
  text-wrap: balance;
}
.section-lede {
  margin-top: 16px;
  max-width: 42rem;
  font-size: 18px;
  color: var(--muted-foreground);
  line-height: 1.65;
}

/* ---------- Hero ---------- */

#hero {
  position: relative;
  /* clip, not hidden: a hidden box can still be scrolled sideways by focus or scrollIntoView. */
  overflow: clip;
  background:
    radial-gradient(60rem 30rem at 15% -10%, oklch(72% 0.14 268 / 0.28), transparent 70%),
    radial-gradient(50rem 30rem at 90% 10%, oklch(78% 0.11 305 / 0.24), transparent 70%),
    linear-gradient(var(--background-deep), var(--background));
}

/* Sonar: concentric rings with a slow sweep, centred on the mascot's eye. */
.sonar {
  --eye-y: 142px;
  position: absolute;
  left: 50%;
  top: calc(var(--eye-y) - 640px);
  width: 1280px;
  height: 1280px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 79px, oklch(55% 0.2 277 / 0.11) 80px 81px);
  -webkit-mask: radial-gradient(circle, #000 25%, transparent 68%);
  mask: radial-gradient(circle, #000 25%, transparent 68%);
  pointer-events: none;
}
.sonar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 290deg, oklch(55% 0.2 277 / 0.1) 360deg);
  animation: sweep 10s linear infinite;
}
@keyframes sweep { to { transform: rotate(360deg); } }

#hero .container { position: relative; padding-top: 104px; padding-bottom: 104px; text-align: center; }

/* The mascot: script.js points its iris at the cursor; it blinks every few seconds. */
.mascot {
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  filter: drop-shadow(0 10px 22px oklch(55% 0.22 277 / 0.35));
  animation: bob 5s ease-in-out infinite;
}
.mascot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.mascot .pupil {
  transform-box: fill-box;
  transform-origin: center;
  animation: eye-blink 6s infinite;
}
.mascot .iris { transition: transform 0.25s ease-out; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes eye-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.08); }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: oklch(100% 0 0 / 0.8);
  font-size: 12px;
  color: var(--muted-foreground);
}
.pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pass);
  box-shadow: 0 0 0 3px oklch(56% 0.14 155 / 0.2);
}

h1 {
  margin: 24px auto 0;
  max-width: 52rem;
  font-size: clamp(38px, 6.4vw, 66px);
  line-height: 1.04;
  text-wrap: balance;
}

.lede {
  margin: 24px auto 0;
  max-width: 44rem;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.assurances {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin: 20px 0 0;
  padding: 0;
  font-size: 14px;
  color: var(--muted-foreground);
}
.assurances li { display: inline-flex; align-items: center; gap: 6px; }
.assurances svg { width: 16px; height: 16px; color: var(--pass); }

/* ---------- Demo window ---------- */

.demo {
  max-width: 60rem;
  margin: 72px auto 0;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow:
    0 30px 60px -20px oklch(35% 0.15 277 / 0.28),
    0 0 0 1px oklch(50% 0.12 278 / 0.04),
    0 0 90px -25px oklch(60% 0.2 277 / 0.35);
  overflow: hidden;
}

.demo-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font: 13px var(--mono);
  color: var(--muted-foreground);
}
.demo-dots { display: flex; gap: 6px; }
.demo-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.demo-tag {
  margin-left: auto;
  font: 500 11px var(--font);
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.demo-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
  padding: 20px;
  font-size: 14px;
  line-height: 1.6;
}

/* Replay: a sketch of the app under test, with the agent's focus moving across it. */

.replay {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background-deep);
}
.replay-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 12px var(--mono);
  color: var(--muted-foreground);
}
.rec { display: inline-flex; align-items: center; gap: 6px; color: var(--foreground); }
.rec i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--critical);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.3; } }
.url {
  flex: 1;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewport {
  position: relative;
  aspect-ratio: 16 / 9;
  padding: 12px;
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--border);
  overflow: hidden;
}
.viewport i {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: oklch(50% 0.08 278 / 0.13);
}
.vp-nav { display: flex; align-items: center; gap: 10px; }
.vp-nav b { width: 18px; height: 18px; border-radius: 5px; background: var(--gradient); }
.vp-nav i { width: 36px; }
.vp-nav i:first-of-type { margin-left: auto; }
.vp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
.vp-card { display: grid; gap: 8px; }
.vp-img {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  background: linear-gradient(135deg, oklch(82% 0.09 262), oklch(85% 0.08 305));
}
.vp-card i.short { width: 55%; }
.vp-form { display: grid; gap: 6px; align-content: start; }
.vp-form i { width: 40%; height: 5px; }
.vp-input {
  height: 18px;
  border: 1px solid oklch(50% 0.08 278 / 0.22);
  border-radius: 4px;
}
.vp-button {
  margin-top: 6px;
  height: 22px;
  border-radius: 4px;
  background: var(--brand-strong);
  color: var(--brand-foreground);
  font: 600 10px/22px var(--font);
  text-align: center;
}

/* script.js moves the focus box and cursor from element to element; CSS animates the move. */
.focus-box,
.cursor {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1), width 0.7s cubic-bezier(0.65, 0, 0.35, 1), height 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}
.focus-box {
  width: 0;
  height: 0;
  border: 1.5px solid var(--brand);
  border-radius: 6px;
  box-shadow: 0 0 0 4px oklch(72% 0.17 277 / 0.15), 0 0 18px oklch(72% 0.17 277 / 0.35);
}
.cursor {
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--foreground);
  box-shadow: 0 0 0 4px oklch(23% 0.07 278 / 0.14);
}

.timeline { display: grid; gap: 4px; }
.track {
  position: relative;
  height: 22px;
  border-radius: 6px;
  background: var(--muted);
}
.clip {
  position: absolute;
  top: 3px;
  bottom: 3px;
  padding: 0 6px;
  border-radius: 4px;
  background: oklch(55% 0.2 277 / 0.13);
  font: 500 10px/16px var(--font);
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.2s, box-shadow 0.2s;
}
.clip.lit {
  background: var(--brand-strong);
  color: var(--brand-foreground);
  box-shadow: 0 4px 12px oklch(55% 0.22 277 / 0.4);
}
.times {
  display: flex;
  justify-content: space-between;
  font: 11px var(--mono);
  color: var(--muted-foreground);
}

/* Suggested tests */

.suggestions { display: flex; flex-direction: column; }
.who {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font: 500 12px var(--mono);
  color: var(--muted-foreground);
}
.who.agent { color: var(--brand); }

.tests {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.tests li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  cursor: default;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.tests li:hover,
.tests li:focus-visible { outline: none; border-color: oklch(72% 0.17 277 / 0.45); background: var(--brand-muted); }
.t-name { flex: 1; }
.prio {
  flex: none;
  padding: 1px 8px;
  border-radius: 999px;
  font: 500 11px var(--mono);
  border: 1px solid currentColor;
}
.prio.critical { color: var(--critical); }
.prio.high { color: var(--high); }
.prio.medium { color: var(--muted-foreground); }

.step-state {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--input);
  transition: background 0.2s, border-color 0.2s;
}
.tests li.active .step-state {
  border-color: var(--brand);
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}
.tests li.done { color: var(--muted-foreground); }
.tests li.done .step-state {
  border-color: var(--pass);
  background: var(--pass) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.2 2.3 2.3 4.7-4.9' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
@keyframes spin { to { transform: rotate(360deg); } }

.plan-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.run-status { font-size: 13px; color: var(--muted-foreground); }
.run-status.running { color: var(--foreground); }
.run-status.complete { color: var(--pass); }

.result {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid oklch(56% 0.14 155 / 0.3);
  background: oklch(56% 0.14 155 / 0.1);
}

/* ---------- Steps ---------- */

.steps {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--card), oklch(97.5% 0.012 280));
}
.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid oklch(72% 0.17 277 / 0.35);
  border-radius: 50%;
  background: var(--brand-muted);
  font: 14px var(--mono);
  color: var(--brand);
}
.step h3 { margin-top: 20px; font-size: 16px; font-weight: 500; letter-spacing: 0; }
.step p { margin-top: 8px; font-size: 14px; line-height: 1.65; color: var(--muted-foreground); }

/* ---------- Trust ---------- */

#trust {
  background: radial-gradient(50rem 24rem at 85% 0%, oklch(80% 0.1 300 / 0.22), transparent 70%);
}
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--border);
  overflow: hidden;
}
.principle { padding: 28px; background: var(--background); }
.principle svg {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 8px;
  background: var(--brand-muted);
  color: var(--brand);
}
.principle h3 { margin-top: 16px; font-size: 16px; font-weight: 500; letter-spacing: 0; }
.principle p { margin-top: 8px; font-size: 14px; line-height: 1.65; color: var(--muted-foreground); }

.works-with {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 32px 0 0;
  padding: 0;
  font-size: 14px;
  color: var(--muted-foreground);
}
.works-with::before { content: "Works with"; margin-right: 6px; font: 500 13px var(--mono); color: var(--brand); }
.works-with li {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
}

/* ---------- Statement ---------- */

#statement { background: linear-gradient(var(--background), var(--background-deep)); }
.statement {
  margin: 0 auto;
  max-width: 48rem;
  text-align: center;
  font-size: clamp(26px, 3.8vw, 40px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-wrap: balance;
}

/* ---------- Early access ---------- */

#access {
  background:
    radial-gradient(40rem 24rem at 0% 100%, oklch(74% 0.13 268 / 0.3), transparent 70%),
    radial-gradient(40rem 24rem at 100% 100%, oklch(80% 0.1 305 / 0.26), transparent 70%),
    var(--background-deep);
}
.waitlist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.form-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 24px 50px -24px oklch(35% 0.15 277 / 0.3);
}
.card-title { margin-top: 32px; font-weight: 500; }
.checklist {
  list-style: none;
  display: grid;
  gap: 10px;
  margin: 16px 0 24px;
  padding: 0;
  font-size: 14px;
  color: var(--muted-foreground);
}
.checklist li { display: flex; gap: 10px; }
.checklist li::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--brand-muted) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.2 2.3 2.3 4.7-4.9' fill='none' stroke='%235865f2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
/* The early-access form is an embedded Typeform (fnBhKlFm); it paints its own white background. */
.typeform { padding: 0; overflow: hidden; }
.typeform [data-tf-widget] { width: 100%; height: 560px; }
.typeform noscript .btn { margin: 24px; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--border); background: var(--background-deep); }
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 40px;
  padding-bottom: 40px;
  font-size: 14px;
  color: var(--muted-foreground);
}
.site-footer .brand { color: var(--foreground); }

/* ---------- 404 ---------- */

.not-found {
  min-height: 80vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
}
.not-found h1 { margin: 0; }
.not-found p { color: var(--muted-foreground); }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .demo-body { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .principles { grid-template-columns: repeat(2, 1fr); }
  .waitlist { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .nav { display: none; }
  .section { padding: 72px 0; }
  .section-title { font-size: 26px; }
  #hero .container { padding-top: 64px; padding-bottom: 72px; }
  .sonar { --eye-y: 102px; }
  .demo { margin-top: 48px; }
  .demo-body { padding: 12px; }
  .demo-head span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .viewport { aspect-ratio: 4 / 3; }
  .steps, .principles { grid-template-columns: 1fr; }
  .tests li { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sonar::after, .rec i, .tests li.active .step-state, .mascot, .mascot .pupil { animation: none; }
  .btn, .tests li, .step-state, .clip, .focus-box, .cursor, .mascot .iris { transition: none; }
}
