/* Halioc brand system on the web.
 *
 * Implements BRAND_SYSTEM.md (malpack/brand) for HTML. This file doubles as the
 * starter the brand system calls for: the palette lives in custom properties so
 * a future page imports this and inherits the whole system.
 *
 * Deliberate constraints, do not "fix" them without reading the reasoning:
 *   - No inline <style> anywhere. That is what lets the CSP drop
 *     'unsafe-inline' from style-src. See public/_headers.
 *   - No script. script-src stays 'none'.
 *   - Light mode only. The brand system specifies paper #FFFFFF. A visitor in
 *     OS dark mode gets a white page, on purpose.
 *   - Fonts are self-hosted and subset to Latin, so font-src stays 'self'.
 *     Regenerate with pyftsubset if the copy ever needs other glyphs; the
 *     command is in README.md.
 */

:root {
  --ink:       #101820;
  --accent:    #f40317;  /* HAL Red. Channel swap of malpack's #0317f4. */
  --slate:     #5A6B7B;
  --warm-gray: #8A93A0;
  --rule:      #D7DEE6;
  --paper:     #FFFFFF;

  --measure: 34rem;      /* body line length, kept short for readability */
}

/* Michroma: display only. Never body text. */
@font-face {
  font-family: "Michroma";
  src: url("fonts/Michroma-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Jost: body. 400 regular, 700 for bold run-in leads. */
@font-face {
  font-family: "Jost";
  src: url("fonts/Jost-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("fonts/Jost-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

html {
  /* Fallbacks are the brand system's, not Helvetica. */
  font-family: "Jost", Futura, "Century Gothic", sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-weight: 400;
}

/* ── Running header, mirroring the document masthead ───────────────────── */
.masthead {
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 0 0.6rem;
}

/* Its own container: .wrap carries a 4rem bottom padding meant for the body,
   which would otherwise open a gap inside the masthead. */
.masthead__inner {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.masthead__label {
  font-family: "Michroma", Eurostile, sans-serif;
  font-size: 0.5rem;
  letter-spacing: 0.09em;
  color: var(--warm-gray);
  text-transform: uppercase;
  margin: 0;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* ── Wordmark block ────────────────────────────────────────────────────── */
.wordmark {
  font-family: "Michroma", Eurostile, "Bank Gothic", sans-serif;
  font-size: clamp(2rem, 7.5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: 0.005em;
  color: var(--ink);
  margin: 3rem 0 0.5rem;
  text-transform: uppercase;
}

.tagline {
  color: var(--slate);
  font-size: 1.0625rem;
  margin: 0 0 1.1rem;
  /* Wider than the body measure on purpose. This is a masthead line, not
     running text, and at the 34rem body measure it breaks into three cramped
     lines under the wordmark. */
  max-width: 42rem;
}

/* The masthead rule. 1.4 to 1.6pt in print; 2px reads equivalently on screen. */
.rule--accent {
  border: 0;
  border-top: 2px solid var(--accent);
  margin: 0 0 2.5rem;
}

/* ── Body ──────────────────────────────────────────────────────────────── */
p {
  max-width: var(--measure);
  margin: 0 0 1.15rem;
}

b, strong { font-weight: 700; }

.lede { font-size: 1.15rem; line-height: 1.5; }

/* Section header: red slash, then ALL CAPS Michroma. */
.section {
  font-family: "Michroma", Eurostile, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 2.75rem 0 0.9rem;
  font-weight: 400;
}
.section::before {
  content: "/";
  color: var(--accent);
  margin-right: 0.5em;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
}
a:hover, a:focus-visible {
  text-decoration-color: var(--accent);
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── Signature line, red slash separators ──────────────────────────────── */
.colophon {
  border-top: 1px solid var(--rule);
  margin-top: 3.5rem;
  padding-top: 1rem;
}

.signature {
  font-family: "Michroma", Eurostile, sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  color: var(--warm-gray);
  text-transform: uppercase;
  margin: 0;
}
.signature span {
  color: var(--accent);
  margin: 0 0.45em;
}

/* ── 404 ───────────────────────────────────────────────────────────────── */
.code {
  font-family: "Michroma", Eurostile, sans-serif;
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  color: var(--ink);
  margin: 3rem 0 0.5rem;
}

@media (max-width: 30rem) {
  .wrap { padding: 0 1.15rem 3rem; }
  .masthead__inner { padding: 0 1.15rem; }
  body { font-size: 1rem; }
}

/* Respect users who ask for less motion, even though nothing animates today. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Additions for the quiet company site (public-quiet) ───────────────── */

/* Principles list: small filled squares per the brand system. Drawn in CSS
   rather than U+25AA, which the Latin font subset does not carry. */
.squares {
  list-style: none;
  padding: 0;
  margin: 0 0 1.15rem;
  max-width: var(--measure);
}
.squares li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.65rem;
}
.squares li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 0.4em;
  height: 0.4em;
  background: var(--ink);
}

address {
  font-style: normal;
  max-width: var(--measure);
  margin: 0 0 1.15rem;
}

/* The masthead label doubles as the way home on inner pages. */
.masthead__home {
  color: inherit;
  text-decoration: none;
}
.masthead__home:hover, .masthead__home:focus-visible {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.18em;
}

.effective {
  color: var(--warm-gray);
  font-size: 0.9rem;
}
