/* ══════════════════════════════════════════════════════════════════════
   HALIFAX SYSTEMS: SITE STYLESHEET
   Corporate document system.
   House rules: no rounded corners, no drop shadows, no gradients,
   no decorative icons. Rules, boxes, and tabular data only.
   ══════════════════════════════════════════════════════════════════════ */

/* ─── FONTS ────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Nulshock';
  src: url('../fonts/nulshock_bold.otf') format('opentype');
  font-weight: 700;
  font-display: swap;
}

/* ─── TOKENS ───────────────────────────────────────────────────────── */
:root {
  /* Ground */
  --ground:      #232323;
  --ground-deep: #1B1B1B;
  --panel:       #2A2A2A;
  --masthead:    #121212;

  /* Ink: all verified at 4.5:1 or better against --ground */
  --ink:         #E8E8E8;   /* body copy, headings      12.3:1 */
  --ink-2:       #B4B4B4;   /* secondary copy            7.4:1 */
  --ink-3:       #8A8A8A;   /* meta, captions            4.4:1 */

  /* Rules */
  --rule:        #3A3A3A;
  --rule-2:      #4E4E4E;

  /* Accent */
  --red:         #C8102E;   /* fills, rules, bars */
  --red-bright:  #FF4A5E;   /* red text on dark          4.7:1 */
  --red-deep:    #8B0A1E;

  /* Type */
  --sans:    'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono:    'Courier New', Courier, monospace;
  --display: 'Nulshock', 'Arial Black', sans-serif;

  /* Metrics */
  --wrap:   1180px;
  --gutter: 40px;
}

/* ─── RESET ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--ground);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

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

/* Skip link: visible on focus only */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--red);
  color: #fff;
  padding: 10px 18px;
  font: 700 0.7rem/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}
.skip:focus { left: 0; }

/* ─── UTILITY STRIP ────────────────────────────────────────────────── */
.utility {
  background: #0C0C0C;
  border-bottom: 1px solid #262626;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.utility-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 7px var(--gutter);
  display: flex;
  align-items: center;
  gap: 10px;
}
.utility strong {
  color: var(--ink-2);
  font-weight: 400;
}
.utility-sep { color: var(--red); }
.utility-right { margin-left: auto; }
.utility-right a { color: var(--ink-3); text-decoration: none; }
.utility-right a:hover { color: var(--red-bright); }

/* ─── MASTHEAD ─────────────────────────────────────────────────────── */
.masthead {
  background: var(--masthead);
  border-bottom: 3px solid var(--red);
  position: sticky;
  top: 0;
  z-index: 100;
}
.masthead-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 0;
  text-decoration: none;
}
.brand img { height: 34px; width: auto; filter: brightness(0) invert(1); }
.brand-word {
  font-family: var(--display);
  font-size: 1.08rem;
  line-height: 1;
  letter-spacing: 0.1em;
  color: #fff;
}
.brand-word em {
  display: block;
  font-style: normal;
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  color: var(--red-bright);
  margin-top: 3px;
}

/* ─── PRIMARY NAV ──────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: stretch;
}
.nav a {
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
  border-left: 1px solid #262626;
  border-top: 3px solid transparent;
  transition: color 0.12s, background 0.12s;
}
.nav a:last-child { border-right: 1px solid #262626; }
.nav a:hover { color: #fff; background: #1D1D1D; }
.nav a.is-current {
  color: #fff;
  background: var(--ground);
  border-top-color: var(--red);
}

/* ─── MOBILE NAV ───────────────────────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  background: var(--masthead);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 67px;
  z-index: 99;
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: max-height 0.25s ease, visibility 0.25s;
}
.nav-mobile.open { max-height: 340px; visibility: visible; }
.nav-mobile a {
  display: block;
  padding: 15px var(--gutter);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid #232323;
  border-left: 3px solid transparent;
}
.nav-mobile a.is-current { color: #fff; border-left-color: var(--red); }

/* ─── PAGE HEAD ────────────────────────────────────────────────────── */
.page-head {
  background: var(--ground-deep);
  border-bottom: 1px solid var(--rule);
  padding: 54px 0 46px;
}
.page-index {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--red-bright);
  margin-bottom: 18px;
}
.page-title {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: #fff;
}
.page-standfirst {
  margin-top: 22px;
  max-width: 62ch;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink-2);
}

/* ─── HOME LEAD ────────────────────────────────────────────────────── */
.lead {
  background: var(--ground-deep);
  border-bottom: 1px solid var(--rule);
  padding: 84px 0 76px;
}
.lead-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 64px;
  align-items: center;
}
.lead-eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--red-bright);
  margin-bottom: 22px;
}
.lead h1 {
  font-size: clamp(2.4rem, 5.6vw, 4rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 26px;
}
.lead p {
  max-width: 54ch;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-2);
}
.lead-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  padding: 44px;
}
/* Masked rather than hue-rotated so the mark is exactly brand red. */
.lead-mark span {
  display: block;
  width: 100%;
  max-width: 250px;
  aspect-ratio: 1910 / 1023;
  background-color: var(--red);
  -webkit-mask: url('../img/halifax_systems_h_only.png') center / contain no-repeat;
          mask: url('../img/halifax_systems_h_only.png') center / contain no-repeat;
}

/* ─── SECTIONS ─────────────────────────────────────────────────────── */
.band { padding: 76px 0; border-bottom: 1px solid var(--rule); }
.band-deep { background: var(--ground-deep); }

.band-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--red);
  margin-bottom: 40px;
}
.band-no {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--red-bright);
}
.band-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #fff;
}
/* Body prose */
.prose { max-width: 68ch; }
.prose p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-2);
  margin-bottom: 20px;
}
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose h2 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 10px;
  margin: 44px 0 18px;
}
.prose h2:first-child { margin-top: 0; }
.prose ul { margin: 0 0 20px 22px; }
.prose li {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.prose a { color: var(--red-bright); text-decoration: underline; }

/* ─── CATALOG ENTRIES (services) ───────────────────────────────────── */
.catalog { border-top: 1px solid var(--rule); }

.entry {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 28px;
  padding: 30px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}

.entry-no {
  font-family: var(--mono);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--rule-2);
  padding-top: 2px;
}
.entry-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 9px;
}
.entry-desc {
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 62ch;
}
/* ─── INDEX GRID (home capability summary) ─────────────────────────── */
.index-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.index-cell {
  background: var(--ground);
  padding: 26px 24px 28px;
}
.index-no {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--red-bright);
  margin-bottom: 12px;
}
.index-title {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 9px;
}
.index-desc {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--ink-2);
}

/* ─── CONTACT ──────────────────────────────────────────────────────── */
.contact-block { max-width: 640px; }
.contact-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.contact-email {
  display: inline-block;
  font-size: clamp(1.1rem, 3vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  word-break: break-word;
}
.contact-email:hover { color: var(--red-bright); }

/* ─── PRINCIPLES (numbered ruled list) ─────────────────────────────── */
.principles { border-top: 1px solid var(--rule); }
.principle {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
}
.principle-no {
  font-family: var(--mono);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--red-bright);
  padding-top: 3px;
}
.principle-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 8px;
}
.principle-desc {
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 68ch;
}

/* ─── APP PAGE (wboscanner) ────────────────────────────────────────── */
.app-head {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 40px;
  align-items: start;
}
.app-icon { width: 160px; height: 160px; }
.app-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-block;
  padding: 13px 24px;
  background: var(--red);
  border: 1px solid var(--red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
}
.btn:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn-ghost { background: transparent; border-color: var(--rule-2); color: var(--ink-2); }
.btn-ghost:hover { background: #1D1D1D; border-color: var(--ink-3); color: #fff; }

/* Placeholder box for icons and screenshots. */
.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px dashed var(--rule-2);
  background: var(--panel);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.8;
}
.shot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.shot .ph { aspect-ratio: 9 / 19.5; }
.shot img { width: 100%; height: auto; border: 1px solid var(--rule); }
.shot figcaption {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.spec {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.spec-key {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 3px;
}
.spec-val { font-size: 0.94rem; line-height: 1.7; color: var(--ink-2); max-width: 68ch; }
.spec-val a { color: var(--red-bright); }

/* ─── FOOTER ───────────────────────────────────────────────────────── */
footer { background: var(--masthead); padding: 56px 0 26px; }

.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 44px;
  padding-bottom: 36px;
  border-bottom: 1px solid #262626;
}
.footer-brand img {
  height: 38px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 16px;
}
.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--ink-3);
  max-width: 42ch;
}
.footer-col-title {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  padding-bottom: 10px;
  margin-bottom: 15px;
  border-bottom: 1px solid #262626;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-links a {
  font-size: 0.86rem;
  color: var(--ink-3);
  text-decoration: none;
  transition: color 0.12s;
}
.footer-links a:hover { color: var(--red-bright); }

.footer-foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #6E6E6E;
}
.footer-foot a { color: #6E6E6E; text-decoration: none; }
.footer-foot a:hover { color: var(--red-bright); }

/* ─── FOCUS ────────────────────────────────────────────────────────── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--red-bright);
  outline-offset: 2px;
}

/* ─── RESPONSIVE ───────────────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --gutter: 22px; }

  .nav { display: none; }
  .nav-toggle { display: flex; }
  .nav-mobile { top: 66px; }

  /* Keep the strip to a single line. The short tagline fits; the email does not. */
  .utility-inner { font-size: 0.6rem; gap: 7px; white-space: nowrap; }
  .utility-right { display: none; }

  .lead { padding: 56px 0 52px; }
  .lead-grid { grid-template-columns: 1fr; gap: 40px; }
  .lead-mark { order: -1; padding: 30px; }
  .lead-mark img { max-width: 160px; }

  .band { padding: 52px 0; }
  .band-head { flex-wrap: wrap; gap: 10px; }

  .index-grid { grid-template-columns: 1fr; }

  .entry { grid-template-columns: 46px 1fr; gap: 18px; }
  .entry-no { font-size: 1.1rem; }

  .principle { grid-template-columns: 46px 1fr; gap: 18px; }

  .footer-cols { grid-template-columns: 1fr 1fr; gap: 32px; }

  .app-head { grid-template-columns: 1fr; gap: 28px; }
  .app-icon { width: 120px; height: 120px; }
  .shot-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .spec { grid-template-columns: 1fr; gap: 6px; }
}

@media (max-width: 560px) {
  .footer-cols { grid-template-columns: 1fr; }
}
