/* ==========================================================
   Vappler — vappler.com landing page
   Palette sampled from the brand mark: #00D3EB needle, #3A474F rings, #000 plate
   ========================================================== */

:root {
  --plate: #000000;
  --panel: #0A1014;
  --panel-2: #0E161B;
  --rule: #1C262C;
  --rule-bright: #2B3940;
  --slate: #3A474F;
  --signal: #00D3EB;
  --signal-dim: #0E8FA1;
  --sodium: #F2A33C;
  --ink: #E9EFF2;
  --ink-2: #94A5AE;
  --ink-3: #6A7B85;

  --rail: 1160px;
  --prose: 62ch;

  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --pad-y: clamp(76px, 9vw, 132px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--plate);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--ink); text-decoration-color: var(--slate); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--signal); }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 1px;
}

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 5.1vw, 4rem); }
h2 { font-size: clamp(1.85rem, 3.3vw, 2.6rem); }
h3 { font-size: 1.1875rem; letter-spacing: -0.015em; line-height: 1.3; }

p { margin: 0 0 1.1em; max-width: var(--prose); }
p:last-child { margin-bottom: 0; }

.lede { font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); color: var(--ink-2); }

.rail {
  width: 100%;
  max-width: var(--rail);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 44px);
}

section[id] { scroll-margin-top: 84px; }

.band { border-top: 1px solid var(--rule); padding-block: var(--pad-y); }

.data { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.01em; }

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
}
.brand img { width: 26px; height: 26px; }

.head-nav { display: flex; gap: 26px; }
.head-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.9375rem;
}
.head-nav a:hover { color: var(--ink); }

/* ---------- buttons + form ---------- */

.btn {
  font: inherit;
  font-weight: 550;
  font-size: 0.9375rem;
  border-radius: 2px;
  border: 1px solid transparent;
  padding: 0 20px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--signal);
  color: #00171C;
  border-color: var(--signal);
}
.btn-primary:hover { background: #3DE2F5; border-color: #3DE2F5; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-bright);
}
.btn-ghost:hover { border-color: var(--slate); background: var(--panel); }

.btn-sm { height: 38px; padding: 0 15px; font-size: 0.875rem; }

.signup { max-width: 520px; }

.signup-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.signup input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 0.9375rem;
  height: 46px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--rule-bright);
  border-radius: 2px;
}
.signup input[type="email"]::placeholder { color: var(--ink-3); }
.signup input[type="email"]:focus-visible { border-color: var(--signal); outline-offset: 1px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note {
  margin: 12px 0 0;
  font-size: 0.875rem;
  color: var(--ink-3);
  max-width: 46ch;
}

.form-msg {
  margin: 12px 0 0;
  font-size: 0.9375rem;
  min-height: 1.4em;
  display: none;
  padding-left: 14px;
  border-left: 2px solid var(--slate);
}
.form-msg.is-shown { display: block; }
.form-msg.is-ok { color: var(--ink); border-left-color: var(--signal); }
.form-msg.is-err { color: #F0C9A0; border-left-color: var(--sodium); }

/* ---------- hero ---------- */

.hero { padding-block: clamp(64px, 7.5vw, 104px) clamp(72px, 8vw, 118px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: start;
}

.hero h1 { margin-bottom: 22px; }
.hero .lede { margin-bottom: 30px; max-width: 54ch; }

.hero-proof {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  color: var(--ink-3);
  font-size: 0.875rem;
}
.hero-proof span { display: inline-flex; align-items: center; gap: 8px; }
.hero-proof span::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--slate);
  border-radius: 50%;
  flex: none;
}

/* ---------- path panel ---------- */

.panel {
  background:
    radial-gradient(120% 90% at 78% 6%, rgba(0, 211, 235, 0.07), transparent 58%),
    var(--panel);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--rule);
  background: rgba(0, 0, 0, 0.35);
  color: var(--ink-3);
}
.panel-head .data { color: var(--ink-3); }

.scope {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.75rem;
}
.scope::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sodium);
  box-shadow: 0 0 0 3px rgba(242, 163, 60, 0.14);
}

.targets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 16px 4px;
}

.chip {
  font: inherit;
  font-family: var(--mono);
  font-size: 0.75rem;
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--rule-bright);
  border-radius: 2px;
  padding: 5px 10px;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease;
}
.chip:hover { color: var(--ink); border-color: var(--slate); }
.chip[aria-pressed="true"] {
  color: var(--signal);
  border-color: var(--signal-dim);
  background: rgba(0, 211, 235, 0.08);
}

.ladder { padding: 18px 16px 6px; position: relative; }

.hop {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  column-gap: 12px;
}

.hop-rail { position: relative; display: flex; justify-content: center; }

.hop-node {
  width: 11px;
  height: 11px;
  margin-top: 5px;
  border: 1px solid var(--slate);
  background: var(--plate);
  border-radius: 50%;
  z-index: 2;
  transition: border-color 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}
.hop.is-lit .hop-node { border-color: var(--signal); background: var(--signal); box-shadow: 0 0 0 4px rgba(0, 211, 235, 0.12); }
.hop.is-target .hop-node { border-radius: 1px; transform: rotate(45deg); width: 10px; height: 10px; }
.hop.is-lit.is-target .hop-node { border-color: var(--sodium); background: var(--sodium); box-shadow: 0 0 0 4px rgba(242, 163, 60, 0.15); }

.hop-line {
  position: absolute;
  top: 16px;
  bottom: -4px;
  width: 1px;
  background: var(--rule-bright);
  z-index: 1;
}
.hop-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--signal-dim);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 340ms ease;
}
.hop.is-lit .hop-line::after { transform: scaleY(1); }
.hop.is-cut .hop-line { background: repeating-linear-gradient(to bottom, var(--slate) 0 3px, transparent 3px 7px); }
.hop.is-cut .hop-line::after { transform: scaleY(0); }

.hop-body { padding-bottom: 18px; min-width: 0; }
.hop:last-child .hop-body { padding-bottom: 6px; }

.hop-host {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}
.hop-host em {
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-3);
}

.hop-edge {
  margin-top: 5px;
  font-size: 0.8125rem;
  color: var(--ink-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  transition: color 200ms ease, opacity 200ms ease;
}
.hop.is-cut .hop-edge { color: var(--ink-3); opacity: 0.5; text-decoration: line-through; text-decoration-color: var(--sodium); }

.tag {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--sodium);
  border: 1px solid rgba(242, 163, 60, 0.4);
  border-radius: 2px;
  padding: 1px 6px;
}
.tag-cve { color: var(--ink-2); border-color: var(--rule-bright); }

.readout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 28px;
  padding: 16px;
  border-top: 1px solid var(--rule);
  background: rgba(0, 0, 0, 0.3);
}

.metric { display: flex; flex-direction: column; gap: 3px; }
.metric b {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--sodium);
  font-variant-numeric: tabular-nums;
  transition: color 240ms ease;
}
.metric.is-broken b { color: var(--signal); }
.metric small { font-size: 0.75rem; color: var(--ink-3); }
.metric-sm b { font-size: 1.0625rem; color: var(--ink); }

.readout .btn { margin-left: auto; }

.fix-note {
  padding: 0 16px 16px;
  font-size: 0.8125rem;
  color: var(--ink-2);
  background: rgba(0, 0, 0, 0.3);
  display: none;
}
.fix-note.is-shown { display: block; }
.fix-note code { font-family: var(--mono); color: var(--signal); font-size: 0.8125rem; }

.panel-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--rule);
  font-size: 0.75rem;
  color: var(--ink-3);
}

/* ---------- narrow two-column prose ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 76px);
  align-items: start;
}

.split h2 { margin-bottom: 18px; }

/* ---------- funnel ---------- */

.cap-lead { margin-top: 38px; }
h2 + .cap-list { margin-top: 38px; }
.rung-a { --w: 100%; }
.rung-b { --w: 11%; }
.rung-c { --w: 4%; }

.funnel { margin-top: 34px; display: flex; flex-direction: column; gap: 2px; }

.rung {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 13px 16px;
  border: 1px solid var(--rule);
  background: var(--panel);
  position: relative;
  overflow: hidden;
}
.rung::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w, 100%);
  background: linear-gradient(90deg, rgba(58, 71, 79, 0.5), rgba(58, 71, 79, 0.06));
}
.rung:last-child::before { background: linear-gradient(90deg, rgba(0, 211, 235, 0.3), rgba(0, 211, 235, 0.04)); }
.rung > * { position: relative; }
.rung span { font-size: 0.9375rem; color: var(--ink-2); }
.rung:last-child span { color: var(--ink); }
.rung b {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
}
.rung:last-child b { color: var(--signal); }

/* ---------- capabilities ---------- */

.cap-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  padding: clamp(26px, 3.2vw, 38px);
  border: 1px solid var(--rule-bright);
  border-radius: 3px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(0, 211, 235, 0.08), transparent 60%),
    var(--panel);
  margin-bottom: 2px;
}
.cap-lead h3 { font-size: clamp(1.3rem, 2.1vw, 1.6rem); margin-bottom: 14px; }

.cap-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.cap {
  padding: 26px clamp(20px, 2.4vw, 30px) 28px;
  border: 1px solid var(--rule);
  margin: -1px 0 0 -1px;
}
.cap h3 { margin-bottom: 9px; }
.cap p { color: var(--ink-2); font-size: 0.9375rem; margin: 0; }

/* ---------- steps ---------- */

.steps { counter-reset: step; margin-top: 38px; display: grid; gap: 2px; }

.step {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 4px;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.step:last-child { border-bottom: 1px solid var(--rule); }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--signal-dim);
  padding-top: 3px;
}
.step h3 { margin-bottom: 7px; }
.step p { color: var(--ink-2); font-size: 0.9375rem; }
.step code {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--signal);
  background: var(--panel-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 2px 7px;
  display: inline-block;
  margin-top: 4px;
}

/* ---------- posture ---------- */

.posture { margin-top: 34px; display: grid; gap: 0; }

.post-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.post-row:last-child { border-bottom: 1px solid var(--rule); }
.post-row dt { font-family: var(--mono); font-size: 0.8125rem; color: var(--ink-3); }
.post-row dd { margin: 0; font-size: 0.9375rem; color: var(--ink-2); }
.post-row dd b { color: var(--ink); font-weight: 550; }

.candid {
  margin-top: 30px;
  padding: 20px 22px;
  border: 1px solid rgba(242, 163, 60, 0.28);
  border-radius: 3px;
  background: rgba(242, 163, 60, 0.04);
}
.candid p { font-size: 0.9375rem; color: var(--ink-2); max-width: 70ch; }
.candid strong { color: var(--ink); font-weight: 600; }

/* ---------- closing cta ---------- */

.close-cta {
  border-top: 1px solid var(--rule);
  padding-block: clamp(72px, 8vw, 116px);
  background: radial-gradient(70% 140% at 12% 0%, rgba(0, 211, 235, 0.07), transparent 62%);
}
.close-cta h2 { margin-bottom: 16px; max-width: 18ch; }
.close-cta .lede { margin-bottom: 28px; }

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--rule);
  padding-block: 30px 40px;
  color: var(--ink-3);
  font-size: 0.875rem;
}
.foot-inner { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: center; }
.foot-inner p { margin: 0; }
.foot-inner nav { margin-left: auto; display: flex; gap: 22px; }
.site-foot a { color: var(--ink-3); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .hero-grid, .split, .cap-lead { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { gap: 48px; }
  .head-nav { display: none; }
}

@media (max-width: 620px) {
  .cap-list { grid-template-columns: minmax(0, 1fr); }
  .signup-row { flex-direction: column; }
  .signup input[type="email"], .signup .btn { width: 100%; }
  .post-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .readout { gap: 18px; }
  .readout .btn { margin-left: 0; width: 100%; }
  .foot-inner nav { margin-left: 0; }
}

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