/*
 * Print documents. On screen these render as a sheet on a desk; at print they
 * become real paper. Replaces the doc-page.js custom element with @page.
 */

@page {
  size: A4;
  margin: 18mm 0;
}

:root { --sheet: 21cm; --pad: 0.7in; }

body {
  background: #e9e5e0;
  padding-block: 3rem;
}

.sheet {
  inline-size: min(var(--sheet), 100% - 2rem);
  margin-inline: auto;
  padding: var(--pad);
  background: #fff;
  border-radius: 7px;
  box-shadow: 0 2px 10px rgb(20 17 15 / 0.12);
}

.doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block-end: 0.625rem;
  margin-block-end: 2rem;
  border-block-end: 1px solid var(--rule-soft);

  & span:first-child {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-family: var(--display);
    font-size: 13px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
  }
  & img { inline-size: 22px; }
  & small {
    font-size: 9pt;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #9a8a76;
  }
}

.doc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block-start: 0.625rem;
  margin-block-start: 2.5rem;
  border-block-start: 1px solid var(--rule-soft);
  font-size: 8.5pt;
  letter-spacing: 0.1em;
  color: #9a8a76;
}

.doc h1 {
  font-size: min(34pt, 10vw); /* 34pt on paper; narrower on a phone, where Charpentier's accent line is wide */
  line-height: 1.2;
  margin-block-end: 1rem;
}

.doc h2 {
  font-size: 20pt;
  line-height: 1.2;
  margin-block: 2rem 1rem;
  break-after: avoid;
}

.doc h3 { font-size: 16pt; }

.doc p { font-size: 11.5pt; line-height: 1.65; color: var(--body); }
.doc .lede { font-size: 13pt; line-height: 1.6; color: var(--ink-strong); max-inline-size: 44ch; }
.doc .sub { font-size: 11.5pt; max-inline-size: 52ch; }

.doc .bullets li { font-size: 11pt; color: var(--body); }
.doc .bullets.-two { columns: 2; column-gap: 2rem; }
.doc .bullets.-two li { break-inside: avoid; margin-block-end: 0.5rem; }

.doc .steps > li {
  display: block;
  padding-block: 0.375rem;
  border: 0;
  break-inside: avoid;

  & p { font-size: 11.5pt; }
  & strong { font-weight: 500; color: var(--ink); }
}
.doc .steps > li:last-child { border-block-end: 0; }

.doc .marker { display: inline-block; min-inline-size: 1.75rem; font-size: 11pt; }

.doc .callout {
  margin-block: 1.25rem 2rem;
  padding: 20px 22px;
  border-inline-start: 2px solid var(--gold);
  background: var(--surface);
  break-inside: avoid;

  & p {
    font-family: var(--display);
    font-style: italic;
    font-size: 15pt;
    line-height: 1.4;
    color: var(--ink);
  }
}

.doc .deliverable {
  margin-block-end: 1.125rem;
  padding: 20px 22px;
  background: var(--surface);
  break-inside: avoid;

  & p { font-size: 11pt; line-height: 1.65; }
  & .fine { font-size: 10.5pt; color: var(--muted); }
}

.doc .facets { display: grid; gap: 1.125rem; margin-block-end: 2rem; }
.doc .facets > div { break-inside: avoid; }
.doc .facets dt {
  margin-block-end: 0.5rem;
  font-size: 9pt;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}
.doc .facets dd {
  font-family: var(--sans); /* body text: Jost (the upright Display is Foria, a heading face) */
  font-size: 11pt;
  line-height: 1.5;
  color: var(--ink-strong);
}

.doc .split > div {
  display: flex;
  gap: 1.125rem;
  padding-block: 0.875rem;
  border-block-start: 1px solid var(--rule-soft);
  break-inside: avoid;
}
.doc .split > div:last-child { border-block-end: 1px solid var(--rule-soft); }
.doc .split dt {
  flex: 0 0 30%;
  font-size: 9pt;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.doc .split dd {
  font-family: var(--sans);
  font-size: 11pt;
  line-height: 1.45;
  color: var(--ink);
}

.doc .page-break { break-before: page; }

@media print {
  body { background: #fff; padding: 0; }

  .sheet {
    inline-size: auto;
    max-inline-size: none;
    margin: 0;
    padding-inline: var(--pad);
    border-radius: 0;
    box-shadow: none;
  }

  .doc-header, .doc-footer { position: running(none); }

  h1, h2, h3 { break-after: avoid; }
  p, li { orphans: 3; widows: 3; }
  figure, blockquote, img { break-inside: avoid; }

  * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
