/* Biphase platform styles: the website's global.css carried over unchanged, plus
   only what a form needs (fields, buttons, an error line, a progress line) at
   the end. The three decisions below still hold at the careers and hr doors;
   the admin door may be denser, in its own stylesheet.

   Biphase Precision Systems — site styles.

   The whole design is three decisions, and nothing may step outside them:

   1. Colour  One background, one text colour. No greys, no lines.
   2. Type    One typeface. Text is 13px; the menu, people's names and roles, and the footer
              are 11px; photo captions are 9px semibold; the company
              details on the landing page are 8px. The logo is the only large
              thing on a page. Headings are text size in Archivo's expanded
              width; a person's name is the same lettering one size down.
   3. Space   Every distance is a step on one 8px scale, and each step has
              one job (see "Space" below).

   There is one layout for every screen: a single narrow column, centred,
   with everything aligned to its left edge. A wide screen shows the same
   page as a phone, with empty background either side. */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("fonts/archivo-latin.de2f1fe81758.woff2") format('woff2');
}

:root {
  /* Colour: provisional values, to be tuned on real screens. */
  --bg: #0b0b0c;
  --fg: #c9c7c2;
  /* Platform only. One raised surface for flat buttons and fields. One muted
     grey for states: the current step, a progress track, a button not yet
     ready. One accent, a calm blue that sits easily on the dark background,
     for the one action on a page, the progress made and the outline of a
     chosen option (owner, 1 November 2026). Corners are slightly rounded. */
  --raised: #1c1c1f;
  --muted: #3a3a40;
  --accent: #3b8fb8;
  --radius: 0.25rem;

  --font: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* Type: size / line height. */
  --small: 0.6875rem;
  --small-line: 1rem;
  --text: 0.8125rem;
  --line: 1.25rem;
  --caption: 0.5625rem;
  --caption-line: 0.875rem;

  /* Space: the 8px scale. */
  --space-1: 0.5rem; /*  8  within one thing: a heading and its content, a person's role and bio; under the header */
  --space-2: 1rem; /*   16  between paragraphs; between logo and menu */
  --space-3: 1.5rem; /* 24  between people, photographs and contact blocks; above the header; around the company details on the landing page; column edge */
  --space-4: 2rem; /*   32  between sections */

  --edge: var(--space-3);
  --section: var(--space-4);

  /* The column: 576px including its edges. */
  --max: 36rem;
  color-scheme: dark;
}

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

html {
  /* Keeps anything jumped to clear of the sticky header. */
  scroll-padding-top: 8rem;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-size: var(--text);
  line-height: var(--line);
  font-weight: 400;
}

main {
  flex: 1;
  padding-bottom: var(--section);
}

h1,
h2,
h3,
p,
ul,
dl,
dd,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-size: inherit;
  font-weight: inherit;
}

ul {
  padding: 0;
  list-style: none;
}

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

img {
  height: auto;
}

p {
  text-wrap: pretty;
}

/* Links carry no underline anywhere on a page, at rest or on hover.
   Only the menu underlines: the current page, and a link under the pointer. */
a {
  color: inherit;
  text-decoration: none;
}

.site-nav a {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  text-decoration-color: transparent;
  transition: text-decoration-color 160ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 4px;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

.skip {
  position: absolute;
  left: var(--edge);
  top: -4rem;
  padding: var(--space-1) var(--space-2);
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
}

.skip:focus {
  top: var(--space-1);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.mark {
  width: 100%;
  height: auto;
}

/* ---------- Type ---------- */

.small {
  font-size: var(--small);
  line-height: var(--small-line);
}

.title {
  font-stretch: 125%;
  font-weight: 500;
  text-wrap: balance;
}

.caption {
  font-size: var(--caption);
  line-height: var(--caption-line);
  font-weight: 600;
}

/* ---------- Layout ---------- */

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

/* Every page is a stack of rows: a heading, and its content beneath it. */
.row {
  display: grid;
  gap: var(--space-1);
}

.row--item {
  row-gap: 0;
}

.row + .row {
  margin-top: var(--section);
}

/* The Contact page's blocks sit a little closer together than sections. */
.row + .row--item {
  margin-top: var(--space-3);
}

/* Everything under a heading is the same distance apart. */
.row__main > * + * {
  margin-top: var(--space-2);
}

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

/* The logo and menu stay at the top of the screen while the page scrolls. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
}

.site-header__inner {
  display: grid;
  justify-items: start;
  gap: var(--space-2);
  padding-block: var(--space-3) var(--space-1);
}

/* The logo with PRECISION SYSTEMS: the one large thing on every page. */
.site-header__logo {
  display: block;
  width: 14rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-2);
}

.site-nav a {
  display: block;
  padding-block: var(--space-1);
}

/* ---------- Company details (landing page only) ---------- */

.legal {
  padding-block: var(--space-3);
  font-size: 0.5rem;
  line-height: 0.75rem;
}

/* ---------- Contact ---------- */

.row--item .row__main {
  overflow-wrap: anywhere;
}

/* ---------- Leadership ---------- */

.people {
  display: grid;
  gap: var(--space-3);
}

.person > * + * {
  margin-top: var(--space-1);
}

/* A small square portrait with three lines beside it: name, role, LinkedIn.
   The lines use the ordinary small-text spacing (16px each), and the portrait
   is exactly as tall as the three together. */
.person__head {
  display: flex;
  align-items: stretch;
  gap: var(--space-2);
}

.person__portrait {
  width: calc(var(--small-line) * 3);
  flex: none;
  aspect-ratio: 1;
  overflow: hidden;
}

.person__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Facility photographs ---------- */

.photos {
  display: grid;
  gap: var(--space-3);
}

.photo img {
  width: 100%;
}

.photo figcaption {
  margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ---------- Platform: header user, forms, steps ---------- */

/* Who is signed in: the person's avatar alone, at the top right corner, on the
   logo's line. It opens the account page, which is where Sign out lives. */
.site-header__inner {
  grid-template-columns: 1fr auto;
  align-items: start;
}

.site-header__logo {
  grid-column: 1;
}

.site-header__me {
  grid-column: 2;
  display: block;
}

.site-header__me .avatar {
  width: 1.75rem;
  height: 1.75rem;
}

.site-nav {
  grid-column: 1 / -1;
}

/* Forms: flat and dark. Fields and buttons sit on the raised surface with no
   border; focus shows as the one-pixel line. */
.form {
  display: grid;
  gap: var(--space-1);
  justify-items: start;
}

.form label {
  margin-top: var(--space-2);
}

.form input,
.form textarea,
.form select {
  width: 100%;
  max-width: 24rem;
  padding: var(--space-1) var(--space-2);
  font: inherit;
  color: var(--fg);
  background: var(--raised);
  border: 0;
  border-radius: var(--radius);
}

/* A text field shows it has focus by its caret alone, with no border. */
.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
}

.form textarea {
  min-height: 6rem;
}

.form button,
.button {
  display: inline-block;
  margin-top: var(--space-2);
  padding: var(--space-1) var(--space-2);
  font: inherit;
  font-stretch: 125%;
  color: var(--fg);
  background: var(--raised);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

.form button:hover,
.button:hover {
  color: var(--bg);
  background: var(--fg);
}

/* The one action on a page: the accent, the full width of the column. */
.form .button--primary,
.button--primary {
  display: block;
  width: 100%;
  text-align: center;
  color: var(--bg);
  background: var(--accent);
}

.form .button--primary:hover,
.button--primary:hover {
  background: var(--fg);
}

/* Not yet ready to press: the form it sends is incomplete. */
.form .button--primary:disabled,
.button--primary:disabled {
  color: var(--fg);
  background: var(--muted);
  cursor: default;
}

/* A label in the action bar while the next step is Biphase's: the shape of
   the button on the raised surface, nothing to press. */
.button--quiet {
  display: block;
  width: 100%;
  text-align: center;
  cursor: default;
}

.button--quiet:hover {
  color: var(--fg);
  background: var(--raised);
}

/* The action bar: the page's one action, anchored to the foot of the screen
   on every page that has one. The page keeps clear of it. */
.action {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 10;
  padding: var(--space-2) 0 max(var(--space-3), env(safe-area-inset-bottom));
  background: var(--bg);
}

main:has(+ .action) {
  padding-bottom: calc(var(--section) + 4.5rem);
}

.error {
  font-weight: 500;
}

/* The candidate's journey: one numbered line per step, the number in a
   circle, the name, then the date once done. A filled circle is done, an
   outline is still to come. The current step stands on the muted tone, its
   number ringed and its name in the heavier weight. */
.steps {
  margin-top: var(--section);
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-1);
}

.step {
  display: grid;
  grid-template-columns: 1.5rem 1fr auto;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1);
  margin: 0 calc(-1 * var(--space-1));
}

.step__n {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  font-size: var(--small);
  line-height: 1;
  font-weight: 600;
  color: var(--bg);
  background: var(--fg);
  border: 1px solid var(--fg);
}

.step--later .step__n {
  color: var(--fg);
  background: transparent;
}

.step--now {
  background: var(--muted);
  border-radius: var(--radius);
}

.step--now .step__n {
  box-shadow: 0 0 0 2px var(--muted), 0 0 0 3px var(--fg);
}

.step--now .step__name {
  font-weight: 700;
}

.step__when {
  font-size: var(--small);
  line-height: var(--small-line);
}

/* The person at the top of their page: the name one size up, then the
   position, both bold, with a section's space above them. */
.who {
  margin-top: var(--space-3);
  font-size: 1.25rem;
  line-height: 1.5rem;
  font-weight: 700;
  font-stretch: 125%;
}

.who-position {
  font-weight: 700;
}

/* Sections of the employee's page: a small menu of anchors under the header. */
.sections {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-2);
}

/* A short table of figures: label left, value right, aligned. */
.facts {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 var(--space-2);
}

.facts dt {
  margin: 0;
}

.facts dd {
  margin: 0;
  text-align: right;
}

/* A step's own page: the step name under the person, then a note or two,
   then its form. The first block of any page keeps the same distance from
   the header as the person's name does. */
main > .row:first-child {
  margin-top: var(--space-3);
}

.step-title {
  margin-top: var(--space-3);
  margin-bottom: var(--space-1);
}

.note + .note {
  margin-top: var(--space-1);
}

.form input[type="file"] {
  padding: 0;
}

.form input[type="file"]::file-selector-button {
  margin-right: var(--space-2);
  padding: var(--space-1) var(--space-2);
  font: inherit;
  font-stretch: 125%;
  color: var(--bg);
  background: var(--fg);
  border: 0;
  cursor: pointer;
}

.form .error {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* One question a page, the same page for a questionnaire and a quiz. At the
   top a card: what this is, its subject, the clock, and a progress bar with
   the count. Then the question block (its number small, the text, a picture
   and any given values); the options as rounded bars two pixels apart, the
   chosen one outlined in the accent; a small Back beneath; the action in the
   bar at the foot. */
.card {
  margin-top: var(--space-3);
  margin-bottom: var(--space-2);
  padding: var(--space-2);
  display: grid;
  gap: var(--space-1);
  background: var(--raised);
  border-radius: var(--radius);
}

.card__line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
}

.progress {
  flex: 1;
  height: 0.25rem;
  background: var(--muted);
  border-radius: var(--radius);
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  background: var(--accent);
}


.timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.form--one {
  gap: 0;
  justify-items: stretch;
}

.ask {
  margin-top: var(--space-3);
  margin-bottom: var(--space-2);
  display: grid;
  gap: var(--space-1);
}

.ask__image {
  display: block;
  width: 100%;
  height: auto;
  margin-top: var(--space-1);
}

.form--one input,
.form--one textarea {
  max-width: none;
}

.choices {
  display: grid;
  gap: 2px;
}

.form .choice {
  position: relative;
  display: block;
  margin: 0;
  padding: var(--space-1) var(--space-2);
  background: var(--raised);
  border-radius: var(--radius);
  cursor: pointer;
}

.choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.choice:has(input:checked) {
  box-shadow: inset 0 0 0 1px var(--accent);
}

.choice:has(input:focus-visible) {
  box-shadow: inset 0 0 0 1px var(--fg);
}

.form--one .back {
  justify-self: start;
  margin-top: var(--space-1);
}

.form--one .error {
  margin-top: var(--space-1);
}
