/* ============================================================================
   eleven88.io — styles.css
   One stylesheet, one page. Tokens live on :root; change colour or type there.
   Palette and type are pinned by Branding.md §17–§22.
   ========================================================================== */

/* ---- Fonts (self-hosted, no CDN) ---------------------------------------- */
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("assets/fonts/IBMPlexSans-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("assets/fonts/IBMPlexSans-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("assets/fonts/IBMPlexMono-Regular.woff2") format("woff2");
}

/* ---- Tokens ------------------------------------------------------------- */
:root {
  /* Brand palette */
  --midnight: #101827;
  --white: #ffffff;
  --cloud: #f5f7fa;
  --cobalt: #316bff;      /* non-text only: rules, marks, diagram highlights */
  --cobalt-ink: #2e66f5;  /* cobalt for text and button fills (passes AA on white) */
  --teal: #12a89d;        /* "live" accent, used sparingly */
  --slate: #596579;

  /* Derived */
  --ink: var(--midnight);
  --ink-soft: var(--slate);
  --ink-on-dark: var(--white);
  --slate-on-dark: #aab4c4;
  --rule: #dde2ea;
  --rule-dark: #2a3446;

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

  --fs-display: clamp(2.5rem, 6vw, 4.75rem);
  --fs-h2: clamp(1.75rem, 3.4vw, 2.625rem);
  --fs-statement: clamp(1.5rem, 2.8vw, 2.125rem);
  --fs-h3: clamp(1.125rem, 1.6vw, 1.375rem);
  --fs-lead: clamp(1.0625rem, 1.5vw, 1.25rem);
  --fs-body: 1rem;
  --fs-ui: 0.9375rem;
  --fs-small: 0.875rem;
  --fs-mono: 0.75rem;
  --fs-label: 0.6875rem;
  --fs-mark: 1.375rem;      /* header wordmark */
  --fs-mark-sm: 1.25rem;    /* footer wordmark */

  /* Layout */
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --band: clamp(3.5rem, 8vw, 6.5rem);
  --edge: 2px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--cobalt-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
b { font-weight: 600; }
code, .mono { font-family: var(--mono); }
svg { display: block; }

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

.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 0.75rem;
  background: var(--midnight);
  color: var(--white);
  z-index: 100;
}
.skip:focus { top: 1rem; }

/* ---- Wordmark ----------------------------------------------------------- */
.wordmark {
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: inherit;
}
.wordmark b { font-weight: 600; }
.wordmark:hover { text-decoration: none; }

/* ---- Header ------------------------------------------------------------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.bar-in {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.bar-id { font-size: var(--fs-mark); }
.bar-nav { display: flex; align-items: center; gap: 1.75rem; }
.bar-nav a {
  color: var(--ink);
  font-size: var(--fs-ui);
  font-weight: 400;
}
.bar-nav a:hover { color: var(--cobalt-ink); text-decoration: none; }
.bar-cta {
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid var(--ink);
  border-radius: var(--edge);
  font-weight: 600 !important;
}
.bar-cta:hover { background: var(--midnight); color: var(--white) !important; }

/* Mobile menu (native <details>, no JS required) */
.menu { position: relative; display: none; }
.menu summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border: 1px solid var(--rule);
  border-radius: var(--edge);
  font-size: var(--fs-small);
  font-weight: 600;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.menu[open] summary { background: var(--midnight); color: var(--white); border-color: var(--midnight); }
.menu-sheet {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 14rem;
  padding: 0.5rem;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--edge);
  box-shadow: 0 12px 32px rgba(16, 24, 39, 0.12);
  display: grid;
}
.menu-sheet a {
  padding: 0.65rem 0.75rem;
  color: var(--ink);
  font-size: var(--fs-ui);
  border-radius: var(--edge);
}
.menu-sheet a:hover { background: var(--cloud); text-decoration: none; }

@media (max-width: 46rem) {
  .bar-nav { display: none; }
  .menu { display: block; }
}

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.875rem;
  padding: 0 1.375rem;
  background: var(--cobalt-ink);
  color: var(--white);
  font-size: var(--fs-ui);
  font-weight: 600;
  border-radius: var(--edge);
  transition: background-color 160ms ease;
}
.btn:hover { background: var(--midnight); text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-ghost:hover { background: var(--midnight); color: var(--white); }
.btn-lg { height: 3.25rem; padding: 0 1.75rem; }
.band-dark .btn-ghost { color: var(--white); border-color: var(--white); }
.band-dark .btn-ghost:hover { background: var(--white); color: var(--midnight); }
.band-dark .btn:hover { background: var(--white); color: var(--midnight); }

.action {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* ---- Hero --------------------------------------------------------------- */
.hero {
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 7vw, 5rem);
  border-bottom: 1px solid var(--rule);
}
.hero h1 {
  font-size: var(--fs-display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 14ch;
}
.hero-lead {
  margin-top: 1.75rem;
  max-width: 34rem;
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--ink-soft);
}
.techline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

/* ---- Bands -------------------------------------------------------------- */
.band { padding: var(--band) 0; }
.band + .band { border-top: 1px solid var(--rule); }
.band-tint { background: var(--cloud); }
.band-dark {
  background: var(--midnight);
  color: var(--ink-on-dark);
  --rule: var(--rule-dark);
  --ink: var(--white);
  --ink-soft: var(--slate-on-dark);
}
.band-dark a { color: var(--white); }

.band-head { max-width: 40rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.band-head h2 {
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.band-head p {
  margin-top: 1rem;
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--ink-soft);
}

/* Statement + body split */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 2rem clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.statement {
  font-size: var(--fs-statement);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 18ch;
}
.statement-body { max-width: 34rem; line-height: 1.65; }
.statement-body + .statement-body { margin-top: 1.1rem; }
.statement-body .lead { font-size: var(--fs-lead); color: var(--ink); }
@media (max-width: 46rem) {
  .split { grid-template-columns: 1fr; }
}

/* ---- Data path diagram -------------------------------------------------- */
.pipeline { margin-top: 1rem; }
.pipeline svg { width: 100%; height: auto; overflow: visible; }
.pipe-line { stroke: var(--rule-dark); stroke-width: 1.5; }
.pipe-line-live {
  stroke: var(--cobalt);
  stroke-dasharray: var(--dash, 960);
  stroke-dashoffset: var(--dash, 960);
}
.pipe-node { fill: var(--midnight); stroke: var(--slate-on-dark); stroke-width: 1.5; }
.pipe-node-key { stroke: var(--cobalt); }
.pipe-dot { fill: var(--teal); }
.pipe-stage {
  font-family: var(--mono);
  font-size: 11px;            /* SVG user units, scaled by viewBox */
  fill: var(--slate-on-dark);
  letter-spacing: 0.08em;
}
.pipe-label {
  font-family: var(--mono);
  font-size: 12px;            /* SVG user units, scaled by viewBox */
  fill: var(--white);
  letter-spacing: 0.1em;
}
.pipe-label-key { fill: #7ea0ff; }
.pipe-desc {
  font-family: var(--sans);
  font-size: 12px;            /* SVG user units, scaled by viewBox */
  fill: var(--slate-on-dark);
}

/* Draw the path once when it scrolls into view */
.settle .pipeline.in .pipe-line-live {
  animation: draw 1400ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .pipe-line-live { stroke-dashoffset: 0; }
}

/* Stacked version of the diagram for narrow screens */
.pipe-stack { display: none; }
@media (max-width: 46rem) {
  .pipeline { display: none; }
  .pipe-stack {
    display: grid;
    gap: 0;
    margin-top: 0.5rem;
    border-top: 1px solid var(--rule-dark);
  }
  .pipe-stack li {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--rule-dark);
  }
  .pipe-stack b {
    font-family: var(--mono);
    font-weight: 400;
    font-size: var(--fs-mono);
    color: var(--slate-on-dark);
    padding-top: 0.2rem;
  }
  .pipe-stack span {
    font-family: var(--mono);
    font-size: var(--fs-mono);
    letter-spacing: 0.1em;
  }
  .pipe-stack em {
    display: block;
    margin-top: 0.25rem;
    font-family: var(--sans);
    font-style: normal;
    font-size: var(--fs-small);
    letter-spacing: 0;
    color: var(--slate-on-dark);
  }
}

/* ---- Products ----------------------------------------------------------- */
.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.5rem clamp(1.5rem, 3vw, 2.5rem);
}
.product { display: flex; flex-direction: column; gap: 0.75rem; }
.product-flow {
  position: relative;
  height: 1.75rem;
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}
.product-flow::before {
  content: "";
  position: absolute;
  left: 0;
  right: calc(-1 * clamp(1.5rem, 3vw, 2.5rem));
  top: 50%;
  height: 1px;
  background: var(--rule);
}
.product:last-child .product-flow::before { right: 0; }
.product-flow::after {
  content: "";
  position: absolute;
  right: calc(-1 * clamp(1.5rem, 3vw, 2.5rem) + 0.35rem);
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-top: 1px solid var(--slate);
  border-right: 1px solid var(--slate);
  transform: translateY(-50%) rotate(45deg);
}
.product:last-child .product-flow::after { display: none; }
.product-verb {
  position: relative;
  padding-right: 0.75rem;
  background: var(--white);
  font-family: var(--mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cobalt-ink);
}
.product h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.product h3 small {
  font-family: var(--mono);
  font-weight: 400;
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  padding: 0.15rem 0.45rem;
}
.product-job { font-size: var(--fs-ui); line-height: 1.6; }
.product ul {
  margin-top: 0.25rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 0.5rem;
}
.product ul li {
  position: relative;
  padding-left: 1rem;
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--ink-soft);
}
.product ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.4rem;
  height: 1px;
  background: var(--slate);
}
.tenets {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem clamp(1.5rem, 3vw, 2.5rem);
}
.tenets li { font-size: var(--fs-ui); line-height: 1.6; color: var(--ink-soft); }
.tenets b { display: block; color: var(--ink); margin-bottom: 0.25rem; }
@media (max-width: 64rem) {
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product:nth-child(2) .product-flow::before { right: 0; }
  .product:nth-child(2) .product-flow::after { display: none; }
  .tenets { grid-template-columns: 1fr; }
}
@media (max-width: 36rem) {
  .products { grid-template-columns: 1fr; }
  .product-flow::before { right: 0; }
  .product-flow::after { display: none; }
}
.band-tint .product-verb, .band-tint .caps ul li { background: var(--cloud); }

/* ---- Capabilities grid -------------------------------------------------- */
.caps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.caps li {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.75rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.cap-name {
  font-family: var(--mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.cap-name span { color: var(--cobalt-ink); }
.caps h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.caps p { color: var(--ink-soft); font-size: var(--fs-ui); line-height: 1.6; }
.caps ul {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.caps ul li {
  border: 1px solid var(--rule);
  padding: 0.2rem 0.5rem;
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  display: block;
}
@media (max-width: 64rem) { .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 36rem) { .caps { grid-template-columns: 1fr; } }

/* ---- Findings ----------------------------------------------------------- */
.findings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(2rem, 5vw, 4rem);
  border-top: 1px solid var(--rule);
}
.finding {
  padding: 2rem 0 2.25rem;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 0 1rem;
}
.finding-id {
  font-family: var(--mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.06em;
  color: var(--cobalt-ink);
  padding-top: 0.45rem;
}
.finding h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.finding p { margin-top: 0.75rem; color: var(--ink-soft); font-size: var(--fs-ui); line-height: 1.6; }
.finding .fix {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--rule);
  color: var(--ink);
}
.finding .fix b { color: var(--cobalt-ink); font-family: var(--mono); font-weight: 400; font-size: var(--fs-mono); letter-spacing: 0.06em; margin-right: 0.5rem; }
@media (max-width: 46rem) {
  .findings { grid-template-columns: 1fr; }
}

/* ---- Standards ledger --------------------------------------------------- */
.ledger { border-top: 1px solid var(--rule); }
.ledger li {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) 1fr minmax(0, 20rem);
  gap: 1rem 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.ledger h3 { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
.ledger p { color: var(--ink-soft); font-size: var(--fs-ui); line-height: 1.6; max-width: 34rem; }
.ledger .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  justify-content: flex-start;
}
.ledger .tags li {
  display: block;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--rule);
  background: var(--white);
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
@media (max-width: 46rem) {
  .ledger li { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* ---- Stages (how the work runs) ----------------------------------------- */
.stages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem clamp(1.5rem, 3vw, 2.5rem);
}
.stage {
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  position: relative;
}
.stage::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 2.5rem;
  height: 2px;
  background: var(--cobalt);
}
.stage-n {
  font-family: var(--mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.stage h3 { margin-top: 0.75rem; font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em; }
.stage p { margin-top: 0.75rem; color: var(--ink-soft); font-size: var(--fs-ui); line-height: 1.6; }
@media (max-width: 64rem) { .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 36rem) { .stages { grid-template-columns: 1fr; } }

/* ---- About -------------------------------------------------------------- */
.who {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: var(--fs-small);
  color: var(--ink-soft);
}
.who b { color: var(--ink); display: block; font-size: var(--fs-body); }

/* ---- Contact ------------------------------------------------------------ */
.close { max-width: 44rem; }
.close h2 {
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.close .lead {
  margin-top: 1.25rem;
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--ink-soft);
}
.fallback {
  margin-top: 1.25rem;
  font-size: var(--fs-small);
  color: var(--ink-soft);
}
.fallback a { font-family: var(--mono); font-size: var(--fs-small); }

/* Placeholder marker — anything bracketed cannot ship by accident */
.ph {
  box-shadow: inset 0 -3px 0 var(--cobalt);
}
.band-dark .ph { box-shadow: inset 0 -3px 0 var(--teal); }

/* ---- Footer ------------------------------------------------------------- */
.foot {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0 3rem;
  font-size: var(--fs-small);
  color: var(--ink-soft);
}
.foot-in {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem 2rem;
  align-items: start;
}
.foot-id { font-size: var(--fs-mark-sm); color: var(--ink); }
.foot-tag { margin-top: 0.25rem; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.foot-nav a { color: var(--ink); }
.foot-meta { text-align: right; }
.foot-legal { margin-top: 0.25rem; font-family: var(--mono); font-size: var(--fs-mono); }
@media (max-width: 46rem) {
  .foot-in { grid-template-columns: 1fr; }
  .foot-meta { text-align: left; }
}

/* ---- Print -------------------------------------------------------------- */
@media print {
  .bar, .skip, .action, .menu { display: none !important; }
  .band-dark { background: none; color: #000; --ink: #000; --ink-soft: #333; }
  body { font-size: 11pt; }
}
