/* ==========================================================================
   Vigilince — marketing site design system
   Self-contained. Tokens mirror the app (src/lib/theme.js): indigo #2E2EA8,
   charcoal #333. No build step, no framework — just CSS custom properties.
   ========================================================================== */

:root {
  /* Brand */
  --brand: #2E2EA8;
  --brand-dk: #1E1E7D;
  --brand-lt: #5C5CD0;
  --brand-2: #0145f5;          /* logo accent blue */
  --charcoal: #333333;

  /* Neutrals */
  --ink: #1c1c22;
  --ink-2: #3a3a44;
  --dim: #5b5b63;
  --faint: #8a8a93;
  --line: #e5e6ec;
  --line-2: #eef0f5;
  --mist: #f5f6f9;
  --mist-2: #eef0f6;
  --card: #ffffff;

  /* Status / loss accents */
  --amber: #F2A900;
  --amber-ink: #a8730a;
  --red: #E2433B;
  --green: #2f9e44;
  --water: #2E2EA8;
  --fire: #c2410c;
  --storm: #6d28d9;
  --mold: #15803d;
  --sewage: #854d0e;

  /* Type */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Radius + shadow */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(26,26,34,.06), 0 1px 3px rgba(26,26,34,.05);
  --shadow: 0 4px 16px rgba(26,26,34,.07), 0 1px 4px rgba(26,26,34,.05);
  --shadow-lg: 0 18px 50px rgba(30,30,125,.13), 0 6px 18px rgba(26,26,34,.06);
  --shadow-brand: 0 14px 36px rgba(46,46,168,.28);

  --container: 1180px;
  --container-narrow: 820px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--card);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-dk); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: var(--container-narrow); }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section.tight { padding: clamp(40px, 5vw, 64px) 0; }
.bg-mist { background: var(--mist); }
.bg-ink { background: #15151c; color: #e9e9f0; }
.bg-brand { background: var(--brand); color: #fff; }
.bg-gradient {
  background: radial-gradient(1200px 600px at 78% -8%, rgba(92,92,208,.22), transparent 60%),
              radial-gradient(900px 500px at 0% 0%, rgba(1,69,245,.10), transparent 55%),
              linear-gradient(180deg, #fbfbfe 0%, #f4f5fb 100%);
}
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { color: var(--ink); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 750; }
h4 { font-size: 1.06rem; font-weight: 700; }
p { margin: 0 0 1em; color: var(--ink-2); }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.3rem); color: var(--dim); line-height: 1.55; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 14px;
}
.muted { color: var(--dim); }
.center { text-align: center; }
.balance { text-wrap: balance; }
.mw-xs { max-width: 540px; } .mw-sm { max-width: 640px; } .mw-md { max-width: 760px; }
.center.mw-xs, .center.mw-sm, .center.mw-md { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: inherit; font-size: 1rem; font-weight: 650; line-height: 1;
  padding: 14px 22px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap; text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { background: var(--brand-dk); color: #fff; box-shadow: 0 18px 42px rgba(46,46,168,.34); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--brand-lt); color: var(--brand-dk); }
.btn-on-dark { background: #fff; color: var(--brand-dk); }
.btn-on-dark:hover { background: #f0f0fa; color: var(--brand-dk); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-outline-light:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }
.btn-lg { padding: 16px 28px; font-size: 1.06rem; }
.btn-sm { padding: 10px 16px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.btn-row.center { justify-content: center; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 28px; height: 70px; }
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 26px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.nav-links a {
  color: var(--ink-2); font-weight: 550; font-size: .96rem; padding: 9px 13px; border-radius: 9px;
}
.nav-links a:hover { color: var(--brand-dk); background: var(--mist); }
.nav-spacer { flex: 1; }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-cta .link-strong { font-weight: 600; color: var(--ink); padding: 9px 6px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; margin-left: auto; color: var(--ink); }

/* Dropdown */
.has-menu { position: relative; }
.menu-panel {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 300px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg);
  padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .16s ease;
}
.has-menu:hover .menu-panel, .has-menu:focus-within .menu-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.menu-item { display: flex; gap: 12px; padding: 11px 12px; border-radius: 10px; align-items: flex-start; }
.menu-item:hover { background: var(--mist); }
.menu-item .mi-dot { width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .9rem; }
.menu-item .mi-t { color: var(--ink); font-weight: 650; font-size: .95rem; line-height: 1.2; }
.menu-item .mi-d { color: var(--dim); font-size: .82rem; margin-top: 2px; }

/* Mobile nav */
.mobile-nav { display: none; padding: 8px 24px 22px; border-bottom: 1px solid var(--line); background: #fff; }
.mobile-nav a { display: block; padding: 12px 8px; color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--line-2); }
.mobile-nav .btn { margin-top: 14px; }
body.nav-open .mobile-nav { display: block; }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 7vw, 92px) 0 clamp(40px, 6vw, 72px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero .lead { margin-bottom: 28px; max-width: 560px; }
.pill-badge {
  display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px 7px 8px; font-size: .85rem; font-weight: 600; color: var(--ink-2);
  box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.pill-badge .tag { background: var(--brand); color: #fff; border-radius: 999px; padding: 3px 9px; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
.hero-note { font-size: .88rem; color: var(--faint); margin-top: 16px; display: flex; align-items: center; gap: 8px; }

/* ---------- Product mock (the "first look" card) ---------- */
.mock {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: 18px; position: relative;
}
.mock::before {
  content: ""; position: absolute; inset: -20px -20px auto auto; width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(92,92,208,.18), transparent 70%); z-index: -1;
}
.mock-top { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); margin-bottom: 14px; }
.mock-top .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.mock-top .mock-label { margin-left: auto; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.mock-readhead { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-size: .82rem; font-weight: 650; }
.chip-loss { background: rgba(46,46,168,.1); color: var(--brand-dk); }
.chip-stop { background: rgba(226,67,59,.12); color: #b3201a; }
.chip-warn { background: rgba(242,169,0,.16); color: var(--amber-ink); }
.chip-ok { background: rgba(47,158,68,.13); color: #1d7a31; }
.chip .ic { width: 14px; height: 14px; }
.conf { margin: 4px 0 16px; }
.conf-bar { height: 8px; background: var(--mist-2); border-radius: 999px; overflow: hidden; }
.conf-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-lt), var(--brand)); border-radius: 999px; }
.conf-label { display: flex; justify-content: space-between; font-size: .78rem; color: var(--dim); margin-bottom: 6px; font-weight: 600; }
.mock-line { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line-2); }
.mock-line .mk { width: 18px; height: 18px; border-radius: 5px; flex: none; margin-top: 2px; display: grid; place-items: center; }
.mock-line .mk.s1 { background: rgba(46,46,168,.12); color: var(--brand); }
.mock-line .mk.s2 { background: rgba(242,169,0,.18); color: var(--amber-ink); }
.mock-line .mk.s3 { background: rgba(47,158,68,.15); color: var(--green); }
.mock-line .mt { font-size: .9rem; font-weight: 600; color: var(--ink); }
.mock-line .md { font-size: .82rem; color: var(--dim); }
.mock-foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--faint); }

/* ---------- Trust bar ---------- */
.trustbar { display: flex; align-items: center; justify-content: center; gap: clamp(18px, 4vw, 54px); flex-wrap: wrap; opacity: .9; }
.trustbar .t-item { font-weight: 700; color: var(--faint); font-size: .92rem; letter-spacing: .02em; display: flex; align-items: center; gap: 9px; }
.trustbar .t-item svg { width: 18px; height: 18px; color: var(--brand-lt); }

/* ---------- Generic grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card.hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line); }
.feature .f-icon { width: 46px; height: 46px; border-radius: 12px; background: rgba(46,46,168,.09); color: var(--brand); display: grid; place-items: center; margin-bottom: 16px; }
.feature .f-icon svg { width: 24px; height: 24px; }
.feature h3 { margin-bottom: .4em; }
.feature p { font-size: .96rem; margin-bottom: 0; }

/* Numbered steps */
.steps { counter-reset: step; display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); }
.step { position: relative; padding-top: 8px; }
.step .num { width: 42px; height: 42px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 800; display: grid; place-items: center; margin-bottom: 16px; box-shadow: var(--shadow-brand); }
.step h3 { margin-bottom: .35em; }
.step p { font-size: .96rem; margin-bottom: 0; }

/* ---------- Loss-type cards ---------- */
.loss-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.loss-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.loss-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--accent, var(--brand)); }
.loss-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.loss-card .l-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--accent, var(--brand)); margin-bottom: 16px; }
.loss-card .l-icon svg { width: 26px; height: 26px; }
.loss-card h3 { margin-bottom: .3em; }
.loss-card p { font-size: .93rem; color: var(--dim); margin-bottom: 16px; flex: 1; }
.loss-card .l-link { font-weight: 650; color: var(--accent, var(--brand)); display: inline-flex; align-items: center; gap: 6px; font-size: .94rem; }
.loss-card:hover .l-link { gap: 10px; }

/* loss accent helpers */
.acc-water { --accent: var(--water); } .acc-fire { --accent: var(--fire); }
.acc-storm { --accent: var(--storm); } .acc-mold { --accent: var(--mold); }
.acc-sewage { --accent: var(--sewage); }

/* ---------- Tools ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tool-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow-sm); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-lt); }
.tool-kind { display: inline-flex; align-items: center; gap: 7px; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }
.tool-kind.template { color: var(--storm); }
.tool-kind.guide { color: var(--mold); }
.tool-card h3 { font-size: 1.12rem; margin-bottom: .35em; }
.tool-card p { font-size: .92rem; color: var(--dim); margin-bottom: 16px; flex: 1; }
.tool-card .t-foot { display: flex; align-items: center; justify-content: space-between; }
.tool-card .t-go { font-weight: 650; font-size: .92rem; display: inline-flex; align-items: center; gap: 6px; }
.badge-free { font-size: .72rem; font-weight: 700; color: var(--green); background: rgba(47,158,68,.12); padding: 4px 9px; border-radius: 999px; }

/* ---------- Calculator / tool app ---------- */
.tool-hero { padding: clamp(36px, 5vw, 60px) 0 0; }
.breadcrumb { font-size: .85rem; color: var(--faint); margin-bottom: 18px; }
.breadcrumb a { color: var(--dim); font-weight: 550; }
.calc-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: start; }
.calc-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow); }
.calc-field { margin-bottom: 18px; }
.calc-field label { display: block; font-weight: 650; font-size: .92rem; color: var(--ink); margin-bottom: 7px; }
.calc-field .hint { font-weight: 450; color: var(--faint); font-size: .82rem; }
.input, select.input {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, select.input:focus { outline: none; border-color: var(--brand-lt); box-shadow: 0 0 0 4px rgba(92,92,208,.14); }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.seg { display: inline-flex; background: var(--mist); border: 1px solid var(--line); border-radius: 10px; padding: 4px; gap: 4px; }
.seg button { font-family: inherit; font-size: .9rem; font-weight: 600; color: var(--dim); background: none; border: 0; padding: 8px 14px; border-radius: 7px; cursor: pointer; }
.seg button.on { background: #fff; color: var(--brand-dk); box-shadow: var(--shadow-sm); }

.result-panel { background: linear-gradient(180deg, #fbfbff, #f4f4fc); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; position: sticky; top: 90px; }
.result-big { font-size: clamp(2.4rem, 6vw, 3.4rem); font-weight: 850; color: var(--brand-dk); letter-spacing: -.03em; line-height: 1; margin: 4px 0 2px; }
.result-unit { font-size: 1rem; font-weight: 600; color: var(--dim); }
.result-meta { display: grid; gap: 10px; margin-top: 20px; }
.result-meta .rm { display: flex; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--line); font-size: .94rem; }
.result-meta .rm .k { color: var(--dim); }
.result-meta .rm .v { font-weight: 700; color: var(--ink); }
.callout { background: rgba(242,169,0,.1); border: 1px solid rgba(242,169,0,.3); border-radius: 12px; padding: 14px 16px; font-size: .88rem; color: var(--amber-ink); display: flex; gap: 10px; }
.callout svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.callout.info { background: rgba(46,46,168,.06); border-color: rgba(46,46,168,.2); color: var(--brand-dk); }

/* prose */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 22px; color: var(--ink-2); }
.prose li { margin-bottom: .5em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.prose th { background: var(--mist); font-weight: 700; color: var(--ink); }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; text-align: left; background: none; border: 0; font-family: inherit; font-size: 1.08rem; font-weight: 650; color: var(--ink); padding: 22px 40px 22px 0; cursor: pointer; position: relative; }
.faq-q::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 400; color: var(--brand); transition: transform .2s ease; }
.faq-item.open .faq-q::after { content: "\2212"; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-a p { padding: 0 40px 22px 0; margin: 0; color: var(--dim); }
.faq-item.open .faq-a { max-height: 420px; }

/* ---------- Pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; }
.price-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 24px; box-shadow: var(--shadow-sm); position: relative; }
.price-card.featured { border-color: var(--brand); box-shadow: var(--shadow-lg); }
.price-card.featured::before { content: "Most popular"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 5px 14px; border-radius: 999px; }
.price-name { font-weight: 750; font-size: 1.15rem; color: var(--ink); }
.price-amt { font-size: 2.5rem; font-weight: 850; letter-spacing: -.03em; color: var(--ink); margin: 14px 0 2px; }
.price-amt small { font-size: .95rem; font-weight: 600; color: var(--dim); letter-spacing: 0; }
.price-sub { font-size: .88rem; color: var(--dim); min-height: 38px; }
.price-card ul { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 11px; }
.price-card li { font-size: .92rem; color: var(--ink-2); display: flex; gap: 9px; align-items: flex-start; }
.price-card li svg { width: 17px; height: 17px; color: var(--green); flex: none; margin-top: 3px; }
.price-card .btn { margin-top: auto; }
.toggle-wrap { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 36px; }
.toggle { width: 52px; height: 30px; border-radius: 999px; background: var(--brand); border: 0; cursor: pointer; position: relative; padding: 0; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
.toggle.annual::after { transform: translateX(22px); }
.toggle-wrap .save { background: rgba(47,158,68,.12); color: #1d7a31; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.toggle-wrap .lab { font-weight: 600; color: var(--dim); }
.toggle-wrap .lab.on { color: var(--ink); }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--brand-dk), var(--brand) 55%, #3b3bc4); border-radius: var(--r-xl); padding: clamp(40px, 6vw, 72px); text-align: center; color: #fff; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 300px at 80% 0%, rgba(255,255,255,.16), transparent 60%); }
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); max-width: 560px; margin: 0 auto 28px; font-size: 1.1rem; }

/* ---------- Stats ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat .s-num { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 850; letter-spacing: -.03em; color: var(--brand-dk); line-height: 1; }
.stat .s-lab { font-size: .92rem; color: var(--dim); margin-top: 6px; }

/* ---------- Footer ---------- */
.site-footer { background: #15151c; color: #b8b8c4; padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 44px; }
.site-footer .f-logo img { height: 24px; margin-bottom: 16px; }
.site-footer .f-blurb { font-size: .92rem; color: #9494a2; max-width: 280px; }
.site-footer h5 { color: #fff; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 16px; font-weight: 700; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.site-footer a { color: #b8b8c4; font-size: .93rem; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #2a2a34; padding-top: 26px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; font-size: .85rem; color: #7e7e8c; }

/* ---------- Email-gate modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(20,20,28,.55); backdrop-filter: blur(3px); z-index: 100; display: none; align-items: center; justify-content: center; padding: 24px; }
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--r-lg); max-width: 460px; width: 100%; padding: 32px; box-shadow: var(--shadow-lg);
  position: relative; animation: pop .22s ease;
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal .m-close { position: absolute; top: 16px; right: 16px; background: none; border: 0; cursor: pointer; color: var(--faint); padding: 4px; }
.modal .m-icon { width: 52px; height: 52px; border-radius: 14px; background: rgba(46,46,168,.1); color: var(--brand); display: grid; place-items: center; margin-bottom: 16px; }
.modal h3 { font-size: 1.4rem; margin-bottom: .3em; }
.modal p { font-size: .95rem; color: var(--dim); }
.modal form { margin-top: 18px; }
.modal .field-row { display: grid; gap: 12px; }
.modal .input { font-size: 1rem; }
.modal .fineprint { font-size: .78rem; color: var(--faint); margin-top: 14px; margin-bottom: 0; line-height: 1.4; }
.modal .m-success { text-align: center; padding: 12px 0; }
.modal .m-success .m-icon { background: rgba(47,158,68,.12); color: var(--green); margin: 0 auto 16px; }

/* ---------- Helpers ---------- */
.hide { display: none !important; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 480px; }
  .grid-4, .stat-row { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .steps, .loss-grid, .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .price-grid { grid-template-columns: repeat(2, 1fr); }
  .calc-layout { grid-template-columns: 1fr; }
  .result-panel { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 720px) {
  .nav-links, .nav-cta .link-strong { display: none; }
  .nav-toggle { display: inline-flex; }
  .grid-2, .grid-3, .grid-4, .steps, .loss-grid, .tool-grid, .stat-row, .price-grid { grid-template-columns: 1fr; }
  .input-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  body { font-size: 16px; }
}
@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; }
  .btn-row .btn { width: 100%; }
}

/* ---------- Photo backgrounds (parallax + tint + slight blur) ---------- */
/* Usage: <section class="… photo-bg" style="--photo:url('assets/x.jpg')"> … </section>
   Two pseudo-layers: ::before holds the fixed (parallax) photo, ::after lays a
   dark tint and a slight blur over it. The blur lives on ::after (not on the
   photo layer) because a filter on the photo element itself would cancel the
   fixed/parallax behavior. isolation:isolate keeps the blur sampling only the
   photo, never the page behind the section. */
.photo-bg {
  position: relative;
  color: #fff;
  background-color: #14141c;
  overflow: hidden;
  isolation: isolate;
}
.photo-bg::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: var(--photo);
  background-size: cover; background-position: center; background-repeat: no-repeat;
  background-attachment: fixed;
}
.photo-bg::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--tint, linear-gradient(180deg, rgba(14,14,22,.72), rgba(15,15,24,.82)));
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.photo-bg > * { position: relative; z-index: 0; }

/* hero variant — a touch darker on the copy (left) side for legibility */
.hero.photo-bg::after {
  background: linear-gradient(104deg, rgba(11,11,18,.9) 0%, rgba(12,12,20,.74) 56%, rgba(13,13,24,.62) 100%);
}

/* light-text treatment inside any photo band */
.photo-bg h1, .photo-bg h2, .photo-bg h3 { color: #fff; }
.photo-bg p, .photo-bg .lead { color: rgba(255,255,255,.85); }
.photo-bg .eyebrow { color: rgba(255,255,255,.82); }
.photo-bg .hero-note { color: rgba(255,255,255,.72); }
.photo-bg .breadcrumb, .photo-bg .breadcrumb a { color: rgba(255,255,255,.72); }
.photo-bg .hl { color: #cfcffb; }                 /* light accent for the hero highlight word */
.photo-bg .pill-badge {
  background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.22);
  color: #fff; box-shadow: none;
}
.photo-bg .pill-badge .tag { background: #fff; color: var(--brand-dk); }
.photo-bg .mock { color: var(--ink); }            /* keep the product card crisp + readable */
.hl { color: var(--brand); }                      /* default (non-photo) accent */

/* parallax is a desktop nicety — mobile browsers jank on fixed backgrounds */
@media (max-width: 820px) {
  .photo-bg::before { background-attachment: scroll; }
  .hero.photo-bg::after { background: linear-gradient(180deg, rgba(11,11,18,.84), rgba(13,13,24,.8)); }
}

/* ---------- Live pipeline panel (product page demo of the app run UI) ---------- */
/* Colors mirror the real app RunScreen: bg #17171c, panel #1f1f26, line #34343f. */
.run-stage { max-width: 580px; margin: 0 auto; }
.run-panel {
  background: #17171c; border: 1px solid #2a2a34; border-radius: 18px;
  padding: 20px 22px 22px; box-shadow: var(--shadow-lg); color: #e8e8ee;
}
.run-top { display: flex; align-items: center; gap: 7px; padding-bottom: 15px; border-bottom: 1px solid #26262f; }
.run-top .rd { width: 9px; height: 9px; border-radius: 50%; background: #3a3a45; }
.run-top .run-id { margin-left: auto; font: 700 11px/1 ui-monospace, "SF Mono", monospace; letter-spacing: .07em; color: #6f6f7d; }
.run-top .run-timer { font: 700 11px/1 ui-monospace, "SF Mono", monospace; color: var(--brand-lt); min-width: 30px; text-align: right; }

.run-steps { list-style: none; margin: 0; padding: 14px 0 0; }
.run-step { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 13px; padding-bottom: 18px; }
.run-step:last-child { padding-bottom: 0; }
.run-step::before {                       /* connector rail */
  content: ""; position: absolute; left: 14px; top: 30px; bottom: -2px; width: 2px; background: #2a2a34; transition: background .4s ease;
}
.run-step:last-child::before { display: none; }
.run-step.is-done::before { background: #2f9e44; }
.run-node {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: #1e1e26; border: 2px solid #34343f; color: #6f6f7d; z-index: 1;
  transition: border-color .3s ease, background .3s ease, box-shadow .3s ease;
}
.run-node svg { width: 15px; height: 15px; }
.run-node .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--brand-lt); display: none; }
.run-label { font-size: 14px; font-weight: 700; color: #8b8b97; transition: color .3s ease; line-height: 1.45; }
.run-sub { font-size: 12px; color: #6f6f7d; margin-top: 1px; line-height: 1.45; }

/* node states */
.run-step.is-active .run-node { border-color: var(--brand-lt); background: #1b1b2a; box-shadow: 0 0 0 4px rgba(92,92,208,.15); color: var(--brand-lt); }
.run-step.is-active .run-node .check { display: none; }
.run-step.is-active .run-node .pulse { display: block; animation: runpulse 1.1s ease-in-out infinite; }
.run-step.is-active .run-label { color: #fff; }
.run-step.is-done .run-node { border-color: #2f9e44; background: #14301d; color: #6ee787; }
.run-step.is-done .run-node .pulse { display: none; }
.run-step.is-done .run-label { color: #e8e8ee; }
@keyframes runpulse { 0%,100% { transform: scale(.7); opacity: .55; } 50% { transform: scale(1); opacity: 1; } }

/* reveal area under a step (first-read card / progress / summary) */
.run-detail { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .45s ease, opacity .3s ease, margin .3s ease; }
.run-step.is-active .run-detail, .run-step.is-done .run-detail { max-height: 230px; opacity: 1; margin-top: 10px; }

/* first-read mini card */
.run-fr { background: #1f1f27; border: 1px solid #34343f; border-radius: 10px; padding: 11px 12px; }
.run-fr.stop { background: #2a1614; border-color: #6e2b27; }
.run-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 9px; }
.run-chip { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 6px; display: inline-flex; align-items: center; gap: 5px; }
.run-chip.loss { background: rgba(92,92,208,.2); color: #b9b9f5; }
.run-chip.stop { background: rgba(226,67,59,.2); color: #f3a39d; }
.run-chip svg { width: 12px; height: 12px; }
.run-conf-row { display: flex; justify-content: space-between; font-size: 10.5px; color: #6f6f7d; margin-bottom: 4px; font-weight: 600; }
.run-bar { height: 6px; background: #2a2a34; border-radius: 99px; overflow: hidden; }
.run-bar > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand-lt), var(--brand)); border-radius: 99px; }
.run-conf-bar > span { transition: width 1s ease; }
.run-prog-bar { margin-bottom: 9px; }
.run-prog-bar > span { transition: width .2s linear; }
.run-prog-label { font-size: 12px; color: #b9b9c4; min-height: 17px; line-height: 1.4; }
.run-counters { display: flex; gap: 20px; margin-top: 10px; }
.run-counter { font-size: 11px; color: #6f6f7d; }
.run-counter b { display: block; color: #e8e8ee; font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.run-open { display: inline-flex; align-items: center; gap: 6px; margin-top: 11px; background: var(--amber); color: #1a1300; font-weight: 800; font-size: 12.5px; padding: 8px 14px; border-radius: 9px; }
.run-open svg { width: 14px; height: 14px; }
