/* ECam site. No web fonts, no scripts, no third-party requests. */

:root {
  color-scheme: light dark;

  --bg: #fbfbfd;
  --bg-raised: #ffffff;
  --bg-sunken: #f1f2f6;
  --text: #14161c;
  --text-muted: #555b6b;
  --border: #dfe2ea;
  --accent: #2f5bea;
  --accent-text: #ffffff;
  --accent-soft: #e8eefe;
  --good: #137a3d;
  --good-soft: #e5f5eb;
  --warn: #8a5300;
  --warn-soft: #fff4dc;
  --warn-border: #f0cd85;
  --no: #a1262b;
  --no-soft: #fbeaea;
  --code-bg: #f1f2f6;
  --shadow: 0 1px 2px rgb(20 22 28 / 6%), 0 8px 24px rgb(20 22 28 / 6%);

  --radius: 14px;
  --max: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f14;
    --bg-raised: #151821;
    --bg-sunken: #10131a;
    --text: #e9ebf1;
    --text-muted: #a0a6b6;
    --border: #262b38;
    --accent: #7c9cff;
    --accent-text: #0d0f14;
    --accent-soft: #1b2440;
    --good: #5fd08f;
    --good-soft: #12291d;
    --warn: #f3c46b;
    --warn-soft: #2a2110;
    --warn-border: #5c4718;
    --no: #ff8a8f;
    --no-soft: #2e1517;
    --code-bg: #1a1e29;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 30%);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

img, svg { max-width: 100%; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--accent-text); padding: 8px 14px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; z-index: 10; }

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

/* Header */

.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand svg { width: 30px; height: 30px; flex: none; }
.logo .bg { fill: var(--accent); }
.logo .fg { fill: none; stroke: var(--accent-text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.logo .hole { fill: var(--accent-text); }

.site-nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a {
  color: var(--text-muted); text-decoration: none; font-size: 0.95rem; font-weight: 500;
  padding: 6px 12px; border-radius: 999px;
}
.site-nav a:hover { color: var(--text); background: var(--bg-sunken); }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--bg-sunken); }

/* Type */

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 750; margin-top: 0; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; color: var(--text-muted); }
.muted { color: var(--text-muted); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 700; color: var(--accent); margin-bottom: 0.6em; }

/* Sections */

section { padding: 72px 0; }
section + section { border-top: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: 36px; }

/* Hero */

.hero { padding: 88px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 0.35em; }
.hero h1 span { color: var(--accent); }
.hero .lead { max-width: 34em; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--border); color: var(--text); background: var(--bg-raised);
}
.button:hover { border-color: var(--text-muted); text-decoration: none; }
.button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.button.primary:hover { filter: brightness(1.08); }

/* Flow illustration */

.flow { display: grid; gap: 14px; }
.flow-card {
  display: flex; gap: 16px; align-items: center;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
}
.flow-card svg { width: 40px; height: 40px; flex: none; color: var(--accent); }
.flow-card strong { display: block; }
.flow-card span { color: var(--text-muted); font-size: 0.93rem; }
.flow-arrow { text-align: center; color: var(--text-muted); font-size: 1.1rem; line-height: 1; }

/* Cards and grids */

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.4em; }
.card p:last-child { margin-bottom: 0; }

.step-num {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; margin-bottom: 14px;
}

.icon-chip {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 14px;
}
.icon-chip svg { width: 24px; height: 24px; }

/* Protects / doesn't */

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checklist li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.checklist li::before {
  content: ""; width: 22px; height: 22px; border-radius: 50%; margin-top: 3px;
  background-repeat: no-repeat; background-position: center; background-size: 14px;
}
.checklist.yes li::before {
  background-color: var(--good-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%23219a52' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.checklist.no li::before {
  background-color: var(--no-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 4.5l7 7M11.5 4.5l-7 7' fill='none' stroke='%23d0464c' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.panel-yes { border-top: 4px solid var(--good); }
.panel-no { border-top: 4px solid var(--no); }

/* Callouts */

.callout {
  border: 1px solid var(--warn-border); background: var(--warn-soft); color: var(--text);
  border-radius: var(--radius); padding: 18px 22px; display: grid; grid-template-columns: 26px 1fr; gap: 12px;
}
.callout svg { width: 24px; height: 24px; color: var(--warn); margin-top: 2px; }
.callout p { margin: 0; }
.callout strong { color: var(--warn); }

.note { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 1.2em 0; }
.note p:last-child { margin-bottom: 0; }

/* Status table */

table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.table-card { padding: 4px 8px; overflow-x: auto; }
.table-card tr:last-child td { border-bottom: 0; }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.no { background: var(--no-soft); color: var(--no); }

/* Code */

code, pre { font-family: var(--mono); font-size: 0.88em; }
:not(pre) > code { background: var(--code-bg); padding: 0.12em 0.4em; border-radius: 6px; }
pre {
  background: var(--code-bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; overflow-x: auto; line-height: 1.55; margin: 0 0 1.2em;
}
pre .c { color: var(--text-muted); }

/* Prose pages */

.page-head { padding: 64px 0 32px; }
.page-head .lead { max-width: 40em; }
.prose { padding: 8px 0 72px; }
.prose h2 { margin-top: 2.2em; padding-top: 0.2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.8em; }
.prose .card h3 { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.toc a {
  text-decoration: none; font-size: 0.92rem; font-weight: 500; color: var(--text-muted);
  border: 1px solid var(--border); padding: 5px 12px; border-radius: 999px;
}
.toc a:hover { color: var(--text); border-color: var(--text-muted); }

.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps > li { counter-increment: step; position: relative; padding-left: 52px; margin-bottom: 2em !important; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 800;
}
.steps > li > h3 { margin-top: 0; }

/* Footer */

.site-footer { border-top: 1px solid var(--border); padding: 40px 0 56px; color: var(--text-muted); font-size: 0.93rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }

/* Responsive */

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  section { padding: 56px 0; }
  .hero { padding: 56px 0 48px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .site-header .wrap { height: auto; padding-top: 10px; padding-bottom: 10px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .site-nav { justify-content: flex-start; margin-left: -12px; }
}

@media (prefers-reduced-motion: no-preference) {
  .button, .site-nav a, .toc a { transition: background-color 0.15s, border-color 0.15s, color 0.15s, filter 0.15s; }
}
