/* ------------------------------------------------------------------ *
 * Doorframe — Minimal Swiss. Ink on paper, hairline rules, one accent.
 * Self-hosted IBM Plex. Auto light/dark via prefers-color-scheme.
 * ------------------------------------------------------------------ */

@font-face {
  font-family: "Plex Sans";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/plex-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Sans";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("fonts/plex-sans-500.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Sans";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("fonts/plex-sans-600.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Mono";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Mono";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("fonts/plex-mono-500.woff2") format("woff2");
}

:root {
  /* Light — warm paper, near-black ink */
  --bg: #fcfcfb;
  --bg-soft: #f4f4f2;
  --ink: #14161a;
  --muted: #61676e;
  --line: #e3e3df;
  --accent: #1b50e0;
  --accent-ink: #fff;          /* text on accent */
  --warn: #b06a00;             /* restrained amber, used once */
  --shadow: 0 1px 2px rgba(20, 22, 26, 0.04);

  --sans: "Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo,
    Consolas, "Liberation Mono", monospace;

  --radius: 6px;
  --maxw: 1080px;
  --gutter: clamp(20px, 5vw, 40px);

  --label: 0.74rem;            /* mono eyebrows / kickers */
  --track: 0.12em;             /* small-caps tracking */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0d0f;
    --bg-soft: #15171a;
    --ink: #f1f2f3;
    --muted: #9aa0a6;
    --line: #24272b;
    --accent: #6f97ff;
    --accent-ink: #0c0d0f;
    --warn: #e0a64a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

::selection { background: var(--accent); color: var(--accent-ink); }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* Mono kicker shared across sections */
.kicker {
  font-family: var(--mono);
  font-weight: 500;
  font-size: var(--label);
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.kicker .dot { color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand-mark { display: inline-flex; color: var(--accent); }
.brand-name {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.site-nav a { color: var(--muted); white-space: nowrap; transition: color 0.15s ease; }
.site-nav a:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { border-bottom: 1px solid var(--line); }
.hero .wrap {
  padding-top: clamp(56px, 9vw, 104px);
  padding-bottom: clamp(56px, 9vw, 104px);
}
.hero-copy { max-width: 760px; }
.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.6rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 18px 0 24px;
  max-width: 16ch;
  text-wrap: balance;
}
.lede {
  font-size: 1.18rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 32px;
}
.lede strong { color: var(--ink); font-weight: 600; }

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.cta-row .btn { justify-content: center; }
.cta-row .btn-primary, .cta-row .btn-ghost { flex: 1 1 0; }
.cta-row .btn-soon { flex: 1 1 100%; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.96rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-soon { color: var(--muted); cursor: default; }
.btn-soon:hover { border-color: var(--line); }
.badge {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 7px;
}
.install-hint {
  margin: 22px 0 0;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- Report mock (hero visual) ---------- */
.report {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-size: 0.86rem;
}
.report-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.report-dots { display: inline-flex; gap: 6px; }
.report-dots i {
  width: 9px; height: 9px; border-radius: 999px;
  background: var(--line); display: inline-block;
}
.report-file {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
}
.report-body { padding: 16px; }

.report-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.report-stats div { background: var(--bg); padding: 10px 12px; }
.report-stats .n {
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.report-stats .n.flag { color: var(--accent); }
.report-stats .k {
  display: block;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.report-table { width: 100%; border-collapse: collapse; font-family: var(--mono); }
.report-table th {
  text-align: left;
  font-weight: 500;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0 8px 8px;
  border-bottom: 1px solid var(--line);
}
.report-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  white-space: nowrap;
}
.report-table tr:last-child td { border-bottom: 0; }
.report-table .id { color: var(--ink); }
.report-table .finding { color: var(--muted); white-space: normal; }

.chip {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.chip.pass { color: var(--ink); }
.chip.gap { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.chip.weak { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }

.report-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.report-foot svg { color: var(--accent); }

/* ---------- Trust strip ---------- */
.trust { border-bottom: 1px solid var(--line); }
.trust .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.trust svg { color: var(--accent); flex: none; }
.trust p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.trust strong { color: var(--ink); font-weight: 600; }

/* ---------- What it is / is not ---------- */
.what .wrap {
  padding-top: clamp(48px, 7vw, 80px);
  padding-bottom: clamp(48px, 7vw, 80px);
}
.what-col { max-width: 640px; padding: 0; }
.what h2 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 12px 0 20px;
}
.what ul { list-style: none; margin: 0; padding: 0; }
.what li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}
.what li:last-child { margin-bottom: 0; }
.check li::before {
  position: absolute;
  left: 0;
  top: 0.05em;
  font-family: var(--mono);
  font-weight: 500;
  content: "+";
  color: var(--accent);
}

/* ---------- Secure / air-gapped ---------- */
.secure { border-top: 1px solid var(--line); }
.secure .wrap {
  padding-top: clamp(48px, 7vw, 80px);
  padding-bottom: clamp(48px, 7vw, 80px);
}
.secure-col { max-width: 640px; }
.secure h2 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 12px 0 20px;
}
.secure ul { list-style: none; margin: 0; padding: 0; }
.secure li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}
.secure li:last-child { margin-bottom: 0; }

/* ---------- Artifact + report ---------- */
.artifact { border-top: 1px solid var(--line); }
.artifact .wrap {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-top: clamp(48px, 7vw, 80px);
  padding-bottom: clamp(48px, 7vw, 80px);
}
.artifact-text { max-width: 34ch; }
.artifact-text p:not(.kicker) {
  margin: 14px 0 0;
  font-size: 1.4rem;
  line-height: 1.4;
  letter-spacing: -0.015em;
}
.artifact strong { font-weight: 600; }
.artifact .muted { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 32px;
  padding-bottom: 40px;
}
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.15s ease;
}
.footer-links a:hover { color: var(--ink); }
.footer-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-align: right;
  line-height: 1.7;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .artifact .wrap { grid-template-columns: 1fr; gap: clamp(28px, 6vw, 40px); }
  .artifact-text { max-width: 46ch; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .site-nav { gap: 18px; }
  /* Keep the GitHub destination; drop in-page anchors so the header never overflows */
  .site-nav a[href^="#"] { display: none; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
  .footer-meta { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
