/* complens.ai — public site (homepage, privacy, terms).
 * Kin to the console (frontend/src/styles/tokens.css): warm-ink monochrome chrome,
 * color appears ONLY as risk semantics inside product artifacts. Adds IBM Plex Serif
 * as the display voice; Sans for body, Mono for anything machine-shaped. */

:root {
  --ink:        #111311;
  --surface:    #171a18;
  --surface-2:  #1d211e;
  --hairline:   #262a27;
  --hairline-2: #333833;
  --text:       #e8eae6;
  --text-muted: #9aa39b;
  --text-faint: #6c746d;

  --risk-critical: #e5484d;
  --risk-high:     #f2820c;
  --risk-medium:   #e0b31e;
  --risk-low:      #3e9b84;

  --focus: #6e8ba6;

  --font-display: "IBM Plex Serif", Georgia, serif;
  --font-ui:      "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --measure: 62ch;
  --page-w: 1060px;
  --pad-x: clamp(20px, 5vw, 48px);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--focus); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

code { font-family: var(--font-mono); font-size: 0.9em; }

.wrap { max-width: var(--page-w); margin: 0 auto; padding: 0 var(--pad-x); }

/* ---- header / footer shell ---- */
.site-header {
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap {
  display: flex; align-items: baseline; gap: 28px; flex-wrap: wrap;
  padding-top: 18px; padding-bottom: 18px;
}
.brand {
  font-family: var(--font-mono);
  font-size: 0.95rem; font-weight: 500; letter-spacing: 0.02em;
  color: var(--text);
}
.brand:hover { text-decoration: none; color: var(--text); }
.site-nav { margin-left: auto; display: flex; gap: 22px; flex-wrap: wrap; align-items: baseline; }
.site-nav a {
  color: var(--text-muted); font-size: 0.85rem; letter-spacing: 0.01em;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .site-nav { gap: 16px; }
  .site-nav a.hide-sm { display: none; }
}
.site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav a.console {
  color: var(--text);
  border: 1px solid var(--hairline-2); border-radius: 6px;
  padding: 6px 14px; margin: -7px 0;
}
.site-nav a.console:hover { border-color: var(--focus); }

.site-footer {
  border-top: 1px solid var(--hairline);
  margin-top: 96px;
}
.site-footer .wrap {
  display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: baseline;
  padding-top: 26px; padding-bottom: 40px;
  font-size: 0.85rem; color: var(--text-faint);
}
.site-footer a { color: var(--text-muted); }
.site-footer .spacer { flex: 1; }

/* ---- shared bits ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-faint);
}

/* ================= homepage ================= */

.hero { padding-top: clamp(56px, 9vh, 110px); }
.hero .eyebrow { margin-bottom: 20px; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 22px;
  max-width: 21ch;
}
.hero h1 em { font-style: italic; color: var(--text-muted); }
.hero .lede {
  max-width: var(--measure);
  color: var(--text-muted);
  font-size: 1.06rem;
  margin: 0 0 30px;
}
.hero .lede strong { color: var(--text); font-weight: 500; }
.hero .purpose {
  max-width: var(--measure);
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0 0 22px;
}
.hero .purpose strong { color: var(--text); font-weight: 600; }
.site-footer .contact { color: var(--text-muted); }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.cta {
  display: inline-block;
  font-size: 0.92rem; font-weight: 500; letter-spacing: 0.01em;
  color: var(--ink); background: var(--text);
  border-radius: 6px; padding: 11px 22px;
}
.cta:hover { text-decoration: none; background: #fff; }
.cta-quiet {
  font-size: 0.92rem; color: var(--text-muted);
  padding: 11px 4px;
}
.cta-quiet:hover { color: var(--text); }

/* ---- the boundary (signature) ---- */
.boundary {
  margin-top: clamp(56px, 8vh, 90px);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--surface);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  overflow: hidden;
}
.pane { padding: 26px 28px 30px; min-width: 0; }
.pane-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 18px;
}

.chat-bubble {
  background: var(--surface-2);
  border: 1px solid var(--hairline-2);
  border-radius: 12px 12px 12px 4px;
  padding: 14px 16px;
  font-size: 0.88rem;
  line-height: 1.55;
  max-width: 40ch;
}
.chat-meta {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--text-faint); margin-bottom: 8px;
}
.hit {
  font-family: var(--font-mono); font-size: 0.85em;
  color: var(--risk-critical);
  background: rgba(229, 72, 77, 0.09);
  border-bottom: 1px solid var(--risk-critical);
  padding: 0 2px;
  border-radius: 2px;
  white-space: nowrap;
}
.verdict {
  margin-top: 16px;
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--text-muted);
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline;
}
.verdict .risk-critical { color: var(--risk-critical); }
.stays {
  margin-top: 18px;
  font-size: 0.8rem; color: var(--text-faint);
}
.stays b { color: var(--text-muted); font-weight: 500; }

.wire {
  position: relative;
  width: 1px;
  background: var(--hairline-2);
}
.wire .crossing {
  position: absolute;
  top: 50%; left: 50%;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--text);
  transform: translate(-50%, -50%);
}
@media (prefers-reduced-motion: no-preference) {
  .wire .crossing { animation: cross 4.5s ease-in-out infinite; }
  @keyframes cross {
    0%, 55%  { transform: translate(-50%, -50%) translateX(-34px); opacity: 0; }
    62%      { opacity: 1; }
    80%      { transform: translate(-50%, -50%) translateX(34px); opacity: 1; }
    88%,100% { transform: translate(-50%, -50%) translateX(34px); opacity: 0; }
  }
}
.wire-label {
  position: absolute; bottom: 26px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 0.65rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-faint);
  background: var(--surface);
  padding: 2px 8px;
  white-space: nowrap;
}

.event-json {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
  overflow-x: auto;
}
.event-json .k { color: var(--text-faint); }
.event-json .risk-critical { color: var(--risk-critical); }
.not-here {
  margin-top: 18px;
  font-size: 0.8rem; color: var(--text-faint);
}

@media (max-width: 780px) {
  .boundary { grid-template-columns: 1fr; }
  .wire { width: auto; height: 1px; }
  .wire .crossing { display: none; }
  .wire-label { bottom: auto; top: 50%; transform: translate(-50%, -50%); }
}

/* ---- sections ---- */
.section { padding-top: clamp(72px, 10vh, 120px); }
.section h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.01em;
  margin: 14px 0 18px;
}
.section > .lede, .section p.intro {
  max-width: var(--measure); color: var(--text-muted); margin: 0 0 34px;
}

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step { border-top: 1px solid var(--hairline-2); padding-top: 18px; }
.step .n {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--text-faint); letter-spacing: 0.1em;
}
.step h3 { font-size: 1rem; font-weight: 500; margin: 10px 0 8px; }
.step p { font-size: 0.88rem; color: var(--text-muted); margin: 0; }
.step p code { color: var(--text); }
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }

.callout {
  border-left: 2px solid var(--risk-low);
  padding: 4px 0 4px 22px;
  max-width: var(--measure);
  margin-top: 40px;
}
.callout p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.callout p b { color: var(--text); font-weight: 500; }

.google-list { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.google-list li {
  border-top: 1px solid var(--hairline);
  padding: 16px 0;
  display: grid; grid-template-columns: 170px 1fr; gap: 18px;
  font-size: 0.92rem;
}
.google-list li:last-child { border-bottom: 1px solid var(--hairline); }
.google-list .what {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-faint);
  padding-top: 2px;
}
.google-list .why { color: var(--text-muted); }
.google-list .why b { color: var(--text); font-weight: 500; }
@media (max-width: 600px) {
  .google-list li { grid-template-columns: 1fr; gap: 6px; }
}

/* ================= legal documents ================= */
.doc { padding-top: clamp(48px, 7vh, 80px); }
.doc-head { border-bottom: 1px solid var(--hairline); padding-bottom: 28px; margin-bottom: 40px; }
.doc-head h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -0.01em;
  margin: 14px 0 12px;
}
.doc-head .dateline {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-faint);
}
.doc-body { max-width: var(--measure); }
.doc-body h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.35rem; letter-spacing: -0.01em;
  margin: 46px 0 12px;
}
.doc-body h3 { font-size: 1rem; font-weight: 500; margin: 30px 0 8px; }
.doc-body p, .doc-body li { color: var(--text-muted); font-size: 0.95rem; }
.doc-body p b, .doc-body li b { color: var(--text); font-weight: 500; }
.doc-body ul { padding-left: 22px; }
.doc-body li { margin-bottom: 8px; }
.doc-body .plain-summary {
  border-left: 2px solid var(--risk-low);
  padding: 4px 0 4px 22px;
  margin: 24px 0 8px;
}
.doc-body .plain-summary p { margin: 0; }
