/* ============================================================
   CodeRabbit-style SaaS clone — hand-built, self-hosted.
   System font stack only (no CDNs, no outbound beacons).
   ============================================================ */

:root {
  --purple: #7c3aed;
  --purple-d: #6d28d9;
  --violet: #8b5cf6;
  --indigo: #6366f1;
  --lavender: #a78bfa;

  --bg-dark: #0b0b14;
  --bg-dark-2: #14122a;
  --ink: #1a1825;
  --text: #211f30;
  --muted: #5b576b;
  --faint: #8b869c;
  --line: #ece9f6;
  --line-2: #e1ddf0;
  --bg: #ffffff;
  --bg-soft: #f7f6fc;

  --grad: linear-gradient(120deg, #a78bfa 0%, #7c3aed 45%, #6366f1 100%);
  --grad-soft: linear-gradient(135deg, rgba(124,58,237,.12), rgba(99,102,241,.12));

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter,
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --wrap: 1140px;

  --shadow-sm: 0 1px 2px rgba(20,18,42,.06), 0 1px 3px rgba(20,18,42,.05);
  --shadow-md: 0 10px 30px -12px rgba(80,40,160,.28);
  --shadow-lg: 0 30px 60px -20px rgba(80,40,160,.35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip {
  position: absolute; left: -9999px; top: 0; background: #fff;
  color: var(--purple); padding: 10px 14px; z-index: 100; border-radius: 8px;
}
.skip:focus { left: 12px; top: 12px; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font: inherit; font-weight: 650; font-size: 15px; cursor: pointer;
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn--lg { padding: 14px 24px; font-size: 16px; border-radius: 12px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-md); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); color: #fff; }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.btn--ghost:hover { transform: translateY(-1px); border-color: var(--lavender); }
.btn--light { background: #fff; color: var(--purple-d); }
.btn--light:hover { transform: translateY(-1px); }
.btn--outline { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.35); }
.btn--outline:hover { background: rgba(255,255,255,.16); color: #fff; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 760; font-size: 19px; letter-spacing: -.02em; color: var(--ink); }
.brand__mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: var(--grad);
  display: grid; place-items: center;
  box-shadow: 0 4px 12px -2px rgba(124,58,237,.5);
}
.brand__name { letter-spacing: -.025em; }
.nav__links { display: flex; gap: 4px; margin-left: 14px; }
.nav__links a {
  font-size: 14.5px; font-weight: 560; color: var(--muted);
  padding: 8px 12px; border-radius: 8px;
}
.nav__links a:hover { color: var(--purple-d); background: var(--bg-soft); }
.nav__cta { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav__cta .link { font-size: 14.5px; font-weight: 560; color: var(--muted); padding: 8px 6px; }
.nav__cta .link:hover { color: var(--purple-d); }
.nav__cta .btn--ghost { display: none; }
.nav__burger { display: none; background: none; border: 0; font-size: 22px; color: var(--ink); cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 80% at 70% -10%, #2a1d5e 0%, #14122a 45%, var(--bg-dark) 100%);
  color: #fff;
}
.hero__glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(40% 50% at 78% 18%, rgba(167,139,250,.45), transparent 70%),
    radial-gradient(35% 40% at 92% 60%, rgba(99,102,241,.35), transparent 70%);
}
.hero__grid {
  position: relative;
  max-width: var(--wrap); margin: 0 auto; padding: 88px 24px 96px;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 650; letter-spacing: .03em;
  color: var(--lavender); background: rgba(167,139,250,.12);
  border: 1px solid rgba(167,139,250,.25); padding: 6px 12px; border-radius: 999px;
}
.eyebrow__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lavender); }
.hero__title {
  font-size: clamp(36px, 5.4vw, 60px); line-height: 1.04; font-weight: 820;
  letter-spacing: -.03em; margin: 22px 0 18px; color: #fff;
}
.hero__sub { font-size: clamp(17px, 1.5vw, 20px); color: #c3bee0; max-width: 540px; margin: 0 0 30px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.hero .btn--ghost { background: rgba(255,255,255,.07); color: #fff; border-color: rgba(255,255,255,.22); box-shadow: none; }
.hero .btn--ghost:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.4); }
.hero__fine { font-size: 13.5px; color: #9a93bd; margin: 0; }

/* ---------- Product mock ---------- */
.mock {
  background: #fff; border-radius: 16px; overflow: hidden; color: var(--text);
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.5);
}
.mock__bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: #f3f1fb; border-bottom: 1px solid var(--line); }
.mock__dot { width: 11px; height: 11px; border-radius: 50%; background: #d8d3ec; }
.mock__dot:nth-child(1) { background: #ff5f57; }
.mock__dot:nth-child(2) { background: #febc2e; }
.mock__dot:nth-child(3) { background: #28c840; }
.mock__file { font-size: 12.5px; font-weight: 660; color: var(--ink); margin-left: 8px; }
.mock__diff { margin-left: auto; font-size: 12px; font-weight: 650; color: var(--muted); }
.mock__diff .add { color: #1a9f5a; }
.mock__diff .del { color: #d23b3b; }
.mock__summary { display: flex; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.mock__spark { width: 34px; height: 34px; border-radius: 9px; flex: none; background: var(--grad-soft); color: var(--purple); display: grid; place-items: center; }
.mock__summary strong { display: block; font-size: 13px; color: var(--ink); }
.mock__summary p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.mock__risk { margin-left: auto; font-size: 12px; font-weight: 650; color: #1a9f5a; background: #e9f8f0; padding: 5px 9px; border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.risk-dot { width: 7px; height: 7px; border-radius: 50%; background: #1a9f5a; }
.mock__code { margin: 0; padding: 14px 16px; background: #faf9ff; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.7; overflow-x: auto; }
.mock__code .ln { display: block; padding: 1px 8px; border-radius: 4px; }
.mock__code .add { background: #e9f8ef; color: #126b41; }
.mock__code .del { background: #fdeeee; color: #a52929; }
.mock__comment { display: flex; gap: 12px; padding: 16px; background: #f7f5fc; border-top: 1px solid var(--line); }
.mock__avatar { width: 34px; height: 34px; border-radius: 9px; flex: none; background: var(--grad); color: #fff; display: grid; place-items: center; }
.mock__bubble { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow-sm); }
.mock__bubble strong { font-size: 12.5px; color: var(--purple-d); display: block; margin-bottom: 2px; }
.mock__bubble p { margin: 0; font-size: 13px; color: var(--text); }
.mock__bubble code { background: #f1eef9; padding: 1px 5px; border-radius: 4px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }

/* ---------- Logo cloud ---------- */
.logos { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.logos .wrap { padding-top: 30px; padding-bottom: 30px; text-align: center; }
.logos__label { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); font-weight: 660; margin: 0 0 16px; }
.logos__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.logo-pill {
  font-size: 14px; font-weight: 660; color: var(--muted);
  background: #fff; border: 1px solid var(--line-2); padding: 8px 16px; border-radius: 999px;
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section--tight { padding: 56px 0 16px; }
.section--alt { background: var(--bg-soft); }
.section__head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.kicker { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--purple); margin-bottom: 12px; }
.section__head h1, .section__head h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 780; letter-spacing: -.025em; margin: 0 0 14px; color: var(--ink); }
.section__head p { font-size: 18px; color: var(--muted); margin: 0; }

/* feature cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 28px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.feature__icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad-soft); color: var(--purple); margin-bottom: 18px;
}
.feature h3 { font-size: 19px; font-weight: 720; margin: 0 0 8px; color: var(--ink); letter-spacing: -.01em; }
.feature p { font-size: 15px; color: var(--muted); margin: 0; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.step__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.step__icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: var(--shadow-md); }
.step__n { font-size: 30px; font-weight: 820; letter-spacing: -.04em; color: var(--line-2); }
.step h3 { font-size: 19px; font-weight: 720; margin: 0 0 8px; color: var(--ink); letter-spacing: -.01em; }
.step p { font-size: 15px; color: var(--muted); margin: 0; }

/* stats band */
.stats { background: radial-gradient(100% 120% at 0% 0%, #2a1d5e 0%, var(--bg-dark-2) 50%, var(--bg-dark) 100%); color: #fff; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 64px 24px; text-align: center; }
.stat__k { display: block; font-size: clamp(32px, 4vw, 46px); font-weight: 820; letter-spacing: -.03em; }
.stat__v { display: block; font-size: 15px; color: #b6b0d6; margin-top: 6px; }

/* integrations grid */
.intgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.int {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 26px 18px; text-align: center; font-size: 16px; font-weight: 680; color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.int:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--lavender); color: var(--purple-d); }

/* testimonials */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quote { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; margin: 0; }
.quote blockquote { margin: 0 0 20px; font-size: 16.5px; line-height: 1.55; color: var(--text); }
.quote figcaption { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.quote__avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; background: var(--grad); color: #fff; font-weight: 700; display: grid; place-items: center; }
.quote figcaption strong { color: var(--ink); font-size: 14.5px; }

/* CTA section */
.cta { padding: 64px 0; }
.cta__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  background: var(--grad-soft); border: 1px solid var(--line-2); border-radius: 20px; padding: 40px 44px;
}
.cta__copy h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 780; letter-spacing: -.02em; margin: 6px 0 10px; color: var(--ink); }
.cta__copy p { margin: 0; color: var(--muted); font-size: 16px; max-width: 560px; }

/* finale band */
.finale {
  background: radial-gradient(100% 130% at 50% -10%, #4c2fad 0%, #3b1d8a 45%, var(--bg-dark-2) 100%);
  color: #fff; padding: 80px 0;
}
.finale__inner { text-align: center; }
.finale h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; letter-spacing: -.025em; margin: 0 0 12px; }
.finale p { color: #cdc7ea; font-size: 18px; margin: 0 0 28px; }
.finale__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.ft { background: var(--bg-dark); color: #9a93bd; }
.ft__top { display: grid; grid-template-columns: 1.4fr 2fr; gap: 48px; padding: 64px 24px 40px; }
.brand--ft { color: #fff; }
.ft__tag { color: #b6b0d6; font-size: 14.5px; margin: 16px 0 6px; max-width: 320px; }
.ft__note { color: #6f6a90; font-size: 13px; margin: 0; }
.ft__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.ft__col h4 { color: #fff; font-size: 14px; margin: 0 0 14px; }
.ft__col a { display: block; font-size: 14px; color: #9a93bd; padding: 5px 0; }
.ft__col a:hover { color: #fff; }
.ft__bottom {
  border-top: 1px solid #26243a; padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px;
}
.ft__legal { display: flex; gap: 18px; }
.ft__legal a { color: #9a93bd; }
.ft__legal a:hover { color: #fff; }

/* ---------- Pricing ---------- */
.phero { padding: 72px 0 8px; text-align: center; background: radial-gradient(80% 70% at 50% 0%, #f3eefe 0%, #fff 70%); }
.phero .kicker { margin-bottom: 10px; }
.phero h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 820; letter-spacing: -.03em; margin: 0 0 14px; color: var(--ink); }
.phero p { font-size: 18px; color: var(--muted); margin: 0 auto 26px; max-width: 560px; }
.phero__toggle { display: inline-flex; background: #efecf8; border-radius: 999px; padding: 4px; gap: 2px; }
.phero__opt { padding: 9px 20px; border-radius: 999px; font-size: 14.5px; font-weight: 620; color: var(--muted); }
.phero__opt em { font-style: normal; color: var(--purple); font-weight: 700; margin-left: 4px; font-size: 12.5px; }
.phero__opt--active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 32px; display: flex; flex-direction: column;
}
.plan--hi { border-color: var(--violet); box-shadow: var(--shadow-lg); transform: translateY(-8px); background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.plan__badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .03em;
  padding: 6px 14px; border-radius: 999px; box-shadow: var(--shadow-md); white-space: nowrap;
}
.plan__name { font-size: 20px; font-weight: 720; color: var(--ink); margin: 0 0 6px; letter-spacing: -.01em; }
.plan__blurb { font-size: 14.5px; color: var(--muted); margin: 0 0 22px; min-height: 42px; }
.plan__price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 22px; }
.plan__amt { font-size: 44px; font-weight: 820; letter-spacing: -.03em; color: var(--ink); }
.plan__per { font-size: 14px; color: var(--muted); }
.plan__list { list-style: none; margin: 22px 0 0; padding: 0; }
.plan__list li { display: flex; gap: 10px; padding: 7px 0; font-size: 14.5px; color: var(--text); align-items: flex-start; }
.plan__check { width: 20px; height: 20px; border-radius: 50%; flex: none; background: var(--grad-soft); color: var(--purple); display: grid; place-items: center; margin-top: 1px; }
.plan__check svg { width: 13px; height: 13px; }
.plan .btn { margin-top: auto; }

.allplans { margin-top: 56px; padding: 36px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 18px; }
.allplans h3 { text-align: center; font-size: 22px; font-weight: 740; margin: 0 0 24px; color: var(--ink); letter-spacing: -.01em; }
.allplans__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.allplans__i { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #fff; color: var(--purple); border: 1px solid var(--line); margin-bottom: 12px; }
.allplans__grid strong { display: block; font-size: 15px; color: var(--ink); margin-bottom: 4px; }
.allplans__grid p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* FAQ */
.faq { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: start; }
.faq__head h2 { font-size: clamp(24px, 2.6vw, 30px); font-weight: 780; margin: 8px 0 0; color: var(--ink); letter-spacing: -.02em; }
.faq__list { display: flex; flex-direction: column; gap: 12px; }
.faq__item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; }
.faq__item summary {
  list-style: none; cursor: pointer; padding: 16px 0; font-size: 16px; font-weight: 640; color: var(--ink);
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__chev { color: var(--purple); font-size: 20px; font-weight: 700; transition: transform .2s ease; }
.faq__item[open] .faq__chev { transform: rotate(45deg); }
.faq__item p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; gap: 48px; padding: 64px 24px 72px; }
  .cards, .steps, .quotes, .plans { grid-template-columns: repeat(2, 1fr); }
  .stats__grid, .intgrid, .allplans__grid { grid-template-columns: repeat(2, 1fr); }
  .plan--hi { transform: none; }
  .faq { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav__links, .nav__cta .link { display: none; }
  .nav__burger { display: block; }
  .section { padding: 60px 0; }
  .cta__inner { flex-direction: column; align-items: flex-start; padding: 30px; }
  .ft__top { grid-template-columns: 1fr; gap: 32px; }
  .ft__cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .cards, .steps, .quotes, .plans, .stats__grid, .intgrid, .allplans__grid { grid-template-columns: 1fr; }
  .nav__cta .btn--ghost { display: none; }
  .mock { font-size: 12px; }
}
