/* indivisa.ai — site styles.
   Shares tokens and base components with indivisa.llc (IndivisaLLC/indivisa-llc).
   Palette: a deep navy-black ground taken from the Indivisa LLC monogram's
   navy, a brighter blue for links and data, and a copper accent. Contrast ratios are checked in
   tests/contrast.test.mjs; change a color there and here together. */

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-opsz.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/* Marcellus is used only for the "INDIVISA" name, to match the logo's
   flared capitals. It is a typeface match, not the original lettering. */
@font-face {
  font-family: "Marcellus";
  src: url("/assets/fonts/marcellus-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #070a13;
  --bg-raised: #0c1221;
  --bg-sunk: #04060d;
  --line: #18213a;
  --line-strong: #283553;
  --control-line: #5a6b91; /* 3:1 or better on every background, for control boundaries */
  --text: #e9edf5;
  --text-dim: #a7b0c4;
  --blue: #8fb0f2;
  --blue-deep: #4766a8;
  --copper: #d9a96a;
  --copper-deep: #b07a3b;
  --focus: #f0c98d;

  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 76rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 6px;
  --short: 0.2727; /* 12 / 44: a 0 bit's tick length relative to a 1 bit's */
}

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

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 100%;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(71, 102, 168, 0.18), transparent 70%),
    var(--bg);
}

main { flex: 1; }
main:focus { outline: none; }

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

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--text); }
a.ext::after { content: "\2009\2197"; font-size: 0.85em; }

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

code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--copper);
  overflow-wrap: anywhere;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 450;
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0 0 0.6em;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 48rem; }
.muted { color: var(--text-dim); }

.label, .eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.eyebrow { color: var(--copper); margin-bottom: 1.25rem; }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--text); max-width: 40em; line-height: 1.55; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 10;
  background: var(--copper);
  color: #120c05;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
}
.skip:focus { top: 1rem; }

/* ------------------------------------------------------------ header */

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(7, 10, 19, 0.88);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--text); text-decoration: none; }
.brand-mark { width: 40px; height: 29px; }
.brand-name { font-family: "Marcellus", var(--serif); font-size: 1.25rem; letter-spacing: 0.12em; }
.brand-llc { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; color: var(--text-dim); vertical-align: 0.18em; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.site-nav a { color: var(--text-dim); text-decoration: none; font-size: 0.95rem; padding: 0.4rem 0; display: inline-block; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--copper); }

.nav-toggle {
  font: 500 0.8rem/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--control-line);
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  display: none;
}

@media (max-width: 860px) {
  .js .nav-toggle { display: inline-block; }
  .js .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--line);
    padding: 0.75rem var(--gutter) 1.25rem;
  }
  .js .site-nav.open { display: block; }
  .js .site-nav ul { flex-direction: column; gap: 0; }
  .js .site-nav a { display: block; padding: 0.8rem 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .header-inner { flex-wrap: wrap; }
  .site-nav ul { gap: 0.25rem 1rem; }
}

/* ------------------------------------------------------------ buttons */

.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 1.75rem 0 0; }
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.9rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  font: 500 0.95rem/1.2 var(--sans);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--copper); color: #160f06; }
.btn-primary:hover { background: var(--focus); color: #160f06; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--control-line); }
.btn-secondary:hover { border-color: var(--blue); color: var(--text); }
.btn.ext::after { content: "\2009\2197"; }

/* ------------------------------------------------------------ status */

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font: 500 0.72rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  white-space: nowrap;
}
/* Each label has its own shape as well as its own colour, so status never
   depends on colour alone. The text label is always present. */
.status-mark { width: 0.55rem; height: 0.55rem; flex: none; }
.status-active .status-mark { border-radius: 50%; background: var(--blue); }
.status-functional .status-mark { border-radius: 50%; background: linear-gradient(90deg, var(--blue) 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px var(--blue); }
.status-development .status-mark { border-radius: 1px; background: var(--copper); }
.status-experimental .status-mark { border-radius: 1px; transform: rotate(45deg) scale(0.85); box-shadow: inset 0 0 0 1.5px var(--copper); }
.status-draft .status-mark { border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--text-dim); }

/* ------------------------------------------------------------ hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.hero h1 { max-width: 14ch; }
.hero-logo { height: 96px; width: auto; margin-bottom: 1.75rem; }

.demo {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: 1.5rem;
}
.demo .label { display: block; margin-bottom: 0.5rem; }
.demo-input {
  width: 100%;
  font: 400 1.05rem/1.4 var(--mono);
  color: var(--text);
  background: var(--bg-sunk);
  border: 1px solid var(--control-line);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
}
.demo-input:focus-visible { border-color: var(--copper); outline-offset: 2px; }
.demo-out-label { margin-top: 1.25rem; }
.demo-out {
  display: block;
  font: 400 0.9rem/1.6 var(--mono);
  color: var(--blue);
  overflow-wrap: anywhere;
  padding: 0.75rem 0.9rem;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.demo-help { color: var(--text-dim); font-size: 0.9rem; margin: 1rem 0 0; }

/* ------------------------------------------------------------ sections */

.section { padding-top: clamp(3rem, 7vw, 5.5rem); padding-bottom: clamp(1rem, 3vw, 2rem); scroll-margin-top: 4.5rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem; border-bottom: 1px solid var(--line); padding-bottom: 1rem; margin-bottom: 0; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; }
.mono { font-family: var(--mono); }
.prose { max-width: 44rem; padding-top: 1.5rem; }
.prose p { color: #d4dae6; }

/* Pipeline */
.pipeline { list-style: none; margin: 0; padding: 0; }
.stage {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 5rem;
}
.stage-num { font: 500 0.85rem/2.6 var(--mono); color: var(--copper); }
.stage-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 0.6rem; }
.stage-head h3 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin: 0; }
.stage-module { font: 400 0.85rem/1 var(--mono); color: var(--text-dim); margin-left: 0.5rem; vertical-align: 0.25em; }
.stage-main > p { color: #d4dae6; max-width: 44rem; }
.note { color: var(--text-dim); font-size: 0.92rem; }
.part { border-left: 2px solid var(--line-strong); padding: 0.25rem 0 0.25rem 1.25rem; margin-top: 1.25rem; max-width: 44rem; }
.part-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-bottom: 0.4rem; }
.part h4 { font: 450 1.1rem/1.2 var(--serif); margin: 0; }
.part p { color: #d4dae6; margin: 0; }

.product-strip { margin-top: 2rem; padding: 1.5rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-raised); }
.product-strip p { margin: 0 0 0.4rem; }
.product-strip p:last-child { margin: 0; }
.product-name { font: 450 1.4rem/1.2 var(--serif); color: var(--text); margin-right: 0.5rem; }
.product-name:hover { color: var(--copper); }

/* Specifications */
.specs { margin: 0; }
.specs div { display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); gap: 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.specs dt { font: 500 0.75rem/1.9 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.specs dd { margin: 0; font-family: var(--mono); font-size: 0.92rem; color: var(--text); }
.specs dd code { font-size: 1em; }

.closing { padding-bottom: clamp(3rem, 7vw, 6rem); }
.contact-email { font: 450 clamp(1.4rem, 4vw, 2.2rem)/1.2 var(--serif); margin: 1rem 0 0; overflow-wrap: anywhere; }
.contact-email a { color: var(--copper); }

/* Status register and other pages */
.page { padding-top: clamp(2rem, 5vw, 4rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.page > .lede { margin-bottom: 2rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-sunk); }
.register { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.register caption { text-align: left; padding: 1rem 1rem 0.5rem; }
.register th, .register td { text-align: left; padding: 0.75rem 1rem; border-top: 1px solid var(--line); vertical-align: middle; }
.register th { font: 500 0.72rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.legend-title { margin-top: 3rem; }
.legend { margin: 0; }
.legend div { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: 1.25rem; align-items: center; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.legend dd { margin: 0; color: #d4dae6; }

/* ------------------------------------------------------------ footer */

.site-footer { border-top: 1px solid var(--line); background: var(--bg-sunk); margin-top: auto; }
.footer-row { padding-top: 2rem; padding-bottom: 2rem; font-size: 0.9rem; }
.footer-row p { margin: 0 0 0.4rem; }
.footer-name { font-family: var(--serif); font-size: 1.05rem; }
.site-footer a { color: var(--text-dim); overflow-wrap: anywhere; }
.site-footer a:hover { color: var(--text); }

/* ------------------------------------------------------------ responsive */

@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .stage { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  .stage-num { line-height: 1.2; }
  .specs div, .legend div { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
  .hero-logo { height: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
  .status-mark { forced-color-adjust: none; }
}

@media print {
  .site-header, .site-footer, .demo, .cta-row { display: none; }
  html, body { background: #fff; color: #000; }
}

