/* Qualified Cyber brand: Midnight & Brass, Jura display, large type for easy reading.
   Dark is the default; light follows the visitor's system preference. */

@font-face { font-family: "Jura"; font-weight: 700; font-display: swap; src: url("/assets/fonts/jura-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("/assets/fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 500; font-display: swap; src: url("/assets/fonts/figtree-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("/assets/fonts/figtree-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  /* Colour: Midnight & Brass (dark) */
  --bg: #0B1220;        /* Midnight */
  --surface: #131D31;   /* Navy */
  --line: #1F2B42;
  --text: #EEF0F4;      /* Chalk */
  --muted: #A4AEC0;     /* Pewter */
  --accent: #D2AE69;    /* Brass */
  --on-accent: #0B1220;
  --glow: rgba(210, 174, 105, .12);

  /* Type */
  --f-display: "Jura", "Figtree", system-ui, sans-serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Scale: nothing on the page is smaller than 17px. */
  --t-small: 1.0625rem;   /* 17 */
  --t-body: 1.25rem;      /* 20 */
  --t-lede: clamp(1.25rem, 2.2vw, 1.5rem);
  --t-h3: 1.5rem;         /* 24 */
  --t-h2: clamp(2rem, 4vw, 2.75rem);
  --t-h1: clamp(2.6rem, 6.4vw, 4.5rem);

  --radius: 6px;
  --max: 1160px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    /* Colour: Paper, Ink & Bronze (light) */
    --bg: #F6F6F3;
    --surface: #FFFFFF;
    --line: #E1E0D9;
    --text: #0E1A2C;
    --muted: #4A5568;
    --accent: #7E5F27;  /* Bronze */
    --on-accent: #FFFFFF;
    --glow: rgba(126, 95, 39, .07);
    color-scheme: light;
  }
}

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

/* scroll-padding keeps anchor targets (#services, #contact, ...) clear of the sticky header:
   on phones the section padding shrinks below the header's 77px, so a heading landed under it. */
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--t-body)/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.1; text-wrap: balance; margin: 0; }
/* Jura's heaviest cut is 700; a hairline outline in the text's own colour adds the extra weight the brand calls for. */
h1, h2, h3, .brand span, .principles strong { -webkit-text-stroke: .022em currentColor; paint-order: stroke fill; }
h1 { font-size: var(--t-h1); letter-spacing: -.01em; }
h2 { font-size: var(--t-h2); margin-bottom: 14px; }
h3 { font-size: var(--t-h3); }

a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--on-accent); padding: 10px 14px; font-weight: 600;
}
.skip:focus { left: 12px; top: 12px; z-index: 10; }

/* Header: the frame mark beside the name, set in Jura. */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand svg { width: 38px; height: 38px; flex: none; }
.brand svg path { fill: var(--accent); }
.brand span { font: 700 1.125rem/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
nav { display: flex; align-items: center; gap: 28px; }
nav a { color: var(--muted); text-decoration: none; font-size: 1.125rem; font-weight: 500; }
nav a:hover { color: var(--text); }
@media (max-width: 820px) { nav a:not(.btn) { display: none; } }
@media (max-width: 560px) { nav { display: none; } }

/* Buttons: large, easy targets. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px;
  background: var(--accent); color: var(--on-accent);
  padding: 14px 26px; border-radius: 3px;
  font: 600 1.125rem/1.2 var(--f-body); text-decoration: none;
  transition: filter .15s ease;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
nav a.btn { color: var(--on-accent); min-height: 48px; padding: 10px 20px; font-size: 1.0625rem; }
.btn-large { min-height: 60px; padding: 18px 34px; font-size: 1.25rem; }
.link-arrow { color: var(--text); text-decoration: none; font-weight: 500; font-size: 1.125rem; }
.link-arrow::after { content: " \2192"; color: var(--accent); }
.link-arrow:hover { text-decoration: underline; }

/* Hero */
.hero {
  padding: clamp(56px, 10vw, 120px) 0 clamp(56px, 9vw, 110px);
  background: radial-gradient(1000px 420px at 100% 0%, var(--glow), transparent 70%), var(--bg);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero-logo { justify-self: end; width: min(100%, 360px); }
.hero-logo img { display: block; width: 100%; height: auto; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-logo { display: none; }
}
.feed { font: 400 var(--t-small)/1.75 var(--f-mono); color: var(--muted); margin: 0 0 28px; }
.feed p { margin: 0; }
.feed .pr { color: var(--accent); }
.cursor { display: inline-block; width: .55em; height: 1.05em; vertical-align: -3px; background: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .cursor { animation: blink 1.1s steps(1) infinite; } }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 520px) { .feed .t { display: none; } }
.hero h1 { max-width: 15ch; margin-bottom: 26px; }
.lede { color: var(--muted); font-size: var(--t-lede); max-width: 38ch; margin: 0 0 40px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }

/* Sections */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-lede { color: var(--muted); font-size: var(--t-lede); margin: 0 0 44px; max-width: 40ch; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; display: grid; gap: 12px; align-content: start;
}
.section-alt .card { background: var(--bg); }
.card .key { font: 500 var(--t-small)/1 var(--f-mono); letter-spacing: .08em; color: var(--accent); }
.card p { margin: 0; color: var(--muted); }

.sectors { margin: 36px 0 0; color: var(--muted); font: 500 var(--t-small)/1.8 var(--f-mono); letter-spacing: .04em; }
.sectors-label { color: var(--accent); letter-spacing: .08em; text-transform: uppercase; margin-right: 10px; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 56px; }
@media (max-width: 860px) { .sectors { margin: 36px 0 0; color: var(--muted); font: 500 var(--t-small)/1.8 var(--f-mono); letter-spacing: .04em; }
.sectors-label { color: var(--accent); letter-spacing: .08em; text-transform: uppercase; margin-right: 10px; }

.two-col { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
.principles { margin: 0; padding: 0; list-style: none; display: grid; gap: 30px; }
.principles li { position: relative; padding-left: 36px; color: var(--muted); }
.principles li::before { content: "\203A"; position: absolute; left: 4px; top: -.12em; font: 700 1.6rem/1 var(--f-mono); color: var(--accent); }
.principles strong { color: var(--text); display: block; font: 700 var(--t-h3)/1.25 var(--f-display); margin-bottom: 6px; }

.bio p { color: var(--muted); margin: 0 0 22px; max-width: 62ch; }
/* Redaction bars. Only the word "[redacted]" is in the page, hidden behind the bar,
   so the withheld words never ship and the text still reads sensibly without this stylesheet. */
.rx, .line {
  overflow: hidden; white-space: nowrap; color: transparent; user-select: none;
  height: 1.05em; line-height: 1.05; background: var(--text); border-radius: 1px;
}
.rx { display: inline-block; max-width: 100%; vertical-align: -.2em; }
.w-2 { width: 1.24em; } .w-3 { width: 1.86em; } .w-4 { width: 2.48em; } .w-5 { width: 3.10em; } .w-6 { width: 3.72em; } .w-7 { width: 4.34em; } .w-8 { width: 4.96em; } .w-9 { width: 5.58em; } .w-10 { width: 6.20em; }

/* About page: the principal's file */
.dossier { max-width: 980px; }
.file {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 4.5vw, 48px); position: relative; overflow: hidden;
  font: 400 var(--t-small)/1.6 var(--f-mono);
}
.file .head { display: grid; gap: 6px; padding-bottom: 22px; border-bottom: 2px solid var(--accent); margin-bottom: 8px; }
.file .meta { display: flex; flex-wrap: wrap; gap: 6px 24px; color: var(--muted); letter-spacing: .06em; }
.file .meta b { color: var(--accent); font-weight: 500; }
.file-name { font-size: clamp(2.1rem, 6vw, 3.4rem); margin: 12px 0 0; }
.file .role { font: 400 var(--t-body)/1.5 var(--f-body); color: var(--muted); margin: 0; }
.file .stamp {
  position: absolute; top: clamp(18px, 4vw, 40px); right: clamp(14px, 4vw, 40px);
  border: 2px solid var(--accent); color: var(--accent); padding: 6px 12px;
  letter-spacing: .14em; font-weight: 500; line-height: 1.3; text-align: center; transform: rotate(-6deg);
}
.file .sec { padding-top: 26px; }
.file h2 { font-size: var(--t-h3); line-height: 1.2; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .06em; }
.file h2 .n { color: var(--accent); font: 500 var(--t-small)/1 var(--f-mono); -webkit-text-stroke: 0; margin-right: 8px; vertical-align: .15em; }
.file dl { margin: 0; }
.file .row { display: grid; grid-template-columns: 12.5em minmax(0, 1fr); gap: 2px 22px; padding: 9px 0; border-top: 1px solid var(--line); }
.file dt { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.file dd { margin: 0; min-width: 0; }
.file .remarks { display: grid; gap: 10px; padding-top: 6px; }
/* Honors and credentials: one paragraph in body type, never a list (brand standards, Dossier). */
.file .honors { padding-top: 12px; border-top: 1px solid var(--line); }
.file .honors p { margin: 0; max-width: 62ch; font: 400 var(--t-body)/1.6 var(--f-body); }
.file .line { display: block; }
.l-100 { width: 100%; } .l-58 { width: 58%; }
.file .remarks p { margin: 4px 0 0; }
.file .foot { margin: 30px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); }
.file .foot .p { color: var(--accent); }
.dossier-cta { margin: 36px 0 0; }
@media (max-width: 640px) {
  .file .row { grid-template-columns: minmax(0, 1fr); }
  .file .stamp { position: static; transform: none; justify-self: start; margin-bottom: 6px; }
}

.contact { text-align: center; }
.contact .section-lede { margin-inline: auto; }
.fine { color: var(--muted); font-size: var(--t-small); margin-top: 22px; }

/* Text pages (privacy, scanning, 404) */
.page-title { font-size: clamp(2.3rem, 5.5vw, 3.5rem); margin-bottom: 18px; }
.eyebrow { font: 500 var(--t-small)/1 var(--f-mono); letter-spacing: .08em; color: var(--accent); margin: 0 0 18px; }
.prose h2 { font-size: 1.75rem; margin: 48px 0 12px; }
.prose p { color: var(--muted); margin: 0 0 18px; max-width: 62ch; }
.prose code {
  font-family: var(--f-mono); font-size: .9em; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px;
}
/* Long User-Agent strings wrap rather than forcing sideways scrolling on phones. */
.prose .ua code { display: block; padding: 14px 16px; overflow-wrap: anywhere; line-height: 1.6; }
.plain-list { color: var(--muted); margin: 0 0 18px; padding-left: 1.2em; max-width: 62ch; }
.plain-list li { margin-bottom: 8px; }

/* MAADD capability sheet: a page on screen, one Letter sheet in print */
.sheet { max-width: 980px; }
.print-hint { color: var(--muted); font-size: var(--t-small); margin: 0 0 28px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sheet-head .section-lede { margin-bottom: 20px; }
.sheet-intro { color: var(--muted); max-width: 70ch; margin: 0 0 22px; }
.callout { border: 1px solid var(--accent); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 40px; color: var(--muted); max-width: 70ch; }
.callout strong { color: var(--text); }
.sheet-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0 48px; }
@media (max-width: 860px) { .sheet-cols { grid-template-columns: minmax(0, 1fr); } }
.sheet h2 { font-size: var(--t-h3); text-transform: uppercase; letter-spacing: .06em; margin: 26px 0 10px; }
.sheet h2 .n { color: var(--accent); font: 500 var(--t-small)/1 var(--f-mono); -webkit-text-stroke: 0; margin-right: 8px; vertical-align: .15em; }
.sheet p { color: var(--muted); margin: 0 0 14px; }
.rows { margin: 0; }
.rows .row { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 2px 18px; padding: 9px 0; border-top: 1px solid var(--line); }
.rows dt { font: 500 var(--t-small)/1.5 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.rows dd { margin: 0; min-width: 0; color: var(--muted); }
.marks { margin: 0 0 12px; padding: 0; list-style: none; }
.marks li { position: relative; padding: 7px 0 7px 26px; border-top: 1px solid var(--line); color: var(--muted); }
.marks li::before { content: "\203A"; position: absolute; left: 2px; top: 5px; font: 700 1.3rem/1 var(--f-mono); color: var(--accent); }
.marks strong, .steps strong { color: var(--text); font-weight: 600; }
.steps { margin: 0 0 12px; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 7px 0 7px 36px; border-top: 1px solid var(--line); color: var(--muted); }
.steps li::before { content: "0" counter(s); position: absolute; left: 0; top: 9px; font: 500 var(--t-small)/1.4 var(--f-mono); color: var(--accent); }
.sheet-foot { margin-top: 36px; padding-top: 18px; border-top: 2px solid var(--accent); }
.sheet-foot p { margin: 0 0 6px; }
.sheet-foot strong { color: var(--text); }
@media (max-width: 500px) { .rows .row { grid-template-columns: minmax(0, 1fr); } }

/* Print: the MAADD sheet becomes one Letter page; everything else prints plainly */
@media print {
  @page { size: Letter; margin: 0.35in 0.45in; }
  html, body { background: #fff !important; color: #0E1A2C !important; font-size: 8.5pt; line-height: 1.33; }
  .skip, .site-header, .site-footer, .print-hint { display: none !important; }
  .section { padding: 0; }
  .wrap { max-width: none; padding: 0; }
  a { color: inherit; text-decoration: none; }
  .sheet { --text: #0E1A2C; --muted: #3B4556; --accent: #7E5F27; --line: #D5D3CB; }
  .sheet .page-title { font-size: 18pt; margin: 1pt 0 4pt; }
  .sheet .eyebrow { font-size: 8pt; margin: 0 0 6pt; }
  .sheet .section-lede { font-size: 10pt; margin: 0 0 5pt; max-width: none; }
  .sheet-intro { font-size: 8.5pt; margin: 0 0 6pt; max-width: none; }
  .callout { margin: 0 0 6pt; padding: 4pt 8pt; max-width: none; border-radius: 3pt; }
  .sheet-cols { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0 20pt; }
  .sheet h2 { font-size: 9pt; margin: 6pt 0 2pt; }
  .sheet h2 .n { font-size: 8pt; }
  .sheet p { margin: 0 0 3pt; }
  .rows .row { grid-template-columns: 8.5em minmax(0, 1fr); gap: 0 8pt; padding: 2.5pt 0; }
  .rows dt { font-size: 7.5pt; line-height: 1.4; }
  .marks li, .steps li { padding-top: 2.5pt; padding-bottom: 2.5pt; }
  .marks li { padding-left: 14pt; } .marks li::before { font-size: 11pt; top: 2.5pt; left: 1pt; }
  .steps li { padding-left: 22pt; } .steps li::before { font-size: 7.5pt; top: 5pt; }
  .sheet-foot { margin-top: 7pt; padding-top: 5pt; }
  .fine { margin-top: 2pt; font-size: 8pt; }
  h1, h2, .callout, .row, li { break-inside: avoid; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; color: var(--muted); font-size: var(--t-small); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 28px; }
.footer-inner p { margin: 0; }

/* Small phones */
@media (max-width: 400px) {
  .wrap { padding: 0 16px; }
  .brand { gap: 10px; }
  .brand svg { width: 32px; height: 32px; }
  .brand span { font-size: 1rem; letter-spacing: .1em; }
  .card { padding: 24px; }
  .btn-large { padding: 16px 22px; font-size: 1.125rem; }
}
