/* IT Architect — Brand B.
   Shares the logo red (#990000) with IT Surgery, so the brands are separated by
   treatment instead: Inter rather than Poppins, a dark slate palette, tighter
   spacing and a more corporate register.
   Accessibility-first: WCAG 2.1 AA contrast, visible focus, keyboard operable. */

:root {
  --brand: #990000;          /* sampled from the logo */
  /* Brand red is unusable as text on the dark slate (2.8:1). This lighter tint
     reaches 7.3:1 while still reading as the brand. */
  --brand-light: #ef9a9a;
  --focus-dark: #7cb0ff;     /* #0b57d0 is only 2.5:1 on slate */
  --slate: #1c2430;          /* dominant dark surface */
  --slate-deep: #141b24;
  --slate-mid: #2a3644;
  --ink: #23293a;
  --body: #3d4451;
  --muted: #5c636f;          /* 5.6:1 on white */
  --line: #dfe3e8;
  --wash: #f5f7f9;
  --white: #ffffff;
  --focus: #0b57d0;

  /* Same typography as itsurgery.me so the two brands read as one business. */
  --font-head: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --maxw: 1140px;
  --panel: 40rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

h1, h2, h3 { font-family: var(--font-head); color: var(--ink); font-weight: 600; line-height: 1.25; }
a { color: var(--brand); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--white); padding: 0.75rem 1rem;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

a:focus-visible, .btn:focus-visible, button:focus-visible,
input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}
/* Dark surfaces need a lighter ring to stay visible. */
.hero :focus-visible, .page-head :focus-visible,
.strip :focus-visible, .section-dark :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--focus-dark);
}

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  padding-top: 0.75rem; padding-bottom: 0.75rem;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
/* The logo is wide (2.4:1) and carries a small tagline, so it needs height to
   stay legible. At 2.6rem the tagline was unreadable. */
.brand img { width: auto; height: 4.6rem; display: block; }

.menu-toggle {
  display: none;
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem;
  background: var(--ink); color: var(--white); border: none;
  border-radius: 5px; padding: 0.5rem 1rem; cursor: pointer;
}

.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.15rem; }
.main-nav a {
  display: block; padding: 0.55rem 0.8rem; border-radius: 6px;
  text-decoration: none; color: var(--ink);
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
}
.main-nav a:hover { background: var(--wash); color: var(--brand); }
.main-nav a[aria-current="page"] { color: var(--brand); box-shadow: inset 0 -2px 0 var(--brand); }

/* ---------- Page head ---------- */
.page-head {
  background: var(--slate); color: var(--white);
  padding: 2.25rem 0 1.75rem;
}
.page-head h1 { color: var(--white); font-size: clamp(1.6rem, 3vw, 2rem); margin: 0; }
.page-head .eyebrow { color: var(--brand-light); }
.standfirst { font-size: 1.05rem; margin: 0.75rem 0 0; color: #d3d8de; }

/* ---------- Hero ---------- */
.hero { background: var(--slate); color: var(--white); padding: 3.25rem 0 2.75rem; }
.hero h1 { color: var(--white); font-size: clamp(1.75rem, 3.4vw, 2.25rem); line-height: 1.2; margin: 0 0 0.85rem; }
.hero .lead { color: #d7dce2; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700;
  font-size: 0.8rem; color: var(--brand-light); margin: 0 0 0.65rem;
}
.lead { font-size: 1.05rem; margin: 0 0 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 0.5rem 1.1rem; border-radius: 6px;
  font-weight: 700; font-size: 0.95rem; text-decoration: none;
  border: 2px solid transparent; font-family: var(--font-head);
  cursor: pointer; line-height: 1.4;
}
.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover { background: #7d0000; }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.55); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); }

/* ---------- Metric strip ---------- */
.strip { background: var(--slate-deep); color: var(--white); padding: 1.35rem 0; }
.strip-inner {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(4, 1fr);
}
.strip-figure {
  display: block; font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: var(--white);
  line-height: 1.1;
}
.strip-label { display: block; font-size: 0.88rem; color: #b9c0c9; margin-top: 0.15rem; }

/* ---------- Sections ---------- */
.section { padding: 2.25rem 0; }
.section h2 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); margin: 0 0 1rem; }
.section h3 { font-size: 1.05rem; margin: 0 0 0.4rem; }
.section-intro { color: var(--muted); margin: 0 0 1.5rem; }

.section-dark { background: var(--slate); color: #d7dce2; }
.section-dark h2, .section-dark h3 { color: var(--white); }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.card {
  background: var(--white); border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: 6px; padding: 1.25rem;
}
.card h2, .card h3 { margin: 0 0 0.5rem; font-size: 1.08rem; }
.card h2 a, .card h3 a { text-decoration: none; }
.card h2 a:hover, .card h3 a:hover { text-decoration: underline; }
.card p { margin: 0 0 0.6rem; }
.card p:last-child { margin-bottom: 0; }
.card-feature { border-top-width: 4px; }
.more { font-weight: 600; }

.cols { display: grid; gap: 1.5rem 2rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* ---------- Technology breadth ---------- */
.tech-heading { margin: 2rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.tech-grid {
  display: grid; gap: 1rem 2rem; margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.tech-group dt {
  font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
  color: var(--ink); margin-bottom: 0.15rem;
}
.tech-group dd { margin: 0; font-size: 0.94rem; color: var(--muted); }

/* ---------- Prose ---------- */
.prose h2 { margin-top: 1.75rem; }
.prose-note { color: var(--muted); font-size: 0.94rem; }
.tech { color: var(--body); margin: 0 0 1rem; }

.ticks { list-style: none; margin: 0.4rem 0 1rem; padding: 0; }
.ticks li { position: relative; padding-left: 1.4rem; margin-bottom: 0.4rem; }
.ticks li::before {
  content: "▪"; position: absolute; left: 0; top: 0;
  color: var(--brand); font-weight: 700;
}
.section-dark .ticks li::before { color: var(--brand-light); }

/* ---------- Proof callout ---------- */
.proof {
  background: var(--wash); border-left: 3px solid var(--brand);
  border-radius: 4px; padding: 1rem 1.25rem; margin: 1.5rem 0;
}
.proof-label {
  text-transform: uppercase; letter-spacing: 0.09em; font-size: 0.72rem;
  font-weight: 700; color: var(--brand); margin: 0 0 0.3rem;
}
.proof p:last-child { margin: 0; }

/* ---------- Experience timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 2rem; }
.role {
  display: grid; gap: 0.5rem 1.75rem;
  grid-template-columns: 11rem 1fr;
  border-top: 1px solid var(--line); padding-top: 1.25rem;
}
.role-period { font-weight: 700; color: var(--ink); margin: 0; }
.role-engagement { color: var(--muted); font-size: 0.9rem; margin: 0.15rem 0 0; }
.role-body h2 { margin: 0 0 0.15rem; font-size: 1.12rem; }
.role-sector { color: var(--brand); font-weight: 600; margin: 0 0 0.5rem; }

/* ---------- CTA ---------- */
.cta-panel {
  background: var(--wash); border-left: 3px solid var(--brand);
  border-radius: 4px; padding: 1.25rem 1.5rem; margin-top: 2rem;
}
.cta-panel h2 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.cta-panel p { margin: 0; }
.section-dark .cta-panel { background: var(--slate-mid); }

/* ---------- Contact ---------- */
.contact-list { list-style: none; margin: 0 0 1.75rem; padding: 0; }
.contact-list li { display: flex; gap: 0.75rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.contact-list span { min-width: 5.5rem; color: var(--muted); font-weight: 600; font-size: 0.9rem; }

/* ---------- Forms ---------- */
.form-wrap {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 6px; padding: 1.5rem; max-width: var(--panel);
}
.form-wrap h2 { margin: 0 0 1rem; font-size: 1.1rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 0.3rem; font-size: 0.95rem; }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; padding: 0.8rem 0.9rem; font-family: var(--font-body); font-size: 1rem;
  color: var(--body); background: var(--white);
  /* --muted is 5.6:1 on white, satisfying WCAG 1.4.11 for UI components. */
  border: 1px solid var(--muted); border-radius: 5px;
}
.field textarea { resize: vertical; }
.form-note { color: var(--muted); font-size: 0.9rem; margin: 0.85rem 0 0; }
.hidden-field { position: absolute; left: -9999px; }

.sibling-nav { margin-top: 2.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.sibling-nav h2 { font-size: 1rem; }
.sibling-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--slate-deep); color: #c3cad3; padding: 2.25rem 0 1.25rem; margin-top: 1rem; }
.footer-grid { display: grid; gap: 1.75rem; grid-template-columns: 1.4fr 1fr 1fr; }
.footer-col h2 {
  color: var(--white); font-size: 0.8rem; margin: 0 0 0.7rem;
  text-transform: uppercase; letter-spacing: 0.09em;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.35rem; font-size: 0.94rem; }
.footer-col a { color: #cbd8e4; text-decoration: none; }
.footer-col a:hover { color: var(--white); text-decoration: underline; }
.footer-brand { color: var(--white); font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; margin: 0 0 0.35rem; }
.footer-small { color: #b9c0c9; font-size: 0.94rem; margin: 0; }
.footer-legal { margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid #333e4b; }
.footer-legal p { margin: 0; font-size: 0.86rem; color: #b9c0c9; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .strip-inner { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .main-nav.is-collapsible { display: none; width: 100%; }
  .main-nav.is-collapsible.is-open { display: block; }
  .main-nav > ul { flex-direction: column; gap: 0; }
  .main-nav a { padding: 0.7rem 0.5rem; border-radius: 0; border-bottom: 1px solid var(--line); }
  .main-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--brand); }
  .role { grid-template-columns: 1fr; gap: 0.3rem; }
  .role-meta { display: flex; gap: 0.75rem; align-items: baseline; }
  .role-engagement { margin: 0; }
}

@media (max-width: 620px) {
  .hero { padding: 2.25rem 0 2rem; }
  .section { padding: 2rem 0; }
  .btn { width: 100%; text-align: center; padding: 0.7rem 1.1rem; }
  .strip-inner { grid-template-columns: 1fr; gap: 0.85rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand img { height: 3.4rem; }
  .form-wrap { padding: 1.15rem; }
}
