/* ============================================================
   PAGE CHROME — shared scaffolding for print templates
   ============================================================
   Foundation for any letter-portrait Pathful document
   (one-pagers, case studies, sell sheets, RFP responses).

   Class prefix: .pf-
   Requires: colors_and_type.css for tokens.
   ============================================================ */

@import url('../colors_and_type.css');

/* --- Reset (scoped) --- */
.pf-doc *,
.pf-doc *::before,
.pf-doc *::after {
  box-sizing: border-box;
}

.pf-doc {
  background: #e8eaee;
  color: var(--pf-black);
  font-family: var(--font-system);
  letter-spacing: var(--tracking-brand);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* --- Page (US Letter portrait, 8.5" x 11" @ 96dpi = 816x1056) --- */
.pf-page {
  width: 8.5in;
  height: 11in;
  margin: 0.5in auto;
  background: #fff;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 8px 32px -8px rgba(22, 22, 22, 0.18),
    0 2px 6px rgba(22, 22, 22, 0.06);
  page-break-after: always;
  break-after: page;
  display: flex;
  flex-direction: column;
}
.pf-page:last-child {
  page-break-after: auto;
  break-after: auto;
}

/* Standard interior page padding (cover overrides this) */
.pf-page--standard {
  padding: 0.5in 0.55in 0.7in;
}

/* --- Page header (crumb + logo + rule) --- */
.pf-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  padding-right: 1.6in; /* clear room for .pf-section-mark */
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 22px;
}
.pf-page-header .pf-crumb {
  font-size: 9.5pt;
  color: var(--fg-subtle);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.pf-page-header .pf-crumb strong {
  color: var(--pf-sky-blue);
  font-weight: 600;
}
.pf-page-header .pf-header-logo {
  height: 22px;
  opacity: 0.85;
}

/* --- Page foot (mark + folio) --- */
.pf-page-foot {
  position: absolute;
  left: 0.5in;
  right: 0.5in;
  bottom: 0.32in;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9pt;
  color: var(--fg-subtle);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pf-page-foot .pf-mark {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  white-space: nowrap;
}
.pf-page-foot .pf-mark-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pf-sky-blue);
}

/* --- Section mark (TOC pips, top-right of every page) --- */
.pf-section-mark {
  position: absolute;
  top: 0.55in;
  right: 0.55in;
  display: flex;
  gap: 4px;
  z-index: 5;
}
.pf-section-mark .pf-pip {
  width: 28px;
  height: 4px;
  background: var(--border-subtle);
  border-radius: 999px;
}
.pf-section-mark .pf-pip.is-active {
  background: var(--pf-sky-blue);
}

/* --- Section eyebrow + title + lead (used inside any page body) --- */
.pf-section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10pt;
  font-weight: 600;
  color: var(--pf-sky-blue);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}
.pf-section-eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: currentColor;
}

.pf-section-title {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 26pt;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--pf-black);
  margin-bottom: 14px;
  max-width: 7in;
}

.pf-section-lead {
  font-size: 11pt;
  line-height: 1.5;
  color: var(--fg-muted);
  letter-spacing: -0.01em;
  max-width: 6.5in;
  font-weight: 400;
}
.pf-section-lead strong {
  color: var(--pf-black);
  font-weight: 600;
}

/* --- Print rules --- */
@page {
  size: letter portrait;
  margin: 0;
}
@media print {
  html,
  body {
    background: #fff !important;
  }
  .pf-page {
    margin: 0 !important;
    box-shadow: none !important;
  }
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
