/* ============================================================
   Sensor-Proof — landing styles
   Vanilla, system fonts, no build. Mobile-first.
   ============================================================ */

:root {
  /* color */
  --bg: #ffffff;
  --surface: #f8fafc;
  --surface-2: #f1f5f9;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --brand-soft: #eff4ff;
  --signal: #10b981;
  --signal-strong: #059669;
  --warn: #f59e0b;
  --warn-soft: #fef3c7;
  --alert: #ef4444;
  --navy: #0b1220;
  --navy-2: #0f1c33;

  /* form */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .1);
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .25);
  --shadow-lg: 0 40px 80px -28px rgba(2, 8, 23, .65);
  --maxw: 1140px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(18px, 5vw, 32px); }

/* ---------- status dots ---------- */
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.dot-signal { background: var(--signal); box-shadow: 0 0 0 3px rgba(16, 185, 129, .18); }
.dot-warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(245, 158, 11, .18); }
.pulse { animation: pulse 2s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .5); }
  70% { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-weight: 600; font-size: .95rem; line-height: 1; cursor: pointer;
  padding: .72em 1.15em; border-radius: var(--radius-pill); border: 1px solid transparent;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { font-size: 1rem; padding: .9em 1.5em; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-strong); box-shadow: var(--shadow); }
.btn-ghost { color: var(--ink-soft); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-outline { color: #fff; border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .04); }
.btn-outline:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .55); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; letter-spacing: -.02em; }
.brand-name { font-size: 1.06rem; }
.nav { display: none; gap: 1.4rem; margin-left: .5rem; margin-right: auto; }
.nav a { color: var(--ink-soft); font-size: .94rem; font-weight: 500; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); border-bottom-color: var(--brand); }
.header-cta { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.header-cta .btn-ghost { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; color: #e8eefc; overflow: hidden;
  background:
    radial-gradient(900px 500px at 78% -10%, rgba(37, 99, 235, .35), transparent 60%),
    radial-gradient(700px 500px at 12% 110%, rgba(16, 185, 129, .18), transparent 55%),
    linear-gradient(180deg, var(--navy), var(--navy-2));
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 40%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 40%, transparent 78%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("assets/images/hero-ambient-1536.webp");
  background-image: image-set(url("assets/images/hero-ambient-1536.avif") type("image/avif"), url("assets/images/hero-ambient-1536.webp") type("image/webp"));
  background-size: cover; background-position: 80% 60%;
  opacity: .4;
}
.hero-grid {
  position: relative; z-index: 1; display: grid; gap: clamp(2.2rem, 5vw, 4rem);
  padding-block: clamp(3.5rem, 8vw, 6rem) clamp(3.5rem, 7vw, 5.5rem);
  align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .82rem; font-weight: 600; letter-spacing: .02em;
  color: #aec6f5; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
  padding: .35rem .7rem; border-radius: var(--radius-pill); margin-bottom: 1.1rem;
}
.hero h1 {
  font-size: clamp(2.3rem, 6vw, 3.6rem); color: #fff; max-width: 16ch;
  margin-bottom: 1.1rem;
}
.lede { font-size: clamp(1.05rem, 2.4vw, 1.22rem); color: #c4d2ee; max-width: 46ch; }
.lede strong { color: #fff; font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.8rem; }
.hero-note { margin-top: 1.1rem; font-size: .85rem; color: #8ea4cc; }

/* live panel */
.panel {
  background: #fff; color: var(--ink); border-radius: 18px; padding: 1.15rem 1.15rem 1rem;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, .5);
  width: 100%; max-width: 440px; justify-self: center;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.panel-status { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .92rem; }
.panel-time { font-size: .78rem; color: var(--muted); }
.panel-metric { display: flex; align-items: center; gap: .9rem; padding: .2rem .2rem 1rem; border-bottom: 1px solid var(--line); margin-bottom: .6rem; }
.metric-num { font-size: 2.5rem; font-weight: 700; color: var(--signal-strong); letter-spacing: -.03em; }
.metric-label { font-size: .85rem; color: var(--ink-soft); line-height: 1.35; }
.metric-sub { color: var(--muted); }

.sensor-list { list-style: none; padding: 0; display: grid; gap: .15rem; }
.sensor {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: .7rem;
  padding: .5rem .35rem; border-radius: 10px;
}
.sensor + .sensor { border-top: 1px solid var(--surface-2); }
.sensor-id { font-size: .86rem; font-weight: 600; display: flex; flex-direction: column; line-height: 1.25; }
.sensor-id small { font-weight: 400; color: var(--muted); font-size: .74rem; }
.sensor.warn .sensor-id small { color: var(--warn); }
.spark { width: 64px; height: 22px; }
.spark polyline { fill: none; stroke: var(--signal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark-dot { fill: var(--signal); }
.spark-flat polyline { stroke: var(--warn); stroke-dasharray: 3 3; }
.sensor-stat { font-size: .8rem; color: var(--signal-strong); font-weight: 600; }
.sensor-stat.warnstat { color: var(--warn); }
.panel-foot { margin-top: .8rem; padding-top: .7rem; border-top: 1px solid var(--line); font-size: .76rem; color: var(--muted); text-align: center; }

/* ---------- trust strip ---------- */
.strip { background: var(--navy-2); color: #cdd9f2; border-bottom: 1px solid rgba(255,255,255,.06); }
.strip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; padding-block: 1.6rem; }
.strip-grid > div { display: flex; flex-direction: column; gap: .15rem; }
.strip-num { font-size: 1.6rem; font-weight: 700; color: #fff; }
.strip-cap { font-size: .82rem; color: #8ea4cc; }

/* ---------- generic section ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-alt { background: var(--surface); }
.section-head { max-width: 56ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.kicker { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: .6rem; }
.section h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
.section-sub { margin-top: .9rem; font-size: 1.06rem; color: var(--muted); }
.section-sub em { color: var(--ink-soft); font-style: italic; }

/* problem cards */
.cards-3 { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.section-alt .card { background: var(--bg); }
.card-badge { display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .03em; padding: .25rem .6rem; border-radius: var(--radius-pill); margin-bottom: .9rem; }
.badge-dead { background: #fee2e2; color: #b91c1c; }
.badge-frozen { background: #e0e7ff; color: #4338ca; }
.badge-drift { background: var(--warn-soft); color: #b45309; }
.card h3 { font-size: 1.18rem; margin-bottom: .4rem; }
.card p { color: var(--muted); font-size: .96rem; }
.problem-foot { margin-top: 2rem; font-size: 1.15rem; font-weight: 600; text-align: center; }

/* steps */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr; gap: 1.4rem; counter-reset: step; }
.step { position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 12px; background: var(--brand-soft); color: var(--brand-strong); font-weight: 700; font-size: 1rem; margin-bottom: 1rem; }
.step h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.step p { color: var(--muted); font-size: .97rem; }

/* features */
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
.feature { padding: 1.4rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.feature:hover { border-color: #c7d2fe; box-shadow: var(--shadow); transform: translateY(-2px); }
.feature-ico { width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, var(--brand-soft), #e7fff5); color: var(--brand-strong); font-size: 1.25rem; margin-bottom: .9rem; }
.feature h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.feature p { color: var(--muted); font-size: .94rem; }

/* CTA */
.cta { background: linear-gradient(135deg, var(--brand), #4f46e5); color: #fff; }
.cta-inner { text-align: center; padding-block: clamp(3.5rem, 8vw, 6rem); max-width: 680px; }
.cta h2 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); }
.cta p { margin-top: .8rem; font-size: 1.1rem; color: #e0e7ff; }
.cta-form { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: 1.8rem; }
.cta-form input {
  flex: 1 1 280px; max-width: 340px; font: inherit; font-size: 1rem; padding: .9em 1.1em;
  border-radius: var(--radius-pill); border: 1px solid transparent; background: #fff; color: var(--ink);
}
.cta-form input::placeholder { color: var(--muted); }
.cta .btn-primary { background: var(--navy); }
.cta .btn-primary:hover { background: #060c18; }
.cta-fine { margin-top: 1rem; font-size: .85rem; color: #c7d2fe; }
.cta-fine a { color: #fff; text-decoration: underline; }
.cta-status { margin-top: .9rem; min-height: 1.2em; font-size: .92rem; font-weight: 500; }
.cta-status[data-state="ok"] { color: #d1fae5; }
.cta-status[data-state="err"] { color: #fecaca; }
.hp { position: absolute !important; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* footer */
.site-footer { background: var(--navy); color: #aebbd6; padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 1rem; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { margin-top: .6rem; font-size: .9rem; color: #8294b5; max-width: 30ch; }
.footer-col h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .8rem; }
.footer-col a { display: block; padding: .28rem 0; font-size: .92rem; color: #aebbd6; }
.footer-col a:hover { color: #fff; }
.footer-base { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; align-items: center; margin-top: 2.5rem; padding-top: 1.3rem; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .82rem; color: #7d8eb0; }
.footer-live { display: inline-flex; align-items: center; gap: .5rem; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (min-width: 560px) {
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .strip-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
}
@media (min-width: 880px) {
  .nav { display: flex; }
  .header-cta .btn-ghost { display: inline-flex; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}

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