/* Tracebound: an investigator's case board. Self-hosted fonts only (CSP allows 'self'). */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/ibmplexsans-var.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/ibmplexmono-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/ibmplexmono-500.woff2') format('woff2'); }

:root {
  --bg: #080c12; --bg2: #0c121b; --panel: #0f1722; --panel2: #131d2a;
  --ink: #e6ecf3; --muted: #93a1b3; --faint: #64748a; --line: #1d2937; --line2: #2a3a4d;
  --accent: #6d8dff; --accent-ink: #0a1230; --accent-soft: rgba(109, 141, 255, .12);
  --signal: #ffc000;                     /* TLP:AMBER */
  --tlp-red: #ff2b2b; --tlp-amber: #ffc000; --tlp-green: #33ff00; --tlp-clear: #ffffff;
  --good: #4ade80; --bad: #f87171;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --sans: 'IBM Plex Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font: 16px/1.65 var(--sans);
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(109, 141, 255, .16), transparent 60%),
    radial-gradient(700px 400px at -10% 30%, rgba(255, 192, 0, .05), transparent 60%),
    var(--bg);
}
/* the map grid behind everything */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(147, 161, 179, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 161, 179, .06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0, #000 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 55%, transparent 100%);
}
a { color: var(--accent); text-underline-offset: 3px; }
::selection { background: rgba(255, 192, 0, .35); color: #fff; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }

/* ---------------------------------------------------------------- header */
header { position: sticky; top: 0; z-index: 10; background: rgba(8, 12, 18, .78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header .wrap { display: flex; align-items: center; gap: 16px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand img { width: 26px; height: 26px; }
.brand .tag { font: 500 11px var(--mono); color: var(--faint); border: 1px solid var(--line2); border-radius: 4px; padding: 1px 6px; letter-spacing: .04em; }
nav { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 14px; }
nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
nav a:hover { color: var(--ink); }
nav a.cta { color: var(--accent-ink); background: var(--accent); padding: 7px 14px; border-radius: 8px; font-weight: 600; }
nav a.cta:hover { color: var(--accent-ink); filter: brightness(1.08); }

/* ---------------------------------------------------------------- type */
h1 { font-size: clamp(34px, 5.4vw, 58px); line-height: 1.05; margin: 0 0 20px; letter-spacing: -.03em; font-weight: 650; }
h1 em { font-style: normal; color: var(--accent); }
h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.15; margin: 0 0 10px; letter-spacing: -.02em; font-weight: 650; }
h3 { font-size: 16.5px; margin: 0 0 6px; font-weight: 600; letter-spacing: -.005em; }
.lead { font-size: 18.5px; color: var(--muted); max-width: 640px; margin: 0; }
.note { font-size: 13.5px; color: var(--faint); }
/* small case-file label above a heading: "02 / WHAT IT DOES" */
.kicker { display: flex; align-items: center; gap: 10px; font: 500 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin: 0 0 14px; }
.kicker::before { content: ""; width: 22px; height: 1px; background: var(--signal); }
.kicker b { color: var(--signal); font-weight: 500; }

/* ---------------------------------------------------------------- sections */
section { padding: 84px 0; border-top: 1px solid var(--line); position: relative; }
section.first { border-top: 0; }
.split { display: grid; gap: 40px; align-items: start; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1.05fr; gap: 56px; } }
.split > * { min-width: 0; }   /* let long labels shrink instead of widening the column */

/* ---------------------------------------------------------------- hero */
.hero { padding: 72px 0 40px; }
.hero .split { align-items: center; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip { display: inline-flex; align-items: center; gap: 7px; font: 500 12px var(--mono); color: var(--muted); border: 1px solid var(--line2); background: rgba(15, 23, 34, .7); border-radius: 999px; padding: 4px 11px; letter-spacing: .02em; }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px rgba(74, 222, 128, .15); }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid var(--line2); color: var(--ink); background: var(--panel); transition: border-color .15s, transform .15s; }
.btn:hover { border-color: var(--muted); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn .arr { font-family: var(--mono); }

/* the link graph: a made-up case traced node by node */
.trace { width: 100%; height: auto; display: block; }
.trace .grid-dot { fill: rgba(147, 161, 179, .18); }
.trace .edge { fill: none; stroke: var(--line2); stroke-width: 1.4; }
.trace .edge.live { stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1.1s ease forwards; }
.trace .edge.hot { stroke: var(--signal); }
.trace .node circle.core { stroke: var(--bg); stroke-width: 3; }
.trace .node circle.halo { fill: none; stroke-width: 1; opacity: .45; }
.trace .node { opacity: 0; animation: appear .5s ease forwards; }
.trace .lbl { font: 500 11.5px var(--mono); fill: var(--ink); }
.trace .sub { font: 400 10.5px var(--mono); fill: var(--faint); }
.trace .pulse { fill: var(--signal); opacity: 0; }
.trace .scan { fill: none; stroke: var(--signal); stroke-width: 1; opacity: .5; transform-origin: 300px 210px; animation: scan 4s 3.2s ease-out infinite; }
.t-person { fill: #ec4899; } .t-phone { fill: #22c55e; } .t-upi { fill: #a855f7; } .t-bank { fill: #10b981; }
.t-domain { fill: #3b82f6; } .t-email { fill: #f97316; } .t-wallet { fill: #f59e0b; } .t-imei { fill: #64748b; }
.h-person { stroke: #ec4899; } .h-phone { stroke: #22c55e; } .h-upi { stroke: #a855f7; } .h-bank { stroke: #10b981; }
.h-domain { stroke: #3b82f6; } .h-email { stroke: #f97316; } .h-wallet { stroke: #f59e0b; } .h-imei { stroke: #64748b; }
.d1 { animation-delay: .2s !important; } .d2 { animation-delay: .6s !important; } .d3 { animation-delay: 1s !important; }
.d4 { animation-delay: 1.4s !important; } .d5 { animation-delay: 1.8s !important; } .d6 { animation-delay: 2.2s !important; }
.d7 { animation-delay: 2.6s !important; } .d8 { animation-delay: 3s !important; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes scan { 0% { r: 8; opacity: .7; } 100% { r: 70; opacity: 0; } }
.board { margin: 0; position: relative; border: 1px solid var(--line2); border-radius: 16px; background: linear-gradient(180deg, rgba(19, 29, 42, .85), rgba(12, 18, 27, .85)); padding: 12px; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8); }
.bar { display: flex; align-items: center; gap: 10px; font: 500 12px var(--mono); color: var(--faint); padding: 2px 4px 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.bar .dots { display: flex; gap: 6px; } .bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line2); }
.bar .path { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .tlp { margin-left: auto; }

/* TLP labels, in the TLP 2.0 colours */
.tlp { display: inline-block; font: 500 11px var(--mono); letter-spacing: .06em; background: #000; padding: 2px 7px; border-radius: 3px; line-height: 1.5; white-space: nowrap; }
.tlp.clear { color: var(--tlp-clear); } .tlp.green { color: var(--tlp-green); } .tlp.amber { color: var(--tlp-amber); } .tlp.red { color: var(--tlp-red); }

/* strip of plain facts under the hero */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-top: 56px; background: var(--panel); }
.facts div { padding: 16px 18px; border-right: 1px solid var(--line); }
.facts div:last-child { border-right: 0; }
.facts b { display: block; font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--signal); margin-bottom: 4px; }
.facts span { font-size: 14.5px; color: var(--muted); line-height: 1.45; display: block; }

/* ---------------------------------------------------------------- product windows */
.window { border: 1px solid var(--line2); border-radius: 14px; background: var(--panel); padding: 10px; margin-top: 36px; box-shadow: 0 50px 90px -50px rgba(0, 0, 0, .9); }
.window img { display: block; width: 100%; height: auto; border-radius: 8px; }
.window + .note { margin-top: 12px; }

/* ---------------------------------------------------------------- cards */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 34px; }
.card { position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 22px 22px 20px; background: linear-gradient(180deg, var(--panel2), var(--panel)); transition: border-color .2s, transform .2s; }
.card:hover { border-color: var(--line2); transform: translateY(-2px); }
.card .no { position: absolute; top: 18px; right: 20px; font: 500 12px var(--mono); color: var(--faint); }
.card .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid rgba(109, 141, 255, .25); margin-bottom: 14px; }
.card .ico svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card.region .ico { background: rgba(255, 192, 0, .08); border-color: rgba(255, 192, 0, .25); }
.card.region .ico svg { stroke: var(--signal); }

/* "patterns" lead: confidence, with its reasons */
.lead-note { display: flex; gap: 12px; align-items: flex-start; margin-top: 22px; padding: 14px 16px; border: 1px dashed var(--line2); border-radius: 12px; max-width: 640px; font-size: 14.5px; color: var(--muted); }
.lead-note .lvl { font: 500 11px var(--mono); color: #000; background: var(--signal); border-radius: 3px; padding: 2px 7px; letter-spacing: .06em; margin-top: 2px; }

/* ---------------------------------------------------------------- what it will not do */
.limits { border: 1px solid rgba(248, 113, 113, .28); border-radius: 16px; background: linear-gradient(180deg, rgba(248, 113, 113, .06), rgba(248, 113, 113, .02)); padding: 26px 28px; }
.limits ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.limits li { display: flex; gap: 12px; color: var(--ink); font-size: 15.5px; }
.limits li::before { content: ""; flex: 0 0 8px; height: 8px; border-radius: 2px; background: var(--bad); margin-top: 9px; }

/* ---------------------------------------------------------------- plans */
.table-wrap { overflow-x: auto; margin-top: 30px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 620px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font: 500 11.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); background: var(--bg2); }
td:first-child { font-weight: 600; white-space: nowrap; }
td.free { color: var(--good); font-family: var(--mono); font-size: 14px; }
tr:hover td { background: rgba(109, 141, 255, .04); }

/* ---------------------------------------------------------------- install */
.terminal { border: 1px solid var(--line2); border-radius: 14px; background: #05080c; padding: 0; overflow: hidden; }
.terminal .bar { padding: 12px 16px; margin: 0; background: var(--bg2); }
.terminal .body { padding: 20px 22px 22px; color: var(--muted); font-size: 15.5px; }
.terminal .body p { margin: 0; }
.terminal .prompt { font: 500 13px var(--mono); color: var(--good); margin-bottom: 8px; display: block; }

/* ---------------------------------------------------------------- closing call */
.closing { text-align: center; }
.closing .lead { margin: 0 auto; }
.closing .buttons { justify-content: center; }

/* ---------------------------------------------------------------- footer */
footer { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 14px; color: var(--muted); background: var(--bg2); }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }
footer .sig { margin-right: auto; display: flex; align-items: center; gap: 10px; color: var(--ink); }
footer .sig img { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- inner pages (security, privacy, evaluate) */
.doc { max-width: 760px; }
.doc p { color: var(--muted); }
.doc h2 { margin-top: 0; }
ul.check, ul.gap { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
ul.check li, ul.gap li { display: flex; gap: 12px; color: var(--ink); font-size: 15.5px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
ul.check li::before { content: ""; flex: 0 0 8px; height: 8px; border-radius: 2px; background: var(--good); margin-top: 9px; }
ul.gap li::before { content: ""; flex: 0 0 8px; height: 8px; border-radius: 2px; background: var(--signal); margin-top: 9px; }
.mailbox { display: inline-flex; align-items: center; gap: 10px; font: 500 15px var(--mono); padding: 10px 14px; border: 1px solid var(--line2); border-radius: 10px; background: var(--panel); text-decoration: none; color: var(--ink); margin: 6px 0 14px; }
.mailbox:hover { border-color: var(--accent); }

/* intake form */
.intake { border: 1px solid var(--line2); border-radius: 16px; background: var(--panel); padding: 26px; max-width: 560px; }
.intake .bar { margin: -6px -4px 16px; }
form { margin: 0; }
label { display: block; font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 16px 0 7px; }
input, textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 10px; font: inherit; font-size: 15.5px; background: var(--bg); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#code { font-family: var(--mono); font-size: 22px; letter-spacing: .4em; text-align: center; }
textarea { min-height: 96px; resize: vertical; }
button { margin-top: 20px; padding: 13px 20px; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; cursor: pointer; width: 100%; }
button:hover { filter: brightness(1.08); }
button[disabled] { opacity: .6; cursor: default; }
.msg:empty { display: none; }
.msg { margin-top: 16px; padding: 12px 14px; border-radius: 10px; font-size: 15px; border: 1px solid var(--line2); }
.msg.ok { background: var(--accent-soft); border-color: rgba(109, 141, 255, .3); }
.msg.err { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .35); color: var(--bad); }
pre.key { white-space: pre-wrap; word-break: break-all; background: var(--bg); border: 1px solid var(--line2); padding: 14px; border-radius: 10px; font: 12px/1.5 var(--mono); color: var(--good); }
.steps { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 14px; color: var(--muted); font-size: 15px; }
.steps li::before { content: "0" counter(s); font: 500 12px var(--mono); color: var(--signal); border: 1px solid var(--line2); border-radius: 6px; padding: 3px 7px; height: fit-content; }
.steps b { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- small screens and motion */
@media (max-width: 760px) {
  nav { gap: 14px; font-size: 13.5px; } nav a.wide { display: none; }
  .brand .tag { display: none; }
  section { padding: 60px 0; } .hero { padding: 44px 0 28px; }
  .facts div { border-right: 0; border-bottom: 1px solid var(--line); } .facts div:last-child { border-bottom: 0; }
  .limits { padding: 22px 20px; } .intake { padding: 20px; }
}
@media (max-width: 420px) { nav a:not(.cta):not(.keep) { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .trace .node, .trace .edge.live { animation: none !important; opacity: 1; stroke-dashoffset: 0; }
  .trace .pulse, .trace .scan { display: none; }
  .card, .btn { transition: none; }
}
