/**
 * Prime Connect marketing site.
 *
 * Layout concept: a ruled ledger. Sections are separated by full-bleed
 * hairlines rather than floating cards, and each one carries its label in a
 * narrow left gutter — the way a government form labels its fields. Nothing is
 * centred except the things that are genuinely symmetrical.
 *
 * Colour and type come from brand/tokens.css. No hex values below.
 */

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

/* Browsers give <figure> a 40px inline margin by default, which pushes a
   full-width figure past the edge of its container. Reset the block elements
   whose UA margins this layout does not want. */
figure,
figcaption,
blockquote,
dl,
dd,
pre {
  margin: 0;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

/* ------------------------------------------------------------------ primitives */

a {
  color: var(--action);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:where(a, button, input, summary):focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: var(--s-2);
  background: var(--surface);
  color: var(--ink);
  padding: var(--s-2) var(--s-4);
  border: 1px solid var(--rule-strong);
  z-index: 10;
}
.skip:focus {
  left: var(--s-4);
}

.shell {
  width: min(1120px, 100% - var(--s-6));
  margin-inline: auto;
}

/* The ledger grid: label gutter, then content. */
.ledger {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: var(--s-6);
}

.label {
  font-family: var(--font-display);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 var(--s-3);
}
.gutter .label {
  position: sticky;
  top: var(--s-6);
}

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

section {
  padding-block: var(--s-8);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
  line-height: 1.12;
}
h1 {
  font-size: clamp(var(--t-xl), 6.2vw, var(--t-3xl));
}
h2 {
  font-size: clamp(var(--t-lg), 3.6vw, var(--t-xl));
}
h3 {
  font-size: var(--t-md);
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  max-width: var(--measure);
}
.lede {
  font-size: var(--t-md);
  color: var(--ink-2);
  line-height: 1.5;
}
.muted {
  color: var(--ink-2);
}
.fine {
  font-size: var(--t-sm);
  color: var(--ink-muted);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  align-items: flex-start;
  min-width: 0;
}
.stack-lg {
  gap: var(--s-6);
}

/**
 * `align-items: flex-start` is what keeps buttons and headings from stretching,
 * but it also makes block children shrink-to-fit their own content — so a wide
 * table or code listing would set the width of the whole page instead of
 * scrolling inside itself. These children take the full column and clip.
 */
.stack > .board,
.stack > .rawfile,
.stack > .versus,
.stack > .figures,
.stack > .rows,
.stack > .table-scroll,
.stack > .faq {
  width: 100%;
  min-width: 0;
}

.mono {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------------- header */

.masthead {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.masthead > .shell {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-base);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.brand:hover {
  text-decoration: none;
}
.brand svg {
  display: block;
  flex: none;
}
.masthead nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--s-5);
}
.masthead nav a {
  color: var(--ink-2);
  font-size: var(--t-sm);
}
.masthead nav a:hover {
  color: var(--ink);
}

/* --------------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--brand);
  color: var(--surface);
  font-family: var(--font-display);
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 120ms ease, background-color 120ms ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
:root[data-theme='dark'] .btn,
.btn {
  color: var(--page);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}
.btn--ghost:hover {
  border-color: var(--ink);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
}

/* ------------------------------------------------------------------------ hero */

.hero {
  padding-block: var(--s-8) var(--s-7);
}
.hero h1 span {
  color: var(--brand);
}
.hero .lede {
  max-width: 54ch;
}

/* The board is the thesis: real solicitations, real deadlines, no mockup gloss. */
.board {
  min-width: 0;
  margin-top: var(--s-7);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.board__bar {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  padding: 10px var(--s-4);
  border-bottom: 1px solid var(--rule);
  background: var(--surface-sunk);
  font-family: var(--font-display);
  font-size: var(--t-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.board__bar strong {
  color: var(--ink);
  font-weight: 600;
}
.board__live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  text-transform: none;
  letter-spacing: 0.04em;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  flex: none;
}
.board__scroll {
  overflow-x: auto;
}
table.roll {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: var(--t-sm);
}
table.roll th {
  font-family: var(--font-display);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: left;
  padding: 10px var(--s-4);
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
table.roll td {
  padding: 13px var(--s-4);
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
}
table.roll tr:last-child td {
  border-bottom: 0;
}
table.roll tbody tr:hover td {
  background: var(--surface-sunk);
}
.roll__title {
  font-weight: 600;
  color: var(--ink);
}
.roll__sub {
  display: block;
  font-family: var(--font-data);
  font-size: var(--t-xs);
  color: var(--ink-muted);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.roll__due {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.roll__due--soon {
  color: var(--critical);
  font-weight: 700;
}
.roll__due--week {
  font-weight: 600;
}

.src {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 2px;
  border: 1px solid var(--rule-strong);
  color: var(--ink-2);
  white-space: nowrap;
}
.src--sam {
  border-color: color-mix(in srgb, var(--brand) 45%, transparent);
  color: var(--brand);
  background: var(--brand-soft);
}
.src--dla {
  border-color: color-mix(in srgb, var(--warning) 45%, transparent);
  color: var(--warning);
  background: var(--warning-soft);
}

/* Page-load primeconnect: rows report in, one after another. */
@media (prefers-reduced-motion: no-preference) {
  table.roll tbody tr {
    animation: report-in 420ms cubic-bezier(0.16, 1, 0.3, 1) backwards;
  }
  table.roll tbody tr:nth-child(1) { animation-delay: 90ms; }
  table.roll tbody tr:nth-child(2) { animation-delay: 160ms; }
  table.roll tbody tr:nth-child(3) { animation-delay: 230ms; }
  table.roll tbody tr:nth-child(4) { animation-delay: 300ms; }
  table.roll tbody tr:nth-child(5) { animation-delay: 370ms; }
  @keyframes report-in {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
  }
}

/* ------------------------------------------------------------------ comparison */

.versus {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.versus > div {
  padding: var(--s-5);
  border-right: 1px solid var(--rule);
}
.versus > div:last-child {
  border-right: 0;
  background: var(--surface);
}
.versus h3 {
  font-size: var(--t-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--s-4);
}
.versus ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  font-size: var(--t-sm);
}
.versus li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: var(--s-2);
  color: var(--ink-2);
  line-height: 1.5;
}
.versus li::before {
  content: '—';
  font-family: var(--font-display);
  color: var(--ink-muted);
}
.versus > div:last-child li {
  color: var(--ink);
}
.versus > div:last-child li::before {
  content: '✓';
  color: var(--good);
  font-weight: 700;
}

/* -------------------------------------------------------------------- features */

.rows {
  display: flex;
  flex-direction: column;
}
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-width: 0;
  gap: var(--s-7);
  padding-block: var(--s-7);
  border-top: 1px solid var(--rule);
  align-items: start;
}
.row:first-child {
  border-top: 0;
  padding-top: 0;
}

.spec {
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s-2) var(--s-4);
  font-size: var(--t-sm);
  align-items: baseline;
}
.spec dt {
  font-family: var(--font-display);
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}
.spec dd {
  margin: 0;
  color: var(--ink-2);
}

/* A literal slice of the DLA batch file — the product's raw material. */
.rawfile {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.rawfile figcaption {
  padding: 9px var(--s-4);
  border-bottom: 1px solid var(--rule);
  background: var(--surface-sunk);
  font-family: var(--font-display);
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.rawfile pre {
  margin: 0;
  padding: var(--s-4);
  overflow-x: auto;
  font-family: var(--font-data);
  font-size: 11.5px;
  line-height: 1.9;
  color: var(--ink-2);
  white-space: pre;
}
.rawfile mark {
  background: var(--brand-soft);
  color: var(--brand);
  padding: 1px 0;
}

.arrow {
  display: block;
  text-align: center;
  color: var(--ink-muted);
  font-family: var(--font-display);
  padding-block: var(--s-3);
}

/* --------------------------------------------------------------------- numbers */

.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--s-5);
}
.figure .n {
  font-family: var(--font-display);
  font-size: var(--t-xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1;
}
.figure .k {
  display: block;
  margin-top: var(--s-2);
  font-size: var(--t-sm);
  color: var(--ink-2);
}

/* --------------------------------------------------------------------- pricing */

.price-card {
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
  padding: var(--s-6);
  max-width: 460px;
}
.price-card .amount {
  font-family: var(--font-display);
  font-size: var(--t-2xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.price-card .per {
  font-size: var(--t-base);
  color: var(--ink-muted);
  font-weight: 400;
  letter-spacing: 0;
}
.checks {
  list-style: none;
  margin: var(--s-5) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  font-size: var(--t-sm);
}
.checks li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: var(--s-2);
  color: var(--ink-2);
}
.checks li::before {
  content: '✓';
  color: var(--good);
  font-weight: 700;
}

/* ------------------------------------------------------------------------- faq */

.faq {
  display: flex;
  flex-direction: column;
}
.faq details {
  border-top: 1px solid var(--rule);
  padding-block: var(--s-4);
}
.faq details:last-of-type {
  border-bottom: 1px solid var(--rule);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  gap: var(--s-4);
  align-items: baseline;
  color: var(--ink);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  margin-left: auto;
  font-family: var(--font-display);
  color: var(--ink-muted);
  font-weight: 400;
}
.faq details[open] summary::after {
  content: '−';
}
.faq details p {
  margin-top: var(--s-3);
  color: var(--ink-2);
  font-size: var(--t-sm);
}

/* ------------------------------------------------------------------------- cta */

.closer {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* ---------------------------------------------------------------------- footer */

footer.site {
  padding-block: var(--s-7) var(--s-8);
  font-size: var(--t-sm);
}
footer.site .cols {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--s-6);
}
footer.site h4 {
  font-family: var(--font-display);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 var(--s-3);
}
footer.site ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
footer.site a {
  color: var(--ink-2);
}
footer.site a:hover {
  color: var(--ink);
}
footer.site .colophon {
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  color: var(--ink-muted);
  font-size: var(--t-xs);
}

/* -------------------------------------------------------------------- longform */

.doc {
  padding-block: var(--s-7) var(--s-9);
}
.doc .body {
  max-width: var(--measure);
  min-width: 0;
}
.doc h2 {
  font-size: var(--t-md);
  margin-top: var(--s-7);
}
.doc h3 {
  font-size: var(--t-base);
  margin-top: var(--s-5);
}
.doc p,
.doc li {
  color: var(--ink-2);
  margin-top: var(--s-3);
}
.doc ul,
.doc ol {
  padding-left: var(--s-5);
  margin: 0;
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--s-4);
  font-size: var(--t-sm);
}
.doc th,
.doc td {
  text-align: left;
  padding: 9px var(--s-3);
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.doc th {
  font-family: var(--font-display);
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.doc td {
  color: var(--ink-2);
}
.doc .table-scroll {
  overflow-x: auto;
}

.callout {
  border-left: 2px solid var(--warning);
  background: var(--warning-soft);
  padding: var(--s-4) var(--s-5);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-top: var(--s-5);
}
.callout p {
  color: var(--ink);
  margin: 0;
}
.callout p + p {
  margin-top: var(--s-3);
}

/**
 * Unfilled legal details render as a loud inline token rather than a plausible
 * default. A privacy policy with a wrong company name in it is worse than one
 * that visibly is not finished, so these are impossible to ship by accident.
 */
.fill {
  font-family: var(--font-display);
  font-size: 0.9em;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--critical-soft);
  color: var(--critical);
  border: 1px dashed currentColor;
  border-radius: 2px;
  padding: 0 5px;
  white-space: nowrap;
}

.toc {
  font-size: var(--t-sm);
}
.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  counter-reset: toc;
}
.toc li {
  counter-increment: toc;
  margin: 0;
}
.toc li::before {
  content: counter(toc, decimal-leading-zero) '  ';
  font-family: var(--font-display);
  color: var(--ink-muted);
  font-size: var(--t-xs);
}

/* --------------------------------------------------------------------- responsive */

@media (max-width: 860px) {
  .ledger {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-4);
  }
  .gutter .label {
    position: static;
  }
  .row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-5);
  }
  .versus > div {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .versus > div:last-child {
    border-bottom: 0;
  }
  section {
    padding-block: var(--s-7);
  }
  .masthead nav a.hide-sm {
    display: none;
  }
}

/* The masthead is the last thing to overflow: brand + links + CTA stop fitting
   somewhere around 620px. Drop the secondary links — the CTA goes to the same
   sign-in screen, so nothing is lost. */
@media (max-width: 620px) {
  .masthead nav a.hide-xs {
    display: none;
  }
  .masthead > .shell {
    gap: var(--s-3);
  }
  .brand {
    letter-spacing: 0.12em;
  }
  .btn {
    padding: 10px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
