/* Omnific StageFrame — site styles
   One stylesheet, no build step. Colours and type live in :root tokens. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-400.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-500.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Display";
  src: url("/assets/fonts/inter-display-600.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colour */
  --house: #040605;        /* page background */
  --rack: #0a100e;         /* panels */
  --rack-raised: #101815;  /* panel header, hover */
  --cable: #1f2b27;        /* hairlines, unlit meter segments */
  --spot: #ecf0f4;         /* primary text */
  --haze: #97a7a0;         /* secondary text (7.4:1 on --house) */
  --signal: #2ef2a4;       /* StageFrame green, matches --sf-brand in the apps */
  --signal-soft: #1a8f63;  /* lit segments below the current stage (--sf-brand-dim) */
  --signal-ink: #02170b;   /* text on --signal */

  /* Type */
  --font-text: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Inter Display", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: 0.875rem;   /* 14 */
  --step-0: 1.0625rem;   /* 17 */
  --step-1: 1.3125rem;   /* 21 */
  --step-2: 1.75rem;     /* 28 */
  --step-3: clamp(2rem, 1.4rem + 2.4vw, 2.75rem);
  --step-hero: clamp(2.75rem, 1.2rem + 6.2vw, 5.25rem);

  /* Space and layout */
  --gutter: clamp(1rem, 0.4rem + 2.6vw, 2.5rem);
  --page: 72rem;
  --measure: 36rem;
  --radius: 6px;

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--house);
  color: var(--spot);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
p + p { margin-top: 1em; }

a {
  color: var(--signal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2px; }

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

::selection { background: var(--signal); color: var(--signal-ink); }

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--signal);
  color: var(--signal-ink);
  font-weight: 500;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--cable);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--spot);
  text-decoration: none;
}
.brand img { width: 28px; height: 28px; flex: none; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1875rem;
  letter-spacing: -0.015em;
}
.brand-owner {
  color: var(--haze);
  font-size: var(--step--1);
  padding-left: 0.65rem;
  border-left: 1px solid var(--cable);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  padding-block: 0.35rem;
  color: var(--haze);
  font-size: 0.9375rem;
  text-decoration: none;
}
.site-nav a:hover { color: var(--spot); }
.site-nav a[aria-current="page"] {
  color: var(--spot);
  box-shadow: inset 0 -2px 0 var(--signal);
}

/* ---------- Buttons ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}
.button {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--signal);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}
.button-primary { background: var(--signal); color: var(--signal-ink); }
.button-primary:hover { background: #6ff7c2; border-color: #6ff7c2; }
.button-quiet { background: transparent; color: var(--spot); border-color: var(--cable); }
.button-quiet:hover { border-color: var(--haze); }

/* ---------- Home: hero ---------- */

.hero { padding-block: clamp(4rem, 2rem + 9vw, 9rem) clamp(3rem, 2rem + 4vw, 5rem); }
.hero h1 {
  font-size: var(--step-hero);
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 13ch;
}
.hero-lede {
  margin-top: 1.75rem;
  max-width: var(--measure);
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--haze);
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(3.5rem, 2rem + 5vw, 6rem); }
.section-head { max-width: var(--measure); margin-bottom: 2.5rem; }
.section-head h2 { font-size: var(--step-3); }
.section-head p { margin-top: 1rem; color: var(--haze); }

/* ---------- Home: product family rack ----------
   The meter is the page's one loud element: five segments,
   one per release stage, lit up to where each product is today. */

.rack {
  border: 1px solid var(--cable);
  border-radius: var(--radius);
  background: var(--rack);
  overflow: hidden;
}

.rack-scale,
.product {
  display: grid;
  grid-template-columns: minmax(10rem, 13rem) minmax(0, 1fr) 15rem;
  column-gap: 2rem;
  align-items: center;
  padding: 1.25rem 1.5rem;
}

.rack-scale {
  background: var(--rack-raised);
  border-bottom: 1px solid var(--cable);
  padding-block: 0.85rem;
  color: var(--haze);
  font-size: 0.8125rem;
}
.rack-scale > span { align-self: end; padding-bottom: 0.1rem; }
.rack-scale ol {
  grid-column: 3;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rack-scale li {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  justify-self: center;
  white-space: nowrap;
  line-height: 1.2;
}

.product-list { margin: 0; padding: 0; list-style: none; }
.product + .product { border-top: 1px solid var(--cable); }

.product-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-1);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.product-name span { color: var(--haze); font-weight: 600; }
.product-desc { color: var(--haze); font-size: 0.9688rem; }
.product-desc.is-tbd { font-style: italic; }

.product-stage { display: grid; gap: 0.5rem; }
.meter {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  height: 0.875rem;
}
.meter i {
  display: block;
  border-radius: 2px;
  background: var(--cable);
}
/* Segments below the current stage glow softly; the current stage is full signal. */
.meter[data-stage="1"] i:nth-child(-n+1),
.meter[data-stage="2"] i:nth-child(-n+2),
.meter[data-stage="3"] i:nth-child(-n+3),
.meter[data-stage="4"] i:nth-child(-n+4),
.meter[data-stage="5"] i:nth-child(-n+5) { background: var(--signal-soft); }
.meter[data-stage="1"] i:nth-child(1),
.meter[data-stage="2"] i:nth-child(2),
.meter[data-stage="3"] i:nth-child(3),
.meter[data-stage="4"] i:nth-child(4),
.meter[data-stage="5"] i:nth-child(5) {
  background: var(--signal);
  box-shadow: 0 0 12px rgba(46, 242, 164, 0.5);
}
.product-status {
  font-size: 0.9063rem;
  font-weight: 500;
  color: var(--spot);
  line-height: 1.35;
}

.rack-note {
  margin-top: 1.25rem;
  color: var(--haze);
  font-size: var(--step--1);
  max-width: var(--measure);
}

/* ---------- Home: about ---------- */

.section-follow { padding-top: 0; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2rem 4rem;
  align-items: start;
  border-top: 1px solid var(--cable);
  padding-top: clamp(3rem, 2rem + 3vw, 4.5rem);
}
.split h2 { font-size: var(--step-3); }
.split .prose { max-width: var(--measure); color: var(--haze); }
.split .prose strong { color: var(--spot); font-weight: 500; }

/* ---------- Support strip (home) ---------- */

.contact-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  padding: clamp(1.75rem, 1rem + 3vw, 2.75rem);
  border: 1px solid var(--cable);
  border-left: 3px solid var(--signal);
  border-radius: var(--radius);
  background: var(--rack);
}
.contact-band h2 { font-size: var(--step-2); }
.contact-band p { margin-top: 0.5rem; color: var(--haze); }
.contact-band .actions { margin-top: 0; }

/* ---------- Inner pages ---------- */

.page-head {
  padding-block: clamp(3rem, 2rem + 5vw, 5.5rem) clamp(2rem, 1.5rem + 2vw, 3rem);
  border-bottom: 1px solid var(--cable);
}
.page-head h1 { font-size: var(--step-3); max-width: 20ch; }
.page-head p { margin-top: 1rem; max-width: var(--measure); color: var(--haze); font-size: var(--step-1); line-height: 1.5; }

.page-body { padding-block: clamp(2.5rem, 2rem + 3vw, 4rem) clamp(4rem, 3rem + 4vw, 6rem); }

.prose { max-width: 42rem; }
.prose h2 { font-size: var(--step-2); margin-top: 2.75rem; margin-bottom: 0.9rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--step-1); margin-top: 2rem; margin-bottom: 0.6rem; }
.prose p, .prose li { color: #c9d4cf; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 1em 0; }
.prose li + li { margin-top: 0.4em; }

/* Notice shown on legal pages until the final text is published */
.notice {
  max-width: 42rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--cable);
  border-left: 3px solid var(--signal);
  border-radius: var(--radius);
  background: var(--rack);
}
.notice h2 { font-size: var(--step-1); margin: 0 0 0.6rem; }
.notice p { color: var(--haze); }

.legal-meta { color: var(--haze); font-size: var(--step--1); margin-bottom: 2rem; }

/* ---------- Legal documents ----------
   Generated by scripts/legal_to_html.py. Numbering always comes from the
   approved text itself; the styles never add or renumber anything. */

.notice + .legal { margin-top: 2.5rem; }

.legal {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 44rem);
  gap: 2.5rem 4rem;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 1.5rem;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  font-size: 0.875rem;
  line-height: 1.45;
}
.legal-toc summary {
  cursor: pointer;
  padding-block: 0.25rem;
  color: var(--spot);
  font-weight: 500;
}
.legal-toc ol {
  margin: 0.75rem 0 0;
  padding: 0 0 0 0.9rem;
  list-style: none;
  border-left: 1px solid var(--cable);
}
.legal-toc li + li { margin-top: 0.55rem; }
.legal-toc a { color: var(--haze); text-decoration: none; display: block; }
.legal-toc a:hover { color: var(--spot); text-decoration: underline; }

.legal-text {
  min-width: 0;
  max-width: 44rem;
  font-size: var(--step-0);
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.legal-text p,
.legal-text li,
.legal-text td,
.legal-text th { color: #c9d4cf; }
.legal-text strong { color: var(--spot); font-weight: 500; }
.legal-text > :first-child { margin-top: 0; }

.legal-text h2 {
  font-size: var(--step-2);
  line-height: 1.2;
  margin: 3rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--cable);
  scroll-margin-top: 1.5rem;
}
.legal-text > h2:first-child { border-top: 0; padding-top: 0; }
.legal-text h3 {
  font-size: var(--step-1);
  line-height: 1.3;
  margin: 2rem 0 0.75rem;
  scroll-margin-top: 1.5rem;
}
.legal-text h4 {
  font-family: var(--font-text);
  font-size: var(--step-0);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--spot);
  margin: 1.5rem 0 0.5rem;
}
.legal-text p + p { margin-top: 1em; }
.legal-text p + ul,
.legal-text p + ol,
.legal-text ul + p,
.legal-text ol + p,
.legal-text ul + ul,
.legal-text ol + ol { margin-top: 1em; }

/* Bulleted lists */
.legal-text ul {
  margin: 1em 0;
  padding-left: 1.25rem;
}
/* Numbered or lettered lists keep the exact markers from the text,
   shown as hanging labels so wrapped lines stay aligned. */
.legal-text ol.as-written {
  margin: 1em 0;
  padding: 0;
  list-style: none;
}
.legal-text ol.as-written > li {
  display: grid;
  grid-template-columns: minmax(2.25em, max-content) minmax(0, 1fr);
  column-gap: 0.6em;
}
.legal-text .marker {
  color: var(--haze);
  font-variant-numeric: tabular-nums;
}
.legal-text li + li { margin-top: 0.5em; }
.legal-text li > ul,
.legal-text li > ol { margin: 0.5em 0 0; grid-column: 2; }

.legal-text blockquote {
  margin: 1.25em 0;
  padding: 0.25em 0 0.25em 1.25em;
  border-left: 3px solid var(--cable);
}
.legal-text hr {
  border: 0;
  border-top: 1px solid var(--cable);
  margin: 2.5rem 0;
}
.legal-text hr + h2 { border-top: 0; padding-top: 0; }
.legal-text .table-wrap {
  margin: 1.25em 0;
  overflow-x: auto;
  border: 1px solid var(--cable);
  border-radius: var(--radius);
}
.legal-text table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.legal-text th,
.legal-text td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--cable);
  min-width: 9rem;
}
.legal-text th { color: var(--spot); font-weight: 500; background: var(--rack-raised); }
.legal-text tr:last-child td { border-bottom: 0; }

/* Support page */
.support-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 3rem 4rem;
  align-items: start;
}
.email-panel {
  padding: 1.75rem;
  border: 1px solid var(--cable);
  border-radius: var(--radius);
  background: var(--rack);
}
.email-panel h2 { font-size: var(--step-1); }
.email-panel p { margin-top: 0.5rem; color: var(--haze); font-size: 0.9688rem; }
.email-address {
  display: inline-block;
  margin-top: 1rem;
  font-size: var(--step-1);
  font-weight: 500;
  word-break: break-all;
}
.email-panel .actions { margin-top: 1.5rem; }

/* 404 */
.not-found { padding-block: clamp(5rem, 3rem + 8vw, 9rem); }
.not-found h1 { font-size: var(--step-3); }
.not-found p { margin-top: 1rem; color: var(--haze); max-width: var(--measure); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--cable);
  color: var(--haze);
  font-size: var(--step--1);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 2rem;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer a { color: var(--haze); text-decoration: none; }
.site-footer a:hover { color: var(--spot); text-decoration: underline; }

/* ---------- Small screens ---------- */

@media (max-width: 52rem) {
  .rack-scale { display: none; }
  .product {
    grid-template-columns: 1fr;
    row-gap: 0.4rem;
    padding: 1.25rem;
  }
  .product-stage {
    margin-top: 0.6rem;
    grid-template-columns: 7.5rem 1fr;
    align-items: center;
    gap: 0.9rem;
  }
  .split,
  .support-grid,
  .legal { grid-template-columns: minmax(0, 1fr); }
  .legal-toc {
    position: static;
    max-height: none;
    padding: 1rem 1.25rem;
    border: 1px solid var(--cable);
    border-radius: var(--radius);
    background: var(--rack);
  }
  .legal-text { font-size: 1rem; }
  .legal-text h2 { margin-top: 2.25rem; padding-top: 1.5rem; }
}

@media (max-width: 30rem) {
  .brand-owner { display: none; }
  .actions .button { flex: 1 1 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}

@media (forced-colors: active) {
  .meter i { border: 1px solid CanvasText; }
  .meter[data-stage] i { forced-color-adjust: none; }
}

@media print {
  .site-header, .site-footer, .skip-link, .actions { display: none; }
  body { background: #fff; color: #000; }
  .prose p, .prose li { color: #000; }
  .notice, .legal-toc { display: none; }
  .legal { display: block; }
  .legal-text { max-width: none; font-size: 11pt; }
  .legal-text p, .legal-text li, .legal-text td, .legal-text th,
  .legal-text strong, .legal-text h2, .legal-text h3, .legal-text h4, .legal-text .marker { color: #000; }
  .legal-text h2 { break-after: avoid; }
  .legal-text a::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}
