/* ============================================================================
   SysAutonomy — stylesheet
   Hand-written. Semantic class names, no utility framework, no build step.
   Edit this file directly; refresh the browser to see it.

   Layout:  1. Tokens   2. Reset & base   3. Type   4. Layout & surfaces
            5. Header   6. Footer   7. Buttons   8. Components   9. Diagram
           10. Forms   11. Responsive
   ========================================================================= */

/* ---- 1. Tokens ---------------------------------------------------------- */
/* The whole palette is these nine values. Change one here, it changes
   everywhere. --accent carries white button text AND is used as accent text on
   white, so it is squeezed from both sides: keep it near 5.8:1 on paper.
   --accent-deep exists because --accent misses AA on --mist. */
:root {
  --paper:       #ffffff;
  --mist:        #f5f6fa;
  --ink:         #16161d;
  --slate:       #5a5f73;
  --rule:        #e4e6ef;
  --accent:      #0057e7;   /* 5.97:1 on paper — the blue in the logo mark */
  --accent-wash: #e9f0fd;
  --accent-deep: #0a4da6;   /* 8.0:1 on paper, 7.41:1 on mist */
  --navy:        #06143d;   /* brand navy — same value as "Sys" in the wordmark */

  /* Logo only. 2.68:1 and 1.89:1 on paper — decorative, never text, never a
     UI state. They are the far end of the mark's gradient. */
  --brand-cyan:  #00aae0;
  --brand-teal:  #00d5ac;

  --font-display: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --font-sans:    "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --page:   1240px;   /* wide sections */
  --column: 1100px;   /* normal sections */
  --gutter: 24px;
}

/* Self-hosted so there is no third-party request and no layout shift. */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url("fonts/instrument-sans-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
}

/* ---- 2. Reset & base ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* Visible keyboard focus, never a mouse focus ring. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
::selection { background: var(--accent-wash); color: var(--ink); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
}
.skip-link:focus {
  left: 16px; top: 16px;
  background: var(--ink); color: #fff;
  padding: 8px 16px; border-radius: 8px;
  font-size: 15px; text-decoration: none;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- 3. Type ------------------------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  text-wrap: balance;
  margin: 0;
}

/* The scale. Sizes step down on small screens via clamp(), so there is no
   separate mobile rule to keep in step. */
.display-xl {
  font-size: clamp(2.25rem, 1.1rem + 4.6vw, 4rem);
  line-height: 1.06; letter-spacing: -0.032em;
}
.display-l {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);
  line-height: 1.12; letter-spacing: -0.022em;
}
.display-m {
  font-size: clamp(1.3125rem, 1.15rem + 0.7vw, 1.5625rem);
  line-height: 1.25; letter-spacing: -0.015em;
}
.lead {
  font-size: clamp(1.125rem, 1.02rem + 0.42vw, 1.3125rem);
  line-height: 1.55; letter-spacing: -0.008em;
}
.small  { font-size: 15px;   line-height: 1.5; }
.micro  { font-size: 13px;   line-height: 1.45; letter-spacing: 0.01em; }
.muted  { color: var(--slate); }

/* Body copy never exceeds a comfortable line length. */
.measure       { max-width: 68ch; }
.measure-tight { max-width: 54ch; }

/* SAP object names and artifact codes. The one place mono earns its place. */
.obj { font-family: var(--font-mono); font-size: 0.92em; font-weight: 500; letter-spacing: 0; }

/* Section label above a heading. Used sparingly — not above every heading. */
.eyebrow {
  font-size: 13px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent-deep);
  margin: 0;
}
.eyebrow-light { color: rgba(255,255,255,0.5); }

p { margin: 0; }
.prose > * + * { margin-top: 16px; }
.prose { color: var(--slate); }

/* ---- 4. Layout & surfaces ----------------------------------------------- */
.wrap       { max-width: var(--column); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide  { max-width: var(--page);   margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: 80px 0; }

/* The four surfaces. Alternating them is what stops the site reading as one
   unbroken white page. No gradients — these are flat tints of the palette. */
.surface-paper { background: var(--paper); color: var(--ink); }
.surface-mist  { background: var(--mist);  color: var(--ink); }
.surface-wash  { background: var(--accent-wash); color: var(--ink); }
.surface-navy  { background: var(--navy);  color: #fff; }

/* Orbit field. Concentric rings struck from a point off the top-right corner,
   echoing the open orbit in the logo mark. Asymmetric by construction: the
   centre sits outside the viewport, so no two sections show the same arc and
   nothing lines up with the text.
   Replaced a 46px square grid, which read as graph paper and was too regular.

   To move it: change the `at 88% -6%` on every line together — that is the
   orbit centre. To change the spacing: the radius pairs (each ring is
   `r` to `r+1` px, i.e. a one-pixel stroke). Opacity falls off outward so the
   near rings read first. */
.orbit { position: relative; overflow: hidden; }
.orbit::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-repeat: no-repeat;
  background-image:
    radial-gradient(circle at 88% -6%, transparent 0 174px, rgba(0,87,231,.22) 174px 176px, transparent 176px),
    radial-gradient(circle at 88% -6%, transparent 0 286px, rgba(0,87,231,.18) 286px 288px, transparent 288px),
    radial-gradient(circle at 88% -6%, transparent 0 428px, rgba(0,87,231,.15) 428px 430px, transparent 430px),
    radial-gradient(circle at 88% -6%, transparent 0 604px, rgba(0,87,231,.12) 604px 606px, transparent 606px),
    radial-gradient(circle at 88% -6%, transparent 0 812px, rgba(0,87,231,.09) 812px 814px, transparent 814px),
    radial-gradient(circle at 88% -6%, transparent 0 1052px, rgba(0,87,231,.07) 1052px 1054px, transparent 1054px),
    radial-gradient(circle at 88% -6%, transparent 0 1324px, rgba(0,87,231,.05) 1324px 1326px, transparent 1326px),
    /* markers riding the field, the way the mark has a dot on its orbit */
    radial-gradient(circle 7px at 71% 46%, rgba(0,87,231,.30) 0 7px, transparent 7px),
    radial-gradient(circle 6px at 94% 30%, rgba(0,213,172,.45) 0 6px, transparent 6px),
    radial-gradient(circle 5px at 58% 76%, rgba(0,87,231,.20) 0 5px, transparent 5px);
}
.orbit-fade::before {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 96%);
}
.orbit > * { position: relative; }

/* Scattered dots, same family, for dark bands. */
.dotted { position: relative; overflow: hidden; }
.dotted::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.4;
  background-image: radial-gradient(rgba(0,87,231,0.45) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
}
.dotted > * { position: relative; }

hr.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* ---- 5. Header ---------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.header-bar {
  max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter);
  height: 80px; display: flex; align-items: center; justify-content: space-between;
}

/* Logo lockup. Both halves are supplied artwork, so both are images.
   The wordmark is outlined paths rather than live text, which means the name
   cannot be changed by editing HTML — it needs new artwork in brand/.
   Sized by HEIGHT, because the two files have very different aspect ratios
   (mark ~0.93:1, wordmark ~6.2:1). */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { height: 47px; width: auto; }
.logo-word { height: 27px; width: auto; }
.logo-tagline {
  display: block; margin-top: 6px;
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.17em;
  color: var(--slate);
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav-group { position: relative; }
.nav-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 15px; color: var(--slate);
  background: none; border: 0; cursor: pointer;
  padding: 8px 12px; border-radius: 8px;
}
.nav-trigger:hover { color: var(--ink); }
.nav-trigger svg { transition: transform 0.15s; }
.nav-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }

.nav-menu {
  position: absolute; left: 0; top: 100%; padding-top: 8px; width: 336px;
}
.nav-menu[hidden] { display: none; }
.nav-menu ul {
  list-style: none; margin: 0; padding: 8px;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 12px;
  box-shadow: 0 12px 32px -12px rgba(6,20,61,0.18);
}
.nav-menu a {
  display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none;
}
.nav-menu a:hover { background: var(--mist); }
.nav-menu .label { display: block; font-size: 15px; font-weight: 500; color: var(--ink); }
.nav-menu .blurb { display: block; margin-top: 2px; font-size: 13px; color: var(--slate); }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }
.mobile-nav { display: none; }

/* ---- 6. Footer ---------------------------------------------------------- */
.site-footer { background: var(--navy); color: #fff; }
.footer-inner { max-width: var(--page); margin: 0 auto; padding: 64px var(--gutter); }
.footer-top { display: grid; gap: 48px; grid-template-columns: 1.4fr 2fr; }
/* The footer uses the -light variants of BOTH files. The mark's S runs navy to
   mid-blue and the wordmark's "Sys" is near-black, so on the navy footer the
   originals lose roughly half of themselves. */
.site-footer .logo-mark { height: 50px; }
.site-footer .logo-word { height: 28px; }
.site-footer .logo-tagline { color: rgba(255,255,255,0.6); }
.footer-blurb { margin-top: 24px; font-size: 15px; color: rgba(255,255,255,0.6); }

.footer-cols { display: grid; gap: 32px; grid-template-columns: repeat(3, 1fr); }
.footer-cols h2 {
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,255,255,0.45);
  margin: 0;
}
.footer-cols ul { list-style: none; margin: 16px 0 0; padding: 0; }
.footer-cols li + li { margin-top: 10px; }
.footer-cols a { font-size: 15px; color: rgba(255,255,255,0.8); text-decoration: none; }
.footer-cols a:hover { color: #fff; }

.footer-bottom {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
/* Flex, not inline: two email addresses with no whitespace between them have no
   wrap point and overflow a 360px viewport. */
.footer-mail { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 15px; color: rgba(255,255,255,0.7); }
.footer-mail a { text-decoration: none; }
.footer-mail a:hover { color: #fff; }
.footer-sep { color: rgba(255,255,255,0.3); }
.footer-legal { font-size: 13px; color: rgba(255,255,255,0.45); }

/* ---- 7. Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 20px; border-radius: 8px;
  font-size: 15px; font-weight: 500; text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary   { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-secondary { border: 1px solid var(--rule); background: var(--paper); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-on-dark   { border: 1px solid rgba(255,255,255,0.25); color: #fff; }
.btn-on-dark:hover { background: #fff; color: var(--navy); border-color: #fff; }
.btn-quiet {
  padding: 0; color: var(--accent-deep);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule);
}
.btn-quiet:hover { color: var(--ink); text-decoration-color: var(--ink); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ---- 8. Components ------------------------------------------------------ */
.grid-2 { display: grid; gap: 24px; grid-template-columns: repeat(2, 1fr); }
.grid-3 { display: grid; gap: 40px; grid-template-columns: repeat(3, 1fr); }

.card {
  display: flex; flex-direction: column; height: 100%;
  padding: 28px; border: 1px solid var(--rule); border-radius: 16px;
  background: var(--paper);
  transition: border-color 0.15s;
}
.card:hover { border-color: rgba(0,87,231,0.4); }
.card-head { display: flex; align-items: center; gap: 10px; }
.card-head img { width: 22px; height: 22px; }
.card h3 { font-size: 21px; letter-spacing: -0.015em; }
.card-line { margin-top: 16px; font-weight: 500; }
.card-body { margin-top: 12px; font-size: 15px; color: var(--slate); }

/* Wide product block: used when a single product has the section to itself and
   a half-width card would leave the other half empty. Argument on the left,
   what-it-covers on the right. */
.card-wide { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; padding: 36px 40px; }
.card-wide:hover { border-color: var(--rule); }
.card-wide-main { display: flex; flex-direction: column; }
.card-wide-main .btn-quiet { margin-top: auto; padding-top: 28px; align-self: flex-start; }
.card-wide-side { border-left: 1px solid var(--rule); padding-left: 40px; }

/* A <dl>, not a <ul> of spans: dt/dd are block-level in the browser default
   stylesheet, so this still stacks correctly if styles.css fails to load or is
   served stale. Spans would run together on one line. */
.feature-list { margin: 20px 0 0; }
.feature-list dt { padding-top: 14px; font-size: 15px; font-weight: 600; }
.feature-list dd { margin: 3px 0 0; padding-bottom: 14px; font-size: 14px; color: var(--slate); border-bottom: 1px solid var(--rule); }
.feature-list dd:last-child { border-bottom: 0; padding-bottom: 0; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; }
.tags li {
  padding: 4px 10px; border-radius: 6px;
  background: var(--accent-wash); color: var(--accent-deep);
  font-size: 13px; font-weight: 500;
}
.card .btn-quiet { margin-top: 28px; align-self: flex-start; }

/* Definition-style list: a name and a note, separated by a hairline. */
.def-list { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 32px 40px; grid-template-columns: repeat(2, 1fr); }
.def-list li { border-top: 1px solid var(--rule); padding-top: 20px; }
.def-list .name { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.def-list .note { margin-top: 6px; font-size: 15px; color: var(--slate); }

/* Pull-quote that closes each role narrative. */
.close-line {
  margin-top: 28px; padding-left: 20px;
  border-left: 2px solid var(--accent);
  color: var(--ink);
}

.stat-row { list-style: none; margin: 0; padding: 0; display: grid; gap: 40px; grid-template-columns: repeat(3, 1fr); }
.stat-figure { font-family: var(--font-display); font-size: 40px; font-weight: 600; letter-spacing: -0.03em; }
.stat-label { margin-top: 8px; font-size: 15px; color: rgba(255,255,255,0.6); }

figure { margin: 0; }
.shot { border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--paper); }
figcaption { margin-top: 12px; font-size: 15px; color: var(--slate); }

/* Numbered lifecycle stages. */
.stages { list-style: none; margin: 48px 0 0; padding: 0; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.stages > li { background: var(--paper); padding: 32px 28px; }
.stages > li + li { border-top: 1px solid var(--rule); }
.stage-head { display: flex; align-items: baseline; gap: 16px; }
.stage-num { color: var(--slate); }
.stage-detail { display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); margin: 20px 0 0; }
.stage-detail dt { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--slate); }
.stage-detail dd { margin: 6px 0 0; font-size: 15px; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; padding: 0; }
.chips li { font-family: var(--font-display); font-size: 25px; font-weight: 600; letter-spacing: -0.015em; }
.chips .soon { font-family: var(--font-sans); font-size: 15px; font-weight: 400; color: var(--slate); }

/* ---- 9. Pipeline diagram ------------------------------------------------ */
/* Our own drawing, so it shows the shape of the work without revealing how
   anything is decided. Horizontally scrollable on small screens rather than
   squashed — six nodes do not fit at 360px and shrinking them makes them
   unreadable. */
.pipeline { margin-top: 64px; }
.pipeline-scroll { overflow-x: auto; padding-bottom: 8px; }
.pipeline-track { display: flex; align-items: stretch; gap: 0; min-width: 900px; }
.pipeline-node {
  flex: 1; min-width: 132px;
  border: 1px solid var(--rule); border-radius: 12px;
  padding: 18px 12px; text-align: center; background: var(--paper);
}
.pipeline-node.is-emphasis { border-color: var(--accent); background: var(--accent-wash); }
.pipeline-node .label { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.pipeline-node .sublabel { display: block; margin-top: 4px; font-size: 14px; color: var(--slate); }
.pipeline-link { flex: 0 0 26px; align-self: center; height: 1px; background: var(--accent); opacity: 0.35; }
.pipeline-marks { display: flex; min-width: 900px; margin-top: 12px; }
.pipeline-marks span { flex: 1; min-width: 132px; text-align: center; color: var(--slate); font-size: 15px; }
.pipeline-marks .gap { flex: 0 0 26px; min-width: 0; }
.pipeline-chip {
  display: inline-block; margin-top: 18px;
  background: var(--accent); color: #fff;
  padding: 8px 16px; border-radius: 999px; font-size: 15px; font-weight: 500;
}
.pipeline-legend {
  display: flex; flex-wrap: wrap; gap: 28px; align-items: center;
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--rule);
  color: var(--slate); font-size: 15px;
}
.pipeline-legend .key { color: var(--accent); }

/* ---- 10. Forms ---------------------------------------------------------- */
.form-field + .form-field { margin-top: 20px; }
.form-field label { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 500; }
.form-field input, .form-field textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--rule); border-radius: 8px;
  font: inherit; font-size: 16px; background: var(--paper); color: var(--ink);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus-visible, .form-field textarea:focus-visible { border-color: var(--accent); }
.form-note { margin-top: 20px; font-size: 13px; color: var(--slate); }
.form-status { margin-top: 20px; padding: 16px; border-radius: 8px; font-size: 15px; }
.form-status.is-ok    { background: var(--accent-wash); color: var(--accent-deep); }
.form-status.is-error { background: #fdecec; color: #9b1c1c; }

.contact-layout { display: grid; gap: 48px; grid-template-columns: 1.3fr 1fr; align-items: start; }
.aside-card { padding: 28px; border-radius: 16px; background: var(--mist); }

/* ---- 11. Responsive ----------------------------------------------------- */
@media (max-width: 1023px) {
  .nav { display: none; }
  .nav-toggle { display: block; }
  .mobile-nav { display: block; border-top: 1px solid var(--rule); background: var(--paper); }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav .wrap-wide { padding-top: 24px; padding-bottom: 24px; }
  .mobile-nav h2 {
    font-family: var(--font-sans); font-size: 13px; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.12em; color: var(--slate); margin: 0;
  }
  .mobile-nav ul { list-style: none; margin: 12px 0 24px; padding: 0; }
  .mobile-nav a { display: block; padding: 8px 0; font-weight: 500; text-decoration: none; }
}

@media (max-width: 860px) {
  .card-wide { grid-template-columns: 1fr; gap: 32px; padding: 28px; }
  .card-wide-side { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 28px; }
  .card-wide-main .btn-quiet { padding-top: 24px; }
  .footer-top { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .section { padding: 56px 0; }
  .grid-2, .grid-3, .def-list, .stat-row, .stage-detail { grid-template-columns: 1fr; }
  .grid-3 { gap: 32px; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .header-bar { height: 68px; }
  .logo-mark { height: 39px; }
  .logo-word { height: 22px; }
}

/* Reduced motion: no smooth scroll, no transitions. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
