/* North West Data — northwestdata.io
   Static site, no build step, no JavaScript, no tracking.

   Design tokens live in tokens.css and are loaded before this file.
   Values here reference those tokens; do not hard-code brand colours.

   IBM Plex Sans is self-hosted from /fonts (SIL OFL 1.1, see fonts/LICENSE)
   rather than loaded from Google Fonts. Two reasons, both load-bearing:
   the Content-Security-Policy in _headers is `default-src 'none'`, and the
   privacy policy states that the site loads no third-party resources and
   sets no cookies. A Google Fonts request would break both. */

/* ---- Typeface ---- */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-300-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
}

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

:root {
  --measure: 760px;
  --gutter: var(--space-6);
  --transition: 150ms ease;
}

/* ---- Reset ---- */

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

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

body {
  margin: 0;
  background: var(--color-bg-ground);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* The home page is short. Without this the footer floats mid-screen on a
     tall monitor with page background below it. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

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

:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-brand);
  color: var(--color-white);
  padding: var(--space-3) var(--space-4);
  z-index: 10;
  text-decoration: none;
}
.skip:focus { left: 0; }

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.site-header {
  background: var(--color-bg-surface);
  border-bottom: 1px solid var(--color-border);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-8);
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
}

/* The logo lockup is inlined into the markup rather than referenced with
   <img src="logo.svg">. The lockup sets its wordmark in live SVG <text>,
   and an SVG loaded through <img> cannot see the document's @font-face
   rules — it would fall back to Helvetica on any machine without IBM Plex
   Sans installed locally, which is nearly all of them. Inlining keeps the
   text in the document, so the self-hosted font applies. */
.logo {
  display: block;
  line-height: 0;
}

.logo svg {
  display: block;
  height: 38px;
  width: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  font-size: var(--text-sm);
}

.site-nav a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.site-nav a:hover,
.site-nav a:focus-visible { color: var(--color-text-primary); }

/* ---- Sections ---- */

main { padding: var(--space-20) 0 var(--space-16); }

section + section { margin-top: var(--space-16); }

h1 {
  font-size: clamp(var(--text-2xl), 5.5vw, var(--text-3xl));
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-semibold);
  margin: 0 0 var(--space-5);
  max-width: 18ch;
}

/* Section headings act as overlines, per the typography rules in the
   design handoff (Medium, uppercase, wide tracking). */
h2 {
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-5);
}

h3 {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-snug);
  margin: 0 0 var(--space-2);
}

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: var(--text-md);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
  margin-bottom: var(--space-5);
}

section p:not(.lede):not(.project-name):not(.project-tag) {
  color: var(--color-text-secondary);
}

a {
  color: var(--color-brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: opacity var(--transition);
}
a:hover { opacity: 0.7; }

/* ---- Project card ---- */

.project {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-8);
}

.project-name {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-snug);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-1);
}

/* Marks Hujra as the first of several products rather than as the whole company.
   Quiet on purpose: it qualifies the name rather than competing with it, and it
   should not read as a launch announcement. */
.project-first {
  display: inline-block;
  margin-left: var(--space-2);
  vertical-align: 0.12em;
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.project-tag {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-5);
}

.project-note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: var(--space-5) 0 0;
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

.more-projects {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: var(--space-5) 0 0;
}

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

.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.contact-list .label {
  flex: 0 0 auto;
  min-width: 7rem;
  color: var(--color-text-muted);
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  font-weight: var(--weight-medium);
  line-height: var(--leading-normal);
}

address {
  font-style: normal;
  margin-top: var(--space-6);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
}

/* ---- Footer ---- */

.site-footer {
  background: var(--color-black);
  color: var(--color-white);
  padding: var(--space-12) 0;
  font-size: var(--text-sm);
}

.site-footer .logo svg { height: 34px; }

.site-footer .logo { margin-bottom: var(--space-6); }

.site-footer p {
  margin: 0 0 var(--space-3);
  opacity: 0.6;
  max-width: 60ch;
}

.site-footer p:last-child { margin-bottom: 0; opacity: 0.4; }

.site-footer a {
  color: var(--color-white);
  transition: opacity var(--transition);
}

.site-footer a:hover { opacity: 0.7; }

.site-footer :focus-visible { outline-color: var(--color-white); }

/* ---- Legal / policy pages ---- */

.policy h1 { max-width: none; }

.policy h2 {
  font-size: var(--text-md);
  text-transform: none;
  letter-spacing: var(--tracking-snug);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin: var(--space-12) 0 var(--space-3);
}

.policy h3 {
  font-size: var(--text-base);
  margin: var(--space-8) 0 var(--space-2);
}

.policy p { color: var(--color-text-secondary); }

.policy ul { padding-left: var(--space-5); margin: 0 0 var(--space-4); }

.policy li {
  margin-bottom: var(--space-2);
  color: var(--color-text-secondary);
}

.policy .updated {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-10);
}

.policy dl { margin: 0 0 var(--space-4); }

.policy dt {
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin-top: var(--space-4);
}

.policy dd {
  margin: var(--space-1) 0 0;
  color: var(--color-text-secondary);
}

/* ---- Small screens ---- */

@media (max-width: 34rem) {
  .site-header .wrap {
    align-items: flex-start;
    gap: var(--space-4);
  }
  .logo svg { height: 32px; }
  main { padding-top: var(--space-12); }
  .project { padding: var(--space-6); }
  .contact-list .label { min-width: 100%; }
  .contact-list li { gap: 0; margin-bottom: var(--space-4); }
}

/* ---- Print ---- */

@media print {
  .site-header, .site-nav, .skip { display: none; }
  body { background: #fff; font-size: 11pt; }
  .site-footer { background: none; color: #000; }
  .site-footer p, .site-footer a { opacity: 1; color: #000; }
}
