/* ===========================================================
   QMW Global — style.css
   Design concept: a technical drafting sheet — blueprint grid,
   corner registration marks, a title-block footer, and a
   spec-sheet visual. Chosen because the work itself (solutions
   architecture, estimation, scoping) is literally about turning
   ambiguity into a precise, measurable document.
   =========================================================== */

:root {
  --ink: #10192B;               /* primary text / dark surfaces */
  --ink-soft: #29334A;
  --paper: #F4F5F2;              /* base background — cool, not cream */
  --paper-alt: #E9EBE4;          /* secondary panel background */
  --blueprint: #2A5C99;          /* structural accent — lines, links */
  --blueprint-dim: #7C93B3;
  --copper: #A9501C;             /* CTA / highlight accent */
  --copper-dark: #863E15;
  --graphite: #5B6472;           /* secondary text */
  --line: rgba(16, 25, 43, 0.16);        /* hairline rule on paper */
  --line-soft: rgba(16, 25, 43, 0.09);
  --line-on-ink: rgba(244, 245, 242, 0.22);

  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Consolas, monospace;

  --container: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blueprint); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--copper); }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  z-index: 200;
  font-family: var(--font-mono);
  font-size: 14px;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.02;
  margin: 0;
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 12px;
}

h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

p { margin: 0 0 16px; max-width: 62ch; }
.section-lede { color: var(--graphite); font-size: 18px; max-width: 56ch; }

.mono { font-family: var(--font-mono); }

/* ---------- Layout rhythm ---------- */

section { padding: 88px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: none; }

.section-head { margin-bottom: 48px; }

/* ---------- Corner registration marks ----------
   A recurring device borrowed from technical drawings:
   short tick marks at two corners of a framed block. */

.tick-frame {
  position: relative;
  padding: 40px;
  border: 1px solid var(--line);
}
.tick-frame::before,
.tick-frame::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--blueprint);
  border-style: solid;
}
.tick-frame::before {
  top: -1px; left: -1px;
  border-width: 2px 0 0 2px;
}
.tick-frame::after {
  bottom: -1px; right: -1px;
  border-width: 0 2px 2px 0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 245, 242, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.03em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark:hover { color: var(--ink); }
.wordmark span { color: var(--copper); }
.wordmark-icon {
  height: 46px;
  width: auto;
  display: block;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 15px;
}
.site-nav a:hover { color: var(--copper); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-top: 96px;
  padding-bottom: 96px;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 34px 34px;
  background-position: center top;
}

.hero-inner { max-width: 760px; }

.hero h1 {
  font-size: clamp(40px, 6.4vw, 72px);
  margin-bottom: 28px;
}

.hero .section-lede { font-size: 20px; margin-bottom: 36px; }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 26px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--copper);
  color: var(--paper);
}
.btn-primary:hover { background: var(--copper-dark); color: var(--paper); }
.btn-secondary {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-secondary:hover { border-color: var(--copper); color: var(--copper); }
.btn-ghost {
  background: transparent;
  color: var(--blueprint);
  padding: 0;
  border: none;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (min-width: 720px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
}

.service-card {
  background: var(--paper);
  padding: 36px;
  border-left: 3px solid var(--blueprint);
}

.service-card .icon { margin-bottom: 18px; }
.service-card p { margin-bottom: 0; color: var(--ink-soft); }

/* ---------- Approach ---------- */

.approach-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
@media (min-width: 860px) {
  .approach-grid { grid-template-columns: 1.1fr 0.9fr; }
}

.experience-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}
.experience-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.experience-list li:first-child { padding-top: 0; }
.experience-role { font-weight: 600; }
.experience-meta { color: var(--graphite); font-family: var(--font-mono); font-size: 13px; white-space: nowrap; }

.credential-panel {
  background: var(--paper-alt);
  border: 1px solid var(--line);
  padding: 28px;
}
.credential-panel h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-mono); font-weight: 500; margin-bottom: 18px; color: var(--graphite); }

.cred-tags {
  display: flex;
  flex-wrap: wrap;
}
.cred-tags span {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-right: none;
  background: var(--paper);
}
.cred-tags span:last-child { border-right: 1px solid var(--line); }

.cred-note {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 15px;
}

/* ---------- Project (SCOPEr) ---------- */

.project-section { background: var(--ink); color: var(--paper); border-bottom: none; }
.project-section .section-lede { color: var(--blueprint-dim); }
.project-section h2 { color: var(--paper); }
.project-section a.btn-secondary { border-color: var(--paper); color: var(--paper); }
.project-section a.btn-secondary:hover { border-color: var(--copper); color: var(--copper); }

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: start;
}
@media (min-width: 860px) {
  .project-grid { grid-template-columns: 1fr 0.9fr; }
}

.project-copy .eyebrow-mark {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--blueprint-dim);
  border: 1px solid var(--line-on-ink);
  padding: 4px 10px;
  margin-bottom: 18px;
}
.project-copy p { color: rgba(244, 245, 242, 0.82); }

/* Estimate slip — a small illustrative spec sheet */
.estimate-slip {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}
.estimate-slip-head {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--graphite);
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-alt);
}
.estimate-slip-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
.estimate-slip-row:last-of-type { border-bottom: none; }
.estimate-slip-row .num { font-family: var(--font-mono); }
.estimate-slip-caption {
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--graphite);
  border-top: 1px solid var(--line);
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: end;
}
@media (min-width: 720px) {
  .contact-grid { grid-template-columns: 1.2fr 0.8fr; }
}
.contact-email {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--copper);
  display: inline-block;
}
.contact-email:hover { color: var(--copper); }

.contact-address {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  max-width: 280px;
}
.contact-address-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 6px;
}
.contact-address address {
  font-style: normal;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.contact-note { color: var(--graphite); font-size: 15px; }

/* ---------- Footer / title block ---------- */

.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 0;
}
.titleblock {
  border-top: 1px solid var(--line-on-ink);
}
.titleblock-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-bottom: 1px solid var(--line-on-ink);
}
@media (min-width: 780px) {
  .titleblock-grid { grid-template-columns: repeat(4, 1fr); }
}
.titleblock-cell {
  padding: 22px 24px;
  border-top: 1px solid var(--line-on-ink);
}
@media (min-width: 780px) {
  .titleblock-cell { border-top: none; border-left: 1px solid var(--line-on-ink); }
  .titleblock-cell:first-child { border-left: none; }
}
.titleblock-cell .label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blueprint-dim);
  margin-bottom: 6px;
}
.titleblock-cell .value { font-size: 14px; color: var(--paper); }
.titleblock-cell a { color: var(--paper); }
.titleblock-cell a:hover { color: var(--copper); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  font-size: 13px;
  color: var(--blueprint-dim);
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--blueprint-dim); text-decoration: none; }
.footer-links a:hover { color: var(--copper); }
.footer-links button.link-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--blueprint-dim); font-size: 13px; font-family: var(--font-body);
  text-decoration: none;
}
.footer-links button.link-btn:hover { color: var(--copper); }

/* ===========================================================
   Cookie banner + preferences modal
   =========================================================== */

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 640px;
  margin: 0 auto;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--line-on-ink);
  padding: 22px 24px;
  z-index: 300;
  box-shadow: 0 8px 28px rgba(16, 25, 43, 0.28);
  transform: translateY(0);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { font-size: 14px; color: rgba(244, 245, 242, 0.85); margin-bottom: 16px; max-width: none; }
.cookie-banner-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cookie-banner .btn-primary { padding: 10px 18px; font-size: 14px; }
.cookie-banner .btn-secondary { padding: 10px 18px; font-size: 14px; border-color: var(--paper); color: var(--paper); }
.cookie-banner .btn-secondary:hover { border-color: var(--copper); color: var(--copper); }
.cookie-banner .btn-ghost { color: var(--blueprint-dim); }
.cookie-banner .btn-ghost:hover { color: var(--copper); }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 25, 43, 0.6);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--paper);
  color: var(--ink);
  max-width: 520px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  padding: 32px;
}
.modal h2 { font-size: 24px; margin-bottom: 8px; }
.modal .modal-intro { color: var(--graphite); font-size: 14px; margin-bottom: 24px; }

.consent-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.consent-row:last-of-type { border-bottom: 1px solid var(--line); }
.consent-row-text strong { display: block; margin-bottom: 4px; font-size: 15px; }
.consent-row-text p { font-size: 13px; color: var(--graphite); margin: 0; max-width: 36ch; }

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex: none;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute;
  inset: 0;
  background: var(--line);
  border: 1px solid var(--graphite);
  transition: background 0.15s ease;
}
.switch .track::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  top: 3px;
  background: var(--paper);
  border: 1px solid var(--graphite);
  transition: transform 0.15s ease;
}
.switch input:checked + .track { background: var(--blueprint); border-color: var(--blueprint); }
.switch input:checked + .track::before { transform: translateX(20px); border-color: var(--blueprint); }
.switch input:disabled + .track { opacity: 0.6; }
.switch input:focus-visible + .track { outline: 2px solid var(--blueprint); outline-offset: 2px; }

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 26px;
  flex-wrap: wrap;
}

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

.legal-main { padding: 64px 0 96px; }
.legal-main .container { max-width: 760px; }
.legal-main h1 { font-size: clamp(32px, 5vw, 44px); margin-bottom: 6px; }
.legal-updated { font-family: var(--font-mono); font-size: 13px; color: var(--graphite); margin-bottom: 40px; }
.legal-main h2 { font-size: 21px; margin-top: 40px; margin-bottom: 12px; font-family: var(--font-body); font-weight: 700; letter-spacing: normal; }
.legal-main p, .legal-main li { color: var(--ink-soft); font-size: 16px; max-width: none; }
.legal-main ul, .legal-main ol { padding-left: 22px; }
.legal-main li { margin-bottom: 8px; }

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 28px;
  font-size: 14px;
}
.legal-table th, .legal-table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.legal-table th {
  background: var(--paper-alt);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.back-link { display: inline-block; margin-bottom: 32px; font-size: 14px; }

.note-box {
  border-left: 3px solid var(--copper);
  background: var(--paper-alt);
  padding: 16px 20px;
  font-size: 14px;
  color: var(--ink-soft);
  margin: 24px 0;
}
