/* ============================================================
   Quarterdeck Website v2 — site-level styles
   Builds on colors_and_type.css tokens.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--fg-2);
  background: var(--bg-1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

/* ---------- Layout primitives ---------- */
.q-wrap { max-width: 1240px; margin: 0 auto; padding: 0 40px; }
.q-wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 720px) {
  .q-wrap, .q-wrap-narrow { padding: 0 22px; }
}

/* ---------- View switcher (prototype only) ---------- */
.q-route-switcher {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  background: var(--qd-navy-900); color: var(--fg-inverse);
  border-radius: 999px; padding: 6px;
  display: flex; gap: 2px;
  box-shadow: 0 8px 24px rgba(11,31,51,0.25);
  font-size: 12px; letter-spacing: .08em;
}
.q-route-switcher button {
  background: transparent; border: 0; color: rgba(250,247,241,0.72);
  padding: 9px 16px; border-radius: 999px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .12em;
  transition: background var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out);
}
.q-route-switcher button.active {
  background: var(--qd-paper-50); color: var(--qd-navy-900);
}
.q-route-switcher button:hover:not(.active) { color: var(--fg-inverse); }

/* ---------- Nav ---------- */
.q-nav {
  position: sticky; top: 0; z-index: 50;
  transition: background var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out);
  border-bottom: 1px solid transparent;
}
.q-nav.on-dark { background: transparent; color: var(--fg-inverse); }
.q-nav.on-light { background: var(--qd-paper-50); color: var(--qd-navy-900); }
.q-nav.scrolled.on-dark {
  background: rgba(11,31,51,0.78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(250,247,241,0.08);
}
.q-nav.scrolled.on-light {
  background: rgba(250,247,241,0.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border-1);
}
.q-nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.q-nav-logo { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 17px; letter-spacing: .002em; color: inherit; cursor: pointer; }
.q-nav-logo .wordmark { font-weight: 600; }
.q-nav-links { display: flex; align-items: center; gap: 12px; list-style: none; margin: 0; padding: 0; font-size: 11.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.q-nav-links a:not(.q-nav-cta) { cursor: pointer; padding: 8px 2px; border-bottom: 1px solid transparent; transition: border-color var(--dur-fast) var(--ease-out); color: inherit; }
.q-nav-links a:not(.q-nav-cta):hover, .q-nav-links a:not(.q-nav-cta).active { border-bottom-color: currentColor; }
.q-nav-sep { opacity: 0.32; user-select: none; font-weight: 400; letter-spacing: 0; }
.q-nav-links a.q-nav-cta {
  padding: 9px 18px; border: 1px solid currentColor; border-radius: 4px;
  font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  transition: background var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out);
  cursor: pointer;
}
.q-nav-links a.q-nav-cta:hover { border-color: currentColor; }
.q-nav.on-dark .q-nav-cta:hover { background: var(--qd-paper-50); color: var(--qd-navy-900); }
.q-nav.on-light .q-nav-cta:hover { background: var(--qd-navy-900); color: var(--fg-inverse); }
@media (max-width: 880px) {
  .q-nav-links .hide-sm { display: none; }
  .q-nav-links { gap: 8px; }
}

/* --- Services dropdown --- */
.q-nav-has-dropdown { position: relative; }
.q-nav-drop-caret { font-size: 10px; margin-left: 3px; opacity: 0.6; }
.q-nav-dropdown {
  display: none;
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--qd-navy-900); border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.22); padding: 6px 0; min-width: 164px; z-index: 200;
}
.q-nav-dropdown::before {
  content: ''; position: absolute; top: -5px; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top: none; border-bottom-color: var(--qd-navy-900);
}

/* Light nav: dropdown matches the nav */
.q-nav.on-light .q-nav-dropdown {
  background: var(--qd-paper-100);
  border: 1px solid var(--qd-paper-300);
  box-shadow: 0 8px 24px rgba(0,0,0,0.09);
}
.q-nav.on-light .q-nav-dropdown::before {
  border-bottom-color: var(--qd-paper-100);
}

.q-nav-has-dropdown:hover .q-nav-dropdown { display: block; }
.q-nav-links .q-nav-dropdown a {
  display: block; padding: 9px 20px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
  color: var(--fg-inverse); opacity: 0.82; cursor: pointer; border-bottom: none !important;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.q-nav-links .q-nav-dropdown a:hover { opacity: 1; border-bottom: none !important; }

/* Light nav: dark text in dropdown */
.q-nav.on-light .q-nav-links .q-nav-dropdown a { color: var(--fg-1); opacity: 0.65; }
.q-nav.on-light .q-nav-links .q-nav-dropdown a:hover { opacity: 1; }

/* ---------- Mobile nav: hamburger button ---------- */
.q-nav-hamburger {
  display: none;
  background: transparent; border: 0; padding: 6px;
  color: inherit; cursor: pointer; line-height: 0;
  border-radius: var(--radius-sm);
  transition: opacity var(--dur-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.q-nav-hamburger:hover { opacity: 0.72; }

/* When overlay is open, header snaps to paper so hamburger/logo are visible */
.q-nav.menu-open {
  background: var(--qd-paper-50) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom-color: var(--border-1) !important;
  color: var(--qd-navy-900) !important;
  position: fixed; width: 100%; z-index: 200;
}

@media (max-width: 768px) {
  .q-nav-desktop { display: none; }
  .q-nav-hamburger { display: flex; align-items: center; justify-content: center; }
}

/* ---------- Full-screen overlay nav ---------- */
.q-nav-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: var(--qd-paper-50);
  display: flex; flex-direction: column;
  padding-top: 80px; /* clears the sticky header */
  opacity: 0; pointer-events: none;
  transform: translateY(-12px);
  transition:
    opacity var(--dur-med) var(--ease-out),
    transform var(--dur-med) var(--ease-out);
}
.q-nav-overlay.is-open {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}

.q-nav-overlay-body {
  flex: 1; display: flex; flex-direction: column;
  justify-content: flex-start;
  padding: 40px 22px 40px;
}

.q-nav-overlay-links {
  list-style: none; margin: 0; padding: 0;
  border-top: 1px solid var(--qd-paper-300);
}

.q-nav-overlay-links li {
  border-bottom: 1px solid var(--qd-paper-300);
  opacity: 0; transform: translateY(10px);
  transition:
    opacity 240ms var(--ease-out),
    transform 240ms var(--ease-out);
  transition-delay: calc(var(--i) * 40ms + 60ms);
}
.q-nav-overlay.is-open .q-nav-overlay-links li {
  opacity: 1; transform: translateY(0);
}

.q-nav-overlay-links a {
  display: flex; align-items: baseline; gap: 18px;
  padding: 20px 0;
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 300; letter-spacing: -0.025em; line-height: 1;
  color: var(--qd-navy-900);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.q-nav-overlay-links a:hover,
.q-nav-overlay-links a.active { color: var(--qd-navy-600); }
.q-nav-overlay-links a.active .idx { color: var(--qd-brass-500); }

.q-nav-overlay-links .idx {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 0.4em; color: var(--qd-brass-700);
  letter-spacing: 0; position: relative; top: -0.1em;
}
.q-nav-overlay-links .label { flex: 1; }

.q-nav-overlay-foot {
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid var(--qd-paper-300);
  display: flex; flex-direction: column; gap: 6px;
  opacity: 0; transform: translateY(8px);
  transition: opacity 240ms var(--ease-out) 280ms, transform 240ms var(--ease-out) 280ms;
}
.q-nav-overlay.is-open .q-nav-overlay-foot {
  opacity: 1; transform: translateY(0);
}

.q-nav-overlay-email {
  font-size: 15px; font-weight: 500; color: var(--qd-navy-900);
  letter-spacing: .01em;
}
.q-nav-overlay-loc {
  font-size: 12px; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: var(--fg-3);
}

/* Only show overlay on mobile */
@media (min-width: 769px) {
  .q-nav-overlay { display: none; }
}

/* ---------- Footer ---------- */
.q-foot {
  background: var(--qd-navy-900); color: var(--fg-inverse);
  padding: 96px 0 40px;
}
.q-foot-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 56px;
  padding-bottom: 56px; border-bottom: 1px solid rgba(250,247,241,0.12);
}
@media (max-width: 900px) { .q-foot-top { grid-template-columns: 1fr 1fr; gap: 40px; } }
.q-foot-top h5 { margin: 0 0 14px; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(250,247,241,0.55); }
.q-foot-top a { display: block; padding: 4px 0; font-size: 14px; color: rgba(250,247,241,0.82); transition: color var(--dur-fast) var(--ease-out); cursor: pointer; }
.q-foot-top a:hover { color: var(--fg-inverse); }
.q-foot-statement { font-family: var(--font-sans); font-weight: 300; font-size: 22px; line-height: 1.3; letter-spacing: -.01em; color: var(--fg-inverse); max-width: 22ch; text-wrap: balance; }
.q-foot-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 28px; font-size: 12px; color: rgba(250,247,241,0.55); flex-wrap: wrap; gap: 12px; }

/* ---------- Buttons (extend kit.css primitives) ---------- */
.qbtn { display:inline-flex; align-items:center; gap:10px; font-family:var(--font-sans); font-size:14px; font-weight:500; letter-spacing:.02em; border-radius:4px; padding:14px 24px; cursor:pointer; border:1.5px solid transparent; transition:all var(--dur-med) var(--ease-out); text-decoration:none; }
.qbtn--primary { background: var(--qd-navy-900); color: var(--fg-inverse); }
.qbtn--primary:hover { background: var(--qd-navy-800); }
.qbtn--paper { background: var(--qd-paper-50); color: var(--qd-navy-900); }
.qbtn--paper:hover { background: #fff; }
.qbtn--outline-dark { background: transparent; color: var(--fg-inverse); border-color: rgba(250,247,241,0.58); }
.qbtn--outline-dark:hover { border-color: var(--fg-inverse); background: rgba(250,247,241,0.06); }
.qbtn--outline { background: transparent; color: var(--qd-navy-900); border-color: var(--qd-navy-900); }
.qbtn--outline:hover { background: var(--qd-navy-900); color: var(--fg-inverse); }
.qbtn .arrow { display: inline-block; transition: transform var(--dur-med) var(--ease-out); }
.qbtn:hover .arrow { transform: translateX(3px); }

.qlink { display:inline-flex; align-items:center; gap: 8px; font-weight: 500; font-size: 14px; letter-spacing:.02em; color: var(--qd-navy-900); border-bottom: 1px solid transparent; padding-bottom: 2px; cursor: pointer; transition: border-color var(--dur-med) var(--ease-out); }
.qlink:hover { border-bottom-color: var(--qd-navy-900); }
.qlink .arrow { transition: transform var(--dur-med) var(--ease-out); }
.qlink:hover .arrow { transform: translateX(3px); }
.qlink--on-dark { color: var(--fg-inverse); }
.qlink--on-dark:hover { border-bottom-color: var(--fg-inverse); }
.qlink--brass { color: var(--qd-brass-700); }
.qlink--brass:hover { border-bottom-color: var(--qd-brass-700); }

/* ---------- Eyebrow w/ rule ---------- */
.q-eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 11.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: var(--qd-brass-700);
}
.q-eyebrow::before { content: ""; width: 40px; height: 1px; background: currentColor; opacity: 0.8; }
.q-eyebrow--dark { color: var(--qd-brass-300); }
.q-eyebrow--slate { color: var(--fg-3); }

/* ---------- Section headings ---------- */
.q-section-head { max-width: 860px; margin-bottom: 64px; }
.q-section-head h2 { margin: 18px 0 0; font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 300; line-height: 1.08; letter-spacing: -.02em; color: var(--fg-1); text-wrap: balance; }
.q-section-head h2 em { font-style: normal; font-weight: 600; }
.q-section-head p { margin: 20px 0 0; max-width: 62ch; font-size: 18px; line-height: 1.65; color: var(--fg-2); }

/* =====================================================================
   HOMEPAGE
   ===================================================================== */

/* --- Hero --- */
.q-home-hero {
  background: var(--qd-navy-900); color: var(--fg-inverse);
  position: relative; overflow: hidden;
  padding: 0 0 140px;
}
.q-home-hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 520px at 82% 18%, rgba(48,163,217,0.09), transparent 60%),
    radial-gradient(1200px 700px at 0% 100%, rgba(184,145,63,0.06), transparent 55%);
  pointer-events: none;
}
.q-home-hero-body { position: relative; padding-top: 96px; }
.q-home-hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 72px; align-items: center; }
@media (max-width: 1000px) { .q-home-hero-grid { grid-template-columns: 1fr; gap: 56px; } }
.q-home-hero h1 {
  margin: 28px 0 36px;
  font-size: clamp(2.75rem, 5.6vw, 5rem);
  font-weight: 300; line-height: 1.02; letter-spacing: -.025em;
  color: var(--fg-inverse); max-width: 18ch; text-wrap: balance;
}
.q-home-hero h1 em { font-style: normal; font-weight: 600; }
.q-home-hero .lede {
  font-size: 20px; line-height: 1.55; color: rgba(250,247,241,0.78);
  max-width: 58ch; margin: 0 0 40px;
}
.q-home-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Right column: "what we do" ledger */
.q-home-ledger {
  border-top: 1px solid rgba(250,247,241,0.18);
  padding-top: 8px;
}
.q-home-ledger-item {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 20px; align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid rgba(250,247,241,0.12);
  cursor: pointer;
  transition: background var(--dur-med) var(--ease-out);
}
.q-home-ledger-item:hover { background: rgba(250,247,241,0.02); }
.q-home-ledger-item .idx { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--qd-brass-300); font-size: 14px; }
.q-home-ledger-item .title { font-size: 17px; font-weight: 500; color: var(--fg-inverse); }
.q-home-ledger-item .meta { font-size: 12px; color: rgba(250,247,241,0.55); letter-spacing: .08em; text-transform: uppercase; }

/* --- Proposition band --- */
.q-prop-band { padding: 120px 0; background: var(--qd-paper-50); }
.q-prop-statement {
  font-size: clamp(1.75rem, 3.4vw, 2.75rem); font-weight: 300; line-height: 1.2;
  letter-spacing: -.015em; color: var(--fg-1); max-width: 26ch; text-wrap: balance;
}
.q-prop-statement em { font-style: normal; font-weight: 600; }
.q-prop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; margin-top: 64px; }
@media (max-width: 900px) { .q-prop-grid { grid-template-columns: 1fr; gap: 40px; } }
.q-prop-col p { font-size: 17px; line-height: 1.7; color: var(--fg-2); margin: 0 0 18px; max-width: 56ch; }

/* --- Services overview (3 services, prose-first) --- */
.q-svc-overview { padding: 120px 0; background: var(--qd-paper-100); border-top: 1px solid var(--qd-paper-200); }
.q-svc-rows { display: grid; grid-template-columns: 1fr; gap: 0; margin-top: 32px; border-top: 1px solid var(--qd-paper-300); }
.q-svc-row {
  display: grid; grid-template-columns: 90px 1fr 1.1fr auto;
  gap: 40px; align-items: center;
  padding: 40px 16px; margin: 0 -16px; border-bottom: 1px solid var(--qd-paper-300);
  cursor: pointer; transition: background var(--dur-med) var(--ease-out);
}
.q-svc-row:hover { background: var(--qd-paper-200); }
@media (max-width: 900px) {
  .q-svc-row { grid-template-columns: 1fr; gap: 14px; padding: 32px 16px; }
  .q-svc-row .num { font-size: 14px; }
}
.q-svc-row .num { font-family: var(--font-serif); font-style: italic; color: var(--qd-brass-700); font-size: 16px; }
.q-svc-row h3 { margin: 0; font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 500; letter-spacing: -.01em; color: var(--fg-1); }
.q-svc-row p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--fg-2); max-width: 52ch; }
.q-svc-row .chev { color: var(--qd-slate-500); transition: transform var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out); }
.q-svc-row:hover .chev { transform: translateX(10px); color: var(--qd-navy-900); }

/* --- Segment grid (illustrated) --- */
.q-segments { padding: 140px 0 160px; background: var(--qd-navy-900); color: var(--fg-inverse); position: relative; }
.q-segments::before {
  content:""; position: absolute; inset: 0;
  background: radial-gradient(1000px 600px at 20% 20%, rgba(184,145,63,0.06), transparent 60%);
  pointer-events: none;
}
.q-segments .q-section-head h2 { color: var(--fg-inverse); }
.q-segments .q-section-head p { color: rgba(250,247,241,0.72); }
.q-seg-grid {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid rgba(250,247,241,0.16);
  border-left: 1px solid rgba(250,247,241,0.16);
}
@media (max-width: 900px) { .q-seg-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .q-seg-grid { grid-template-columns: 1fr; } }

.q-seg-card {
  position: relative;
  border-right: 1px solid rgba(250,247,241,0.16);
  border-bottom: 1px solid rgba(250,247,241,0.16);
  padding: 40px 32px 36px;
  cursor: pointer;
  transition: background var(--dur-med) var(--ease-out);
  display: flex; flex-direction: column; gap: 24px;
  min-height: 440px;
}
.q-seg-card:hover { background: rgba(250,247,241,0.035); }
.q-seg-illo {
  width: 100%; aspect-ratio: 4/3;
  background: var(--qd-navy-800);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  transition: background var(--dur-med) var(--ease-out);
}
.q-seg-card:hover .q-seg-illo { background: var(--qd-navy-700); }
.q-seg-illo svg { width: 78%; height: 78%; }
.q-seg-body { display: flex; flex-direction: column; gap: 10px; }
.q-seg-label { font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--qd-brass-300); }
.q-seg-card h3 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.01em; color: var(--fg-inverse); }
.q-seg-card p { margin: 0; font-size: 14px; line-height: 1.6; color: rgba(250,247,241,0.7); }
.q-seg-card .qlink { color: var(--fg-inverse); opacity: 0.9; font-size: 13px; margin-top: auto; padding-top: 6px; }
.q-seg-card .qlink .arrow { transition: transform var(--dur-med) var(--ease-out); }
.q-seg-card:hover .qlink .arrow { transform: translateX(4px); }

/* --- Home: selected work --- */
.q-work-sel { padding: 120px 0; background: var(--qd-paper-50); }
.q-work-list { display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--qd-paper-300); margin-top: 32px; }
.q-work-item {
  display: grid; grid-template-columns: 120px 1.3fr 1fr auto;
  gap: 40px; align-items: center;
  padding: 28px 0; border-bottom: 1px solid var(--qd-paper-300);
  cursor: pointer;
  transition: background var(--dur-med) var(--ease-out);
}
@media (max-width: 900px) {
  .q-work-item { grid-template-columns: 1fr; gap: 14px; }
}
.q-work-thumb {
  width: 120px; height: 72px; border-radius: 4px;
  background-size: cover; background-position: center;
  background-color: var(--qd-navy-800);
  flex-shrink: 0;
  transition: opacity var(--dur-med) var(--ease-out);
}
.q-work-item:hover .q-work-thumb { opacity: 0.85; }
@media (max-width: 900px) { .q-work-thumb { width: 100%; height: 180px; } }
.q-work-item .yr { font-family: var(--font-serif); font-style: italic; color: var(--qd-brass-700); font-size: 16px; }
.q-work-item h4 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.75rem); font-weight: 500; color: var(--fg-1); letter-spacing: -.01em; }
.q-work-item h4 .seg { display: block; font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--qd-slate-500); font-size: 0.65em; margin-top: 6px; }
.q-work-item p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--fg-2); max-width: 48ch; }
.q-work-item .chev { color: var(--qd-slate-500); transition: transform var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out); }
.q-work-item:hover .chev { transform: translateX(4px); color: var(--qd-navy-900); }
.q-work-item:hover h4 { color: var(--qd-navy-700); }

/* --- Logo strip --- */
.q-logos { padding: 72px 0; background: var(--qd-paper-100); border-top: 1px solid var(--qd-paper-300); border-bottom: 1px solid var(--qd-paper-300); }
.q-logos-label { text-align: center; font-size: 11.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 36px; }
.q-logos-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 40px 48px; align-items: center; justify-items: center; }
@media (max-width: 900px) { .q-logos-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.q-logo-mark {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 18px; color: var(--qd-slate-700); opacity: 0.55;
  letter-spacing: -.01em; text-align: center;
  transition: opacity var(--dur-med) var(--ease-out);
}
.q-logo-mark:hover { opacity: 0.95; }
.q-logo-mark--sans { font-family: var(--font-sans); font-style: normal; font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }

/* --- Home: closing prompt --- */
.q-closer { padding: 140px 0; background: var(--qd-paper-50); }
.q-closer-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start;
  padding-top: 60px; border-top: 1px solid var(--qd-paper-300);
}
@media (max-width: 900px) { .q-closer-inner { grid-template-columns: 1fr; gap: 40px; } }
.q-closer h2 { margin: 18px 0 0; font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 300; line-height: 1.08; letter-spacing: -.02em; color: var(--fg-1); max-width: 20ch; text-wrap: balance; }
.q-closer h2 em { font-style: normal; font-weight: 600; }
.q-closer p { font-size: 17px; line-height: 1.7; color: var(--fg-2); margin: 0 0 20px; max-width: 52ch; }

/* =====================================================================
   CASE STUDY PAGE (NEC)
   ===================================================================== */

.q-case-hero { padding: 120px 0 80px; background: var(--qd-paper-50); }
.q-case-crumbs { font-size: 11.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-3); display: flex; gap: 10px; align-items: center; margin-bottom: 48px; }
.q-case-crumbs a { color: var(--fg-3); cursor: pointer; transition: color var(--dur-fast); }
.q-case-crumbs a:hover { color: var(--qd-navy-900); }
.q-case-crumbs .sep { opacity: 0.5; }
.q-case-header h1 {
  margin: 14px 0 0;
  font-size: clamp(2.5rem, 5.5vw, 4.75rem);
  font-weight: 300; line-height: 1.02; letter-spacing: -.025em;
  color: var(--fg-1); max-width: 22ch; text-wrap: balance;
}
.q-case-header h1 em { font-style: normal; font-weight: 600; }
.q-case-meta {
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
  padding: 24px 0; border-top: 1px solid var(--qd-paper-300); border-bottom: 1px solid var(--qd-paper-300);
}
@media (max-width: 720px) { .q-case-meta { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
.q-case-meta dt { font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-3); margin: 0 0 6px; }
.q-case-meta dd { margin: 0; font-size: 15px; color: var(--fg-1); font-weight: 500; }

/* Hero visual */
.q-case-visual {
  margin-top: 72px; aspect-ratio: 16/9;
  background: var(--qd-navy-900); border-radius: 6px;
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end; padding: 40px;
  color: var(--fg-inverse);
}
.q-case-visual::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,31,51,0.02) 0%, rgba(11,31,51,0.32) 100%),
    radial-gradient(900px 500px at 68% 30%, rgba(48,163,217,0.22), transparent 65%),
    radial-gradient(700px 400px at 20% 80%, rgba(184,145,63,0.12), transparent 60%);
}
.q-case-visual-inner { position: relative; display: flex; justify-content: space-between; align-items: flex-end; width: 100%; gap: 20px; flex-wrap: wrap; }
.q-case-visual .tag {
  padding: 8px 14px; border: 1px solid rgba(255,255,255,0.4); border-radius: 999px;
  font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
}
.q-case-visual .award {
  font-family: var(--font-serif); font-style: italic; font-size: 18px;
  color: var(--qd-brass-300); display: flex; align-items: center; gap: 12px;
}
.q-case-visual .award::before { content: ""; width: 28px; height: 1px; background: var(--qd-brass-500); }

/* Case body — editorial */
.q-case-body { padding: 120px 0 80px; background: var(--qd-paper-50); }
.q-case-layout { display: grid; grid-template-columns: 240px 1fr; gap: 80px; align-items: start; }
@media (max-width: 1000px) { .q-case-layout { grid-template-columns: 1fr; gap: 32px; } .q-case-toc { display: none; } }

.q-case-toc { position: sticky; top: 100px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); display: flex; flex-direction: column; gap: 4px; }
.q-case-toc a { display: block; padding: 10px 0; border-left: 1px solid var(--qd-paper-300); padding-left: 16px; color: var(--fg-3); cursor: pointer; transition: color var(--dur-fast), border-color var(--dur-fast); }
.q-case-toc a:hover, .q-case-toc a.active { color: var(--qd-navy-900); border-left-color: var(--qd-brass-500); }

.q-case-article { max-width: 720px; }
.q-case-article h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
  font-weight: 500; letter-spacing: -.015em; line-height: 1.15;
  color: var(--fg-1); margin: 0 0 24px; text-wrap: balance;
}
.q-case-article h2 .sec-num { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--qd-brass-700); font-size: 0.55em; margin-right: 14px; vertical-align: 0.25em; }
.q-case-article p { font-size: 18px; line-height: 1.75; color: var(--fg-1); margin: 0 0 22px; max-width: 64ch; font-weight: 400; }
.q-case-article p + p { margin-top: 0; }
.q-case-article .lede { font-size: 22px; line-height: 1.55; color: var(--fg-1); font-weight: 300; letter-spacing: -.005em; margin-bottom: 40px; max-width: 56ch; }
.q-case-article .section { padding: 64px 0; border-bottom: 1px solid var(--qd-paper-300); }
.q-case-article .section:first-child { padding-top: 0; }
.q-case-article .section:last-child { border-bottom: 0; }

/* Pullquote */
.q-pull {
  margin: 48px 0;
  padding: 32px 0 32px 32px;
  border-left: 2px solid var(--qd-brass-500);
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.35;
  color: var(--fg-1); text-wrap: balance;
}
.q-pull-by { font-family: var(--font-sans); font-style: normal; font-size: 13px; font-weight: 500; color: var(--fg-3); letter-spacing: .06em; margin-top: 18px; display: block; }
.q-pull-by .role { font-weight: 400; color: var(--fg-3); }

/* Numbered outcomes */
.q-outcomes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 32px; border-top: 1px solid var(--qd-paper-300); }
@media (max-width: 800px) { .q-outcomes { grid-template-columns: 1fr; } }
.q-outcome { padding: 32px 24px 32px 0; border-bottom: 1px solid var(--qd-paper-300); border-right: 1px solid var(--qd-paper-300); }
.q-outcome:last-child { border-right: 0; }
.q-outcome:not(:first-child) { padding-left: 24px; }
.q-outcome .n { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: clamp(2.5rem, 4vw, 3.25rem); color: var(--qd-brass-500); line-height: 1; }
.q-outcome .label { font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); margin: 14px 0 8px; }
.q-outcome .desc { font-size: 15px; line-height: 1.55; color: var(--fg-1); margin: 0; }

/* Deliverables list */
.q-case-article ul.deliver-list { list-style: none; padding: 0; margin: 32px 0 0; border-top: 1px solid var(--qd-paper-300); }
.q-case-article ul.deliver-list li {
  display: grid; grid-template-columns: 140px 1fr; gap: 32px; align-items: baseline;
  padding: 20px 0; border-bottom: 1px solid var(--qd-paper-300);
  font-size: 16px; line-height: 1.6; color: var(--fg-1);
}
@media (max-width: 720px) { .q-case-article ul.deliver-list li { grid-template-columns: 1fr; gap: 6px; } }
.q-case-article ul.deliver-list li .t { font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); padding-top: 3px; }

/* Case study: next */
.q-case-next { padding: 96px 0; background: var(--qd-navy-900); color: var(--fg-inverse); }
.q-case-next-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 40px; flex-wrap: wrap; gap: 16px; }
.q-case-next h3 { margin: 0; font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 300; letter-spacing: -.015em; color: var(--fg-inverse); }
.q-case-next-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .q-case-next-grid { grid-template-columns: 1fr; } }
.q-case-next-card {
  padding: 32px; border: 1px solid rgba(250,247,241,0.16); border-radius: 6px;
  cursor: pointer;
  transition: background var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out);
}
.q-case-next-card:hover { background: rgba(250,247,241,0.04); border-color: rgba(250,247,241,0.32); }
.q-case-next-card .tag { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--qd-brass-300); margin-bottom: 12px; font-weight: 500; }
.q-case-next-card h4 { margin: 0 0 10px; font-size: 1.5rem; font-weight: 500; color: var(--fg-inverse); }
.q-case-next-card p { margin: 0; font-size: 15px; line-height: 1.6; color: rgba(250,247,241,0.72); }

/* =====================================================================
   AI ADOPTION SERVICE PAGE
   ===================================================================== */

.q-svc-hero2 {
  background: var(--qd-navy-900); color: var(--fg-inverse);
  padding: 140px 0 120px; position: relative; overflow: hidden;
}
.q-svc-hero2::before {
  content:""; position:absolute; inset:0;
  background:
    radial-gradient(1000px 600px at 85% 30%, rgba(184,145,63,0.08), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(48,163,217,0.05), transparent 60%);
}
.q-svc-hero2-inner { position: relative; }
.q-svc-hero2 h1 {
  margin: 20px 0 32px;
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 300; line-height: 1.0; letter-spacing: -.03em;
  color: var(--fg-inverse); max-width: 14ch; text-wrap: balance;
}
.q-svc-hero2 h1 em { font-style: normal; font-weight: 600; }
.q-svc-hero2 .lede {
  font-size: 22px; line-height: 1.55; color: rgba(250,247,241,0.82);
  max-width: 54ch; margin: 0 0 40px; font-weight: 300;
}
.q-svc-hero2-meta {
  display: flex; gap: 48px; margin-top: 64px; padding-top: 28px;
  border-top: 1px solid rgba(250,247,241,0.16); flex-wrap: wrap;
}
.q-svc-hero2-meta > div { flex: 1 1 200px; min-width: 180px; }
.q-svc-hero2-meta dt { font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: rgba(250,247,241,0.55); margin: 0 0 8px; }
.q-svc-hero2-meta dd { margin: 0; font-size: 16px; color: var(--fg-inverse); font-weight: 400; line-height: 1.5; }

/* --- The situation band --- */
.q-situation { padding: 120px 0; background: var(--qd-paper-50); }
.q-situation-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 80px; align-items: start; }
@media (max-width: 900px) { .q-situation-grid { grid-template-columns: 1fr; gap: 40px; } }
.q-situation p { font-size: 20px; line-height: 1.65; color: var(--fg-1); margin: 0 0 22px; font-weight: 300; max-width: 56ch; }
.q-situation p strong { font-weight: 600; color: var(--fg-1); }

/* --- Foundations pull quote --- */
.q-foundations-quote { padding: 80px 0; background: var(--qd-navy-900); }
.q-foundations-quote-inner { display: grid; grid-template-columns: auto 1fr; gap: 48px; align-items: start; max-width: 820px; }
.q-foundations-quote-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: center top; flex-shrink: 0; margin-top: 6px; }
.q-foundations-quote-text { margin: 0 0 20px; padding: 0; border: none; font-family: Georgia, serif; font-style: italic; font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.6; color: var(--fg-inverse); font-weight: 400; }
.q-foundations-quote-attr { display: flex; align-items: center; gap: 12px; }
.q-foundations-quote-attr .name { font-size: 15px; font-weight: 600; color: var(--fg-inverse); }
.q-foundations-quote-attr .role { font-size: 14px; color: rgba(250,247,241,0.55); }
.q-foundations-quote-attr::before { content: '—'; color: #C9A55A; font-size: 15px; }
@media (max-width: 720px) { .q-foundations-quote-inner { grid-template-columns: 1fr; } .q-foundations-quote-photo { width: 56px; height: 56px; } }

/* --- Three entry states --- */
.q-entry-states { padding: 140px 0; background: var(--qd-paper-100); border-top: 1px solid var(--qd-paper-200); }
.q-entry-states .q-section-head h2 em { color: var(--qd-navy-900); }
.q-entry-list { display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--qd-paper-300); margin-top: 32px; }
.q-entry-item {
  display: grid; grid-template-columns: 180px 1fr 1.1fr; gap: 56px;
  padding: 56px 0; border-bottom: 1px solid var(--qd-paper-300);
  align-items: start;
}
@media (max-width: 900px) { .q-entry-item { grid-template-columns: 1fr; gap: 20px; padding: 40px 0; } }
.q-entry-num {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: clamp(3rem, 6vw, 5rem); color: var(--qd-brass-500); line-height: 1;
}
.q-entry-title { font-size: clamp(1.25rem, 2.2vw, 1.75rem); font-weight: 500; color: var(--fg-1); letter-spacing: -.01em; line-height: 1.25; text-wrap: balance; }
.q-entry-title .label { display: block; font-family: var(--font-sans); font-size: 11.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--qd-brass-700); margin-bottom: 14px; }
.q-entry-body p { font-size: 16px; line-height: 1.7; color: var(--fg-2); margin: 0 0 14px; max-width: 52ch; }
.q-entry-body p:last-child { margin-bottom: 0; }
.q-entry-body p em { font-style: normal; font-weight: 500; color: var(--fg-1); }

/* --- How it flows (process) --- */
.q-process { padding: 140px 0; background: var(--qd-navy-900); color: var(--fg-inverse); }
.q-process .q-section-head h2 { color: var(--fg-inverse); }
.q-process .q-section-head p { color: rgba(250,247,241,0.72); }
.q-process-phases {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid rgba(250,247,241,0.16);
  margin-top: 32px;
}
@media (max-width: 900px) { .q-process-phases { grid-template-columns: 1fr; } }
.q-phase {
  padding: 40px 32px 48px 32px;
  border-right: 1px solid rgba(250,247,241,0.12);
  position: relative;
}
.q-phase:first-child { padding-left: 0; }
.q-phase:last-child { border-right: 0; padding-right: 0; }
@media (max-width: 900px) { .q-phase { border-right: 0; border-bottom: 1px solid rgba(250,247,241,0.12); padding: 32px 0; } }
.q-phase .step { font-family: var(--font-serif); font-style: italic; color: var(--qd-brass-300); font-size: 15px; margin-bottom: 8px; }
.q-phase h4 { margin: 6px 0 14px; font-size: 1.25rem; font-weight: 500; color: var(--fg-inverse); letter-spacing: -.005em; }
.q-phase p { margin: 0; font-size: 14.5px; line-height: 1.65; color: rgba(250,247,241,0.72); max-width: 32ch; }

/* --- Entry offer card --- */
.q-offer { padding: 140px 0; background: var(--qd-paper-50); }
.q-offer-card {
  background: var(--qd-paper-100); border: 1px solid var(--qd-paper-300); border-top: 2px solid var(--qd-brass-500);
  border-radius: 6px; padding: 56px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
  align-items: start;
}
@media (max-width: 900px) { .q-offer-card { grid-template-columns: 1fr; gap: 32px; padding: 36px; } }
.q-offer-card h3 { margin: 12px 0 16px; font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 400; letter-spacing: -.015em; color: var(--fg-1); text-wrap: balance; }
.q-offer-card .what { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--qd-brass-700); font-weight: 500; }
.q-offer-card > div > p { font-size: 17px; line-height: 1.65; color: var(--fg-2); margin: 0 0 16px; max-width: 44ch; }
.q-offer-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--qd-paper-300); }
.q-offer-specs dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); margin: 0 0 6px; font-weight: 500; }
.q-offer-specs dd { margin: 0; font-size: 15px; color: var(--fg-1); font-weight: 500; }
.q-offer-includes { list-style: none; padding: 0; margin: 0 0 32px; }
.q-offer-includes li { display: grid; grid-template-columns: 16px 1fr; gap: 14px; padding: 10px 0; font-size: 15px; color: var(--fg-1); line-height: 1.55; border-bottom: 1px solid var(--qd-paper-200); }
.q-offer-includes li:last-child { border-bottom: 0; }
.q-offer-includes li::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--qd-brass-500); margin-top: 9px; }

/* --- FAQ --- */
.q-faq { padding: 120px 0 140px; background: var(--qd-paper-100); border-top: 1px solid var(--qd-paper-200); }
.q-faq-list { border-top: 1px solid var(--qd-paper-300); margin-top: 32px; }
.q-faq-item { padding: 28px 0; border-bottom: 1px solid var(--qd-paper-300); display: grid; grid-template-columns: 1fr 2fr; gap: 48px; align-items: start; }
@media (max-width: 800px) { .q-faq-item { grid-template-columns: 1fr; gap: 10px; } }
.q-faq-item .q { font-size: 18px; font-weight: 500; color: var(--fg-1); line-height: 1.4; max-width: 28ch; letter-spacing: -.005em; text-wrap: balance; }
.q-faq-item .a { font-size: 16px; line-height: 1.65; color: var(--fg-2); max-width: 58ch; }

/* --- CTA band --- */
.q-svc-cta {
  padding: 120px 0;
  background: var(--qd-navy-900); color: var(--fg-inverse);
  border-top: 1px solid var(--qd-paper-300);
}
.q-svc-cta-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 80px; align-items: end; }
@media (max-width: 900px) { .q-svc-cta-inner { grid-template-columns: 1fr; gap: 32px; } }
.q-svc-cta h2 { margin: 18px 0 0; font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 300; line-height: 1.08; letter-spacing: -.02em; color: var(--fg-inverse); max-width: 22ch; text-wrap: balance; }
.q-svc-cta h2 em { font-style: normal; font-weight: 600; }
.q-svc-cta p { font-size: 17px; line-height: 1.65; color: rgba(250,247,241,0.72); margin: 24px 0 0; max-width: 48ch; }

/* ============================================================
   TECH STACK LAYERS (FoundationsTechnologyPage)
   ============================================================ */
.q-tech-stack {
  background: var(--qd-navy-900);
  padding: 100px 0 110px;
  color: var(--fg-inverse);
}
.q-tech-stack .q-section-head { max-width: 600px; margin-bottom: 56px; }
.q-tech-stack .q-section-head h2 {
  margin: 8px 0 16px;
  color: var(--fg-inverse);
  font-weight: 300;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -.02em;
}
.q-tech-stack .q-section-head h2 em { font-style: normal; font-weight: 600; }
.q-tech-stack .q-section-head p { color: rgba(250,247,241,0.65); font-size: 16px; line-height: 1.65; }
.q-tech-layers { border-top: 1px solid rgba(250,247,241,0.1); }
.q-tech-layer {
  display: grid;
  grid-template-columns: 160px 1fr 220px;
  gap: 40px;
  align-items: start;
  padding: 32px 0;
  border-bottom: 1px solid rgba(250,247,241,0.1);
}
@media (max-width: 960px) {
  .q-tech-layer { grid-template-columns: 120px 1fr; }
  .q-tech-layer-caps { grid-column: 2; }
}
@media (max-width: 640px) {
  .q-tech-layer { grid-template-columns: 1fr; gap: 12px; }
  .q-tech-layer-caps { grid-column: 1; }
}
.q-tech-layer-id { display: flex; flex-direction: column; gap: 4px; padding-top: 2px; }
.q-tech-layer-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 2rem;
  line-height: 1;
  color: var(--qd-brass-300);
}
.q-tech-layer-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(250,247,241,0.35);
}
.q-tech-layer-body { padding-top: 2px; }
.q-tech-layer-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--fg-inverse);
  margin-bottom: 8px;
  letter-spacing: -.01em;
}
.q-tech-layer-desc {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(250,247,241,0.6);
  max-width: 44ch;
}
.q-tech-layer-caps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
}
.q-tech-cap {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  color: rgba(250,247,241,0.55);
  border: 1px solid rgba(250,247,241,0.14);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  white-space: nowrap;
}

/* ============================================================
   AI MATURITY SPECTRUM (FoundationsAIPage)
   ============================================================ */
.q-ai-maturity {
  background: var(--qd-paper-100);
  padding: 100px 0 110px;
  border-top: 1px solid var(--qd-paper-200);
  border-bottom: 1px solid var(--qd-paper-200);
}
.q-ai-maturity .q-section-head { max-width: 520px; margin-bottom: 40px; }
.q-ai-maturity .q-section-head h2 { margin-top: 8px; }
.q-maturity-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  position: relative;
  gap: 0;
}
.q-maturity-rail {
  position: absolute;
  top: 15px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--qd-paper-300);
  z-index: 0;
}
.q-maturity-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 12px;
  position: relative;
  z-index: 1;
}
.q-maturity-node {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--qd-paper-300);
  background: var(--qd-paper-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--fg-3);
  margin-bottom: 20px;
  flex-shrink: 0;
  transition: background 1.2s ease, border-color 1.2s ease, color 1.2s ease, box-shadow 1.2s ease;
}
.q-maturity-stage--active .q-maturity-node {
  background: var(--qd-navy-900);
  border-color: var(--qd-navy-900);
  color: var(--fg-inverse);
  box-shadow: 0 0 0 4px var(--qd-paper-100), 0 0 0 5px rgba(11,31,51,0.15);
}
.q-maturity-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-3);
  letter-spacing: .01em;
  margin-bottom: 8px;
  line-height: 1.3;
  transition: color 1.2s ease;
}
.q-maturity-stage--active .q-maturity-label { color: var(--fg-1); }
.q-maturity-desc {
  font-size: 14px;
  color: var(--fg-3);
  line-height: 1.55;
  transition: color 1.2s ease;
}
.q-maturity-stage--active .q-maturity-desc { color: var(--fg-2); }
.q-maturity-context {
  margin-top: 44px;
  max-width: 600px;
  font-size: 15px;
  color: var(--fg-2);
  line-height: 1.75;
}
.q-maturity-context p + p { margin-top: 16px; }
.q-maturity-rail-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 1px;
  background: var(--qd-navy-900);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (max-width: 800px) {
  .q-maturity-track { grid-template-columns: 1fr; }
  .q-maturity-rail { display: none; }
  .q-maturity-stage {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    padding: 18px 0;
    border-bottom: 1px solid var(--qd-paper-200);
    gap: 18px;
  }
  .q-maturity-stage:last-child { border-bottom: 0; }
  .q-maturity-node { margin-bottom: 0; flex-shrink: 0; }
  .q-maturity-content { padding-top: 5px; }
}

/* ============================================================
   INSIGHTS PAGE
   ============================================================ */

/* --- Masthead header --- */
.q-insights-header {
  background: var(--qd-paper-100);
  padding: 100px 0 72px;
  border-bottom: 1px solid var(--qd-paper-300);
}
.q-insights-header-inner {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: end;
}
@media (max-width: 800px) { .q-insights-header-inner { grid-template-columns: 1fr; gap: 28px; } }
.q-insights-title {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: clamp(4rem, 9vw, 7.5rem); line-height: 1; letter-spacing: -.03em;
  color: var(--fg-1); margin: 10px 0 0;
}
.q-insights-descriptor {
  font-size: 18px; line-height: 1.65; color: var(--fg-2);
  max-width: 52ch; margin: 0; padding-bottom: 6px;
}

/* --- Featured piece --- */
.q-insights-featured { background: var(--qd-paper-100); padding: 56px 0 80px; }
.q-feat-card {
  background: var(--qd-navy-900);
  border-radius: 4px; padding: 56px 64px 56px;
  display: grid; grid-template-columns: 1fr;
}
@media (max-width: 800px) { .q-feat-card { padding: 36px 28px 40px; } }
.q-feat-card-label {
  display: flex; align-items: center; gap: 10px; margin-bottom: 28px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
}
.q-feat-card-label .cat { color: var(--qd-brass-400, #c9a85c); }
.q-feat-card-label .sep { color: rgba(250,247,241,0.3); }
.q-feat-card-label .date, .q-feat-card-label .rt { color: rgba(250,247,241,0.5); }
.q-feat-card-title {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.9rem, 3.8vw, 3.2rem); line-height: 1.12; letter-spacing: -.02em;
  color: var(--fg-inverse); margin: 0 0 28px; max-width: 26ch;
}
.q-feat-card-excerpt {
  font-size: 17px; line-height: 1.7; color: rgba(250,247,241,0.68);
  max-width: 62ch; margin: 0 0 36px;
}
.q-feat-card-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--fg-inverse); cursor: pointer; opacity: 0.9;
  border-bottom: 1px solid rgba(250,247,241,0.3); padding-bottom: 2px;
  transition: opacity var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.q-feat-card-link:hover { opacity: 1; border-bottom-color: rgba(250,247,241,0.8); }

/* --- Archive grid --- */
.q-insights-archive { background: var(--qd-paper-100); padding: 0 0 120px; }
.q-insights-archive-head { padding-bottom: 32px; border-bottom: 1px solid var(--qd-paper-300); margin-bottom: 0; }
.q-insights-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-left: 1px solid var(--qd-paper-300);
}
@media (max-width: 1000px) { .q-insights-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .q-insights-grid { grid-template-columns: 1fr; } }

.q-insight-card {
  padding: 36px 36px 32px;
  border-right: 1px solid var(--qd-paper-300);
  border-bottom: 1px solid var(--qd-paper-300);
  display: flex; flex-direction: column; gap: 0;
  cursor: pointer;
  transition: background var(--dur-med) var(--ease-out);
}
.q-insight-card:hover { background: var(--qd-paper-200); }
.q-insight-card-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 16px;
}
.q-insight-card-meta .cat {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
  color: var(--qd-brass-700);
}
.q-insight-card-meta .date { font-size: 11px; color: var(--fg-3); letter-spacing: .04em; }
.q-insight-card-title {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.25; letter-spacing: -.01em;
  color: var(--fg-1); margin: 0 0 14px;
}
.q-insight-card-excerpt {
  font-size: 14px; line-height: 1.65; color: var(--fg-2);
  margin: 0 0 24px; flex: 1;
}
.q-insight-card-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--fg-1); cursor: pointer;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: border-color var(--dur-fast) var(--ease-out);
  align-self: flex-start; margin-top: auto;
}
.q-insight-card:hover .q-insight-card-link { border-bottom-color: var(--fg-1); }

/* --- Insights CTA --- */
.q-insights-cta {
  padding: 100px 0; background: var(--qd-paper-200);
  border-top: 1px solid var(--qd-paper-300);
}
.q-insights-cta-inner {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 80px; align-items: start;
}
@media (max-width: 900px) { .q-insights-cta-inner { grid-template-columns: 1fr; gap: 32px; } }
.q-insights-cta h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 300; line-height: 1.12;
  letter-spacing: -.02em; color: var(--fg-1); margin: 12px 0 0; max-width: 26ch; text-wrap: balance;
}
.q-insights-cta h2 em { font-style: normal; font-weight: 600; }

/* --- Email capture form --- */
.q-email-capture { margin-top: 28px; }
.q-email-capture-row { display: flex; gap: 0; max-width: 420px; }
.q-email-capture-input {
  flex: 1; padding: 11px 16px;
  font-size: 15px; font-family: var(--font-sans); color: var(--fg-1);
  background: var(--qd-paper-50); border: 1px solid var(--qd-paper-400);
  border-right: none; border-radius: 3px 0 0 3px;
  outline: none; transition: border-color var(--dur-fast);
}
.q-email-capture-input:focus { border-color: var(--qd-navy-900); }
.q-email-capture-input::placeholder { color: var(--fg-3); }
.q-email-capture-btn {
  padding: 11px 20px; font-size: 13px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; font-family: var(--font-sans);
  background: var(--qd-navy-900); color: var(--fg-inverse);
  border: 1px solid var(--qd-navy-900); border-radius: 0 3px 3px 0;
  cursor: pointer; white-space: nowrap;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.q-email-capture-btn:hover { background: var(--qd-navy-700); border-color: var(--qd-navy-700); }
.q-email-capture-btn:disabled { opacity: 0.6; cursor: default; }
.q-email-capture-error {
  margin-top: 10px; font-size: 13px; color: #c0392b;
}
.q-email-capture-success {
  margin-top: 28px; font-size: 15px; line-height: 1.6;
  color: var(--fg-2); max-width: 38ch;
}
@media (max-width: 500px) {
  .q-email-capture-row { flex-direction: column; }
  .q-email-capture-input { border-right: 1px solid var(--qd-paper-400); border-bottom: none; border-radius: 3px 3px 0 0; }
  .q-email-capture-btn { border-radius: 0 0 3px 3px; }
}

/* ============================================================
   COMPASS WIDGET
   ============================================================ */
@keyframes compassFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.q-compass-lbl-active { animation: compassFadeIn 0.65s ease forwards; }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */

/* --- Header --- */
.q-art-header {
  background: var(--qd-navy-900); color: var(--fg-inverse);
  padding: 0 0 80px;
}
.q-art-header-inner { padding-top: 100px; max-width: 820px; }
.q-art-crumb {
  display: flex; align-items: center; gap: 10px; margin-bottom: 32px;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500;
  color: rgba(250,247,241,0.45);
}
.q-art-crumb-link { color: rgba(250,247,241,0.6); cursor: pointer; transition: color var(--dur-fast) var(--ease-out); }
.q-art-crumb-link:hover { color: var(--fg-inverse); }
.q-art-h1 {
  font-family: var(--font-serif); font-weight: 400; font-style: normal;
  font-size: clamp(2rem, 4.5vw, 3.8rem); line-height: 1.1; letter-spacing: -.025em;
  color: var(--fg-inverse); margin: 0 0 36px;
}
.q-art-h1 em { font-style: italic; font-weight: 400; }
.q-art-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: rgba(250,247,241,0.5); letter-spacing: .04em;
}
.q-art-meta .author { color: rgba(250,247,241,0.75); font-weight: 500; }
.q-art-meta .sep { opacity: 0.4; }

/* --- Body --- */
.q-art-body { background: var(--qd-paper-100); padding: 80px 0 0; }

/* Two-column layout: TOC sidebar + content */
.q-art-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 72px;
  align-items: start;
}
@media (max-width: 960px) {
  .q-art-layout { grid-template-columns: 1fr; }
  .q-art-toc { display: none; }
}

/* Sticky TOC */
.q-art-toc { position: sticky; top: 108px; }
.q-art-toc-label {
  font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--fg-3); margin-bottom: 18px;
}
.q-art-toc-list { list-style: none; margin: 0; padding: 0; }
.q-art-toc-item { margin: 0; }
.q-art-toc-item a {
  display: flex; gap: 12px; align-items: baseline;
  padding: 9px 0; cursor: pointer;
  border-top: 1px solid var(--qd-paper-300);
  text-decoration: none;
}
.q-art-toc-item .num {
  font-family: var(--font-serif); font-style: italic;
  font-size: 12px; color: var(--qd-brass-700);
  flex-shrink: 0; min-width: 20px;
}
.q-art-toc-item .text {
  font-size: 12px; line-height: 1.4; color: var(--fg-3);
  transition: color var(--dur-fast) var(--ease-out);
}
.q-art-toc-item.is-active .text { color: var(--fg-1); font-weight: 500; }
.q-art-toc-item:hover .text { color: var(--fg-2); }

.q-art-content {
  max-width: 720px;
  margin: 0;
}
.q-art-layout .q-art-pull { margin-left: 0; }
.q-art-layout .q-art-pull--right { margin-right: 0; }

/* Running text */
.q-art-content p { font-size: 18px; line-height: 1.75; color: var(--fg-1); margin: 0 0 24px; }
.q-art-lede {
  font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.65; color: var(--fg-1);
  font-weight: 400; margin-bottom: 36px !important;
  padding-bottom: 36px; border-bottom: 1px solid var(--qd-paper-300);
}

/* Section headers */
.q-art-section { margin: 56px 0 0; }
.q-art-section-label {
  font-family: var(--font-serif); font-style: italic; color: var(--qd-brass-700);
  font-size: 15px; margin-bottom: 10px;
}
.q-art-section h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-weight: 500; letter-spacing: -.015em;
  line-height: 1.2; color: var(--fg-1); margin: 0 0 24px;
}
.q-art-closing { padding-bottom: 0; border-top: 1px solid var(--qd-paper-300); padding-top: 40px; margin-top: 56px; }

/* Pull quotes */
.q-art-pull {
  margin: 48px -64px;
  padding: 0 0 0 32px;
  border-left: 3px solid var(--qd-brass-700);
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem); line-height: 1.45; letter-spacing: -.01em;
  color: var(--fg-1);
}
.q-art-pull--right {
  margin: 48px -64px 48px auto;
  padding: 0 32px 0 0;
  border-left: none; border-right: 3px solid var(--qd-brass-700);
  text-align: right;
}
@media (max-width: 900px) { .q-art-pull, .q-art-pull--right { margin-left: 0; margin-right: 0; } }

/* Numbered callout block */
.q-art-callout {
  background: var(--qd-paper-200);
  border: 1px solid var(--qd-paper-300);
  border-radius: 4px;
  padding: 40px 44px;
  margin: 40px 0;
}
.q-art-callout-items { display: flex; flex-direction: column; gap: 32px; }
.q-art-callout-item { display: grid; grid-template-columns: 36px 1fr; gap: 20px; align-items: start; }
.q-art-callout-item .n {
  font-family: var(--font-serif); font-style: italic; color: var(--qd-brass-700);
  font-size: 18px; padding-top: 2px;
}
.q-art-callout-item strong { font-size: 16px; font-weight: 600; color: var(--fg-1); display: block; margin-bottom: 6px; }
.q-art-callout-item p { font-size: 15px; line-height: 1.65; color: var(--fg-2); margin: 0; }

/* Stat breakout */
.q-art-stat {
  background: var(--qd-navy-900);
  border-radius: 4px;
  padding: 48px 52px;
  margin: 48px 0;
}
.q-art-stat-inner { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
@media (max-width: 700px) { .q-art-stat-inner { grid-template-columns: 1fr; gap: 20px; } }
.q-art-stat-num {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(3.5rem, 7vw, 5.5rem); line-height: 1; letter-spacing: -.03em;
  color: var(--qd-brass-400, #c9a85c);
}
.q-art-stat-body { font-size: 17px; line-height: 1.65; color: rgba(250,247,241,0.8); }
.q-art-stat-body strong { color: var(--fg-inverse); font-weight: 600; }

/* Aside */
.q-art-aside {
  background: var(--qd-paper-200);
  border-left: 3px solid var(--qd-slate-400, #8a9ab0);
  padding: 24px 28px;
  margin: 36px 0;
  border-radius: 0 4px 4px 0;
}
.q-art-aside-label {
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--fg-3); margin-bottom: 10px;
}
.q-art-aside p { font-size: 15px; line-height: 1.65; color: var(--fg-2); margin: 0; }

/* Inline author avatars in header meta */
.q-art-avatars-inline {
  display: flex; align-items: center; margin-right: 4px;
}
.q-art-avatar-sm {
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
  object-fit: cover; object-position: center top;
  border: 1.5px solid rgba(250,247,241,0.25);
}
.q-art-avatars-inline .q-art-avatar-sm:not(:first-child) { margin-left: -7px; }

/* Author block at bottom */
.q-art-authors {
  margin: 64px 0 0; padding: 0 0 64px;
}
.q-art-author-entry {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 32px 0; border-top: 1px solid var(--qd-paper-300);
}
.q-art-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; object-position: center top;
  border: 1px solid var(--qd-paper-300);
}
.q-art-author-name {
  font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--fg-1); margin-bottom: 10px;
}
.q-art-author-entry p { font-size: 15px; line-height: 1.65; color: var(--fg-2); margin: 0; }

/* Footer nav */
.q-art-footer-nav {
  background: var(--qd-paper-200);
  border-top: 1px solid var(--qd-paper-300);
  padding: 60px 0;
}
.q-art-footer-nav-inner {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 40px;
  flex-wrap: wrap;
}
.q-art-back {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--fg-1); border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.q-art-back:hover { border-bottom-color: var(--fg-1); }
.q-art-footer-cta .label { font-size: 14px; color: var(--fg-2); }
.q-insights-cta p { font-size: 17px; line-height: 1.65; color: var(--fg-2); margin: 0; max-width: 46ch; }

/* Chat animation component */
.q-chat-animation { margin-bottom: 80px; height: 7rem; overflow: hidden; }
.q-chat-text {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  color: var(--qd-navy-900);
  line-height: 1.3;
  font-weight: 400;
  font-style: italic;
  max-width: 22ch;
}
.q-chat-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--qd-brass-500);
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: chat-cursor-blink 1s step-end infinite;
}
@keyframes chat-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Foundations sticky section nav */
.q-section-nav {
  position: sticky;
  top: 64px;
  z-index: 40;
  background: var(--qd-paper-50);
  border-bottom: 1px solid var(--qd-paper-300);
}
.q-section-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
}
.q-section-nav-back {
  font-size: 11.5px; font-weight: 500; letter-spacing: .06em;
  color: var(--qd-slate-400); background: none; border: none; padding: 0;
  cursor: pointer; transition: color var(--dur-fast);
}
.q-section-nav-back:hover { color: var(--qd-navy-900); }
.q-section-nav-tabs { display: flex; gap: 24px; align-items: center; height: 100%; }
.q-section-nav-tab {
  font-size: 11.5px; font-weight: 500; letter-spacing: .04em;
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: 0; height: 100%; color: var(--qd-slate-400); cursor: pointer;
  transition: color var(--dur-fast), border-color var(--dur-fast);
  display: flex; align-items: center;
}
.q-section-nav-tab:hover { color: var(--qd-navy-900); }
.q-section-nav-tab.active { color: var(--qd-navy-900); border-bottom-color: var(--qd-brass-500); cursor: default; }

/* Clickable eyebrow parent link */
.q-eyebrow-link { cursor: pointer; opacity: 0.75; text-decoration: underline; text-decoration-color: transparent; transition: opacity var(--dur-fast), text-decoration-color var(--dur-fast); }
.q-eyebrow-link:hover { opacity: 1; text-decoration-color: currentColor; }

/* Entry item click affordance */
.q-entry-item { transition: background var(--dur-fast); }
.q-entry-item:hover { background: var(--qd-paper-100); }
.q-entry-arrow {
  display: block; margin-top: 20px;
  color: var(--qd-slate-400);
  transition: transform var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out);
}
.q-entry-arrow .arrow { width: 20px; height: 20px; }
.q-entry-item:hover .q-entry-arrow { transform: translateX(6px); color: var(--qd-navy-900); }

/* ============================================================
   WORK INDEX PAGE
   ============================================================ */

/* --- Light hero (breaks from navy pattern) --- */
.q-work-hero {
  background: var(--qd-paper-50);
  padding: 0 0 96px;
  border-bottom: 1px solid var(--qd-paper-300);
}
.q-work-hero-inner { padding-top: 120px; }
.q-work-hero h1 {
  margin: 16px 0 28px;
  font-size: clamp(2.4rem, 5vw, 4.25rem);
  font-weight: 300; line-height: 1.06; letter-spacing: -.025em;
  color: var(--fg-1); max-width: 22ch; text-wrap: balance;
}
.q-work-hero h1 em { font-style: normal; font-weight: 600; }
.q-work-hero .lede { font-size: 17px; line-height: 1.7; color: var(--fg-2); }

/* --- Case grid --- */
.q-work-cases { padding: 80px 0; background: var(--qd-paper-50); }
.q-work-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px;
}
@media (max-width: 760px) { .q-work-grid { grid-template-columns: 1fr; } }

.q-work-card {
  cursor: pointer; background: var(--qd-paper-100);
  display: flex; flex-direction: column;
  transition: background var(--dur-med) var(--ease-out);
}
.q-work-card:hover { background: var(--qd-paper-200); }

.q-work-card-image {
  aspect-ratio: 16/10; background-size: cover; background-position: center;
  background-color: var(--qd-navy-900);
  position: relative; overflow: hidden;
}
.q-work-card-image::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(11,31,51,0.35) 100%);
}
.q-work-card-tag {
  position: absolute; bottom: 14px; left: 16px; z-index: 1;
  font-size: 10.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(250,247,241,0.85);
}

.q-work-card-body { padding: 28px 32px 32px; flex: 1; display: flex; flex-direction: column; }
.q-work-card-client {
  font-size: 1.25rem; font-weight: 500; letter-spacing: -.01em;
  color: var(--fg-1); margin: 0 0 10px;
}
.q-work-card-desc {
  font-size: 15px; line-height: 1.65; color: var(--fg-2);
  margin: 0 0 24px; flex: 1;
}
.q-work-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.q-work-card-services { display: flex; gap: 6px; flex-wrap: wrap; }
.q-work-card-svc {
  font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--qd-brass-700); border: 1px solid var(--qd-brass-400); border-radius: 2px;
  padding: 3px 8px;
}
.q-work-card-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--fg-1); white-space: nowrap;
  transition: gap var(--dur-fast) var(--ease-out);
}
.q-work-card:hover .q-work-card-link { gap: 10px; }
.q-work-card:hover .q-work-card-link .arrow { transform: translateX(2px); }

/* --- Logo field --- */
.q-work-logos { padding: 96px 0; background: var(--qd-paper-100); border-top: 1px solid var(--qd-paper-300); border-bottom: 1px solid var(--qd-paper-300); }
.q-work-logos-label {
  text-align: center; font-size: 11px; font-weight: 500; letter-spacing: .18em;
  text-transform: uppercase; color: var(--fg-3); margin-bottom: 56px;
}
.q-work-logos-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 48px 56px;
  align-items: center; justify-items: center;
}
@media (max-width: 700px) { .q-work-logos-grid { grid-template-columns: repeat(2, 1fr); gap: 36px 32px; } }
.q-work-logo {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 18px; color: var(--qd-slate-700); opacity: 0.45;
  letter-spacing: -.01em; text-align: center;
  transition: opacity var(--dur-med) var(--ease-out);
}
.q-work-logo:hover { opacity: 0.85; }


/* ============================================================
   Mega menu system
   ============================================================ */

/* Panel-open: force solid navy on the nav bar */
.q-nav.panel-open {
  background: var(--qd-navy-900) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom-color: transparent !important;
  color: var(--fg-inverse) !important;
}

/* Mobile menu-open: navy drawer, not paper */
.q-nav.menu-open {
  background: var(--qd-navy-900) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom-color: rgba(250,247,241,0.12) !important;
  color: var(--fg-inverse) !important;
  position: fixed; width: 100%; z-index: 200;
}

/* The panel itself */
.q-mega-panel {
  background: var(--qd-navy-800);
  border-top: 0.5px solid rgba(250,247,241,0.12);
  padding: 36px 0 44px;
  color: var(--fg-inverse);
  animation: megaFadeIn 160ms ease forwards;
}

@keyframes megaFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Backdrop dims the page */
.q-mega-backdrop {
  position: fixed; inset: 0; z-index: 49;
  background: rgba(11,31,51,0.55);
  cursor: default;
}

/* Shared label style */
.q-mega-col-label {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--qd-brass-500);
  margin-bottom: 16px;
}

/* Shared "view all" link */
.q-mega-all-link {
  display: inline-block;
  font-size: 12px; font-weight: 500;
  color: var(--qd-brass-500); cursor: pointer;
  transition: color 140ms ease;
}
.q-mega-all-link:hover { color: var(--qd-brass-300); }

/* Two-column layout (Insights, Team, Contact) */
.q-mega-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

/* ── What We Do panel ── */
.q-mega-panel-inner { width: 100%; }

.q-mega-wwdo {
  display: flex;
  gap: 0;
  align-items: flex-start;
}

.q-mega-markets {
  width: 230px; flex-shrink: 0;
  border-right: 0.5px solid rgba(250,247,241,0.12);
  padding-right: 28px; margin-right: 32px;
}

.q-mega-market-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border-left: 2px solid transparent;
  border-radius: 0 2px 2px 0;
  cursor: pointer;
  transition: border-color 130ms ease, background 130ms ease;
  margin-bottom: 3px;
}
.q-mega-market-item:hover,
.q-mega-market-item.active {
  border-left-color: var(--qd-brass-500);
  background: rgba(250,247,241,0.05);
}

.q-mega-market-name {
  font-size: 13px; font-weight: 500;
  color: var(--fg-inverse); margin-bottom: 2px;
}
.q-mega-market-sub {
  font-size: 11px; color: rgba(250,247,241,0.48);
}
.q-mega-market-chev {
  color: var(--qd-brass-500); font-size: 16px;
  flex-shrink: 0; margin-left: 8px;
  transition: transform 120ms ease;
}
.q-mega-market-item:hover .q-mega-market-chev,
.q-mega-market-item.active .q-mega-market-chev {
  transform: translateX(2px);
}

.q-mega-market-detail { flex: 1; min-width: 0; }

/* Overview card */
.q-mega-overview-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(250,247,241,0.05);
  border: 0.5px solid rgba(184,145,63,0.38);
  border-radius: 3px;
  padding: 14px 18px;
  cursor: pointer; margin-bottom: 22px;
  transition: background 130ms ease, border-color 130ms ease;
}
.q-mega-overview-card:hover {
  background: rgba(250,247,241,0.09);
  border-color: rgba(184,145,63,0.7);
}
.q-mega-overview-eyebrow {
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--qd-brass-500); margin-bottom: 3px;
}
.q-mega-overview-title {
  font-size: 14px; font-weight: 500;
  color: var(--fg-inverse); margin-bottom: 3px;
}
.q-mega-overview-desc { font-size: 12px; color: rgba(250,247,241,0.58); }
.q-mega-overview-arrow {
  color: var(--qd-brass-500); font-size: 18px; flex-shrink: 0;
}

.q-mega-services-label {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(250,247,241,0.38); margin-bottom: 10px;
}

.q-mega-services { display: flex; flex-direction: column; gap: 2px; }

.q-mega-service-item {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 12px;
  border-left: 2px solid transparent;
  border-radius: 0 2px 2px 0;
  cursor: pointer;
  transition: border-color 130ms ease, background 130ms ease;
}
.q-mega-service-item:hover {
  border-left-color: var(--qd-brass-500);
  background: rgba(250,247,241,0.04);
}

.q-mega-svc-content { flex: 1; min-width: 0; }
.q-mega-svc-label {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--qd-brass-500); margin-bottom: 3px;
}
.q-mega-svc-desc { font-size: 12px; color: rgba(250,247,241,0.62); line-height: 1.4; }
.q-mega-svc-arrow {
  color: rgba(250,247,241,0.3); font-size: 15px; flex-shrink: 0; margin-left: auto;
  transition: color 130ms ease;
}
.q-mega-service-item:hover .q-mega-svc-arrow { color: var(--qd-brass-500); }

/* Footer strip */
.q-mega-footer-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin-top: 32px; padding-top: 20px;
  border-top: 0.5px solid rgba(250,247,241,0.1);
}
.q-mega-footer-text { font-size: 12px; color: rgba(250,247,241,0.45); }
.q-mega-footer-cta {
  font-size: 12px; font-weight: 500;
  color: var(--qd-brass-500); white-space: nowrap; cursor: pointer;
  transition: color 130ms ease;
}
.q-mega-footer-cta:hover { color: var(--qd-brass-300); }

/* ── Work panel ── */
.q-mega-work-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 0.5px solid rgba(250,247,241,0.1);
}
.q-mega-cases {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.q-mega-case-card {
  border: 0.5px solid rgba(250,247,241,0.12);
  border-radius: 3px; padding: 0; cursor: pointer; overflow: hidden;
  transition: border-color 130ms ease, background 130ms ease;
}
.q-mega-case-card:hover {
  border-color: var(--qd-brass-500);
  background: rgba(250,247,241,0.04);
}
.q-mega-case-thumb {
  width: 100%; height: 90px;
  background-size: cover; background-position: center;
  flex-shrink: 0;
}
.q-mega-case-body { padding: 14px 16px 16px; }
.q-mega-case-tag {
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--qd-brass-500); margin-bottom: 7px;
}
.q-mega-case-title {
  font-size: 13px; font-weight: 500;
  color: var(--fg-inverse); margin-bottom: 6px; line-height: 1.3;
}
.q-mega-case-desc { font-size: 12px; color: rgba(250,247,241,0.58); line-height: 1.45; }

/* ── Insights panel ── */
.q-mega-insight-item {
  padding: 10px 0;
  border-bottom: 0.5px solid rgba(250,247,241,0.09);
  cursor: pointer;
  transition: opacity 130ms ease;
}
.q-mega-insight-item:hover { opacity: 0.78; }
.q-mega-insight-tag {
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--qd-brass-500); margin-bottom: 4px;
}
.q-mega-insight-title {
  font-size: 12px; font-weight: 500;
  color: var(--fg-inverse); line-height: 1.35; margin-bottom: 4px;
}
.q-mega-insight-desc {
  font-size: 11px; color: rgba(250,247,241,0.55); line-height: 1.45; margin-bottom: 4px;
}
.q-mega-insight-date { font-size: 11px; color: rgba(250,247,241,0.4); }

/* ── Pull quote (Insights + Team) ── */
.q-mega-pullquote {
  border-left: 2px solid var(--qd-brass-500);
  background: rgba(250,247,241,0.04);
  padding: 16px 20px; border-radius: 0 3px 3px 0;
}
.q-mega-pullquote-text {
  font-family: Georgia, serif; font-style: italic;
  font-size: 13px; color: rgba(250,247,241,0.84);
  line-height: 1.6; margin-bottom: 10px;
}
.q-mega-pullquote-attr {
  font-size: 11px; font-weight: 500; color: var(--qd-brass-500);
}

/* ── Team panel ── */
.q-mega-team-member {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px;
  border: 0.5px solid rgba(250,247,241,0.1);
  border-radius: 3px; margin-bottom: 6px; cursor: pointer;
  transition: border-color 130ms ease, background 130ms ease;
}
.q-mega-team-member:hover {
  border-color: rgba(184,145,63,0.5);
  background: rgba(250,247,241,0.04);
}
.q-mega-team-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(184,145,63,0.14); color: var(--qd-brass-300);
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.q-mega-team-name { font-size: 13px; font-weight: 500; color: var(--fg-inverse); }
.q-mega-team-role { font-size: 11px; color: rgba(250,247,241,0.48); margin-top: 1px; }

/* ── Contact panel ── */
.q-mega-contact-headline {
  font-size: 16px; font-weight: 500;
  color: var(--fg-inverse); line-height: 1.35; margin-bottom: 12px;
}
.q-mega-contact-sub {
  font-size: 13px; color: rgba(250,247,241,0.58);
  line-height: 1.5; margin-bottom: 22px;
}
.q-mega-contact-cta {
  display: inline-block;
  font-size: 13px; font-weight: 500;
  border: 0.5px solid rgba(250,247,241,0.38);
  color: var(--fg-inverse); padding: 10px 18px; border-radius: 3px;
  cursor: pointer; transition: border-color 130ms ease, background 130ms ease;
}
.q-mega-contact-cta:hover {
  border-color: rgba(250,247,241,0.72);
  background: rgba(250,247,241,0.06);
}
.q-mega-contact-details {
  display: flex; flex-direction: column; gap: 28px;
  padding-left: 36px;
  border-left: 0.5px solid rgba(250,247,241,0.12);
}
.q-mega-detail-label {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--qd-brass-500); margin-bottom: 4px;
}
.q-mega-detail-value {
  font-size: 14px; font-weight: 500;
  color: var(--fg-inverse); display: block; margin-bottom: 3px;
}
.q-mega-detail-link { cursor: pointer; transition: opacity 130ms ease; }
.q-mega-detail-link:hover { opacity: 0.72; }
.q-mega-detail-sub { font-size: 12px; color: rgba(250,247,241,0.45); }

/* ── Mobile overlay — navy theme ── */
.q-nav-overlay {
  background: var(--qd-navy-900) !important;
}
.q-nav-overlay-links a {
  color: var(--fg-inverse) !important;
}
.q-nav-overlay-links a:hover,
.q-nav-overlay-links a.active {
  color: rgba(250,247,241,0.65) !important;
}
.q-nav-overlay-links {
  border-top-color: rgba(250,247,241,0.12) !important;
}
.q-nav-overlay-links li {
  border-bottom-color: rgba(250,247,241,0.12) !important;
}
.q-nav-overlay-foot {
  border-top-color: rgba(250,247,241,0.12) !important;
}
.q-nav-overlay-email { color: var(--fg-inverse) !important; }
.q-nav-overlay-loc { color: rgba(250,247,241,0.45) !important; }

/* Mobile toggle indicator */
.q-mob-toggle {
  margin-left: auto; font-size: 20px; font-weight: 300;
  color: rgba(250,247,241,0.5); line-height: 1;
}

/* Mobile What We Do sub-section */
.q-mob-sub {
  padding: 4px 0 12px 32px;
}
.q-mob-market-group { margin-bottom: 2px; }
.q-mob-market {
  display: flex !important; align-items: center; justify-content: space-between;
  padding: 10px 0 !important;
  font-size: 1.2rem !important; font-weight: 400 !important;
  letter-spacing: -0.01em !important;
  color: var(--fg-inverse) !important;
  border-bottom: none !important; cursor: pointer;
}
.q-mob-services {
  padding: 4px 0 10px 16px;
  border-left: 2px solid rgba(184,145,63,0.4);
  margin-left: 4px; margin-bottom: 8px;
}
.q-mob-svc {
  display: block !important;
  font-size: 13px !important; font-weight: 500 !important;
  letter-spacing: 0.04em !important;
  color: var(--fg-inverse) !important;
  padding: 6px 12px !important;
  border-bottom: none !important; cursor: pointer;
  transition: color 130ms ease !important;
}
.q-mob-svc:hover { color: var(--fg-inverse) !important; }
.q-mob-svc.active { color: rgba(250,247,241,0.45) !important; cursor: default; }
.q-mob-svc--overview {
  color: var(--qd-brass-300) !important;
  font-size: 11px !important;
  letter-spacing: 0.1em !important; text-transform: uppercase !important;
  margin-bottom: 4px;
}
