/* Vigil marketing — shared chrome for the secondary pages (security, pricing,
   vs, for/*, how-it-works). Loaded alongside tokens.css + landing.css so these
   pages reuse .nav, .board, .faq, .price-card, .section-h, .cta and only add
   what's page-structural here. Everything derives from Nightwatch tokens. */

/* ---- nav: "For…" dropdown (native <details>, no JS, keyboard-accessible) ---- */
.nav-dd { position: relative; }
.nav-dd > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  color: var(--nw-text-dim); font-size: .92rem; font-weight: 600;
}
.nav-dd > summary::-webkit-details-marker { display: none; }
.nav-dd > summary::after {
  content: "▾"; font-size: .7rem; color: var(--nw-text-dim); transition: transform .18s;
}
.nav-dd[open] > summary, .nav-dd > summary:hover { color: var(--nw-text); }
.nav-dd[open] > summary::after { transform: rotate(180deg); }
.nav-dd-menu {
  position: absolute; top: calc(100% + 12px); right: 0; min-width: 232px;
  display: grid; padding: 8px; gap: 2px; z-index: 40;
  background: var(--nw-surface-2); border: 1px solid var(--nw-line-strong);
  border-radius: var(--nw-radius); box-shadow: var(--nw-shadow);
}
.nav-dd-menu a {
  display: block; padding: 9px 12px; border-radius: var(--nw-radius-sm);
  color: var(--nw-text-dim); font-size: .9rem; font-weight: 600; text-decoration: none;
}
.nav-dd-menu a:hover { color: var(--nw-text); background: var(--nw-surface); }
.nav-active { color: var(--nw-text) !important; }
.nav-active::after {
  content: ""; display: block; height: 2px; margin-top: 4px; border-radius: 2px;
  background: var(--nw-amber);
}

/* ---- language switcher (EN ⇄ ع) ---- */
.lang-btn {
  flex: none; width: 34px; height: 34px; padding: 0; cursor: pointer;
  font-family: var(--nw-font-mono); font-size: .82rem; font-weight: 700;
  color: var(--nw-text-dim); background: transparent;
  border: 1px solid var(--nw-line-strong); border-radius: 999px;
  transition: color .18s, border-color .18s;
}
.lang-btn:hover { color: var(--nw-amber); border-color: var(--nw-amber); }

/* ---- RTL (Arabic) — Archivo/Plex have no Arabic glyphs, and Arabic takes no
   letter-spacing; mirror the few explicitly left-aligned headings. ---- */
[dir="rtl"] { font-family: "Segoe UI", Tahoma, system-ui, sans-serif; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
[dir="rtl"] .nw-mono, [dir="rtl"] .hero-trust li {
  font-family: "Segoe UI", Tahoma, system-ui, sans-serif;
}
[dir="rtl"] .eyebrow, [dir="rtl"] .nw-mono, [dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 {
  letter-spacing: normal;
}
[dir="rtl"] .moment .section-h, [dir="rtl"] .moment-copy,
[dir="rtl"] .signup .section-h { text-align: right; }

/* ---- mobile hamburger (shown only on small screens once nav.js enables js-nav) ---- */
.nav-burger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  background: transparent; border: 0; padding: 8px; margin: -8px -4px -8px 0;
}
.nav-burger span {
  display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--nw-text);
  transition: transform .22s ease, opacity .18s ease;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- page hero (secondary pages) ---- */
.page-hero {
  position: relative; max-width: 900px; margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) clamp(16px, 5vw, 56px) clamp(24px, 4vw, 40px);
  text-align: center;
}
.page-hero .eyebrow { justify-content: center; }
.page-hero h1 {
  font-family: var(--nw-font-display); font-weight: 900; letter-spacing: -.02em;
  font-size: clamp(2.1rem, 5.2vw, 3.4rem); line-height: 1.02; margin: 0 0 18px;
}
.page-hero .lede {
  color: var(--nw-text-dim); font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  line-height: 1.62; max-width: 60ch; margin: 0 auto 26px;
}
.page-hero .hero-ctas { justify-content: center; }

/* ---- legal pages (privacy / terms / dpa) ---- */
.legal-draft-banner {
  max-width: 780px; margin: clamp(24px, 5vw, 40px) auto 0;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--nw-amber); border-radius: 8px;
  color: var(--nw-text-dim); font-size: .92rem; line-height: 1.55;
}
.legal-draft-banner strong { color: var(--nw-amber); }
.legal-draft-banner code { font-family: var(--nw-font-mono); font-size: .9em; }
/* The Arabic-availability note had no rule, so it sprawled full-width flush-left
   while the banner above and hero below are centered. Match the banner's box so
   it reads as one column. Centered in RTL too (logical margin auto is symmetric). */
.legal-ar-note {
  max-width: 780px; margin: var(--sp-3) auto 0;
  padding: 0 var(--sp-4);
  font-size: .86rem; text-align: center;
}
.legal-body { max-width: 70ch; margin: 0 auto; color: var(--nw-text-dim); line-height: 1.7; }

/* ---- layout utilities (keep markup CSP-clean: no inline styles) ---- */
.sec-top { margin-top: clamp(20px, 4vw, 40px); }
/* .mk-lead.push wins over .mk-lead's own margin shorthand (equal-order, higher specificity) */
.push, .mk-lead.push { margin-top: 26px; }
.prose.center { text-align: center; }

/* ---- generic section wrapper ---- */
.mk { max-width: 1000px; margin: clamp(44px, 7vw, 88px) auto 0; padding: 0 clamp(16px, 5vw, 56px); }
.mk-narrow { max-width: 780px; }
.mk-lead { text-align: center; color: var(--nw-text-dim); max-width: 62ch;
  margin: -24px auto 34px; font-size: .98rem; line-height: 1.62; }

/* ---- prose blocks ---- */
.prose { color: var(--nw-text-dim); line-height: 1.7; font-size: 1rem; }
.prose h3 { color: var(--nw-text); font-size: 1.15rem; margin: 26px 0 8px; }
.prose p { margin: 0 0 14px; }
.prose strong { color: var(--nw-text); }
.prose a { color: var(--nw-signal); text-decoration: none; }
.prose a:hover { text-decoration: underline; }

/* ---- pricing tiers (value by site size; up to 2/5/34 cameras within each) ---- */
.tiers {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--nw-gap);
  max-width: 1020px; margin: 0 auto; align-items: stretch;
}
.tier {
  position: relative; display: flex; flex-direction: column;
  padding: 30px 24px 26px; border-radius: 18px;
  background: linear-gradient(165deg, var(--nw-surface-2), var(--nw-surface));
  border: 1px solid var(--nw-line); box-shadow: var(--nw-hairline);
}
.tier-featured {
  border-color: color-mix(in srgb, var(--nw-amber) 55%, transparent);
  box-shadow: var(--nw-glow-amber), var(--nw-hairline);
}
.tier-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(180deg, var(--nw-amber-soft), var(--nw-amber));
  color: #241300; font-size: .64rem; font-weight: 800; letter-spacing: .08em;
  padding: 4px 12px; border-radius: 999px; text-transform: uppercase; white-space: nowrap;
}
.tier-name {
  font-family: var(--nw-font-mono); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--nw-text-dim); margin: 0 0 12px;
}
.tier-price { font-family: var(--nw-font-display); font-weight: 900; font-size: 2.5rem; line-height: 1; margin: 0; }
.tier-price .cur { color: var(--nw-amber); font-size: 1.3rem; vertical-align: super; }
.tier-price .per { font-family: var(--nw-font-mono); font-size: .78rem; color: var(--nw-text-dim); font-weight: 400; }
.tier-for { color: var(--nw-text-dim); font-size: .86rem; line-height: 1.45; margin: 10px 0 18px; }
.tier ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 9px; text-align: left; }
.tier li { position: relative; padding-left: 24px; font-size: .9rem; }
.tier li::before { content: "✓"; position: absolute; left: 0; color: var(--nw-sage); font-weight: 700; }
.tier .cta, .tier .cta-outline { margin-top: auto; display: block; text-align: center; }
.cta-outline {
  padding: 13px 20px; border-radius: 12px; text-decoration: none; font-weight: 700;
  color: var(--nw-text); border: 1px solid var(--nw-line-strong); transition: border-color .18s, color .18s;
}
.cta-outline:hover { border-color: var(--nw-amber); color: var(--nw-amber); }
/* The anti-per-camera headline — the promise that lives inside every tier. */
.tier-promise {
  max-width: 620px; margin: 26px auto 0; text-align: center;
  font-size: .92rem; color: var(--nw-text-dim);
}
.tier-promise strong { color: var(--nw-amber); }
.tier-note { text-align: center; color: var(--nw-text-dim); font-size: .84rem; margin: 8px auto 0; }

/* ---- feature / value grid ---- */
.mk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--nw-gap); }
.mk-grid.two { grid-template-columns: repeat(2, 1fr); }
.mk-tile {
  padding: 22px; border-radius: var(--nw-radius);
  background: linear-gradient(160deg, var(--nw-surface-2), var(--nw-surface));
  border: 1px solid var(--nw-line); box-shadow: var(--nw-hairline);
}
.mk-tile .ic { font-size: 1.4rem; line-height: 1; }

/* SVG icon set (sprite via <use>) — inherits accent from currentColor. */
.ic-svg { display: block; width: 28px; height: 28px; color: var(--nw-amber); }
.mk-tile .ic-svg { margin-bottom: 2px; }
.ic-chip { width: 15px; height: 15px; }
.chip .ic-svg { color: var(--nw-text-dim); }
.mk-tile h3 { font-size: 1.08rem; margin: 12px 0 8px; }
.mk-tile p { color: var(--nw-text-dim); font-size: .92rem; line-height: 1.55; margin: 0; }

/* ============================================================
   Data-flow diagram — the heart of /security. Shows plainly what
   stays on the box vs the single thing that leaves. Honest by design.
   ============================================================ */
.flow { display: grid; grid-template-columns: 1fr; gap: 18px; }
.flow-lane {
  position: relative; border-radius: var(--nw-radius); padding: 20px 22px;
  border: 1px solid var(--nw-line); background: var(--nw-surface);
  box-shadow: var(--nw-hairline);
}
.flow-lane .lane-label {
  font-family: var(--nw-font-mono); font-size: .66rem; letter-spacing: .14em;
  text-transform: uppercase; margin: 0 0 12px; display: inline-flex; align-items: center; gap: 8px;
}
.flow-onbox { box-shadow: inset 3px 0 0 var(--nw-sage), var(--nw-hairline); }
.flow-onbox .lane-label { color: var(--nw-sage); }
.flow-leaves { box-shadow: inset 3px 0 0 var(--nw-signal), var(--nw-hairline); }
.flow-leaves .lane-label { color: var(--nw-signal); }
.flow-optional { box-shadow: inset 3px 0 0 var(--nw-amber), var(--nw-hairline); }
.flow-optional .lane-label { color: var(--nw-amber); }
.lane-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.flow-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px;
  border-radius: 999px; font-size: .84rem; color: var(--nw-text);
  background: var(--nw-ink-2); border: 1px solid var(--nw-line);
}
.chip .chip-ic { font-size: .78rem; }
.flow-note { margin: 10px 0 0; font-size: .84rem; color: var(--nw-text-dim); line-height: 1.55; }

/* ---- comparison callout row (used on /vs and /security) ---- */
.claim {
  display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start;
  padding: 14px 0; border-top: 1px solid var(--nw-line);
}
.claim:first-child { border-top: none; }
.claim .ck { color: var(--nw-sage); font-weight: 700; }
.claim .cx { color: var(--nw-alarm); font-weight: 700; }
.claim p { margin: 0; line-height: 1.55; }
.claim strong { color: var(--nw-text); }
.claim span { color: var(--nw-text-dim); font-size: .92rem; }

/* ---- CTA band (closes every secondary page → one signup source) ---- */
.cta-band {
  position: relative; isolation: isolate; overflow: hidden;
  max-width: 1000px; margin: clamp(56px, 9vw, 104px) auto clamp(40px, 7vw, 80px);
  padding: clamp(32px, 5vw, 52px) clamp(20px, 5vw, 48px); text-align: center;
  border-radius: 22px; border: 1px solid var(--nw-line-strong);
  background: linear-gradient(160deg, var(--nw-surface-2), var(--nw-surface));
  box-shadow: var(--nw-hairline);
}
.cta-band::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(70% 120% at 50% 0%, rgba(255, 168, 40, 0.08), transparent 62%);
}
.cta-band h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: 0 auto 12px; max-width: 22ch; }
.cta-band p { color: var(--nw-text-dim); max-width: 54ch; margin: 0 auto 22px; line-height: 1.6; }
.cta-band .hero-ctas { justify-content: center; }

/* ---- founder guarantee (home proof section) — real commitment, not fabricated proof ---- */
.founder {
  display: flex; gap: 20px; align-items: flex-start; margin-top: var(--nw-gap);
  padding: 24px clamp(20px, 4vw, 32px); border-radius: var(--nw-radius);
  background: linear-gradient(160deg, var(--nw-surface-2), var(--nw-surface));
  border: 1px solid var(--nw-line-strong); box-shadow: var(--nw-hairline);
}
.founder-badge {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--nw-font-display); font-weight: 900;
  color: #241300; background: linear-gradient(180deg, var(--nw-amber-soft), var(--nw-amber));
  box-shadow: var(--nw-glow-amber);
}
.founder-quote { margin: 0 0 10px; font-size: 1.02rem; line-height: 1.6; color: var(--nw-text); }
.founder-sign { color: var(--nw-text-dim); }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .mk-grid, .mk-grid.two { grid-template-columns: 1fr; }
  .tiers { grid-template-columns: 1fr; max-width: 420px; }
}
@media (max-width: 560px) {
  .founder { flex-direction: column; gap: 14px; }
}
@media (max-width: 640px) {
  .flow-lane { padding: 16px; }

  /* Collapse the link row into a slide-down panel under the sticky bar.
     Progressive enhancement: only active once nav.js adds .js-nav. */
  .nav.js-nav .nav-burger { display: inline-flex; }
  .nav.js-nav .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0 clamp(16px, 5vw, 56px);
    background: color-mix(in srgb, var(--nw-ink) 95%, transparent);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--nw-line-strong);
    box-shadow: var(--nw-shadow);
    max-height: 0; overflow: hidden;
    transition: max-height .26s ease;
  }
  .nav.js-nav .nav-links.nav-open { max-height: 80vh; overflow-y: auto; }
  .nav.js-nav .nav-links > a,
  .nav.js-nav .nav-links > .nav-dd {
    width: 100%; padding: 13px 2px; border-bottom: 1px solid var(--nw-line);
  }
  .nav.js-nav .nav-links > a:first-child { padding-top: 16px; }
  .nav.js-nav .nav-links .nav-cta {
    text-align: center; border-bottom: 0; margin: 12px 0 16px;
    padding: 12px; border-radius: 999px;
  }
  /* "For" opens inline inside the panel — no floating menu on mobile. */
  .nav.js-nav .nav-dd > summary { justify-content: space-between; width: 100%; }
  .nav.js-nav .nav-dd-menu {
    position: static; min-width: 0; margin-top: 6px; padding: 4px 0 0 12px;
    background: transparent; border: 0; box-shadow: none;
  }
  .nav.js-nav .nav-dd-menu a { padding: 9px 6px; }
}
