/* ==========================================================================
   Watchdog AI - shared stylesheet
   Dark security-SaaS theme - no external dependencies
   ========================================================================== */

/* ---- Design tokens ---- */
:root {
  --bg: #070b14;
  --bg-2: #0a1120;
  --surface: rgba(148, 163, 184, 0.055);
  --surface-2: rgba(148, 163, 184, 0.1);
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.26);
  --text: #e8eefb;
  --muted: #98a5be;
  --faint: #6b7893;
  --cyan: #22d3ee;
  --indigo: #818cf8;
  --violet: #a78bfa;
  --green: #34d399;
  --red: #fb7185;
  --amber: #fbbf24;
  --gradient: linear-gradient(120deg, var(--cyan), var(--indigo) 55%, var(--violet));
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --radius: 18px;
  --radius-sm: 12px;
  --nav-h: 76px;
  --container: 1120px;
  --shadow-lg: 0 24px 70px -20px rgba(2, 6, 23, 0.8);
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(34, 211, 238, 0.28); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
main { display: block; }

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0 0 1em; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 58ch; }
.grad-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Nav ---- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 11, 20, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: var(--nav-h); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand svg { width: 30px; height: 30px; }
.brand em { font-style: normal; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px;
  color: var(--muted); font-weight: 500; font-size: 0.95rem;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav-cta { margin-left: 8px; }
.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--border-strong); color: var(--text);
  border-radius: 10px; width: 42px; height: 42px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 840px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 6px;
    padding: 16px 24px 20px;
    background: rgba(7, 11, 20, 0.97);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-cta { margin: 8px 0 0; display: inline-flex; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; font-family: inherit; line-height: 1.2;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn-sm { padding: 9px 18px; font-size: 0.88rem; }
.btn-block { width: 100%; }
.btn-primary {
  background: var(--gradient); color: #05070d;
  box-shadow: 0 10px 30px -10px rgba(56, 189, 248, 0.5);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(129, 140, 248, 0.55); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: rgba(34, 211, 238, 0.5); background: var(--surface-2); }

/* ---- Hero (home) ---- */
.hero { position: relative; padding: calc(var(--nav-h) + 72px) 0 96px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 340px at 18% -10%, rgba(34, 211, 238, 0.16), transparent 60%),
    radial-gradient(700px 420px at 85% 0%, rgba(129, 140, 248, 0.18), transparent 65%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 75%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero-title { font-size: clamp(2.4rem, 4.6vw, 3.6rem); margin-bottom: 20px; }
.hero-sub { font-size: 1.15rem; color: var(--muted); max-width: 52ch; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.hero-note { color: var(--faint); font-size: 0.85rem; margin: 0; }
.hero-note b { color: var(--muted); font-weight: 600; }

/* ---- Console mock ---- */
.console {
  position: relative;
  border-radius: var(--radius); border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(16, 24, 44, 0.92), rgba(9, 14, 26, 0.95));
  box-shadow: var(--shadow-lg); overflow: hidden;
  font-family: var(--mono); font-size: 0.8rem;
}
.console-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.04);
}
.console-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); }
.console-bar .dot.red { background: var(--red); }
.console-bar .dot.amber { background: var(--amber); }
.console-bar .dot.green { background: var(--green); }
.console-title { margin-left: 8px; color: var(--faint); font-size: 0.76rem; }
.live { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.live-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--green); opacity: 0.5;
  animation: ping 1.8s ease-out infinite;
}
@keyframes ping {
  0% { transform: scale(0.55); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}
.console-body { padding: 18px 18px 8px; display: grid; gap: 10px; }
.log { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 0.78rem; color: var(--muted); min-width: 0; }
.log .t { color: var(--faint); flex-shrink: 0; }
.log .msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge {
  flex-shrink: 0; font-family: var(--font); font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.09em; padding: 2.5px 8px; border-radius: 6px;
}
.b-blocked  { color: var(--red);    background: rgba(251, 113, 133, 0.12); border: 1px solid rgba(251, 113, 133, 0.35); }
.b-redacted { color: var(--amber);  background: rgba(251, 191, 36, 0.1);  border: 1px solid rgba(251, 191, 36, 0.3); }
.b-alert    { color: var(--violet); background: rgba(167, 139, 250, 0.12); border: 1px solid rgba(167, 139, 250, 0.35); }
.b-discover { color: var(--cyan);   background: rgba(34, 211, 238, 0.1);  border: 1px solid rgba(34, 211, 238, 0.3); }
.b-allowed  { color: var(--green);  background: rgba(52, 211, 153, 0.1);  border: 1px solid rgba(52, 211, 153, 0.3); }
.console-foot { border-top: 1px solid var(--border); padding: 10px 18px; color: var(--faint); font-size: 0.72rem; }

/* ---- Sections ---- */
.section { padding: 96px 0; position: relative; }
.section[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.section-head .lead { margin-bottom: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--cyan); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase; margin-bottom: 20px;
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 12px var(--cyan);
}

/* ---- Cards / grids ---- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius); padding: 26px;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, 0.4); background: var(--surface-2); }
.card .icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(34, 211, 238, 0.09); border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--cyan); margin-bottom: 16px;
}
.card .icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 0.93rem; }
.card ul li + li { margin-top: 6px; }

/* ---- Steps ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step {
  position: relative; padding: 28px 26px;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
}
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--mono); font-size: 0.82rem; font-weight: 600;
  color: var(--cyan); border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 8px; padding: 3px 10px; display: inline-block; margin-bottom: 18px;
  background: rgba(34, 211, 238, 0.08);
}
.step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ---- Stats ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat {
  text-align: center; padding: 28px 18px;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
}
.stat b {
  display: block; font-size: 2rem; letter-spacing: -0.03em; margin-bottom: 6px;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { color: var(--muted); font-size: 0.88rem; }

/* ---- CTA band ---- */
.cta-band {
  position: relative; overflow: hidden; text-align: center;
  border-radius: 24px; border: 1px solid var(--border-strong);
  background:
    radial-gradient(500px 240px at 20% 0%, rgba(34, 211, 238, 0.12), transparent 60%),
    radial-gradient(500px 240px at 80% 100%, rgba(129, 140, 248, 0.14), transparent 60%),
    var(--bg-2);
  padding: 72px 32px;
}
.cta-band h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.cta-band p { color: var(--muted); max-width: 52ch; margin-inline: auto; }
.cta-band .hero-actions { justify-content: center; margin-top: 28px; margin-bottom: 0; }

/* ---- Pills ---- */
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--muted); font-size: 0.85rem; font-weight: 500;
}

/* ---- Sub-page hero ---- */
.page-hero {
  position: relative; overflow: hidden;
  padding: calc(var(--nav-h) + 64px) 0 72px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(700px 300px at 30% 0%, rgba(34, 211, 238, 0.1), transparent 60%),
    radial-gradient(700px 300px at 80% 10%, rgba(129, 140, 248, 0.12), transparent 60%);
}
.page-hero h1 { font-size: clamp(2rem, 3.8vw, 2.9rem); margin-bottom: 16px; }

/* ---- Forms ---- */
.form-card {
  border: 1px solid var(--border-strong); background: var(--surface);
  border-radius: var(--radius); padding: 34px;
}
.form-card h2, .form-card h3 { margin-bottom: 6px; }
.form-card > p { color: var(--muted); font-size: 0.95rem; }
.form-narrow { max-width: 680px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; font-weight: 600; }
.field label span { color: var(--faint); font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text); width: 100%;
  background: rgba(7, 11, 20, 0.6);
  border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 11px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field select option { background: var(--bg-2); color: var(--text); }
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}
.form-status {
  margin: 0 0 16px; padding: 12px 16px; border-radius: 10px; font-size: 0.9rem;
  border: 1px solid rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.08); color: #7ce7c0;
}
.form-status[hidden] { display: none; }
.form-card .btn { margin-top: 22px; }
.form-note { color: var(--faint); font-size: 0.85rem; margin: 16px 0 0; }
.form-note a { color: var(--cyan); }

/* ---- Contact ---- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 24px; align-items: start; }
.info-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 20px; }
.info-list li { display: flex; gap: 14px; align-items: flex-start; }
.info-icon {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
  background: rgba(34, 211, 238, 0.09); border: 1px solid rgba(34, 211, 238, 0.25); color: var(--cyan);
}
.info-icon svg { width: 20px; height: 20px; }
.info-list b { display: block; font-size: 0.92rem; margin-bottom: 2px; }
.info-list p, .info-list a { margin: 0; color: var(--muted); font-size: 0.9rem; }
.info-list a { word-break: break-all; }
.info-list a:hover { color: var(--cyan); }
.info-list p a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.info-list p a:hover { color: var(--cyan); }

/* ---- FAQ ---- */
.faq { max-width: 760px; }
.faq details {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 12px;
}
.faq summary { cursor: pointer; font-weight: 600; font-size: 0.97rem; }
.faq summary::marker { color: var(--cyan); }
.faq details p { margin: 12px 0 0; color: var(--muted); font-size: 0.92rem; }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 56px 0 40px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; margin-bottom: 40px; }
.footer-brand { max-width: 300px; }
.footer-brand p { color: var(--muted); font-size: 0.92rem; }
.footer-col h4 {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--faint); margin-bottom: 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--muted); font-size: 0.92rem; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  border-top: 1px solid var(--border); padding-top: 24px;
  color: var(--faint); font-size: 0.85rem;
}

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal:nth-child(6) { transition-delay: 0.4s; }

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .cards, .steps, .cards-2 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .cards, .steps, .cards-2, .form-grid { grid-template-columns: 1fr; }
  .form-card { padding: 26px 22px; }
  .cta-band { padding: 56px 24px; }
}

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

/* ==========================================================================
   About page additions
   ========================================================================== */

/* ---- Story grid ---- */
.story-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: start; }
.story-text p { color: var(--muted); font-size: 1rem; }
.story-text p:first-of-type { color: var(--text); font-size: 1.05rem; }
.story-text p:first-of-type::first-letter { color: var(--cyan); font-weight: 700; }

/* ---- Timeline ---- */
.timeline { max-width: 560px; }
.timeline-item { position: relative; padding: 0 0 28px 34px; border-left: 1px solid var(--border-strong); }
.timeline-item:last-child { padding-bottom: 4px; border-left-color: transparent; }
.timeline-item::before {
  content: ""; position: absolute; left: -7px; top: 4px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--cyan);
}
.timeline-item b {
  display: block; font-family: var(--mono); font-size: 0.8rem; font-weight: 600;
  color: var(--cyan); letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 6px;
}
.timeline-item p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---- People / leadership ---- */
.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.person {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius); padding: 26px;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.person:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, 0.4); background: var(--surface-2); }
.avatar {
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 1.02rem; letter-spacing: 0.02em;
  color: #05070d; background: var(--gradient);
  margin-bottom: 16px;
}
.person h3 { font-size: 1.02rem; margin-bottom: 2px; }
.person .role {
  display: block; color: var(--cyan); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 10px;
}
.person p { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* ---- Responsive (about) ---- */
@media (max-width: 980px) {
  .story-grid { grid-template-columns: 1fr; gap: 36px; }
  .people { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .people { grid-template-columns: 1fr; }
}
