/* CMT Software — site styles. Technical look: deep slate, amber signal, schematic diagrams. */

/* Fonts are self-hosted (SIL Open Font Licence, see /fonts/LICENSE.txt) so pages never contact Google Fonts. */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap; src: url("/fonts/ibm-plex-sans-latin.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-mono-500-latin.woff2") format("woff2"); }

:root {
  --bg: #0f1c28;
  --panel: #142636;
  --wire: #2a4259;
  --grid: #16293a;
  --text: #dbe5ee;
  --muted: #8ea2b5;
  --amber: #f0a73a;
  --amber-hi: #ffbd59;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 "IBM Plex Sans", system-ui, sans-serif; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
img, svg { max-width: 100%; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 32px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--amber); color: #1b1404; padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--wire); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; white-space: nowrap; }
.logo svg { flex: none; }
.site-nav { display: flex; gap: 28px; font-size: 15px; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

/* Hero */
.hero { padding: 80px 0 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px; background-position: -1px -1px; }
.hero h1 { font-size: clamp(40px, 6.5vw, 84px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 700; margin: 0; max-width: 13ch; }
.hero.page h1 { font-size: clamp(36px, 5vw, 64px); max-width: 18ch; }
.hero p { font-size: 21px; color: var(--muted); max-width: 40ch; margin: 24px 0 36px; }
.btn { display: inline-block; background: var(--amber); color: #1b1404; font-weight: 600; text-decoration: none; padding: 15px 26px; border-radius: 4px; }
.btn:hover { background: var(--amber-hi); }

/* Schematic diagrams */
.schematic { margin-top: 64px; padding-bottom: 56px; }
.schematic svg { width: 100%; height: auto; display: block; }
.sys rect { fill: var(--panel); stroke: var(--wire); stroke-width: 1.5; }
.sys text { font: 600 15px "IBM Plex Sans", sans-serif; fill: var(--text); }
.sys.legacy rect { stroke: var(--muted); stroke-dasharray: 6 5; }
.sys.legacy text { fill: var(--muted); }
.tap { stroke: var(--wire); stroke-width: 1.5; fill: none; }
.bus { stroke: var(--amber); stroke-width: 3; fill: none; }
.bus-thin { stroke: var(--amber); stroke-width: 2; fill: none; }
.label { font: 500 12px "IBM Plex Mono", monospace; fill: var(--amber); }
.label.muted { fill: var(--muted); }
.msg { fill: var(--amber); }

/* Sections */
section { padding: 96px 0; border-top: 1px solid var(--wire); }
h2 { font-size: 34px; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 40px; font-weight: 600; }

.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--wire); border: 1px solid var(--wire); }
.service { background: var(--bg); padding: 28px 24px 32px; position: relative; }
.service:hover { background: var(--panel); }
.service svg { display: block; margin-bottom: 20px; }
.service h3 { font-size: 19px; margin: 0 0 8px; font-weight: 600; line-height: 1.3; }
.service h3 a { text-decoration: none; }
.service h3 a::after { content: ""; position: absolute; inset: 0; }
.service:hover h3 { color: var(--amber); }
.service p { margin: 0; color: var(--muted); font-size: 16px; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--wire); border: 1px solid var(--wire); }
.checklist li { background: var(--bg); padding: 24px 24px 24px 56px; position: relative; font-size: 18px; }
.checklist li::before { content: ""; position: absolute; left: 24px; top: 37px; width: 16px; height: 2px; background: var(--amber); }

.who .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.who h2 { margin-bottom: 24px; }
.who p { font-size: 24px; line-height: 1.45; margin: 0; max-width: 32ch; }
.photo { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; border: 1px solid var(--wire); filter: saturate(0.85); }

.contact { background: var(--panel); }
.contact h2 { margin-bottom: 12px; }
.contact p { color: var(--muted); max-width: 52ch; margin: 0 0 28px; }
.contact .email { font-size: clamp(22px, 3.4vw, 38px); font-weight: 600; color: var(--amber); text-decoration: none; border-bottom: 2px solid var(--amber); overflow-wrap: anywhere; }
.contact .email:hover { color: var(--amber-hi); border-color: var(--amber-hi); }

/* Footer */
.site-footer { padding: 28px 0 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--wire); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 32px; }

/* 404 */
.notfound { min-height: 60vh; }

@media (max-width: 960px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .site-nav { gap: 14px; font-size: 14px; }
  .logo { font-size: 17px; }
  .site-nav .hide-sm { display: none; }
  .hero { padding-top: 48px; }
  .hero p { font-size: 18px; }
  .schematic { margin-top: 40px; padding-bottom: 40px; }
  section { padding: 64px 0; }
  h2 { font-size: 28px; margin-bottom: 28px; }
  .services, .checklist { grid-template-columns: 1fr; }
  .who .wrap { grid-template-columns: 1fr; gap: 32px; }
  .who p { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .msg { display: none; }
}

/* Cookie consent bar (built by /js/consent.js) */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 20; max-width: 720px; margin: 0 auto; background: var(--panel); border: 1px solid var(--wire); border-top: 2px solid var(--amber); border-radius: 4px; padding: 16px 20px; display: flex; gap: 16px 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.consent[hidden] { display: none; }
.consent p { margin: 0; font-size: 15px; color: var(--text); flex: 1 1 320px; }
.consent p a { color: var(--amber); }
.consent-actions { display: flex; gap: 12px; }
.consent button { font: 600 15px "IBM Plex Sans", system-ui, sans-serif; padding: 10px 20px; border-radius: 4px; cursor: pointer; }
.consent-reject { background: transparent; color: var(--text); border: 1px solid var(--muted); }
.consent-reject:hover { border-color: var(--text); }
.consent-accept { background: var(--amber); color: #1b1404; border: 1px solid var(--amber); }
.consent-accept:hover { background: var(--amber-hi); }
.consent button:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* Footer links and long-form pages */
.footer-links { display: flex; gap: 20px; }
.footer-links a, .footer-links button { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.prose { max-width: 70ch; }
.prose h2 { font-size: 24px; margin: 48px 0 12px; }
.prose h3 { font-size: 18px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--text); }
.prose ul { padding-left: 20px; }
.prose a { color: var(--amber); }
.prose code { font: 500 0.9em "IBM Plex Mono", monospace; color: var(--amber); }
.updated { color: var(--muted); font-size: 15px; }

/* Articles */
.crumb { margin: 0 0 16px; font-size: 15px; }
.crumb a { color: var(--amber); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.prose ol { padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose h2 { scroll-margin-top: 16px; }
.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--wire); }
.prose table, .prose-table table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 16px; }
.prose th, .prose td, .prose-table th, .prose-table td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--wire); }
.prose thead th, .prose-table thead th { color: var(--amber); font-weight: 600; background: var(--panel); }
.prose tbody th, .prose-table tbody th { font-weight: 600; color: var(--text); }
.prose tr:last-child th, .prose tr:last-child td, .prose-table tr:last-child th, .prose-table tr:last-child td { border-bottom: 0; }
.article-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--wire); border: 1px solid var(--wire); }
.article-list li { background: var(--bg); padding: 28px 28px 32px; position: relative; }
.article-list li:hover { background: var(--panel); }
.article-list h2 { font-size: 24px; margin: 0 0 8px; }
.article-list h2 a { text-decoration: none; }
.article-list h2 a::after { content: ""; position: absolute; inset: 0; }
.article-list li:hover h2 { color: var(--amber); }
.article-list p { margin: 0; color: var(--muted); max-width: 70ch; }
.reading h2 { font-size: 24px; margin-bottom: 16px; }
.reading-list { margin: 0; padding-left: 20px; }
.reading-list li { margin-bottom: 8px; font-size: 18px; }
.reading-list a { color: var(--amber); }
article .hero.page h1 { max-width: 26ch; }

/* Azure: homepage band and Azure page */
.lede { font-size: 20px; line-height: 1.55; max-width: 62ch; margin: 0; }
.checklist a { text-decoration-color: var(--amber); text-underline-offset: 4px; }
.checklist a:hover { color: var(--amber); }
.azure .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.azure h2 { margin-bottom: 24px; }
.azure p { font-size: 21px; line-height: 1.5; color: var(--muted); max-width: 40ch; margin: 0 0 28px; }
.more { color: var(--amber); font-weight: 600; text-underline-offset: 4px; }
.more:hover { color: var(--amber-hi); }
.azure-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--wire); border: 1px solid var(--wire); }
.azure-list li { background: var(--panel); padding: 28px 24px; font-weight: 600; font-size: 19px; border-left: 2px solid var(--amber); }
@media (max-width: 760px) {
  .azure .wrap { grid-template-columns: 1fr; gap: 32px; }
  .azure p { font-size: 18px; }
  .lede { font-size: 18px; }
}
.checklist li:last-child:nth-child(odd) { grid-column: 1 / -1; }
