/* ==========================================================
   Signal & State — styles
   ========================================================== */

:root {
  --bg: #070a12;
  --bg-elev: #0d1220;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e8ecf4;
  --text-muted: #8b94a8;
  --accent: #34d399;
  --accent-2: #38bdf8;
  --accent-3: #a78bfa;
  --warn: #fbbf24;
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1180px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; }
p { margin: 0; }

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

section { position: relative; padding: 120px 0; }

/* ---------- Background ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}
.bg-glow {
  position: fixed;
  top: -30vh;
  left: 50%;
  width: 1100px;
  height: 700px;
  transform: translateX(-50%);
  z-index: -1;
  background:
    radial-gradient(closest-side, rgba(52, 211, 153, 0.18), transparent),
    radial-gradient(closest-side at 70% 60%, rgba(56, 189, 248, 0.14), transparent);
  filter: blur(40px);
  pointer-events: none;
}

/* ---------- Typography helpers ---------- */
.gradient-text {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 60%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.muted { color: var(--text-muted); }

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.eyebrow {
  padding: 6px 14px;
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.06);
}
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; max-width: 760px; }
.section-lead {
  margin-top: 20px;
  max-width: 620px;
  font-size: 1.1rem;
  color: var(--text-muted);
}
.section-lead a { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.97rem;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
}
.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s var(--ease);
}
.btn:hover svg { transform: translateX(3px); }
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04120c;
  box-shadow: 0 8px 30px -8px rgba(52, 211, 153, 0.55);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px -8px rgba(52, 211, 153, 0.7); }
.btn--ghost {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.07); }
.btn--sm { padding: 9px 18px; font-size: 0.9rem; }
.btn--block { width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(7, 10, 18, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.logo__mark { width: 30px; height: 30px; }
.logo__mark rect { fill: #0f1524; stroke: var(--border-strong); }
.logo__mark path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.amp { color: var(--accent); }

.nav__links { display: flex; align-items: center; gap: 32px; }
.nav__links a:not(.btn) {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav__links a:not(.btn):hover { color: var(--text); }

.nav__toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: none;
  border: 0;
  cursor: pointer;
  position: relative;
}
.nav__toggle span {
  position: absolute;
  left: 9px;
  right: 9px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.nav__toggle span:first-child { top: 15px; }
.nav__toggle span:last-child { top: 23px; }
.nav.is-open .nav__toggle span:first-child { top: 19px; transform: rotate(45deg); }
.nav.is-open .nav__toggle span:last-child { top: 19px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 170px 0 110px; }
.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}
.lead {
  margin-top: 24px;
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero__trust {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.hero__trust li { display: inline-flex; align-items: center; gap: 8px; }
.hero__trust svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Dashboard mock */
.dash,
.code {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.9), rgba(10, 14, 24, 0.9));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow:
    0 40px 80px -30px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 0 80px -20px rgba(52, 211, 153, 0.25);
  overflow: hidden;
}
.dash__bar,
.code__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: #2a3245; }
.dash__title {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.dash__body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  padding: 24px;
}
.dash__score { position: relative; width: 132px; height: 132px; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring__track { stroke: rgba(255, 255, 255, 0.06); }
.ring__fill {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 1.6s var(--ease);
  filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.6));
}
.dash__score-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.dash__score-label strong { font-size: 1.7rem; font-weight: 700; }
.dash__score-label span { font-size: 0.7rem; color: var(--text-muted); }

.dash__stats { display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.dash__stats div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}
.dash__stats div:last-child { border-bottom: 0; padding-bottom: 0; }
.dash__stats .k { font-size: 0.85rem; color: var(--text-muted); }
.dash__stats .v { font-family: var(--mono); font-weight: 500; color: var(--accent); }
.dash__stats .v--warn { color: var(--warn); }

.dash__feed { grid-column: 1 / -1; }
.dash__feed-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.dash__feed ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 168px;
}
.dash__feed li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.78rem;
  animation: feedIn 0.5s var(--ease);
}
.dash__feed li .tag {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 500;
}
.tag--pass { background: rgba(52, 211, 153, 0.12); color: var(--accent); }
.tag--info { background: rgba(56, 189, 248, 0.12); color: var(--accent-2); }
.tag--warn { background: rgba(251, 191, 36, 0.12); color: var(--warn); }
.dash__feed li .msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c3cad8; }
.dash__feed li .time { margin-left: auto; color: var(--text-muted); flex-shrink: 0; }
@keyframes feedIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Frameworks marquee ---------- */
.frameworks { padding-bottom: 80px; }
.marquee {
  margin-top: 56px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.chip {
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  font-weight: 600;
  white-space: nowrap;
  font-size: 0.95rem;
  transition: border-color 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Features ---------- */
.features {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  position: relative;
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(52, 211, 153, 0.1), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.feature:hover { border-color: var(--border-strong); transform: translateY(-4px); }
.feature:hover::before { opacity: 1; }
.feature__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.15), rgba(56, 189, 248, 0.1));
  border: 1px solid rgba(52, 211, 153, 0.25);
  margin-bottom: 22px;
}
.feature__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 10px; }
.feature p { color: var(--text-muted); font-size: 0.97rem; }

/* ---------- Split / code ---------- */
.split__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.integrations {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.integrations li {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.88rem;
  color: var(--text-muted);
}
.code pre {
  margin: 0;
  padding: 24px;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.75;
  overflow-x: auto;
  color: #c3cad8;
}
.code .c { color: #5c667d; }
.code .k { color: var(--accent-2); }
.code .s { color: var(--accent-3); }
.code .ok { color: var(--accent); }

/* ---------- Process ---------- */
.steps {
  list-style: none;
  padding: 0;
  margin: 56px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 28px 24px 28px;
  border-top: 1px solid var(--border-strong);
}
.step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 1s var(--ease) 0.2s;
}
.step.is-visible::before { width: 100%; }
.step__num {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
}
.step h3 { font-size: 1.3rem; margin: 14px 0 10px; }
.step p { color: var(--text-muted); font-size: 0.96rem; }

/* ---------- Stats ---------- */
.stats { padding: 80px 0; }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-top: 56px;
  padding-bottom: 56px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat { text-align: center; }
.stat strong {
  display: block;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff, #9aa3b7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- FAQ ---------- */
.faq__inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 64px;
  align-items: start;
}
.accordion { display: flex; flex-direction: column; gap: 12px; }
.accordion details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  transition: border-color 0.2s;
}
.accordion details[open] { border-color: var(--border-strong); }
.accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 56px 20px 22px;
  font-weight: 600;
  position: relative;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.3s var(--ease);
}
.accordion details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.accordion details p {
  padding: 0 22px 20px;
  color: var(--text-muted);
}

/* ---------- CTA / Contact ---------- */
.cta {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: center;
  padding: 56px;
  border-radius: 24px;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(600px circle at 0% 0%, rgba(52, 211, 153, 0.16), transparent 60%),
    radial-gradient(500px circle at 100% 100%, rgba(56, 189, 248, 0.12), transparent 60%),
    var(--bg-elev);
  overflow: hidden;
}
.cta h2 { font-size: clamp(2rem, 3.6vw, 2.75rem); }
.cta p { margin-top: 16px; color: var(--text-muted); font-size: 1.08rem; }

.form { display: flex; flex-direction: column; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; }
.form label span { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.form input,
.form select {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: rgba(7, 10, 18, 0.6);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.form input::placeholder { color: #4d566a; }
.form input:focus,
.form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
}
.form input.is-invalid { border-color: #f87171; }
.form__status { min-height: 1.4em; font-size: 0.92rem; text-align: center; }
.form__status.is-success { color: var(--accent); }
.form__status.is-error { color: #f87171; }

/* ---------- Footer ---------- */
.footer { padding: 72px 0 32px; border-top: 1px solid var(--border); }
.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}
.footer__tag { margin-top: 14px; color: var(--text-muted); max-width: 320px; font-size: 0.95rem; }
.footer__cols { display: flex; gap: 72px; }
.footer__cols h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-weight: 600;
}
.footer__cols a {
  display: block;
  margin-bottom: 10px;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.footer__cols a:hover { color: var(--accent); }
.footer__bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero__inner,
  .split__inner,
  .faq__inner,
  .cta { grid-template-columns: 1fr; }
  .hero__visual { max-width: 560px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stats__grid { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
}

@media (max-width: 760px) {
  section { padding: 88px 0; }
  .hero { padding: 130px 0 72px; }
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 24px;
    background: rgba(7, 10, 18, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0.25s;
  }
  .nav.is-open .nav__links { opacity: 1; transform: none; visibility: visible; }
  .nav.is-open { background: rgba(7, 10, 18, 0.96); }
  .nav__links a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 1rem; }
  .nav__cta { margin-top: 16px; }
  .features,
  .steps { grid-template-columns: 1fr; }
  .dash__body { grid-template-columns: 1fr; justify-items: center; }
  .dash__stats { width: 100%; }
  .cta { padding: 32px 22px; }
  .form__row { grid-template-columns: 1fr; }
  .footer__cols { gap: 48px; }
}

@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .dash__feed li .time { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
