/* ==========================================================================
   CAPABILITY STATEMENT (css/capabilities.css)
   --------------------------------------------------------------------------
   Styles used only by capabilities.html. Loaded after css/site.css, which
   supplies the colours, fonts and shared components (panel, title block,
   spec table, tick list, buttons). Every class here starts with "capstmt".

   INDEX
     1. Page hero ......... the two buttons under the page title
     2. The sheet ......... the framed statement
          2.1 Heading band    logo, name and three title-block cells
          2.2 Columns         narrative on the left, data on the right
          2.3 Blocks          one numbered block per part of the statement
          2.4 Lists           competencies, past performance, differentiators
          2.5 Corporate data  the spec table and the NAICS list
          2.6 Point of contact
     3. Note under the sheet
     4. Print / PDF ....... the one-page US Letter version

   The page has two jobs: it is read on screen, and it is printed or saved
   as a PDF. Parts 1 to 3 are the screen version. Part 4 re-arranges the
   same content for paper.
   ========================================================================== */


/* ==========================================================================
   1. PAGE HERO
   ========================================================================== */

/* This copy of the logo belongs to the printed letterhead (part 4). On
   screen the logo is shown in the sheet's heading band instead. */
.capstmt-hero__logo {
  display: none;
}

.capstmt-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* The print button needs JavaScript. Without it (js/boot.js never added
   the class "js"), the button is not offered; the browser's own Print
   command still works. (If JavaScript is running but js/capabilities.js
   never arrives, js/boot.js hides the button instead: see the mark
   "data-needs-script" on the button in capabilities.html.) */
html:not(.js) .capstmt-hero__actions [data-print] {
  display: none;
}


/* ==========================================================================
   2. THE SHEET
   The frame itself is the shared .panel component with corner ticks:
     <div class="panel ticks capstmt"> ... </div>
   ========================================================================== */

/* --- 2.1 Heading band ------------------------------------------------------
   Same construction as the company title block on the home page: the gaps
   between the pieces are 1px wide and show the band's background colour,
   which draws the hairlines. */

.capstmt__band {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line-2);
}

.capstmt__brand {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  background: var(--bg-2);
}

.capstmt__logo {
  flex: none;
  width: 64px;
  height: 64px;
}

.capstmt__name {
  color: var(--ink);
  font-family: var(--font-display);
  font-stretch: 125%;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
}

/* The two cells, "Document" and "Ownership": stacked on small phones, side
   by side from 420px. (Identifiers such as the CAGE code are not shown up
   here; they live in the Corporate data block.) */
.capstmt__cells {
  grid-template-columns: minmax(0, 1fr);
  background: transparent;
  border: 0;
}

@media (min-width: 420px) {
  .capstmt__cells {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .capstmt__band {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .capstmt__brand {
    gap: 20px;
    padding: 20px 32px 20px 24px;
  }

  .capstmt__logo {
    width: 76px;
    height: 76px;
  }

  .capstmt__name {
    font-size: 1.25rem;
  }

  .capstmt__name span {
    display: block;   /* "Sentinel GovCon" / "Solutions LLC" on two lines */
  }

  /* The cells are as tall as the logo beside them; centre their text. */
  .capstmt__cells .titleblock__cell {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px 20px 18px;
  }
}


/* --- 2.2 Columns ------------------------------------------------------------
   Phones and tablets: one column, in reading order.
   From 900px, and always on paper: two columns. The narrative takes three
   fifths, the data two fifths, with a hairline between them. */

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

.capstmt__col--side {
  border-top: 1px solid var(--line);
}

@media print, (min-width: 900px) {
  .capstmt__cols {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }

  .capstmt__col--side {
    border-top: 0;
    border-left: 1px solid var(--line-2);
  }

  /* The two columns are always the same height, but the narrative is
     usually the longer one. Rather than leave a hole in the data column,
     the corporate data table takes up the slack: its block grows, and the
     spare height is shared equally between its rows. */
  .capstmt__block--data,
  .capstmt__block--data .capstmt__spec {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
  }

  .capstmt__block--data .spec__row {
    flex: 1 0 auto;
    align-content: center;   /* text stays in the middle of a taller row */
  }
}


/* --- 2.3 Blocks -------------------------------------------------------------
   Each part of the statement is one block: a small numbered heading with a
   leader line, then its content. Blocks are separated by hairlines. */

.capstmt__block {
  padding: clamp(20px, 2.6vw, 32px);
}

.capstmt__block + .capstmt__block {
  border-top: 1px solid var(--line);
}

/* An <h2> drawn as a drawing label: small monospace capitals. */
.capstmt__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-stretch: 100%;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-wrap: wrap;
  color: var(--ink);
}

/* The leader line that runs from the heading to the edge of the block. */
.capstmt__heading::after {
  content: "";
  flex: 1;
  min-width: 12px;
  border-top: 1px solid var(--line-2);
}

.capstmt__no {
  color: var(--amber);
}

.capstmt__text {
  max-width: 68ch;
  line-height: 1.65;
  text-wrap: pretty;   /* avoids a single word alone on the last line, where supported */
}


/* --- 2.4 Lists --------------------------------------------------------------
   The shared tick list, adjusted to sit inside a block: the heading's
   leader line already rules off the top, and the block's own edge rules
   off the bottom, so the list's first and last hairlines are dropped. */

.capstmt__list {
  border-top: 0;
  line-height: 1.55;
  text-wrap: pretty;
}

.capstmt__list > li {
  padding-block: 12px;
}

.capstmt__list > li::before {
  top: calc(12px + 0.78em);
}

.capstmt__list > li:first-child {
  padding-top: 0;
}

.capstmt__list > li:first-child::before {
  top: 0.78em;
}

.capstmt__list > li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

/* Small phones: a shorter tick and indent leave more room for the words. */
@media (max-width: 419.98px) {
  .capstmt__list > li {
    padding-left: 22px;
  }

  .capstmt__list > li::before {
    width: 10px;
  }
}

/* The lead-in term of each core competency. */
.capstmt__term {
  color: var(--ink);
  font-weight: 600;
}


/* --- 2.5 Corporate data ------------------------------------------------------
   The shared spec table, adjusted in the same way as the lists above. */

.capstmt__spec {
  border-top: 0;
}

.capstmt__spec .spec__row {
  padding-block: 11px;
}

.capstmt__spec .spec__row:first-child {
  padding-top: 0;
}

.capstmt__spec .spec__row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.capstmt__spec .spec__desc {
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* NAICS: one line per code. */
.capstmt__naics {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
}

/* The six-digit code itself, in the data typeface. */
.capstmt__code {
  margin-right: 0.25em;
  color: var(--ink);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}


/* --- 2.6 Point of contact ------------------------------------------------------ */

.capstmt__poc {
  font-style: normal;   /* browsers set <address> in italics by default */
}

.capstmt__poc-name {
  color: var(--ink);
  font-family: var(--font-display);
  font-stretch: 125%;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.25;
}

.capstmt__poc-role {
  margin-top: 4px;
  font-size: 0.9375rem;
}

.capstmt__poc-email {
  margin-top: 10px;
}

/* Full width in the narrow data column and on phones; on a tablet, where
   the block is the full width of the sheet, it stops at a sensible size. */
.capstmt__poc-btn {
  max-width: 22rem;
  margin-top: 20px;
}


/* ==========================================================================
   3. NOTE UNDER THE SHEET
   ========================================================================== */

.capstmt__note {
  max-width: 76ch;
  margin-top: 20px;
}

/* The printed page's footer line. Paper only (part 4). */
.capstmt__printfoot {
  display: none;
}


/* ==========================================================================
   4. PRINT / PDF
   One US Letter page: black text on white, grey hairlines, and the amber
   accent only as the rule under the letterhead and a few small marks.

   css/site.css (its section 8) has already switched the colour tokens to
   dark-on-white for paper. The rules below do the rest:
     - hide what only makes sense on screen (site header and footer,
       buttons, the margin rail, the heading band, the note);
     - turn the page hero into a compact letterhead;
     - set the sheet in two columns at paper type sizes;
     - stretch the frame to the bottom of the page and add a footer line.

   TO CHECK AFTER EDITING THE CONTENT: print preview must still show ONE
   page. If it runs onto a second page, lower the "font-size" on html below
   a little (9.25pt -> 9pt): every size on the sheet scales with it.
   The sizes below leave about half an inch spare, including on networks
   where the web fonts are blocked and the fallback fonts are used.
   ========================================================================== */

@page {
  size: letter;
  margin: 0.5in;
}

@media print {
  :root {
    --capstmt-rule: #c98a17;   /* amber, used for one thin rule */
  }

  /* 1rem is now 9.25pt. Most sizes in both stylesheets are written in rem,
     so this one line scales the whole page down to paper sizes. */
  html {
    font-size: 9.25pt;
  }

  body {
    font-size: 1rem;
    line-height: 1.45;
  }

  /* --- Hidden on paper --------------------------------------------------- */
  .site-header,
  .site-footer,
  .section__rail,
  .capstmt-hero__actions,
  .capstmt__band,
  .capstmt__poc-btn,
  .capstmt__note {
    display: none !important;
  }

  /* --- Page skeleton -------------------------------------------------------
     The page area is 10in tall (11in paper less two 0.5in margins). <main>
     is made at least 9.7in tall and everything down to the sheet is told to
     grow, so the frame always reaches the foot of the page. The 0.3in spare
     is a safety margin: a little too much height would cause a blank second
     page. */
  .container {
    width: 100%;
  }

  main {
    display: flex;
    flex-direction: column;
    min-height: 9.7in;
  }

  .section,
  .section__grid,
  .section__body,
  .capstmt {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
  }

  .section__grid {
    padding: 0;
    border: 0;
  }

  .section__body {
    padding: 0;
  }

  .capstmt__cols {
    flex: 1 0 auto;
  }

  /* --- Letterhead (the page hero, re-arranged) ----------------------------
        [logo]  Sentinel GovCon Solutions            CAPABILITY STATEMENT
                Strategic GovCon Advisory — ...
        ---------------------------------------------------------- amber rule */
  .capstmt-hero {
    overflow: visible;
  }

  .capstmt-hero .page-hero__inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 0.18in;
    padding: 0 0 0.14in;
    border-bottom: 1.5pt solid var(--capstmt-rule);
  }

  .capstmt-hero__logo {
    display: block;
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
    width: 0.74in;
    height: 0.74in;
  }

  .capstmt-hero .page-hero__title {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    max-width: none;
    margin: 0;
    font-size: 19pt;
    white-space: nowrap;
  }

  .capstmt-hero .page-hero__intro {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    max-width: none;
    margin: 4pt 0 0;
    font-size: 10pt;
    line-height: 1.3;
  }

  .capstmt-hero .eyebrow {
    grid-column: 3;
    grid-row: 1;
    align-self: end;
    padding-bottom: 2pt;
    font-size: 7.5pt;
    color: var(--ink);
  }

  /* --- The sheet -------------------------------------------------------------
     "print-color-adjust: exact" asks the browser to print the few details
     that are drawn as backgrounds (the corner ticks and the status dot) even
     when its "Background graphics" option is switched off. */
  .capstmt {
    margin-top: 0.15in;
    break-inside: auto;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* On paper the narrative column is a little narrower than on screen
     (7 parts to 5), which gives the data column room for its longest values. */
  .capstmt__cols {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  .capstmt__block {
    padding: 0.125in 0.19in;
  }

  .capstmt__heading {
    gap: 8pt;
    margin-bottom: 0.09in;
    font-size: 7.5pt;
  }

  .capstmt__text {
    max-width: none;
    line-height: 1.5;
  }

  .capstmt__list {
    line-height: 1.42;
  }

  .capstmt__list > li {
    padding: 4.5pt 0 4.5pt 15pt;
  }

  .capstmt__list > li::before {
    top: calc(4.5pt + 0.7em);
    width: 8pt;
  }

  .capstmt__list > li:first-child::before {
    top: 0.7em;
  }

  .capstmt__spec .spec__row {
    grid-template-columns: 0.7in minmax(0, 1fr);
    column-gap: 7pt;
    padding-block: 5pt;
  }

  .capstmt__spec .spec__term {
    font-size: 6.75pt;
    letter-spacing: 0.08em;
  }

  .capstmt__spec .spec__desc {
    font-size: 9pt;
    line-height: 1.4;
  }

  .capstmt__naics {
    gap: 3pt;
  }

  .capstmt .status-dot {
    width: 5pt;
    height: 5pt;
    margin-right: 6pt;
  }

  .capstmt__poc-name {
    font-size: 11.5pt;
  }

  .capstmt__poc-role {
    margin-top: 2pt;
    font-size: 9pt;
  }

  .capstmt__poc-email {
    margin-top: 4pt;
  }

  /* Links are just text on paper. */
  .capstmt a {
    color: inherit;
    text-decoration: none;
  }

  /* --- Footer line --------------------------------------------------------- */
  .capstmt__printfoot {
    display: flex;
    flex: none;
    justify-content: space-between;
    gap: 0.25in;
    margin-top: 0.09in;
    font: 400 6.75pt/1.4 var(--font-mono);
    letter-spacing: 0.04em;
    color: var(--ink-3);
  }
}
