/* Orionid Systems. Brand tokens from the project brief, with a matching dark theme.
   Theme follows the visitor's system setting. All text pairs checked at 4.5:1 or better. */

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("fonts/public-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* Brand */
  --ink: #12263A;
  --mist: #EEF3F6;
  --white: #FFFFFF;
  --teal: #0B6E6A;
  --brass: #9A6B12;

  /* Light theme */
  --bg: #FFFFFF;
  --bg-alt: #EEF3F6;
  --surface: #FFFFFF;
  --text: #12263A;
  --muted: #41566A;
  --rule: #C9D5DD;
  --link: #0B6E6A;
  --link-hover: #085552;
  --btn-bg: #0B6E6A;
  --btn-bg-hover: #085552;
  --btn-fg: #FFFFFF;
  --focus: #0B6E6A;
  --field-border: #5B6B7A;
  --err: #A12B2B;
  --accent-rule: #0B6E6A;
  --cred: #9A6B12;
  --ph-bg: #FBF3E0;
  --ph-fg: #6F4B08;
  --ph-line: #9A6B12;
  --st-done-bg: #DDF0EE;
  --st-done-fg: #085552;
  --st-part-bg: #FBF3E0;
  --st-part-fg: #6F4B08;
  --st-plan-bg: #E6ECF1;
  --st-plan-fg: #12263A;
  --matrix-head-bg: #12263A;
  --matrix-head-fg: #FFFFFF;
  --zebra: #F6F9FB;
  --shadow: 0 1px 2px rgba(18, 38, 58, .06), 0 8px 24px rgba(18, 38, 58, .08);

  /* Header and footer stay ink in both themes */
  --bar-bg: #12263A;
  --bar-fg: #FFFFFF;
  --bar-link: #9FE3DE;
  --bar-btn-bg: #4DBBB4;
  --bar-btn-fg: #08202B;
  --bar-btn-hover: #6FCEC8;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C1722;
    --bg-alt: #112133;
    --surface: #14283C;
    --text: #E6EDF3;
    --muted: #A9B8C6;
    --rule: #2A4157;
    --link: #5CC8C1;
    --link-hover: #8EDDD8;
    --btn-bg: #4DBBB4;
    --btn-bg-hover: #6FCEC8;
    --btn-fg: #08202B;
    --focus: #8EDDD8;
    --field-border: #7F93A6;
    --err: #FF9A9A;
    --accent-rule: #4DBBB4;
    --cred: #E2B455;
    --ph-bg: #2B2312;
    --ph-fg: #F0C96E;
    --ph-line: #E2B455;
    --st-done-bg: #123B3A;
    --st-done-fg: #7FE0D9;
    --st-part-bg: #3A2F12;
    --st-part-fg: #F0C96E;
    --st-plan-bg: #1E3347;
    --st-plan-fg: #C5D3E0;
    --matrix-head-bg: #0A1520;
    --matrix-head-fg: #E6EDF3;
    --zebra: #112133;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0 0 .75rem; color: var(--text); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 20ch; letter-spacing: -.015em; font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw, 2.25rem); letter-spacing: -.01em; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1rem; max-width: 68ch; }

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

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

.sr {
  position: absolute; 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: 20;
  background: var(--bar-bg); color: var(--bar-fg); padding: .6rem 1rem; border-radius: 4px;
  outline: 2px solid var(--bar-fg);
}
.skip:focus { top: 1rem; }

/* Header: ink in both themes */
.site-header { background: var(--bar-bg); color: var(--bar-fg); position: sticky; top: 0; z-index: 10; border-bottom: 3px solid var(--accent-rule); }
.site-header :focus-visible, .site-footer :focus-visible { outline-color: #FFFFFF; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; letter-spacing: -.005em; color: var(--bar-fg); text-decoration: none; }
.brand:hover { color: var(--bar-fg); }
nav { display: flex; align-items: center; gap: 1.75rem; flex-wrap: wrap; }
nav ul { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
nav ul a { color: var(--bar-fg); text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; font-size: .975rem; }
nav ul a:hover { border-bottom-color: var(--bar-link); color: var(--bar-fg); }
.menu-btn { display: none; }

/* Buttons and links */
.btn {
  display: inline-block; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  padding: .75rem 1.35rem; border-radius: 4px; border: 2px solid transparent; line-height: 1.3;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { background: var(--btn-bg-hover); color: var(--btn-fg); text-decoration: none; }
.site-header .btn-primary { background: var(--bar-btn-bg); color: var(--bar-btn-fg); padding: .55rem 1.1rem; }
.site-header .btn-primary:hover { background: var(--bar-btn-hover); color: var(--bar-btn-fg); }
.link-strong { font-weight: 600; }
.actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin: 1.75rem 0 3rem; }

/* Hero */
.hero { background: var(--bg-alt); padding: 4rem 0 3.5rem; border-bottom: 1px solid var(--rule); }
.lead { font-size: 1.2rem; max-width: 62ch; color: var(--text); }

/* The matrix: the one memorable element */
.matrix {
  margin: 0; background: var(--surface); border: 1px solid var(--rule);
  border-radius: 6px; overflow: hidden; box-shadow: var(--shadow);
}
.matrix figcaption {
  padding: 1rem 1.25rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem;
  border-bottom: 1px solid var(--rule); border-left: 5px solid var(--accent-rule);
}
.matrix figcaption strong { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.matrix figcaption span { font-size: .925rem; color: var(--muted); }

.scroll { overflow-x: auto; }
.scroll:focus-visible { outline-offset: -3px; }
table { width: 100%; border-collapse: collapse; font-size: .975rem; min-width: 44rem; }
th, td { text-align: left; vertical-align: top; padding: .85rem 1.25rem; border-top: 1px solid var(--rule); }
thead th { border-top: 0; font-weight: 600; background: var(--matrix-head-bg); color: var(--matrix-head-fg); }
tbody th { font-weight: 600; }
.matrix tbody tr:nth-child(even) > * { background: var(--zebra); }
.cid {
  display: inline-block; font-family: var(--mono); font-size: .85rem; font-weight: 600;
  background: var(--bg-alt); border: 1px solid var(--rule); border-radius: 3px; padding: 0 .4rem; margin-right: .4rem;
}

.st { display: inline-block; font-weight: 600; white-space: nowrap; padding: .1rem .65rem; border-radius: 999px; font-size: .9rem; }
.st-done { background: var(--st-done-bg); color: var(--st-done-fg); }
.st-part { background: var(--st-part-bg); color: var(--st-part-fg); }
.st-plan { background: var(--st-plan-bg); color: var(--st-plan-fg); }

/* Sections */
section { padding: 4rem 0; }
.band { background: var(--bg-alt); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.intro { font-size: 1.1rem; margin-bottom: 2rem; color: var(--muted); }

/* Capabilities: ruled rows, not cards */
.cap { display: grid; grid-template-columns: minmax(12rem, 1fr) 3fr; gap: 1rem 2.5rem; padding: 1.6rem 0; border-top: 1px solid var(--rule); }
.cap:first-of-type { border-top: 2px solid var(--accent-rule); }
.cap h3 { margin: 0; }
.cap p:last-child { margin-bottom: 0; }
.typical { font-size: .975rem; color: var(--muted); }
.typical strong { color: var(--text); }

/* Offers and past performance */
.offers { background: var(--surface); }
#offers .scroll { border: 1px solid var(--rule); border-radius: 6px; box-shadow: var(--shadow); }
.offers thead th { background: var(--matrix-head-bg); color: var(--matrix-head-fg); }
.offers tbody tr:nth-child(even) > * { background: var(--zebra); }
.offers th[scope="row"] { min-width: 14rem; }
.offers td:nth-child(2) { max-width: 36rem; }
.row-link { display: block; margin-top: .4rem; font-weight: 500; }

/* Placeholders: visible, quiet, and always legible */
.ph {
  background: var(--ph-bg); color: var(--ph-fg);
  border-bottom: 2px dotted var(--ph-line);
  padding: .05rem .4rem; border-radius: 3px 3px 0 0; font-weight: 500; font-size: .94em;
}

/* Registrations: brass marks credentials */
.reg { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.5rem 2.5rem; }
.reg div { border-left: 4px solid var(--cred); padding-left: 1rem; }
.reg dt { font-weight: 600; }
.reg dd { margin: .25rem 0 0; }
.reg address { font-style: normal; }
.reg .sub { display: block; font-size: .925rem; color: var(--muted); }

/* Two-column blocks */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 4rem; align-items: start; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: .25rem 0; }

/* Form */
form { max-width: 34rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 1.5rem; box-shadow: var(--shadow); }
.field { margin-bottom: 1.1rem; }
label { display: block; font-weight: 600; margin-bottom: .3rem; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 2px solid var(--field-border); border-radius: 4px; padding: .6rem .75rem;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--focus); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--err); }
.err { color: var(--err); font-weight: 600; margin: .3rem 0 0; font-size: .95rem; }
#form-status { margin: 1rem 0 0; font-weight: 600; }

/* Plain document pages (privacy) */
.doc { padding: 3.5rem 0 4rem; }
.doc .wrap { max-width: 48rem; }
.doc h1 { max-width: none; font-size: clamp(2rem, 4vw, 2.8rem); }
.doc h2 { font-size: 1.4rem; margin-top: 2rem; }
.doc .meta { color: var(--muted); margin-bottom: 1.5rem; }
.doc .back { margin-top: 2.5rem; }

/* Footer: ink in both themes */
.site-footer { background: var(--bar-bg); color: var(--bar-fg); padding: 2rem 0; border-top: 3px solid var(--accent-rule); }
.site-footer p { margin: 0; }
.site-footer a { color: var(--bar-link); }
.site-footer a:hover { color: #FFFFFF; }
.foot-links { margin-top: .6rem !important; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.site-footer .ph { background: #2B2312; color: #F0C96E; border-bottom-color: #E2B455; }

/* Small screens */
@media (max-width: 52rem) {
  .two { grid-template-columns: 1fr; }
  .cap { grid-template-columns: 1fr; gap: .5rem; }
  .hero { padding: 2.75rem 0 2.5rem; }
  section { padding: 3rem 0; }

  .js .menu-btn {
    display: inline-block; font: inherit; font-weight: 600; background: transparent; color: var(--bar-fg);
    border: 2px solid var(--bar-fg); border-radius: 4px; padding: .45rem .9rem; cursor: pointer;
  }
  .js nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; padding-bottom: 1rem; }
  .js nav.open { display: flex; }
  .js nav ul { flex-direction: column; gap: .25rem; }
}

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