/* ============================================================
   DAY LAW · JV BROCHURE — Attorney of Record + ABS + Day Law
   Parchment + oxblood + aged brass. Single light theme.
   Inherits tokens.css from the Day Law deck DNA.
   ============================================================ */

@import url("tokens.css");
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  --font-display: "Iowan Old Style", "Apple Garamond", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans:    -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --page-max:     1080px;
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Page frame (two stacked "pages") ---- */
.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 64px 56px 88px;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg);
}
.page + .page { border-bottom: none; }

/* ---- Header / wordmark ---- */
.brand-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 16px;
  margin-bottom: 36px;
}
.brand-mark {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.brand-mark .dot {
  color: var(--brand);
  font-weight: 600;
}
.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.brand-rule {
  height: 1px;
  background: linear-gradient(90deg, var(--gold) 0%, transparent 60%);
  margin: 8px 0 24px;
}

/* ---- Headlines ---- */
h1.display {
  font-family: var(--font-display);
  font-size: clamp(38px, 4.4vw, 56px);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 16px;
}
h1.display em {
  font-style: italic;
  color: var(--brand);
}
.lede {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.45;
  font-weight: 300;
  font-style: italic;
  color: var(--ink-2);
  max-width: 760px;
  margin-bottom: 40px;
}

h2.section {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  color: var(--ink);
  margin: 36px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hairline);
}
h2.section .num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--gold);
  margin-right: 12px;
  letter-spacing: 0.06em;
}

/* ---- Three-party party cards ---- */
.parties {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0 8px;
}
.party {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand);
  padding: 22px 20px 24px;
  border-radius: 2px;
}
.party.aor   { border-top-color: var(--brand); }
.party.abs   { border-top-color: var(--gold); }
.party.firm  { border-top-color: var(--ink); }
.party .role {
  font-family: var(--font-sans);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 8px;
}
.party .name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 14px;
  line-height: 1.2;
}
.party .body {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.party .body strong { color: var(--ink); font-weight: 600; }
.party .body em { font-style: italic; color: var(--brand); font-weight: 500; }

/* ---- Flow row (structure) ---- */
.flow-svg {
  display: block;
  width: 100%;
  height: auto;
  margin: 28px auto 16px;
  max-width: 1000px;
}

/* ---- Economics tables ---- */
.econ-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 20px 0;
}
.econ-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 22px 22px 18px;
  border-radius: 2px;
}
.econ-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}
.econ-card .face {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.econ-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px dashed var(--hairline);
  font-size: 14px;
}
.econ-row:last-child { border-bottom: none; }
.econ-row .lbl { color: var(--muted); }
.econ-row .val {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--ink);
}
.econ-row.aor .val { color: var(--brand); font-weight: 600; }
.econ-row.firm .val { color: var(--ink); font-weight: 600; }
.econ-row.face .val { color: var(--ink-2); }

/* ---- Throughput table ---- */
.tput-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 8px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.tput-table th, .tput-table td {
  text-align: right;
  padding: 11px 14px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--hairline);
}
.tput-table th {
  background: var(--surface-2);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.tput-table td:first-child, .tput-table th:first-child {
  text-align: left;
  font-family: var(--font-sans);
  color: var(--ink-2);
}
.tput-table tr:last-child td { border-bottom: none; }
.tput-table tbody tr:last-child td {
  border-top: 2px solid var(--gold);
  font-weight: 600;
  background: var(--surface-2);
}
.tput-table .num {
  font-family: var(--font-mono);
  color: var(--ink);
}
.tput-table .num.aor { color: var(--brand); font-weight: 600; }

/* ---- Pillars / bullet rows ---- */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 18px 0 8px;
}
.pillar {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 18px 20px;
  border-radius: 2px;
}
.pillar .title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.pillar .body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* ---- KPI strip (econ headline) ---- */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 26px 0 18px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 18px 18px 16px;
  border-radius: 2px;
  text-align: left;
}
.kpi .label {
  font-family: var(--font-sans);
  font-size: 10.5px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 500;
}
.kpi .value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.05;
}
.kpi .value em {
  font-style: italic;
  color: var(--brand);
  font-weight: 500;
}
.kpi .sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: 0.04em;
}

/* ---- Footnote / fine print ---- */
.fineprint {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}
.fineprint strong { color: var(--ink-2); font-weight: 600; }

/* ---- Footer ---- */
.page-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 36px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.page-foot .mark {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.page-foot .mark .dot { color: var(--brand); }

/* ---- Responsive ---- */
@media (max-width: 800px) {
  .page { padding: 40px 24px 56px; }
  .parties, .pillar-grid, .econ-grid, .kpi-strip { grid-template-columns: 1fr; }
  h1.display { font-size: 36px; }
  .tput-table th, .tput-table td { font-size: 12px; padding: 8px 10px; }
}

/* ---- Print: each .page → exactly one Letter sheet ---- */
@page { size: Letter; margin: 0.35in 0.45in; }
@media print {
  html, body { background: #fff; font-size: 13.5px; }
  .page {
    max-width: none;
    padding: 0 0 0 0;
    border-bottom: none;
    page-break-after: always;
    break-after: page;
  }
  .page:last-child { page-break-after: auto; break-after: auto; }
  .brand-row { padding-bottom: 10px; margin-bottom: 18px; }
  .brand-rule { margin: 4px 0 14px; }
  h1.display {
    font-size: 26px;
    line-height: 1.08;
    margin-bottom: 8px;
  }
  .lede { font-size: 13.5px; line-height: 1.4; margin-bottom: 14px; max-width: none; }
  h2.section { font-size: 16px; margin: 12px 0 6px; padding-bottom: 4px; }
  h2.section .num { font-size: 11px; margin-right: 8px; }
  .parties { gap: 10px; margin: 12px 0 6px; }
  .party { padding: 12px 14px 14px; }
  .party .role { font-size: 9px; margin-bottom: 4px; letter-spacing: 0.18em; }
  .party .name { font-size: 16px; margin-bottom: 8px; }
  .party .body { font-size: 11.5px; line-height: 1.45; }
  .party .body p { margin: 0; }
  .party .body p + p { margin-top: 6px !important; }
  .flow-svg { margin: 14px auto 10px; max-width: 100%; }
  .pillar-grid { gap: 10px; margin: 10px 0 6px; }
  .pillar { padding: 10px 14px; }
  .pillar .title { font-size: 13px; margin-bottom: 4px; }
  .pillar .body { font-size: 11.5px; line-height: 1.45; }
  .kpi-strip { gap: 8px; margin: 14px 0 8px; }
  .kpi { padding: 10px 12px 10px; }
  .kpi .label { font-size: 9px; margin-bottom: 4px; letter-spacing: 0.16em; }
  .kpi .value { font-size: 22px; line-height: 1; }
  .kpi .sub { font-size: 9.5px; margin-top: 4px; }
  .econ-grid { gap: 10px; margin: 6px 0 4px; }
  .econ-card { padding: 10px 12px 8px; }
  .econ-card h3 { font-size: 13px; }
  .econ-card .face { font-size: 9.5px; margin-bottom: 6px; }
  .econ-row { padding: 3px 0; font-size: 11px; }
  .tput-table { margin: 4px 0 4px; }
  .tput-table th, .tput-table td { padding: 5px 10px; font-size: 10.5px; }
  .tput-table th { font-size: 9px; }
  .pillar { padding: 8px 12px; }
  .pillar .title { font-size: 12px; margin-bottom: 3px; }
  .pillar .body { font-size: 11px; line-height: 1.4; }
  .fineprint {
    font-size: 8.5px;
    line-height: 1.35;
    margin-top: 8px;
    padding-top: 6px;
  }
  .fineprint br + br { display: none; }
  .fineprint br { display: none; }
  .fineprint { columns: 2; column-gap: 18px; column-rule: 1px solid var(--hairline); }
  .page-foot {
    margin-top: 14px;
    padding-top: 8px;
    font-size: 9.5px;
  }
  .page-foot .mark { font-size: 11px; }
  /* Avoid page-internal breaks inside key blocks */
  .parties, .pillar-grid, .econ-grid, .kpi-strip, .tput-table { break-inside: avoid; }
  .party, .pillar, .kpi, .econ-card { break-inside: avoid; }
  .flow-svg { break-inside: avoid; }
}
