/*
 * Halyard — placeholder site.
 *
 * The palette and the typography are not choices made here. They are lifted
 * from `halyard_brandidentity.md` §7.2–7.4 in halyard-core, which is the single
 * source of truth for both, and from `frontend/src/index.css` where the same
 * four values are declared for the product itself. Change them there first.
 *
 * Halyard and Kova are one design system in two colorways. Kova's pine
 * #1e5c38 must not appear here either — it is the other product's signature.
 */

:root {
  /* The canonical four. Everything below is derived from them. */
  --palette-parchment: #f4f0e8;
  --palette-navy: #1c3f63;
  --palette-stone: #d4c9a8;
  --palette-earth: #8b6040;

  --bg: var(--palette-parchment);
  --card: #faf8f2;
  --border: #d4ccb4;
  --text: #202834;   /* near-black tinted toward the brand hue */
  --dim: #556678;    /* 5.1:1 on parchment */
  --focus-ring: #5b87a8;
}

/*
 * Committed to one look. Parchment and navy is the colour of a printed
 * nautical chart, and a dark inversion of it is a different brand. Declared
 * explicitly so a browser in dark mode does not repaint the ground underneath.
 */
:root { color-scheme: light; }

/*
 * Both faces are served from this origin, never from Google Fonts — an
 * appliance may have no internet, and a site that does should not hand every
 * visitor's address to a third party on the way to a privacy policy. Files and
 * their OFL-1.1 licences are in /fonts.
 */
@font-face {
  font-family: "Inconsolata";
  src: url("/fonts/Inconsolata-VF.ttf") format("truetype");
  font-weight: 200 900;
  font-stretch: 50% 200%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/BarlowCondensed-LightItalic.woff2") format("woff2");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  /* Monospace throughout, carried over from Kova. §7.3: the monospace UI is a
     load-bearing part of the shared design language, not an affectation. */
  font-family: "Inconsolata", Consolas, "Courier New", monospace;
  font-size: 16px;
  line-height: 1.5;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* One measure, shared by the band and by everything under it, so the two never
   disagree as the screen widens. The side padding lives here and nowhere else. */
.sheet,
.band-inner {
  width: 100%;
  max-width: 46rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── the wordmark band ──────────────────────────────────────────────────── */

.band {
  background: var(--palette-navy);
  padding-block: 1.75rem;
  /* A hairline of warm stone under the navy, the way a chart rules its
     borders. Not decoration for its own sake: it stops the band from floating
     when the parchment below is this close in value. */
  border-bottom: 3px solid var(--palette-stone);
}

/*
 * Barlow Condensed appears ONLY here — §7.2 is explicit that it must never
 * reach body text, labels or buttons.
 */
.wordmark {
  font-family: "Barlow Condensed", "Inconsolata", monospace;
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--palette-stone);
  font-size: clamp(2rem, 8vw, 3.25rem);
  line-height: 1;
  display: inline-block;
}

/* ── the sheet ──────────────────────────────────────────────────────────── */

main {
  flex: 1;
  display: flex;
  align-items: center;
  padding-block: clamp(3rem, 12vh, 7rem);
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--palette-earth);   /* 4.8:1 on parchment */
}

h1 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.75rem, 6vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--palette-navy);
  /* A monospace headline cannot be re-measured by the browser the way a
     proportional one can, so the long word gets an explicit escape rather than
     a horizontal scrollbar. */
  overflow-wrap: break-word;
}

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

.lede {
  margin: 0 0 1.5rem;
  /* A reading measure is about 70 characters whatever the monitor is. */
  max-width: 44ch;
  font-size: 1.0625rem;
}

.note {
  margin: 0 0 2rem;
  max-width: 44ch;
  color: var(--dim);
}

.contact a {
  color: var(--palette-navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.contact a:hover { color: var(--palette-earth); }

/* ── footer ─────────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding-block: 1.5rem 2.5rem;
  font-size: 0.8125rem;
  color: var(--dim);
}

footer p { margin: 0 0 0.35rem; }

.sep { padding-inline: 0.5rem; }

.legal { color: var(--text); }

.gloss { font-style: italic; }

/* Narrow screens: the name and the state stack, so the separator between them
   has nothing left to separate. Hidden rather than turned into its own line —
   `display: block` left a stray dot floating between the two. */
@media (max-width: 30rem) {
  .sep { display: none; }
  .legal { display: block; }
}
