:root {
  --bg: #070a14;
  --bg-2: #0c111f;
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);

  --text: #eef2fb;
  --muted: #97a3bd;
  --dim: #6b7794;

  --accent: #4d8dff;
  --accent-2: #22d3ee;
  --accent-soft: rgba(77, 141, 255, .14);
  --grad: linear-gradient(105deg, #4d8dff 0%, #22d3ee 100%);

  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1120px;
  --ease: cubic-bezier(.22, .8, .28, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Heebo", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ambient light behind everything */
body::before {
  content: "";
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 720px;
  background:
    radial-gradient(560px 380px at 72% 8%, rgba(77, 141, 255, .20), transparent 68%),
    radial-gradient(460px 340px at 22% 0%, rgba(34, 211, 238, .13), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

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

h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); }

.lead { font-size: clamp(1.02rem, 1.9vw, 1.2rem); color: var(--muted); }
.note { font-size: .875rem; color: var(--dim); margin: .4em 0; }
.error { color: #ff8b8b; font-size: .9rem; margin: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 15px;
  margin-bottom: 26px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, .16);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.82); }
}

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

/* ---------- header / footer ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(7, 10, 20, .72);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 13px;
  height: 66px;
}
.brand {
  font-weight: 800;
  font-size: 1.12rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.02em;
}
.brand-mark {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--grad);
  display: inline-block;
  margin-inline-end: 2px;
  vertical-align: -6px;
  box-shadow: 0 4px 16px rgba(77, 141, 255, .4);
}
.brand-sub {
  color: var(--dim);
  font-size: .85rem;
  padding-inline-start: 13px;
  border-inline-start: 1px solid var(--line);
}

.site-footer {
  margin-top: 90px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: .85rem;
}
.site-footer .wrap { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 999px;
  padding: 13px 30px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), opacity .2s;
}
.btn-primary {
  background: var(--grad);
  color: #04121f;
  box-shadow: 0 8px 26px rgba(77, 141, 255, .32);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(77, 141, 255, .42); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }
.btn-lg { padding: 16px 38px; font-size: 1.05rem; }
.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .1); transform: translateY(-2px); }

/* ---------- landing ---------- */
.hero { padding: clamp(56px, 10vw, 104px) 0 clamp(48px, 8vw, 84px); }
.hero h1 { max-width: 15ch; }
.hero .lead { max-width: 56ch; margin-bottom: 32px; }
.hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 8px; }
.hero-actions .note { margin: 0; }

.checks { list-style: none; padding: 0; margin: 0 0 34px; display: grid; gap: 11px; }
.checks li {
  position: relative;
  padding-inline-start: 32px;
  color: var(--muted);
}
.checks li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 0;
  top: .38em;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid rgba(77, 141, 255, .45);
  color: var(--accent-2);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
}

/* steps */
.section { padding: clamp(48px, 8vw, 84px) 0; }
.section-head { max-width: 52ch; margin-bottom: 40px; }

.step-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  counter-reset: step;
}
.step-grid li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.step-grid li:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.step-grid li::before {
  content: "0" counter(step);
  display: block;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
}
.step-grid p { color: var(--muted); margin: 0; font-size: .95rem; }

/* about */
.about-panel {
  background: linear-gradient(160deg, rgba(77, 141, 255, .1), rgba(34, 211, 238, .04) 55%, transparent);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: clamp(30px, 5vw, 52px);
}
.about-panel p { color: var(--muted); max-width: 66ch; }
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px;
  margin-top: 36px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.stat-value {
  font-size: 2rem; font-weight: 800; letter-spacing: -.03em;
  /* keeps values like "50+" from flipping to "+50" in an RTL context */
  unicode-bidi: plaintext;
  text-align: right;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1.1;
}
.stat-label { color: var(--dim); font-size: .88rem; }

.cta-band { text-align: center; padding-bottom: 20px; }
.cta-band h2 { margin-bottom: 26px; }

/* ---------- app shell ---------- */
.app main { padding: clamp(32px, 6vw, 56px) 0 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 34px);
  margin-bottom: 18px;
  backdrop-filter: blur(8px);
}
.card h2 {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--muted);
  margin-bottom: 14px;
}

.stage { animation: rise .5s var(--ease) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* forms */
.form { display: grid; gap: 17px; margin-top: 26px; }
.form label { display: grid; gap: 7px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.form input, .form select, textarea {
  font: inherit;
  color: var(--text);
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .04);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.form input::placeholder, textarea::placeholder { color: var(--dim); }
.form input:hover, .form select:hover, textarea:hover { border-color: var(--line-strong); }
.form input:focus, .form select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.form select option { background: var(--bg-2); color: var(--text); }
.form .btn { justify-self: start; margin-top: 8px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }

/* ---------- chat ---------- */
.chat-head { margin-bottom: 20px; }
.chat-head h1 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin-bottom: .2em; }
.chat-head .lead { font-size: .95rem; margin: 0; }

.chat-log {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  height: min(56vh, 480px);
  min-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.chat-log::-webkit-scrollbar { width: 8px; }
.chat-log::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }

.bubble {
  max-width: 82%;
  padding: 13px 17px;
  border-radius: 16px;
  white-space: pre-wrap;
  animation: rise .35s var(--ease) both;
  font-size: .97rem;
}
.bubble.assistant {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-start-start-radius: 5px;
  align-self: flex-start;
}
.bubble.user {
  background: var(--grad);
  color: #04121f;
  font-weight: 500;
  border-start-end-radius: 5px;
  align-self: flex-end;
}
.bubble.system {
  background: none;
  color: var(--dim);
  font-size: .85rem;
  align-self: center;
  text-align: center;
  max-width: 100%;
}

.dots { display: inline-flex; gap: 4px; align-items: center; }
.dots i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted);
  animation: blink 1.3s infinite;
}
.dots i:nth-child(2) { animation-delay: .18s; }
.dots i:nth-child(3) { animation-delay: .36s; }
@keyframes blink {
  0%, 60%, 100% { opacity: .25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.chat-input { display: flex; gap: 12px; margin-top: 16px; align-items: flex-end; }
.chat-input textarea { flex: 1; resize: none; min-height: 52px; max-height: 160px; }
.chat-input .btn { height: 52px; }
.chat-hint { text-align: center; }

/* ---------- results ---------- */
.score-hero {
  text-align: center;
  padding: clamp(30px, 5vw, 48px) 24px;
  background:
    radial-gradient(420px 220px at 50% 0%, rgba(77, 141, 255, .22), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  margin-bottom: 18px;
}
.ring { position: relative; width: 200px; height: 200px; margin: 6px auto 20px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.ring .track { stroke: rgba(255, 255, 255, .07); }
.ring .fill {
  stroke: url(#ringGrad);
  transition: stroke-dashoffset 1.4s var(--ease);
  filter: drop-shadow(0 0 10px rgba(77, 141, 255, .5));
}
.ring-center {
  position: absolute; inset: 0;
  display: grid; place-content: center; gap: 0;
  text-align: center;
}
.ring-num {
  font-size: 3.6rem; font-weight: 800; letter-spacing: -.04em; line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ring-suffix { font-size: .8rem; color: var(--dim); margin-top: 6px; }
.score-caption { font-weight: 600; font-size: 1.05rem; margin: 0; }

.summary-text { font-size: 1.05rem; color: var(--text); margin: 0; }

.gaps, .recs { list-style: none; padding: 0; margin: 0; display: grid; gap: 13px; }
.gaps li, .recs li { position: relative; padding-inline-start: 34px; color: var(--muted); }
.gaps li::before {
  content: "";
  position: absolute; inset-inline-start: 2px; top: .62em;
  width: 9px; height: 9px; border-radius: 3px;
  background: #f0a742;
  box-shadow: 0 0 0 4px rgba(240, 167, 66, .13);
}
.recs { counter-reset: rec; }
.recs li { counter-increment: rec; }
.recs li::before {
  content: counter(rec);
  position: absolute; inset-inline-start: 0; top: .16em;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid rgba(77, 141, 255, .4);
  color: var(--accent-2);
  font-size: .78rem; font-weight: 700;
  display: grid; place-items: center;
}

.cta-card {
  text-align: center;
  background: linear-gradient(150deg, rgba(77, 141, 255, .18), rgba(34, 211, 238, .07) 60%, transparent);
  border: 1px solid rgba(77, 141, 255, .3);
  border-radius: 26px;
  padding: clamp(30px, 5vw, 48px);
  margin-top: 26px;
}
.cta-card h2 { color: var(--text); font-size: clamp(1.3rem, 2.6vw, 1.75rem); font-weight: 700; }
.cta-card p { color: var(--muted); max-width: 58ch; margin-inline: auto; margin-bottom: 26px; }

@media (max-width: 620px) {
  .form-row { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
  .bubble { max-width: 92%; }
  .ring { width: 168px; height: 168px; }
  .ring-num { font-size: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
