/* =====================================================================
   Strata — "Survey" design system
   Ink on bone. One field colour. Labelled figures. Hatched layers.
   ===================================================================== */

/* ---- self-hosted fonts (latin subset) ---- */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  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-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
}

/* ---- tokens ---- */
:root {
  --bone: #efebe2;
  --paper-2: #e6e1d5;
  --line: #c9c3b4;
  --hatch: #8f8878;
  --muted: #6b675e;
  --ink-2: #45423b;
  --ink: #1c1b18;
  --lichen: #5d7a3a;
  --lichen-light: #8fae64;
  --lichen-tint: rgba(93, 122, 58, .10);

  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, Segoe UI, sans-serif;

  --max: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --rule: 1px solid var(--ink);
  --rule-soft: 1px solid var(--line);

  /* layer patterns — fixed meanings site-wide */
  --p-context: repeating-linear-gradient(0deg, transparent 0 5px, var(--hatch) 5px 6px);
  --p-head: var(--lichen);
  --p-integrated: repeating-linear-gradient(45deg, transparent 0 5px, var(--hatch) 5px 6px);
  --p-conflict: repeating-linear-gradient(45deg, transparent 0 4px, var(--ink) 4px 5px),
                repeating-linear-gradient(-45deg, transparent 0 4px, var(--ink) 4px 5px);
  --p-git: radial-gradient(var(--hatch) 1px, transparent 1.3px) 0 0 / 6px 6px;
  --p-storage: repeating-linear-gradient(-45deg, transparent 0 3px, var(--hatch) 3px 4px);
}

/* ---- base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  text-wrap: pretty;
}
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--lichen); }
:focus-visible { outline: 2px solid var(--lichen); outline-offset: 2px; }
::selection { background: #dde2cf; }
img, svg { max-width: 100%; height: auto; display: block; }

/* ---- skip link ---- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 60;
  background: var(--bone); padding: 8px 12px; border: 1px solid var(--ink);
  font: 500 12px/1 var(--font-mono); color: var(--ink); text-decoration: none;
}
.skip:focus { left: 12px; top: 12px; }

/* ---- header ---- */
header {
  position: sticky; top: 0; z-index: 20;
  background: var(--bone);
  border-bottom: var(--rule);
}
.nav {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 28px; min-height: 60px;
}
.brand {
  display: flex; align-items: center; gap: 10px; flex: none;
  font: 600 16px/1 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
}
.brand .mark { flex: none; }
.nav-links {
  display: flex; gap: 24px; overflow-x: auto; flex: 1; min-width: 0; padding: 6px 0;
}
.nav-links a { font-size: 14px; text-decoration: none; white-space: nowrap; }
.eval-label {
  flex: none; font: 500 11.5px/1 var(--font-mono); padding: 6px 9px;
  border: 1px solid var(--ink); text-decoration: none; white-space: nowrap; color: var(--ink);
}
.eval-label:hover { background: var(--paper-2); color: var(--ink); }

/* ---- layout ---- */
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
section { border-bottom: var(--rule); }

/* ---- type roles ---- */
.kicker {
  font: 500 12px/1.4 var(--font-mono); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--lichen); display: block;
}
h1 { margin: 0; font: 500 clamp(40px, 5.4vw, 64px)/1.02 var(--font-mono); letter-spacing: -0.045em; }
h2 { margin: 0; font: 500 clamp(28px, 3.4vw, 40px)/1.1 var(--font-mono); letter-spacing: -0.035em; }
h2.big { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.06; letter-spacing: -0.045em; }
h3 { margin: 0; font-weight: 600; font-size: 18px; line-height: 1.3; }
.sub-headline { margin: 0; font: 500 19px/1.4 var(--font-mono); letter-spacing: -0.01em; }
.lead { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.body-copy { margin: 0; font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.measure { max-width: 62ch; }
.caption { font: 400 12px/1.5 var(--font-mono); color: var(--muted); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px;
  font: 500 14px/1 var(--font-mono); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary { background: var(--ink); color: var(--bone); }
.btn-primary:hover { background: var(--lichen); color: var(--bone); }
.btn-secondary { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-secondary:hover { background: var(--paper-2); color: var(--ink); }

/* ---- ruled cell grids ---- */
.grid-cells {
  display: grid; border-top: var(--rule); border-left: var(--rule);
}
.grid-cells > * { border-right: var(--rule); border-bottom: var(--rule); }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.cols-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.cols-6 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }

/* ---- layer patterns as utilities ---- */
.p-context { background: var(--p-context); }
.p-head { background: var(--p-head); }
.p-integrated { background: var(--p-integrated); }
.p-conflict { background: var(--p-conflict); }
.p-git { background: var(--p-git); }
.p-storage { background: var(--p-storage); }
.p-chip {
  display: inline-block; background: var(--bone); padding: 2px 5px;
  font: 500 12.5px/1.4 var(--font-mono); color: var(--ink);
}

/* ---- status chips ---- */
.chip {
  font: 500 11px/1 var(--font-mono); padding: 5px 7px; text-transform: uppercase;
  white-space: nowrap; display: inline-block;
}
.chip-integrated, .chip-resolved { background: var(--lichen); color: var(--bone); border: 1px solid var(--lichen); }
.chip-conflict { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.chip-working, .chip-editing, .chip-validating, .chip-resolving, .chip-active,
.chip-recorded, .chip-checkpointed, .chip-open, .chip-local, .chip-assigned, .chip-ended {
  background: var(--paper-2); color: var(--ink); border: 1px solid var(--ink);
}
.chip-provisional { background: transparent; color: var(--ink-2); border: 1px dashed var(--muted); }
.chip-verified { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.chip-superseded { background: transparent; color: var(--muted); border: 1px solid transparent; text-decoration: line-through; }
.chip-muted { background: transparent; color: var(--ink-2); border: 1px solid var(--line); }
.chip-workspace { background: transparent; color: var(--ink-2); border: 1px solid var(--line); }

/* ---- figure frames ---- */
.figure { border: 1px solid var(--ink); margin: 0; }
.figure-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 14px; border-bottom: var(--rule);
  font: 500 11.5px/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase;
}
.figure-bar .fig-label { color: var(--muted); font-weight: 500; }
.figure-caption { padding: 10px 14px; font: 400 12px/1.5 var(--font-mono); color: var(--ink-2); }

/* ---- demo controls (segmented) ---- */
.controls { display: flex; gap: 0; flex-wrap: wrap; }
.controls button {
  all: unset; cursor: pointer; font: 500 12.5px/1 var(--font-mono);
  padding: 10px 14px; border: 1px solid var(--ink); margin-right: -1px;
  color: var(--ink); background: transparent;
}
.controls button:hover { background: var(--paper-2); }
.controls button:disabled { opacity: 0.4; cursor: default; }
.controls button.primary-ctl { background: var(--ink); color: var(--bone); padding-left: 16px; padding-right: 16px; }
.controls button.primary-ctl:hover { background: var(--lichen); color: var(--bone); }
.controls button:focus-visible { outline: 2px solid var(--lichen); outline-offset: 2px; }

/* ---- tables ---- */
table.deploy { width: 100%; border-collapse: collapse; font-size: 15px; border-top: var(--rule); }
table.deploy caption {
  text-align: left; padding: 0 0 12px; caption-side: top;
  font: 500 11.5px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase;
}
table.deploy th, table.deploy td { text-align: left; padding: 12px 12px 12px 0; border-bottom: var(--rule-soft); vertical-align: top; }
table.deploy tr:last-child th, table.deploy tr:last-child td { border-bottom: var(--rule); }
table.deploy th { font: 500 12px/1.4 var(--font-mono); color: var(--ink-2); width: 34%; }
table.deploy td { font-size: 15px; }
.maturity-label {
  font: 500 11.5px/1 var(--font-mono); padding: 6px 9px; border: 1px solid var(--ink); white-space: nowrap;
}

/* ---- footer ---- */
footer { border-top: var(--rule); }
.footer-grid {
  max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) 56px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; font-size: 14px;
}
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-brand .brand { font-size: 16px; }
.footer-brand p { color: var(--ink-2); line-height: 1.5; margin: 0; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col span {
  font: 500 11.5px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.footer-col a { text-decoration: none; }

/* ---- code block ---- */
pre.code {
  background: var(--paper-2); border: var(--rule); padding: 20px; overflow-x: auto;
  font: 400 13px/1.6 var(--font-mono); margin: 0;
}
pre.code .cmt { color: var(--muted); }

/* ---- inline footnote sup ---- */
sup.fn { font-size: 12px; color: var(--lichen); margin-left: 2px; }
sup.fn a { color: var(--lichen); text-decoration: none; }

/* ---- docs layout ---- */
.docs-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 0; border-bottom: var(--rule); }
.docs-side { border-right: var(--rule); padding: 24px 20px 40px 0; }
.docs-side nav { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 2px; }
.docs-side a { font-size: 14px; text-decoration: none; padding: 5px 8px; color: var(--ink-2); }
.docs-side a:hover { background: var(--paper-2); color: var(--ink); }
.docs-side a[aria-current="page"] { background: var(--lichen-tint); color: var(--ink); font-weight: 500; }
.docs-side .side-head { font: 500 11.5px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 12px 8px 4px; }
.docs-body { padding: 64px 0 80px 48px; min-width: 0; }
.docs-body h1 { font-size: clamp(30px, 4vw, 44px); }
.docs-body h2 { font-size: clamp(22px, 2.6vw, 30px); margin-top: 40px; }
.docs-body h3 { margin-top: 28px; }
.docs-body p, .docs-body li { color: var(--ink-2); }
.docs-body ul, .docs-body ol { padding-left: 22px; }
.breadcrumbs { font: 400 12px/1.5 var(--font-mono); color: var(--muted); margin: 0 0 24px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--lichen); }
.pager { display: flex; justify-content: space-between; gap: 24px; margin-top: 48px; padding-top: 24px; border-top: var(--rule-soft); }
.pager a { font: 500 13px/1.4 var(--font-mono); text-decoration: none; max-width: 44%; }
.pager .dir { color: var(--muted); font-weight: 400; display: block; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.status-badge { font: 500 11px/1 var(--font-mono); padding: 4px 7px; text-transform: uppercase; white-space: nowrap; border: 1px solid var(--line); color: var(--ink-2); }
.status-impl { border-color: var(--lichen); color: var(--lichen); }
.status-exp { border-color: var(--ink); color: var(--ink); }
.status-plan { border-color: var(--muted); color: var(--muted); border-style: dashed; }

/* ---- feature table ---- */
table.features { width: 100%; border-collapse: collapse; border-top: var(--rule); font-size: 15px; }
table.features th, table.features td { text-align: left; padding: 12px; border-bottom: var(--rule-soft); vertical-align: top; }
table.features th { font: 500 11.5px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ---- 6-step figure (single row by default) ---- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

/* ---- responsive ---- */
@media (max-width: 800px) {
  .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .docs-wrap { grid-template-columns: 1fr; }
  .docs-side { border-right: none; border-bottom: var(--rule); padding-bottom: 16px; }
  .docs-side nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .docs-side .side-head { width: 100%; }
  .docs-body { padding: 40px 0 64px; }
}

/* ---- fjern hostens "by Anyabelle"-badge (injecteret af platformen, ikke vores kode) ---- */
#anyabelle-badge,
a[href*="anyabelle.com"],
a[aria-label*="Anyabelle"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
}
