/* ==========================================================================
   QDW · Shared site styles  (Editorial direction · V1)
   --------------------------------------------------------------------------
   Narrow column, hairlines, type does the work.
   Imports design-tokens.css.
   ========================================================================== */

@import url('design-tokens.css');

/* --- Reset & basics --- */
*, *::before, *::after { box-sizing: border-box; }
img, svg { display: block; max-width: 100%; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter Tight', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-off-black);
  background: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body.qdw-drawer-open { overflow: hidden; }

/* Override defaults from design-tokens.css */
h1, h2, h3, h4 { font-weight: 500; line-height: 1.1; letter-spacing: -0.4px; margin: 0; color: inherit; }
h1 { font-size: 64px; line-height: 1; letter-spacing: -2px; }
p { margin: 0; color: inherit; line-height: 1.65; }
a {
  color: inherit;
  text-decoration: none;
  border: none;
  border-bottom: none;
  padding-bottom: 0;
  transition: color 150ms ease, border-color 150ms ease;
}

::selection { background: var(--color-claret); color: var(--color-cream); }

/* ==========================================================================
   COLUMN — every page lives in a single 720px column
   ========================================================================== */
.qdw-col {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 640px) {
  .qdw-col { padding: 0 24px; }
}


/* ==========================================================================
   HEADER / NAV
   ========================================================================== */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 56px;
  border-bottom: 0.5px solid rgba(20,22,20,0.12);
  background: rgba(244,239,230,0.92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  position: sticky; top: 0; z-index: 100;
}
.bar__brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 500; letter-spacing: -0.6px; font-size: 22px;
  color: var(--color-off-black);
}
.bar__brand-mark {
  display: inline-block;
  width: 68px; height: 17px;
  overflow: visible;
  position: relative;
  flex: 0 0 auto;
  transform: translateY(1px);
}
.bar__brand-mark svg {
  width: 100%; height: 100%;
  overflow: visible;
}
.bar__brand-mark .qdw-axis{stroke:var(--color-claret);stroke-width:0.6;opacity:0.28}
.bar__brand-mark .qdw-bar{--i:0;fill:var(--color-claret);transform-box:view-box;transform-origin:0 8px;animation:qdw-bar-rise 560ms cubic-bezier(0.22,0.61,0.36,1) calc(320ms + var(--i) * 55ms) backwards}
.bar__brand-mark .qdw-bar:nth-of-type(1){--i:3}
.bar__brand-mark .qdw-bar:nth-of-type(2){--i:2}
.bar__brand-mark .qdw-bar:nth-of-type(3){--i:1}
.bar__brand-mark .qdw-bar:nth-of-type(4){--i:0}
.bar__brand-mark .qdw-bar:nth-of-type(5){--i:1}
.bar__brand-mark .qdw-bar:nth-of-type(6){--i:2}
.bar__brand-mark .qdw-bar:nth-of-type(7){--i:3}
@keyframes qdw-bar-rise{0%{transform:scaleY(1)}0.01%{transform:scaleY(0)}100%{transform:scaleY(1)}}

/* Hover: the packet is resampled — bars collapse to the midline and re-quantize */
.bar__brand:hover .qdw-bar{animation:qdw-bar-resample 720ms cubic-bezier(0.22,0.61,0.36,1) calc(var(--i) * 45ms) backwards}
@keyframes qdw-bar-resample{0%{transform:scaleY(1)}34%{transform:scaleY(0.14)}70%{transform:scaleY(1.2)}100%{transform:scaleY(1)}}
@media (prefers-reduced-motion: reduce){
  .bar__brand-mark .qdw-bar,.bar__brand:hover .qdw-bar{animation:none;transform:none}
}
.bar__nav {
  display: flex; gap: 32px;
  font-size: 13px; color: rgba(20,22,20,0.65);
}
.bar__nav a {
  position: relative;
  padding: 4px 0;
  color: rgba(20,22,20,0.65);
  transition: color 200ms ease;
}
.bar__nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--color-claret);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms cubic-bezier(0.22,0.61,0.36,1);
}
.bar__nav a:hover { color: var(--color-off-black); }
.bar__nav a:hover::after { transform: scaleX(1); }
.bar__nav a.is-current {
  color: var(--color-off-black);
}
.bar__nav a.is-current::after { transform: scaleX(1); }
.bar__cta {
  background: var(--color-claret);
  color: var(--color-cream);
  padding: 9px 16px;
  border-radius: 4px;
  font-size: 13px; font-weight: 500;
  transition: background 150ms ease, transform 150ms ease;
}
.bar__cta:hover { background: #581826; transform: translateY(-1px); }

/* mobile */
.bar__burger {
  display: none;
  background: transparent; border: none;
  width: 36px; height: 36px;
  padding: 0; cursor: pointer; position: relative;
  border-radius: 4px;
}
.bar__burger:hover { background: rgba(20,22,20,0.08); }
.bar__burger span {
  display: block; position: absolute; left: 9px;
  width: 18px; height: 1.5px; background: var(--color-off-black);
  border-radius: 1px;
  transition: transform 250ms ease, opacity 200ms ease, top 250ms ease;
}
.bar__burger span:nth-child(1) { top: 12px; }
.bar__burger span:nth-child(2) { top: 17.25px; }
.bar__burger span:nth-child(3) { top: 22.5px; }
.bar__burger[aria-expanded="true"] span:nth-child(1) { top: 17.25px; transform: rotate(45deg); }
.bar__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.bar__burger[aria-expanded="true"] span:nth-child(3) { top: 17.25px; transform: rotate(-45deg); }

@media (max-width: 767px) {
  .bar { padding: 16px 24px; gap: 12px; }
  .bar__nav { display: none; }
  .bar__burger { display: block; }
  .bar__cta { display: none; }
}

/* mobile drawer */
.qdw-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(20,22,20,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 250ms ease;
  z-index: 150;
}
.qdw-drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.qdw-drawer {
  position: fixed; top: 0; right: 0;
  height: 100dvh; width: min(86vw, 360px);
  background: var(--color-cream);
  border-left: 0.5px solid rgba(20,22,20,0.18);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(0.22,0.61,0.36,1);
  display: flex; flex-direction: column;
  padding: 80px 32px 32px;
  box-shadow: -20px 0 60px rgba(20,22,20,0.12);
}
.qdw-drawer.is-open { transform: translateX(0); }
.qdw-drawer__eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(20,22,20,0.55);
  margin: 0 0 20px;
}
.qdw-drawer__nav { list-style: none; margin: 0; padding: 0; }
.qdw-drawer__nav li { border-top: 0.5px solid rgba(20,22,20,0.12); }
.qdw-drawer__nav li:last-child { border-bottom: 0.5px solid rgba(20,22,20,0.12); }
.qdw-drawer__nav a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0;
  font-size: 22px; font-weight: 500; letter-spacing: -0.3px;
  color: var(--color-off-black);
  transition: color 150ms ease, padding 150ms ease;
}
.qdw-drawer__nav a:hover { color: var(--color-claret); padding-left: 4px; }
.qdw-drawer__nav a.is-current { color: var(--color-claret); }
.qdw-drawer__nav a::after {
  content: "→"; font-family: 'JetBrains Mono', monospace;
  font-size: 14px; color: rgba(20,22,20,0.55); font-weight: 400;
  transition: transform 150ms ease, color 150ms ease;
}
.qdw-drawer__nav a:hover::after { color: var(--color-claret); transform: translateX(4px); }
.qdw-drawer__cta {
  margin-top: 28px;
  background: var(--color-claret); color: var(--color-cream);
  padding: 14px; text-align: center;
  font-size: 14px; font-weight: 500; border-radius: 4px;
}
.qdw-drawer__foot {
  margin-top: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(20,22,20,0.55);
}


/* ==========================================================================
   PAGE HEAD (hero) — used on every page
   ========================================================================== */
.head { padding: 88px 0 64px; }
.head--lg { padding: 96px 0 80px; }
.head__eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(20,22,20,0.55);
  margin: 0 0 28px;
}
.head__h {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -2px;
  font-weight: 500;
  margin: 0 0 28px;
  text-wrap: balance;
}
.head__h em { font-style: normal; color: var(--color-claret); }
.head__sub {
  font-size: 19px;
  line-height: 1.5;
  color: rgba(20,22,20,0.7);
  max-width: 600px;
  margin: 0 0 36px;
}
.head__cta {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
@media (max-width: 480px) {
  .head__cta { flex-direction: column; align-items: stretch; gap: 8px; }
  .head__cta .btn-primary,
  .head__cta .btn-ghost {
    justify-content: center;
    width: 100%;
  }
  .head__cta .btn-ghost {
    border-bottom: none;
    padding: 14px 18px;
    border: 0.5px solid rgba(20,22,20,0.25);
    border-radius: 4px;
  }
}

@media (max-width: 640px) {
  .head { padding: 56px 0 40px; }
  .head--lg { padding: 64px 0 48px; }
  .head__h { font-size: 40px; letter-spacing: -1.2px; line-height: 1.02; }
  .head__sub { font-size: 17px; }
}


/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--color-claret); color: var(--color-cream);
  padding: 14px 22px;
  border: none; border-radius: 4px;
  font-family: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}
.btn-primary:hover { background: #581826; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--color-off-black);
  padding: 14px 18px;
  font-size: 14px; font-weight: 500;
  border-bottom: 0.5px solid rgba(20,22,20,0.4);
  padding-bottom: 4px;
  transition: color 150ms ease, border-color 150ms ease;
}
.btn-ghost:hover { color: var(--color-claret); border-bottom-color: var(--color-claret); }


/* ==========================================================================
   SECTIONS — vertical rhythm with hairlines between
   ========================================================================== */
.sec { padding: 64px 0; border-top: 0.5px solid rgba(20,22,20,0.12); }
.sec__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 40px; gap: 24px;
}
.sec__chap {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--color-claret);
  margin: 0;
}
.sec__h {
  font-size: 32px; line-height: 1.1; letter-spacing: -0.8px;
  font-weight: 500;
  margin: 8px 0 0;
  text-wrap: balance;
}
.sec__h--lg { font-size: 40px; letter-spacing: -1px; }
.sec__dek {
  font-size: 16px; line-height: 1.6;
  color: rgba(20,22,20,0.7);
  max-width: 600px;
  margin: 14px 0 0;
}

@media (max-width: 640px) {
  .sec { padding: 48px 0; }
  .sec__head { margin-bottom: 28px; }
  .sec__h { font-size: 26px; }
}


/* ==========================================================================
   NUMBERED LIST (offerings, principles, etc.)
   ========================================================================== */
.nlist { display: flex; flex-direction: column; }
.nlist__item {
  padding: 32px 0;
  border-top: 0.5px solid rgba(20,22,20,0.12);
}
.nlist__item:last-child { border-bottom: 0.5px solid rgba(20,22,20,0.12); }
.nlist__name {
  font-size: 22px; letter-spacing: -0.4px; font-weight: 500;
  margin: 0 0 10px;
}
.nlist__copy {
  font-size: 15px; line-height: 1.65;
  color: rgba(20,22,20,0.7);
  margin: 0 0 10px;
  max-width: 560px;
}
.nlist__detail {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.06em;
  color: rgba(20,22,20,0.55);
}

@media (max-width: 640px) {
  .nlist__item { padding: 24px 0; }
  .nlist__name { font-size: 20px; }
}


/* ==========================================================================
   CASE STUDY CARD
   ========================================================================== */
.cs {
  border: 0.5px solid rgba(20,22,20,0.12);
  background: white;
  border-radius: 4px;
  padding: 32px;
}
.cs + .cs { margin-top: 16px; }
.cs__meta {
  display: flex; gap: 24px; flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(20,22,20,0.55);
  padding-bottom: 18px; margin-bottom: 22px;
  border-bottom: 0.5px solid rgba(20,22,20,0.12);
}
.cs__meta strong {
  display: block;
  color: var(--color-off-black);
  font-family: 'Inter Tight', sans-serif;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  margin-top: 2px;
}
.cs__h {
  font-size: 22px; line-height: 1.25; letter-spacing: -0.4px;
  font-weight: 500;
  margin: 0 0 22px;
  max-width: 560px;
}
.cs__row {
  display: grid; grid-template-columns: 100px 1fr;
  gap: 14px 24px;
  font-size: 14px; line-height: 1.6;
  margin: 0 0 12px;
}
.cs__row dt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(20,22,20,0.55);
  padding-top: 3px;
}
.cs__row dd { margin: 0; color: var(--color-off-black); }
.cs__outcomes {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 0.5px solid rgba(20,22,20,0.12);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.cs__num {
  font-size: 24px; letter-spacing: -0.4px; font-weight: 500;
  color: var(--color-claret); line-height: 1;
  margin: 0 0 6px;
}
.cs__lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(20,22,20,0.55);
  line-height: 1.4;
}
@media (max-width: 640px) {
  .cs { padding: 24px; }
  .cs__row { grid-template-columns: 1fr; gap: 4px; }
  .cs__row dt { padding-top: 12px; }
  .cs__outcomes { grid-template-columns: 1fr; gap: 14px; }
  .cs__outcomes > div { padding: 12px 0; border-top: 0.5px solid rgba(20,22,20,0.08); }
  .cs__outcomes > div:first-child { border-top: none; padding-top: 0; }
}


/* ==========================================================================
   DARK CALLOUT (First Hour box, etc.)
   ========================================================================== */
.dark-card {
  background: var(--color-off-black); color: var(--color-cream);
  margin: 32px -32px 0;
  padding: 56px 56px 60px;
  border-radius: 4px;
}
.dark-card__chap {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(244,239,230,0.55);
  margin: 0 0 14px;
}
.dark-card__h {
  font-size: 36px; line-height: 1.05; letter-spacing: -1px; font-weight: 500;
  margin: 0 0 12px;
}
.dark-card__sub {
  font-size: 15px; color: rgba(244,239,230,0.65);
  margin: 0 0 36px;
}
.dark-steps { display: flex; flex-direction: column; }
.dark-step {
  display: grid; grid-template-columns: 80px 1fr;
  gap: 28px; padding: 20px 0;
  border-top: 0.5px solid rgba(244,239,230,0.18);
  align-items: start;
}
.dark-step__time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; letter-spacing: 0.04em;
  color: rgba(244,239,230,0.78);
  padding-top: 4px;
}
.dark-step__lbl {
  font-size: 18px; font-weight: 500;
  margin: 0 0 6px;
  letter-spacing: -0.2px;
}
.dark-step__copy {
  font-size: 14px; line-height: 1.6;
  color: rgba(244,239,230,0.7);
  margin: 0;
}
.dark-card__close {
  margin-top: 32px;
  font-size: 14px; color: rgba(244,239,230,0.55);
  font-style: italic;
}

@media (max-width: 640px) {
  .dark-card { margin: 24px -24px 0; padding: 36px 24px 40px; }
  .dark-card__h { font-size: 28px; }
  .dark-step { grid-template-columns: 1fr; gap: 4px; }
  .dark-step__time { padding-top: 0; }
}


/* ==========================================================================
   STATS STRIP
   ========================================================================== */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 0.5px solid rgba(20,22,20,0.12);
  border-bottom: 0.5px solid rgba(20,22,20,0.12);
}
.stat {
  padding: 24px 18px 24px 0;
  border-right: 0.5px solid rgba(20,22,20,0.08);
}
.stat:last-child { border-right: none; padding-right: 0; }
.stat__num {
  font-size: 30px; letter-spacing: -0.8px; font-weight: 500;
  line-height: 1;
  margin: 0 0 6px;
}
.stat__num small {
  font-size: 15px; color: rgba(20,22,20,0.55); letter-spacing: -0.3px; margin-left: 2px;
}
.stat__lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(20,22,20,0.55);
  line-height: 1.5;
}
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(n+3) { border-top: 0.5px solid rgba(20,22,20,0.08); }
}


/* ==========================================================================
   PROSE — body copy on rich pages
   ========================================================================== */
.prose p {
  font-size: 16px; line-height: 1.75;
  color: var(--color-off-black);
  margin: 0 0 20px;
  max-width: 640px;
}
.prose p.dim { color: rgba(20,22,20,0.7); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { font-weight: 500; }
.prose em { font-style: italic; color: var(--color-claret); }
.prose a {
  border-bottom: 0.5px solid rgba(20,22,20,0.4);
  padding-bottom: 1px;
  transition: color 150ms, border-color 150ms;
}
.prose a:hover { color: var(--color-claret); border-bottom-color: var(--color-claret); }
.prose ul {
  margin: 0 0 20px;
  padding-left: 0;
  list-style: none;
  max-width: 620px;
}
.prose li {
  font-size: 16px; line-height: 1.7;
  padding: 6px 0 6px 24px;
  position: relative;
}
.prose li::before {
  content: "—";
  position: absolute; left: 0; top: 6px;
  color: var(--color-claret);
  font-family: 'JetBrains Mono', monospace;
}


/* ==========================================================================
   END CTA (page closer)
   ========================================================================== */
.end {
  padding: 80px 0 0;
  text-align: center;
}
.end__h {
  font-size: 28px; line-height: 1.15; letter-spacing: -0.6px;
  font-weight: 500;
  margin: 0 0 24px;
}
.end__h em { font-style: normal; color: var(--color-claret); }
@media (max-width: 640px) {
  .end__h { font-size: 22px; }
}


/* ==========================================================================
   FOOTER
   ========================================================================== */
.foot {
  margin-top: 80px;
  padding: 64px 0 40px;
  background: var(--color-off-black);
  color: var(--color-cream);
}
.foot__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 0.5px solid rgba(244,239,230,0.18);
}
.foot__brand {
  font-size: 20px; font-weight: 500; letter-spacing: -0.5px;
  color: var(--color-cream);
  margin: 0 0 14px;
}
.foot__brand .dot { width: 6px; height: 6px; background: var(--color-claret); border-radius: 50%; transform: translateY(-2px); }
.foot__tagline {
  font-size: 14px; line-height: 1.6;
  color: rgba(244,239,230,0.65);
  margin: 0;
  max-width: 320px;
}
.foot__lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(244,239,230,0.5);
  margin: 0 0 14px;
}
.foot__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.foot__list a {
  font-size: 14px;
  color: rgba(244,239,230,0.78);
  transition: color 150ms ease;
}
.foot__list a:hover { color: var(--color-cream); }
.foot__bottom {
  padding-top: 28px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(244,239,230,0.5);
}
.foot__bottom a { color: inherit; border-bottom: 0.5px solid rgba(244,239,230,0.2); padding-bottom: 1px; }
.foot__bottom a:hover { color: var(--color-cream); }

@media (max-width: 767px) {
  .foot__top { grid-template-columns: 1fr; gap: 32px; padding-bottom: 36px; }
}


/* ==========================================================================
   SCROLL-REVEAL
   ========================================================================== */
.qdw-reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity 700ms cubic-bezier(0.22,0.61,0.36,1),
              transform 700ms cubic-bezier(0.22,0.61,0.36,1);
}
.qdw-reveal.is-visible { opacity: 1; transform: translateY(0); }


/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-cream), 0 0 0 4px var(--color-claret);
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .qdw-reveal { opacity: 1; transform: none; }
}
