/* 911CFO.ai — site stylesheet v1.00
   Idea: the data boundary. One device — a red dashed perimeter — marks "this stays inside your firm".
   Everything else stays quiet: white paper, navy ink, brand blue, gold used only as a highlighter on figures. */

:root {
  --paper: #FFFFFF;
  --mist: #F2F5F9;
  --ink: #142235;
  --muted: #4E5B6B;
  --line: #D6DEE8;
  --blue: #124B8F;
  --deep: #0E3A6D;
  --red: #B02025;
  --gold: #FFD966;
  --display: "Montserrat", "Segoe UI", Arial, sans-serif;
  --body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --measure: 68ch;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-s: 6px;
  --radius-l: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.62 var(--body);
  font-feature-settings: "tnum" 1, "lnum" 1;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--deep); color: #fff; padding: 10px 16px; z-index: 100; border-radius: var(--radius-s); }
.skip-link:focus { left: 8px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--measure); }

/* Type scale — Montserrat for display, Source Sans 3 for reading */
h1, h2, h3, h4 { font-family: var(--display); color: var(--deep); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.005em; }
h4 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.15rem, 1.8vw, 1.32rem); color: var(--muted); max-width: 58ch; }
.small { font-size: .92rem; color: var(--muted); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--deep); }
.brand img { height: 40px; width: auto; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 1.28rem; letter-spacing: -0.02em; color: var(--deep); }
.brand-name span { color: var(--blue); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); }
.nav .btn { border-bottom: 0; padding: 10px 18px; color: #fff; }
.nav .btn:hover, .nav .btn[aria-current="page"] { color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; font: 600 .95rem var(--body); color: var(--ink); cursor: pointer; }

/* Buttons */
.btn { display: inline-block; font: 700 1rem/1 var(--display); letter-spacing: -0.005em; text-decoration: none; padding: 15px 24px; border-radius: var(--radius-s); border: 2px solid var(--blue); background: var(--blue); color: #fff; cursor: pointer; transition: background .15s ease, color .15s ease; }
.btn:hover { background: var(--deep); border-color: var(--deep); color: #fff; }
.btn.secondary { background: transparent; color: var(--blue); }
.btn.secondary:hover { background: var(--mist); color: var(--deep); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* Sections */
section { padding: clamp(56px, 8vw, 104px) 0; }
section.band { background: var(--mist); }
section.tight { padding-top: 0; }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.12rem; }

/* Hero */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 104px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 span { display: block; }

/* The signature device: the data boundary */
.boundary { position: relative; border: 2px dashed var(--red); border-radius: var(--radius-l); padding: 26px; background: var(--paper); }
.boundary-label { position: absolute; top: -13px; left: 22px; background: var(--paper); color: var(--red); font: 700 .82rem/1 var(--display); padding: 5px 10px; border: 2px dashed var(--red); border-radius: 999px; }
section.band .boundary-label { background: var(--paper); }

/* Ledger demo */
.demo-q { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; padding: 0; list-style: none; }
.demo-q button { font: 600 .92rem/1.25 var(--body); color: var(--ink); background: var(--mist); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; text-align: left; }
.demo-q button[aria-pressed="true"] { background: var(--deep); border-color: var(--deep); color: #fff; }
.demo-answer { min-height: 196px; }
.demo-ask { font: 700 1.05rem/1.3 var(--display); color: var(--deep); margin-bottom: 10px; }
.demo-text { font-size: 1.08rem; margin-bottom: 14px; }
.demo-text mark { background: linear-gradient(transparent 55%, var(--gold) 55%); color: inherit; padding: 0 2px; font-weight: 700; }
.demo-sources { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.demo-sources li { font-size: .86rem; color: var(--blue); border: 1px solid var(--line); background: var(--mist); border-radius: var(--radius-s); padding: 4px 10px; }
.demo-sources li.none { color: var(--red); border-color: var(--red); background: #FDF1F1; }
.demo-note { margin-top: 16px; font-size: .84rem; color: var(--muted); }
.demo-answer.swap { animation: settle .28s ease-out; }
@keyframes settle { from { opacity: .2; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Steps — a true sequence, so numbered */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 3px solid var(--deep); counter-reset: step; }
.steps li { padding: 22px 22px 6px 0; counter-increment: step; }
.steps li + li { padding-left: 22px; border-left: 1px solid var(--line); }
.steps li::before { content: counter(step); display: block; font: 800 2.4rem/1 var(--display); color: var(--blue); margin-bottom: 12px; }
.steps p { color: var(--muted); }

/* Principles — plain columns, no card chrome */
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.cols > div h3 { margin-bottom: .4em; }
.cols > div p { color: var(--muted); }
.cols.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Two ways to run it */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: stretch; }
.panel { border: 1px solid var(--line); border-radius: var(--radius-l); padding: 30px; background: var(--paper); }
.panel.boundary { border: 2px dashed var(--red); }
.panel ul, .ticks { margin: 0; padding: 0; list-style: none; }
.panel li, .ticks li { padding: 9px 0 9px 28px; position: relative; border-top: 1px solid var(--line); }
.panel li:first-child, .ticks li:first-child { border-top: 0; }
.panel li::before, .ticks li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 12px; height: 7px; border-left: 2.5px solid var(--blue); border-bottom: 2.5px solid var(--blue); transform: rotate(-45deg); }
.panel .who { color: var(--muted); margin-bottom: 18px; }

/* Module table */
.modules { width: 100%; border-collapse: collapse; font-size: 1rem; }
.modules th { text-align: left; font: 700 .95rem var(--display); color: var(--deep); padding: 12px 14px; border-bottom: 2px solid var(--deep); }
.modules td { padding: 16px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.modules td:first-child { font-weight: 700; color: var(--deep); width: 26%; }
.status { display: inline-block; font: 700 .8rem/1 var(--display); padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.status.now { background: #E3F1E4; color: #1F5E23; }
.status.dev { background: #FFF4CC; color: #6A5000; }
.status.beta { background: #DCE8F6; color: #0E3A6D; }
.partner { display: flex; align-items: center; gap: 14px; margin-top: 18px; color: var(--muted); font-weight: 600; }
.partner-logo { height: 24px; width: auto; }
.table-wrap { overflow-x: auto; }

.more { margin-top: 14px; }
.modules caption { text-align: left; caption-side: bottom; padding-top: 12px; }

/* Figures */
figure { margin: 0; }
.fig img { width: 100%; height: auto; }
.fig figcaption { margin-top: 12px; font-size: .92rem; color: var(--muted); }
.fig.wide { margin-bottom: 40px; }
.fig.gap { margin-bottom: 48px; }
.fig.narrow { max-width: 620px; }
.split.media { align-items: center; margin-bottom: 44px; }
.split.media .section-head { margin-bottom: 0; }
.screens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
.screens .lead { grid-column: 1 / -1; max-width: 960px; }
.fig.shot img { border-radius: 12px; box-shadow: 0 1px 2px rgba(20,34,53,.08), 0 12px 32px -12px rgba(14,58,109,.28); background: #fff; }
.step-icon { width: 64px; height: 64px; margin-bottom: 14px; }
.steps li::before { float: right; margin: 0; font-size: 1.6rem; color: var(--line); }

/* Statement band */
.statement { background: var(--deep); color: #fff; }
.statement h2 { color: #fff; max-width: 20ch; }
.statement p { color: #D7E3F4; max-width: 60ch; font-size: 1.12rem; }
.statement .btn { background: #fff; color: var(--deep); border-color: #fff; }
.statement .btn:hover { background: var(--gold); border-color: var(--gold); color: var(--deep); }
.statement .btn.secondary { background: transparent; color: #fff; border-color: #fff; }
.statement .btn.secondary:hover { background: rgba(255,255,255,.12); color: #fff; }

/* Page hero (inner pages) */
.page-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 18ch; }

/* Controls list on Security */
.controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); }
.controls div { padding: 22px 0; border-top: 1px solid var(--line); }
.controls h3 { font-size: 1.12rem; }
.controls p { color: var(--muted); margin: 0; }

/* Forms */
form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; color: var(--deep); }
.field .hint { font-size: .9rem; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], select, textarea {
  font: 400 1.05rem/1.4 var(--body); color: var(--ink); background: #fff; border: 1.5px solid #B8C4D3; border-radius: var(--radius-s); padding: 12px 14px; width: 100%;
}
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid rgba(18,75,143,.18); outline-offset: 0; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); }
.error { color: var(--red); font-size: .92rem; font-weight: 600; min-height: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--blue); flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 14px 16px; border-radius: var(--radius-s); font-weight: 600; }
.form-status:empty { display: none; }
.form-status.ok { background: #E3F1E4; color: #1F5E23; }
.form-status.err { background: #FDF1F1; color: var(--red); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.aside { border-left: 3px solid var(--deep); padding-left: 24px; }
.aside h2 { font-size: 1.3rem; }

/* Footer */
.site-footer { background: var(--ink); color: #C9D3E0; padding: 56px 0 36px; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid h2 { color: #fff; font-size: 1rem; margin-bottom: 12px; letter-spacing: 0; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer .tag { color: var(--gold); font-family: var(--display); font-weight: 700; margin-top: 12px; }
.footer-base { border-top: 1px solid #2C3D55; margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .86rem; }

/* Legal pages */
.legal h2 { font-size: 1.35rem; margin-top: 1.6em; }
.legal li { margin-bottom: .4em; }

/* Responsive */
@media (max-width: 960px) {
  .hero .wrap, .split, .contact-grid { grid-template-columns: 1fr; }
  .cols { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { border-left: 0; padding-left: 0; }
  .screens { grid-template-columns: 1fr; max-width: 720px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav { position: absolute; top: 72px; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 18px; }
  .nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 12px; text-align: center; }
  .cols, .cols.two, .controls, .steps, .footer-grid { grid-template-columns: 1fr; }
  .steps li + li { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .boundary { padding: 22px 18px; }
  .fig.wide, .fig.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .fig.wide img, .fig.scroll img { min-width: 720px; }
  .fig.wide figcaption, .fig.scroll figcaption { position: sticky; left: 0; max-width: calc(100vw - 2 * var(--gutter)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .site-header, .site-footer, .actions, .nav-toggle { display: none; }
  .boundary { border-style: solid; }
}
