/* ==================================================================
   BUILD QUANTUM PARTNERS: Official Design System & Homepage Styles
   Adapted from BQP Brand Knowledge Base (01 Brand / 02 Templates)
   Visual Territory: Bell Labs meets NASA 1974 Standards Manual
   ================================================================== */

/* ---- TYPEFACE DECLARATIONS (Local embedded woff2) ---------------- */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/inter-var.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/inter-italic-var.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/inter-tight-var.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-400.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-600.woff2') format('woff2');
}

/* ---- SYSTEM TOKENS ----------------------------------------------- */

:root {
  /* THE SIGNAL COLOR: The full bleed band */
  --block:      #16150f;
  --block-ink:  #faf8f3;
  --block-sub:  #b3aea1;

  /* NEUTRAL CORE (Warm ground default) */
  --ink:        #16150f;   /* Primary text and dominant marks */
  --sub:        #5c5a52;   /* Secondary narrative copy */
  --faint:      #9a978c;   /* Metadata labels, ordinals, subtle details */
  --hair:       #16150f;   /* Structural hairline, full weight */
  --hair-lt:    #ddd9cf;   /* Secondary internal dividing hairline */
  --rule:       #c9c5b9;   /* Container boundaries and panel borders */
  --wash:       #f0ede5;   /* Subtle emphasis fill */
  --ground:     #faf8f3;   /* Page surface */
  --stage:      #e8e5dd;   /* Surrounding desktop viewport background */

  /* TYPOGRAPHY STACKS */
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --tight: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* TRACKING */
  --track-mono:    0.08em;
  --track-tight:  -0.022em;
  --track-display: -0.035em;

  /* HAIRLINE WEIGHT */
  --hw: 1px;
}

/* ---- RESET & GLOBAL STYLES ---------------------------------------- */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--stage);
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  background-color: var(--stage);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---- SHEET CONTAINER --------------------------------------------- */

.sheet {
  max-width: 1040px;
  margin: 0 auto;
  background-color: var(--ground);
  border-left: var(--hw) solid var(--rule);
  border-right: var(--hw) solid var(--rule);
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
}

.pad {
  padding-left: clamp(24px, 5vw, 68px);
  padding-right: clamp(24px, 5vw, 68px);
}

/* ---- RUNNING HEAD (NAVBAR) --------------------------------------- */

.runhead {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--ground);
  border-bottom: var(--hw) solid var(--hair);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.runhead__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 52px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand__logo {
  height: 22px;
  width: auto;
  display: block;
}

.brand__name {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav__link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--sub);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: var(--hw) solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav__link:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---- COVER HERO --------------------------------------------------- */

.cover {
  padding-top: clamp(40px, 6vw, 64px);
  padding-bottom: clamp(48px, 7vw, 76px);
  border-bottom: var(--hw) solid var(--hair);
}

.fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

/* The four fields are the page's section index: each links to its numbered section. */
.field {
  display: block;
  border-left: var(--hw) solid var(--hair);
  padding-left: 12px;
  color: inherit;
  text-decoration: none;
  transition: border-color 120ms ease, padding-left 120ms ease;
}

.field__lab,
.field__val {
  display: block;
}

.field:hover,
.field:focus-visible {
  border-left-width: 3px;
  padding-left: 10px;
}

.field:hover .field__lab,
.field:focus-visible .field__lab {
  color: var(--ink);
}

.field:hover .field__val,
.field:focus-visible .field__val {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.field:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.field__lab {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--faint);
  line-height: 1.3;
}

.field__val {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: 4px;
  line-height: 1.4;
}

.cover__headline {
  font-family: var(--tight);
  font-size: clamp(34px, 5.2vw, 56px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: var(--track-display);
  color: var(--ink);
  max-width: 24ch;
  text-wrap: balance;
  margin-bottom: 28px;
  margin-left: -0.03em;
}

.cover__deck {
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.55;
  color: var(--sub);
  max-width: 66ch;
  text-wrap: pretty;
}

.cover__deck strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---- SECTION PATTERN ---------------------------------------------- */

.section {
  scroll-margin-top: 72px;
  padding-top: clamp(48px, 6vw, 68px);
  padding-bottom: clamp(48px, 6vw, 68px);
  border-bottom: var(--hw) solid var(--hair);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.eyebrow__code {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--faint);
}

.eyebrow__rule {
  width: 20px;
  height: var(--hw);
  background-color: var(--rule);
}

.eyebrow__title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--ink);
}

.section__headline {
  font-family: var(--tight);
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: var(--track-tight);
  color: var(--ink);
  max-width: 32ch;
  text-wrap: balance;
  margin-bottom: 16px;
  margin-left: -0.02em;
}

.section__deck {
  font-size: 15px;
  line-height: 1.6;
  color: var(--sub);
  max-width: 68ch;
  text-wrap: pretty;
  margin-bottom: 36px;
}

/* ---- THREE-COLUMN GRID (THESIS & ENGAGEMENTS) -------------------- */

.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  border-top: var(--hw) solid var(--hair);
  padding-top: 28px;
}

.trio__col {
  display: flex;
  flex-direction: column;
}

.trio__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: var(--hw) solid var(--hair-lt);
  margin-bottom: 14px;
}

.trio__num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: var(--track-mono);
  color: var(--faint);
}

.trio__title {
  font-family: var(--tight);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 10px;
}

.trio__body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--sub);
  text-wrap: pretty;
}

.trio__body p + p {
  margin-top: 10px;
}

.trio__body strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---- PIECES SPEC GRID (TECHNICAL DISCIPLINES) --------------------- */

.pieces {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.piece {
  border: var(--hw) solid var(--rule);
  background-color: var(--ground);
  padding: 24px;
}

.piece__ord {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 6px;
}

.piece__name {
  font-family: var(--tight);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: var(--track-tight);
  color: var(--ink);
  margin-bottom: 14px;
  line-height: 1.25;
}

.piece__list {
  list-style: none;
  border-top: var(--hw) solid var(--hair-lt);
}

.piece__item {
  position: relative;
  padding: 10px 0 10px 20px;
  border-bottom: var(--hw) solid var(--hair-lt);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--sub);
  text-wrap: pretty;
}

.piece__item:last-child {
  border-bottom: none;
}

.piece__item::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 17px;
  width: 5px;
  height: 5px;
  border: var(--hw) solid var(--ink);
  background: transparent;
}

.piece__item strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---- STATEMENT STAT BLOCK ---------------------------------------- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: var(--hw) solid var(--hair);
  margin-top: 36px;
  background-color: var(--wash);
}

.stat-strip__cell {
  padding: 24px 28px;
}

.stat-strip__cell + .stat-strip__cell {
  border-left: var(--hw) solid var(--hair);
}

.stat-strip__val {
  font-family: var(--tight);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.1;
}

.stat-strip__lab {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--sub);
  margin-top: 8px;
  line-height: 1.4;
}

/* ---- AUDIENCE LIST CARDS ----------------------------------------- */

.audiences {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.audience-card {
  border: var(--hw) solid var(--rule);
  padding: 24px 20px;
  background-color: var(--ground);
  display: flex;
  flex-direction: column;
}

.audience-card__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 8px;
}

.audience-card__title {
  font-family: var(--tight);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.3;
}

.audience-card__body {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--sub);
  text-wrap: pretty;
}

/* ---- SIGNATURE SIGNAL BAND (CLOSER) ------------------------------ */

.signal-band {
  scroll-margin-top: 72px;
  background-color: var(--block);
  color: var(--block-ink);
  padding: clamp(48px, 6vw, 68px) clamp(24px, 5vw, 68px);
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.signal-band__left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.signal-band__line {
  font-family: var(--tight);
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 600;
  letter-spacing: var(--track-tight);
  line-height: 1.1;
  color: var(--block-ink);
  max-width: 18ch;
}

.signal-band__meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--block-sub);
}

.signal-band__body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--block-sub);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.signal-band__body p {
  text-wrap: pretty;
}

.signal-band__body strong {
  color: var(--block-ink);
  font-weight: 600;
}

.signal-band__contact {
  padding-top: 12px;
  border-top: var(--hw) solid #33312b;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.signal-band__email {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--block-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.signal-band__email:hover {
  color: #fff;
}

.signal-band__loc {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--block-sub);
  margin-top: 6px;
}

/* ---- RUNNING FOOT (FOOTER) --------------------------------------- */

.runfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 20px clamp(24px, 5vw, 68px) 24px;
  border-top: var(--hw) solid var(--hair);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--faint);
  background-color: var(--ground);
}

.runfoot__left {
  color: var(--sub);
}

.runfoot__center {
  color: var(--faint);
}

.runfoot__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.portal-link {
  color: var(--faint);
  text-decoration: none;
  border-bottom: var(--hw) solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.portal-link:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---- RESPONSIVE MEDIA QUERIES ------------------------------------ */

@media (max-width: 900px) {
  .fields {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .trio {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .pieces {
    grid-template-columns: 1fr;
  }

  .audiences {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .signal-band {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .stat-strip {
    grid-template-columns: 1fr;
  }

  .stat-strip__cell + .stat-strip__cell {
    border-left: none;
    border-top: var(--hw) solid var(--hair);
  }
}

@media (max-width: 640px) {
  .runhead__row {
    height: auto;
    padding-top: 14px;
    padding-bottom: 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .nav {
    flex-wrap: wrap;
    gap: 14px;
  }

  .fields {
    grid-template-columns: 1fr;
  }

  .runfoot {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media print {
  html, body {
    background: #fff;
  }
  .sheet {
    max-width: none;
    border: none;
  }
  .runhead {
    position: static;
  }
}

/* Platform columns: each pairs a challenge with our answer. */
.trio__body--pair p + p {
  margin-top: 14px;
  padding-top: 14px;
  border-top: var(--hw) solid var(--hair-lt);
}

.trio__tag {
  display: block;
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--faint);
}

.trio__answer {
  color: var(--ink);
}

.trio__answer .trio__tag {
  color: var(--ink);
  font-weight: 600;
}

/* Side by side, line up titles, challenges and answers across the three columns. */
@media (min-width: 901px) {
  .trio--pairs {
    grid-template-rows: auto auto auto auto;
    row-gap: 0;
  }

  .trio--pairs .trio__col {
    display: grid;
    grid-row: span 4;
    grid-template-rows: subgrid;
  }

  .trio--pairs .trio__body--pair {
    display: contents;
  }
}
