/* Savio AI — site styles. Same token vocabulary as the extension. */

:root {
  --bg-primary: #07080C;
  --bg-secondary: #0B0D14;
  --card-bg: #0F111A;
  --border-subtle: #1A1C24;
  --border-strong: #232633;

  --violet-primary: #6E5BFF;
  --violet-glow: #9F7BFF;
  --core-light: #E9E4FF;

  --text-primary: #EDEFF5;
  --text-secondary: #A1A6B3;
  --text-tertiary: #6B6F7C;

  --success: #4ADE80;
  --danger: #FF6B7A;

  --gradient: linear-gradient(135deg, #6E5BFF 0%, #9F7BFF 100%);
  --shadow-glow: 0 0 0 1px rgba(159,123,255,0.32), 0 18px 60px rgba(110,91,255,0.28);

  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  --maxw: 1140px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--violet-glow); text-decoration: none; }
a:hover { color: var(--core-light); }

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

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

/* ── Background glow ─────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: -20vh -20vw auto auto;
  width: 90vw;
  height: 90vh;
  background: radial-gradient(closest-side, rgba(110,91,255,0.18), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  bottom: -30vh;
  left: -20vw;
  width: 80vw;
  height: 80vh;
  background: radial-gradient(closest-side, rgba(159,123,255,0.10), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

main, header, footer { position: relative; z-index: 1; }

/* ── Navbar ──────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  background: rgba(7, 8, 12, 0.65);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  text-decoration: none;
}
.nav-brand .brand-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
  box-shadow: 0 4px 14px rgba(110, 91, 255, 0.30);
}
.nav-brand .brand-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #fff;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.nav-brand .brand-name .ai {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}
@media (max-width: 720px) {
  .nav-inner { padding: 12px 0; }
  .nav-brand .brand-icon { width: 34px; height: 34px; }
  .nav-brand .brand-name { font-size: 19px; gap: 4px; }
  .nav-cta { padding: 7px 12px; font-size: 13px; }
}
@media (max-width: 380px) {
  .nav-brand { gap: 8px; }
  .nav-brand .brand-icon { width: 30px; height: 30px; }
  .nav-brand .brand-name { font-size: 17px; }
  .nav-cta { padding: 6px 10px; font-size: 12.5px; }
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 120ms ease;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--gradient);
  color: #fff !important;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 6px 18px rgba(110,91,255,0.32);
  transition: filter 120ms ease, transform 80ms ease;
}
.nav-cta:hover { filter: brightness(1.06); }
.nav-cta:active { transform: translateY(1px); }
@media (max-width: 720px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 500;
  border: 1px solid var(--border-strong);
  background: var(--card-bg);
  color: var(--text-primary);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
}
.btn:hover { background: #131623; border-color: #2c3040; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--gradient);
  border: 0;
  color: #fff;
  padding: 13px 22px;
  box-shadow: 0 10px 30px rgba(110,91,255,0.34);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-lg { padding: 15px 26px; font-size: 15.5px; }

.kbd {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 70px;
  text-align: center;
  position: relative;
}
.hero .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--core-light);
  background: rgba(110,91,255,0.10);
  border: 1px solid rgba(110,91,255,0.28);
  margin-bottom: 24px;
}
.hero .pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--violet-glow);
  box-shadow: 0 0 10px var(--violet-glow);
}
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 18px;
  background: linear-gradient(180deg, #fff 0%, #cdc7ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero h1 .accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  max-width: 640px;
  margin: 0 auto 30px;
  font-size: clamp(15px, 2.4vw, 18px);
  color: var(--text-secondary);
  line-height: 1.6;
}
.hero .cta-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero .meta-row {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--text-tertiary);
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
  max-width: 100%;
}
.hero .meta-row > span { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.hero .meta-row .sep { opacity: 0.4; }
@media (max-width: 480px) {
  .hero .meta-row { font-size: 12px; }
  .hero .meta-row .sep { display: none; }
}

/* Hero visual — popup mock */
.hero-visual {
  margin: 56px auto 0;
  max-width: 480px;
  position: relative;
}
.popup-mock {
  width: 100%;
  border-radius: 22px;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(110,91,255,0.10), transparent 60%),
    var(--bg-primary);
  overflow: hidden;
  box-shadow: var(--shadow-glow);
}
.popup-mock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.popup-mock-bar .left { display: flex; align-items: center; gap: 10px; }
.popup-mock-bar .left img { width: 22px; height: 22px; border-radius: 7px; }
.popup-mock-bar .left span { font-size: 13px; font-weight: 600; }
.popup-mock-bar .tabs {
  display: inline-flex;
  gap: 2px;
  background: var(--bg-secondary);
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}
.popup-mock-bar .tab {
  padding: 5px 11px;
  font-size: 11.5px;
  color: var(--text-secondary);
  border-radius: 999px;
  font-weight: 500;
}
.popup-mock-bar .tab.active {
  background: var(--card-bg);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.popup-mock-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.mock-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px;
}
.mock-card .row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.mock-card .title { font-size: 13px; font-weight: 600; }
.mock-card .preview { font-size: 12px; color: var(--text-secondary); margin: 0 0 8px; line-height: 1.5; }
.mock-card .meta {
  display: flex; flex-wrap: wrap; gap: 6px; font-size: 10.5px; color: var(--text-tertiary); align-items: center;
}
.mock-card .badge {
  padding: 2px 7px; border-radius: 999px;
  background: rgba(110,91,255,0.12);
  color: var(--core-light); border: 1px solid rgba(110,91,255,0.25);
  font-weight: 500;
}
.mock-card .star { color: var(--violet-glow); }

/* ── Section primitives ─────────────────────────────────────────── */
section { padding: 80px 0; position: relative; }
.section-eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--violet-glow);
  margin-bottom: 12px;
  font-weight: 600;
}
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 14px;
  line-height: 1.15;
}
.section-lead {
  max-width: 600px;
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0 0 40px;
}

/* Trusted-by sites strip */
.sites-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
  padding: 30px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.sites-strip .label {
  color: var(--text-tertiary);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-right: 6px;
}
.site {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-secondary);
  opacity: 0.9;
}
.site-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--violet-glow);
  box-shadow: 0 0 10px var(--violet-glow);
}

/* Features grid */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) { .features { grid-template-columns: 1fr; } }
.feature {
  position: relative;
  padding: 26px;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  transition: border-color 150ms ease, transform 150ms ease;
}
.feature:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.feature .icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(110,91,255,0.18), rgba(159,123,255,0.10));
  border: 1px solid rgba(110,91,255,0.25);
  display: flex; align-items: center; justify-content: center;
  color: var(--violet-glow);
  margin-bottom: 14px;
}
.feature h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.01em;
  font-weight: 600;
}
.feature p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.55;
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step {
  padding: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
}
.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 10px;
  background: var(--gradient);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 12px;
  box-shadow: 0 8px 20px rgba(110,91,255,0.32);
}
.step h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.step p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.step p .kbd { display: inline-block; margin: 1px 1px; vertical-align: baseline; }
@media (max-width: 480px) {
  .step { padding: 20px; }
  section { padding: 60px 0; }
  .container { padding: 0 18px; }
}

/* Pricing */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: stretch;
}
@media (max-width: 900px) { .pricing { grid-template-columns: 1fr; } }
.plan {
  position: relative;
  padding: 28px;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  display: flex;
  flex-direction: column;
}
.plan.recommended {
  border-color: rgba(110,91,255,0.55);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(110,91,255,0.10), transparent 50%),
    var(--card-bg);
  box-shadow: var(--shadow-glow);
}
.plan .ribbon {
  position: absolute;
  top: -10px; right: 18px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--gradient);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(110,91,255,0.45);
}
.plan h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; color: var(--text-secondary); }
.plan .price {
  font-size: 38px; font-weight: 700; letter-spacing: -0.02em; line-height: 1;
  margin: 6px 0 4px;
}
.plan .price .cycle { font-size: 14px; color: var(--text-tertiary); font-weight: 500; }
.plan .save { font-size: 12.5px; color: var(--violet-glow); font-weight: 500; margin-top: 4px; }
.plan ul {
  list-style: none; padding: 18px 0 0; margin: 16px 0 0;
  border-top: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; gap: 10px;
  flex-grow: 1;
}
.plan ul li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px;
}
.plan ul li svg { color: var(--violet-glow); flex: 0 0 auto; }
.plan .cta { margin-top: 22px; }
.plan .cta a { width: 100%; justify-content: center; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 8px; max-width: 820px; }
.faq details {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  transition: border-color 150ms ease;
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 500;
  font-size: 15.5px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  color: var(--text-tertiary);
  font-size: 22px;
  font-weight: 300;
  transition: transform 150ms ease;
}
.faq details[open] summary::after { content: '–'; }
.faq p {
  color: var(--text-secondary);
  font-size: 14.5px;
  margin: 12px 0 0;
  line-height: 1.6;
}

/* ── Animated demo ──────────────────────────────────────────────── */
.demo-section { position: relative; }

.demo-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
  align-items: center;
  gap: 0;
  max-width: 980px;
  margin: 0 auto;
  padding: 22px;
  border-radius: 24px;
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(110,91,255,0.10), transparent 60%),
    var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
}

@media (max-width: 760px) {
  .demo-stage {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 14px;
    padding: 16px;
  }
  .demo-flow { display: none; }
}

.demo-popup, .demo-chat {
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: var(--bg-primary);
  overflow: hidden;
  box-shadow: var(--shadow-glow);
}

/* Savio popup */
.demo-popup-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.demo-brand { display: inline-flex; align-items: center; gap: 8px; }
.demo-brand img { width: 22px; height: 22px; border-radius: 6px; }
.demo-brand span { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.demo-tabs { display: inline-flex; gap: 2px; background: var(--bg-secondary); padding: 3px; border-radius: 999px; border: 1px solid var(--border-subtle); }
.demo-tabs span { font-size: 11px; padding: 4px 9px; color: var(--text-secondary); border-radius: 999px; font-weight: 500; }
.demo-tabs span.active { background: var(--card-bg); color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--border-strong); }

.demo-popup-body { padding: 12px; }

.demo-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px;
}
.demo-card-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.demo-card-preview {
  margin: 4px 0 10px;
  font-size: 12px;
  color: var(--text-secondary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.demo-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.demo-card-meta .demo-badge {
  font-size: 10.5px; padding: 2px 8px; border-radius: 999px;
  background: rgba(110,91,255,0.12); color: var(--core-light);
  border: 1px solid rgba(110,91,255,0.25); font-weight: 500;
}
.demo-card-meta .demo-meta-text { font-size: 10.5px; color: var(--text-tertiary); }

.demo-inject {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; width: 100%;
  padding: 8px 12px;
  border-radius: 9px;
  border: 0;
  background: var(--gradient);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(110,91,255,0.30);
  transform-origin: center;
  animation: demo-inject-pulse 10s ease-in-out infinite;
}

/* Connecting flow line (SVG) */
.demo-flow {
  width: 64px;
  height: 60px;
  overflow: visible;
}
.demo-flow path {
  fill: none;
  stroke: url(#demoFlowGradient);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  filter: drop-shadow(0 0 6px rgba(159,123,255,0.55));
  animation: demo-flow-draw 10s ease-in-out infinite;
}
.demo-flow .demo-dot {
  fill: var(--violet-glow);
  filter: drop-shadow(0 0 10px var(--violet-glow));
  opacity: 0;
  animation: demo-dot-travel 10s ease-in-out infinite;
}

/* Chat panel */
.demo-chat-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.demo-chat-bar .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.18);
}
.demo-chat-bar .url {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-left: 6px;
}
.demo-chat-body {
  padding: 18px 14px 14px;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 180px;
}
.demo-chat-spacer { flex: 1; }
.demo-input-text {
  position: relative;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  display: inline-flex; align-items: center;
  font-size: 13px;
  color: var(--text-primary);
}
.demo-placeholder {
  color: var(--text-tertiary);
  position: absolute;
  inset: 0;
  display: flex; align-items: center;
  animation: demo-placeholder-fade 10s ease-in-out infinite;
}
.demo-typed-wrap {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
  width: 0;
  color: var(--text-primary);
  animation: demo-type 10s steps(40, end) infinite;
}
.demo-cursor {
  display: inline-block;
  width: 1.5px;
  height: 1.05em;
  background: var(--violet-glow);
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: demo-blink 0.9s steps(2) infinite, demo-cursor-show 10s linear infinite;
}
.demo-input-box {
  margin-top: auto;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-tertiary);
  animation: demo-input-glow 10s ease-in-out infinite;
}
.demo-send {
  margin-left: auto;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gradient);
  border: 0;
  color: #fff;
  font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
  animation: demo-send-pulse 10s ease-in-out infinite;
}

/* ── Keyframes ─────────────────────────────────────────────────── */
@keyframes demo-inject-pulse {
  0%, 8%   { transform: scale(1); box-shadow: 0 6px 18px rgba(110,91,255,0.30); }
  10%      { transform: scale(1.04); box-shadow: 0 0 0 6px rgba(159,123,255,0.18), 0 8px 22px rgba(110,91,255,0.45); }
  14%      { transform: scale(0.97); box-shadow: 0 0 0 0 rgba(159,123,255,0); }
  18%, 100% { transform: scale(1); box-shadow: 0 6px 18px rgba(110,91,255,0.30); }
}
@keyframes demo-flow-draw {
  0%, 16%  { stroke-dashoffset: 120; opacity: 0; }
  20%      { stroke-dashoffset: 120; opacity: 1; }
  35%      { stroke-dashoffset: 0;   opacity: 1; }
  60%      { stroke-dashoffset: 0;   opacity: 0.9; }
  72%      { opacity: 0; }
  100%     { opacity: 0; stroke-dashoffset: 120; }
}
@keyframes demo-dot-travel {
  0%, 18%  { opacity: 0; offset-distance: 0%; }
  22%      { opacity: 1; offset-distance: 0%; }
  35%      { opacity: 1; offset-distance: 100%; }
  40%, 100% { opacity: 0; offset-distance: 100%; }
}
@keyframes demo-type {
  0%, 35%  { width: 0; }
  62%      { width: 30ch; }
  88%      { width: 30ch; }
  92%      { width: 0; }
  100%     { width: 0; }
}
@keyframes demo-placeholder-fade {
  0%, 33%   { opacity: 1; }
  36%, 90%  { opacity: 0; }
  93%, 100% { opacity: 1; }
}
@keyframes demo-blink { 50% { opacity: 0; } }
@keyframes demo-cursor-show {
  0%, 35%  { opacity: 0; }
  36%      { opacity: 1; }
  88%      { opacity: 1; }
  92%, 100% { opacity: 0; }
}
@keyframes demo-input-glow {
  0%, 30%, 92%, 100% { border-color: var(--border-subtle); box-shadow: none; }
  40%, 88%           { border-color: rgba(110,91,255,0.35); box-shadow: 0 0 0 3px rgba(110,91,255,0.10); }
}
@keyframes demo-send-pulse {
  0%, 65%, 100% { transform: scale(1); filter: brightness(1); }
  70%, 80%      { transform: scale(1.10); filter: brightness(1.15); }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .demo-inject, .demo-flow path, .demo-flow .demo-dot,
  .demo-typed-wrap, .demo-cursor, .demo-placeholder, .demo-send, .demo-input-box {
    animation: none !important;
  }
  .demo-typed-wrap { width: auto; }
  .demo-placeholder { display: none; }
}

/* CTA section */
.cta-band {
  margin: 0 auto;
  max-width: var(--maxw);
  padding: 50px 40px;
  border-radius: var(--r-xl);
  text-align: center;
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(110,91,255,0.18), transparent 60%),
    linear-gradient(180deg, rgba(159,123,255,0.06), rgba(0,0,0,0));
  border: 1px solid rgba(110,91,255,0.25);
  box-shadow: var(--shadow-glow);
}
.cta-band h2 {
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 12px;
}
.cta-band p { color: var(--text-secondary); margin: 0 0 24px; }

/* Footer */
.footer {
  padding: 50px 0 36px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 60px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}
.footer-brand .brand-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
}
.footer-brand .brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}
.footer-brand .brand-name .ai {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.footer-links { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--text-secondary); font-size: 14px; }
.footer-links a:hover { color: var(--text-primary); }
.footer-meta {
  margin-top: 26px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-tertiary);
}
.cortex-link {
  color: var(--text-secondary);
  font-weight: 500;
  margin-left: 4px;
  transition: color 120ms ease;
}
.cortex-link:hover { color: var(--violet-glow); }

/* Legal pages */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.legal h1 {
  color: var(--text-primary);
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.legal h2 {
  color: var(--text-primary);
  font-size: 19px;
  letter-spacing: -0.01em;
  margin: 32px 0 8px;
}
.legal p { margin: 0 0 14px; }
.legal ul { padding-left: 20px; margin: 0 0 14px; }
.legal ul li { margin-bottom: 6px; }
.legal .updated { font-size: 13px; color: var(--text-tertiary); margin-bottom: 28px; }
.legal a { color: var(--violet-glow); }
.legal code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13.5px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--core-light);
}
