/*
 * The Hawk IVO stylesheet (HIS 2026) for the pages without an app: the public documents and the status page. Roles and
 * values are those of Atlas (frontend/src/styles/tokens.css) and Hub (theme.css); light by default, dark (HIS-33) through
 * prefers-color-scheme, since neither page runs a script for a theme. Primary is the action colour in both themes, accents
 * are lighter in the dark one, status colours appear in messages and tags only, and nothing has a shadow.
 * The same file lies in backend/hawktrust/api/public_assets and terraform/status/site; tests/test_brand_files.py keeps them equal.
 */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('inter-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* names of companies and places in other European languages; loaded only by a page that uses these letters */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('inter-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;
  --his-page: #ffffff;
  --his-soft: #f8f8f8;
  --his-soft-blue: #f3f6f9;
  --his-card: #ffffff;
  --his-border: #dbdbdb;
  --his-text: #364e72;
  --his-navy: #0d1120;
  --his-grey: #616161;
  --his-accent: #304ffe;
  --his-action: #304ffe;
  --his-on-action: #ffffff;
  --his-functional: #0d47a0;
  --his-info-bg: #deebff;
  --his-info-text: #0068c9;
  --his-ok-bg: #e3fcef;
  --his-ok-text: #008244;
  --his-warn-bg: #fffae6;
  --his-warn-text: #b75900;
  --his-crit-bg: #ffe7e7;
  --his-crit-text: #c8322b;
  --his-neutral-bg: #f3f6f9;
  --his-selection: rgba(48, 79, 254, 0.18);
  --his-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --his-font-mono: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace;
  --his-column: 52rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --his-page: #0d1120;
    --his-soft: #141b2e;
    --his-soft-blue: #1d2540;
    --his-card: #1d2540;
    --his-border: #465473;
    --his-text: #d9e4f5;
    --his-navy: #eef3fc;
    --his-grey: #aab6ca;
    --his-accent: #a4bfff;
    --his-functional: #b9d4f9;
    --his-info-bg: #183451;
    --his-info-text: #b4d8ff;
    --his-ok-bg: #173a31;
    --his-ok-text: #9cecc8;
    --his-warn-bg: #3d2f1e;
    --his-warn-text: #ffdbad;
    --his-crit-bg: #422627;
    --his-crit-text: #ffc1bb;
    --his-neutral-bg: #1d2540;
    --his-selection: rgba(164, 191, 255, 0.28);
  }
}

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--his-page);
  color: var(--his-text);
  font: 400 16px/1.6 var(--his-font);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--his-selection); }
:focus-visible { outline: 2px solid var(--his-functional); outline-offset: 2px; }
a { color: var(--his-functional); }
h1, h2, h3 { color: var(--his-navy); font-weight: 500; line-height: 1.25; }

/* the frame: bar, column and footer share one left edge */
.his-bar, .his-footer { padding-inline: max(16px, calc((100% - var(--his-column)) / 2)); }

.his-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  min-height: 64px;
  padding-block: 8px;
  border-bottom: 1px solid var(--his-border);
  background: var(--his-page);
}

.his-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--his-navy);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
}
.his-brand img { display: block; flex: none; }
.his-brand h1 { margin: 0; color: inherit; font: inherit; }

.his-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: calc(var(--his-column) + 32px);
  margin: 0 auto;
  padding: 32px 16px 48px;
}

.his-footer {
  padding-block: 20px;
  background: var(--his-soft);
  color: var(--his-grey);
  font-size: 0.875rem;
}
.his-footer p { margin: 2px 0; }

/* messages: 16 px corners, a tinted ground, no colour bar */
.his-message {
  margin: 16px 0;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--his-neutral-bg);
  color: var(--his-text);
}
.his-message a { color: inherit; }
.his-info { background: var(--his-info-bg); color: var(--his-info-text); }
.his-ok { background: var(--his-ok-bg); color: var(--his-ok-text); }
.his-warn { background: var(--his-warn-bg); color: var(--his-warn-text); }
.his-crit { background: var(--his-crit-bg); color: var(--his-crit-text); }
