/* Double N Works site styles, shared by index.html, it-services.html and facility-services.html.
   Tokens come from the Double N Works Brand Guide (Steel and Safety).
   Layout rules: everything wraps or stacks into one column on a phone. Do not add fixed widths. */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/archivo-latin.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-mono-500-latin.woff2") format("woff2"); }

:root {
  --paper: #FFFFFF; --steel: #E6E8EA; --line: #CFD2D6; --line-strong: #76808A;
  --ink: #2B3138; --ink-muted: #545C66; --gunmetal: #2B3138; --band-ink: #E6E8EA; --band-muted: #CFD2D6;
  --safety: #C8501E; --safety-text: #A8431A; --on-safety: #FFFFFF; --focus: #C8501E; --band-accent: #E2703C;
  --font-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, "Courier New", monospace;
  --logo-light: block; --logo-dark: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1C2025; --steel: #2B3138; --line: #3A424B; --line-strong: #7A848E;
    --ink: #E6E8EA; --ink-muted: #A9B0B8; --safety: #E2703C; --safety-text: #EB8452; --on-safety: #1C2025; --focus: #EB8452;
    --logo-light: none; --logo-dark: block; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 26px; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
ul { padding: 0; list-style: none; }
a { color: var(--safety-text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[id] { scroll-margin-top: 16px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 720px) { .wrap { padding-left: max(40px, env(safe-area-inset-left, 0px)); padding-right: max(40px, env(safe-area-inset-right, 0px)); } }

/* type */
.eyebrow { font-size: 13px; line-height: 16px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--safety-text); }
.eyebrow.quiet { color: var(--ink-muted); }
.h1 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.h1.display { font-size: clamp(32px, 5vw, 56px); line-height: 1.07; }
.h2 { font-size: clamp(24px, 3vw, 28px); line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.h3 { font-size: 20px; line-height: 26px; font-weight: 700; }
.lead { font-size: 18px; line-height: 30px; color: var(--ink-muted); max-width: 640px; }
.note { font-size: 15px; line-height: 24px; color: var(--ink-muted); }
.context { font-size: 15px; line-height: 22px; font-weight: 600; color: var(--ink-muted); }
.mono { font-family: var(--font-mono); font-weight: 500; font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.pending { color: var(--safety-text); font-weight: 600; }
abbr[title] { text-decoration: none; }

/* header */
header.site { background: var(--paper); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand img { height: 40px; width: auto; }
.logo-light { display: var(--logo-light); }
.logo-dark { display: var(--logo-dark); }
nav ul { display: flex; gap: 0 24px; flex-wrap: wrap; }
nav a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current="page"] { color: var(--safety-text); }
nav a[aria-current="page"] { border-bottom-color: var(--safety); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 12px 20px; border-radius: 4px; font: inherit; font-size: 15px; line-height: 20px; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--safety); color: var(--on-safety); border: 1.5px solid var(--safety); }
.btn-primary:hover { filter: brightness(0.92); }
.btn-secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--line-strong); }
.btn-secondary:hover { background: var(--steel); }
.btn-ink { background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink); align-self: flex-start; }
.btn-ink:hover { filter: brightness(1.15); }
.btn-ghost { background: transparent; color: var(--band-ink); border: 1.5px solid var(--band-muted); align-self: flex-start; }
.actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* sections */
.sec { padding: 0 0 56px; }
.sec.first { padding-top: 48px; }
.head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; max-width: 760px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 24px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px 40px; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 24px; }

.hero { padding: 48px 0 40px; display: flex; flex-wrap: wrap; gap: 32px 40px; align-items: stretch; }
.hero-copy { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; justify-content: center; }
.hero > aside { flex: 1 1 300px; }

.card { background: var(--steel); border-radius: 10px; padding: 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card.big { border-radius: 16px; gap: 14px; justify-content: center; }
.card .foot { color: var(--ink-muted); margin-top: auto; }
.card .proofline { border-top: 1px solid var(--line-strong); padding-top: 12px; }
.card .h3.big { font-size: 24px; line-height: 30px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.list li { display: flex; gap: 10px; }
.list li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 9px; background: var(--safety); }

.proof { border: 1px solid var(--line); border-top: 3px solid var(--safety); border-radius: 10px; padding: 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.result { background: var(--steel); border-radius: 4px; padding: 10px 14px; margin-top: auto; font-weight: 600; }
.rule { border-top: 3px solid var(--safety); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
/* competency icons: Lucide (lucide.dev), ISC license */
.rule .ico { width: 28px; height: 28px; color: var(--ink-muted); margin-bottom: 2px; }

.strip { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; line-height: 20px; font-weight: 600; }
.strip .mono { font-size: 14px; }

dl.facts { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 16px; }
dl.facts dt { font-weight: 600; color: var(--ink-muted); }
.codes { gap: 10px 40px; }
.code { display: flex; gap: 16px; }
.code dt { flex: none; width: 64px; }

/* home hero photo with quick facts */
.hero-visual { flex: 1 1 420px; position: relative; border-radius: 16px; overflow: hidden; padding: 210px 32px 32px; min-height: 440px; display: flex; align-items: flex-end; justify-content: center; background: linear-gradient(rgba(255,255,255,.66), rgba(255,255,255,.66)), url(/img/hero-ladder.jpg) center 4% / cover no-repeat; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.hero-visual .card { width: 100%; background: rgba(232,234,236,.94); color: #2B3138; box-shadow: 0 12px 32px rgba(20,24,28,.16); border-radius: 16px; gap: 16px; }
.hero-visual .card .eyebrow, .hero-visual dl.facts dt { color: #545C66; }
.hero-visual a { color: #2B3138; }
.hero-visual .card .note, .hero-visual .card .eyebrow.quiet { color: #545C66; }
.hero-visual .btn-primary { background: #C8501E; border-color: #C8501E; color: #FFFFFF; }
.hero-visual.short { padding-top: 150px; min-height: 0; }
.hero-visual.it { background: linear-gradient(rgba(255,255,255,.38), rgba(255,255,255,.38)), url(/img/hero-servers.jpg) center / cover no-repeat; }
.hero-visual .mono { overflow-wrap: normal; white-space: nowrap; }

/* leadership */
.leader { display: flex; flex-wrap: wrap; gap: 32px 40px; align-items: flex-start; }
.leader-copy { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.leader picture { flex: 1 1 240px; max-width: 320px; }
.headshot { width: 100%; height: auto; display: block; border-radius: 16px; }

/* contact band and footer */
.band { background: var(--gunmetal); color: var(--band-ink); }
.band .wrap { padding-top: 56px; padding-bottom: 56px; display: flex; flex-wrap: wrap; gap: 24px 64px; align-items: center; justify-content: space-between; }
.band .eyebrow { color: var(--band-accent); }
.band p { color: var(--band-muted); }
.band-copy { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.band-lines { display: flex; flex-direction: column; gap: 6px; font-size: 18px; line-height: 28px; font-weight: 600; }
.band-lines a { color: var(--band-ink); overflow-wrap: anywhere; }
footer.site { background: var(--gunmetal); color: var(--band-muted); border-top: 1px solid #3A424B; }
footer.site .wrap { padding-top: 40px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-end; }
footer.site img { height: 44px; width: auto; display: block; }
footer.site .legal { font-size: 14px; line-height: 22px; display: flex; flex-direction: column; gap: 2px; }
footer.site .legal strong { color: var(--band-ink); font-weight: 600; }

/* owner headshot, used in the contact band and the prime contractor card */
.face { display: block; width: 132px; height: 176px; object-fit: cover; object-position: center 20%; border-radius: 10px; flex: none; }
.face.small { width: 72px; height: 72px; object-position: center 12%; }
.band-person { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.person { display: flex; gap: 16px; align-items: center; }
.person p { line-height: 22px; }

/* contact form (home page) */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 32px 40px; }
.contact-intro { display: flex; flex-direction: column; gap: 24px; }
.contact-lines { display: flex; flex-direction: column; gap: 16px; }
.contact-lines .row { display: flex; flex-direction: column; gap: 2px; }
.contact-lines .label { font-size: 13px; line-height: 16px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted); }
.contact-lines .value { font-size: 18px; line-height: 28px; font-weight: 600; overflow-wrap: anywhere; }
form.contact-form { background: var(--steel); border-radius: 16px; padding: 24px; align-self: start; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
label { font-size: 15px; line-height: 20px; font-weight: 600; }
input, select, textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: 4px; padding: 10px 12px; min-height: 44px; width: 100%; max-width: 100%; }
textarea { min-height: 120px; resize: vertical; }
.contact-form .opt { font-weight: 400; color: var(--ink-muted); }
.contact-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .form-foot { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.contact-form .form-note { font-size: 14px; line-height: 20px; color: var(--ink-muted); flex: 1 1 220px; }
.form-msg { grid-column: 1 / -1; font-size: 15px; line-height: 22px; color: var(--ink-muted); }
.form-msg:empty { display: none; }
.form-msg.ok { color: var(--ink); font-weight: 600; }
.form-msg.err { color: var(--safety-text); font-weight: 600; }
.contact-form button[disabled] { opacity: .6; cursor: wait; }

/* phone */
@media (max-width: 700px) {
  .hide-sm { display: none; }
  nav ul { gap: 0 14px; }
  nav a { font-size: 14px; }
  .btn { white-space: normal; }
  .sec { padding-bottom: 40px; }
  .hero-visual { padding: 180px 16px 16px; min-height: 0; }
  form.contact-form { grid-template-columns: 1fr; }
}
