/* PureTrace public site.
 *
 * One stylesheet for every page. Served from S3 as a same-origin object, which
 * is why the CloudFront CSP carries style-src 'self' rather than 'unsafe-inline':
 * no page may declare a <style> block or a style="" attribute.
 *
 * Palette is the 2026 brand set, aligned to brand/logo-on-navy.svg.
 * Two contrast rules are load-bearing and must not be "tidied":
 *   --cyan  fails WCAG AA on white (3.1:1). Decoration only, never text.
 *   --green fails as text. Use --green-text for marks and captions.
 *   --muted is for light backgrounds only. On navy use --sky-muted.
 */

:root {
  --navy: #151947;
  --navy-deep: #0d1030;
  --cyan: #1c9cd8;
  --blue: #396cb3;
  --blue-dark: #2e5892;
  --green: #6dae44;
  --green-text: #4c7a2c;
  --sky: #b1e2f9;
  --sky-muted: #9fc4de;
  --ink: #1f2430;
  --muted: #5b6472;
  --fog: #f5f5f5;
  --line: #dfe4ec;
  --line-navy: #2b3068;
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/outfit-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  /* Keep an anchor target clear of the sticky nav bar. */
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: "Outfit", "Segoe UI", Calibri, Arial, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: #fff;
  line-height: 1.65;
  font-size: 17px;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.18;
  margin: 0;
  color: var(--navy);
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 18px;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--blue-dark);
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  color: var(--blue);
  padding: 12px 18px;
  /* Above the sticky nav bar, or focusing it scrolls it under the bar. */
  z-index: 40;
}

.skip:focus {
  left: 12px;
  top: 12px;
}

/* ---- Layout ---- */

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

.wrap-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 28px;
}

section {
  padding: 68px 0;
}

.alt {
  background: var(--fog);
}

/* Navy surfaces. `header` is grouped into every one of these rules on purpose:
   the hero lives inside <header>, not inside .navy, and without it the h1
   inherits the default navy heading colour and renders navy on navy. */

.navy,
header {
  background: var(--navy);
  color: var(--sky);
}

.navy h1,
.navy h2,
.navy h3,
header h1,
header h2,
header h3 {
  color: #fff;
}

.navy p,
header p {
  color: var(--sky);
}

/* ---- Sticky nav bar ----
   Deliberately a direct child of <body>, not of <header>. A sticky element only
   sticks within its own containing block, so nesting it inside <header> would
   scroll it away the moment the hero ended. */

.nav-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(21, 25, 71, 0.18);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.nav-logo {
  display: block;
  line-height: 0;
}

.nav-logo img {
  height: 26px;
  width: auto;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  align-items: center;
}

.nav-links a {
  color: var(--sky);
  text-decoration: none;
  font-size: 15px;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Reserved slot: enable once app.puretrace.co.uk resolves.
   <a class="nav-signin" href="https://app.puretrace.co.uk">Sign in</a> */
.nav-signin {
  border: 1px solid var(--cyan);
  border-radius: 4px;
  padding: 6px 14px;
}

/* ---- Hero ---- */

/* The hero is the one centred block on the site. Everything below it stays
   left-aligned: a short headline centred reads deliberate, a 2,000-word page
   centred does not. */
.hero {
  padding: 78px 0 84px;
  text-align: center;
}

.hero .cta-row {
  justify-content: center;
}

/* Defaults to the light-surface colour. Sky on white is 1.3:1, so the navy
   variant is an explicit override rather than something source order decides. */
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.navy .eyebrow,
header .eyebrow {
  color: var(--sky);
}

/* text-wrap: balance evens the two lines instead of leaving the last word
   stranded on its own. max-width is a ceiling for browsers without it, not the
   thing doing the breaking. */
.hero h1 {
  font-size: 52px;
  max-width: 20ch;
  margin: 0 auto 24px;
  text-wrap: balance;
}

/* balance, not pretty: these are short blocks, and pretty still allowed a
   single word to strand on the last line. */
.hero p {
  text-wrap: balance;
}

.hero p {
  max-width: 58ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 18px;
}

.hero .lede {
  color: #fff;
}

/* ---- Typography helpers ---- */

h1 {
  font-size: 40px;
}

h2 {
  font-size: 28px;
  margin-bottom: 18px;
  max-width: 24ch;
}

h3 {
  font-size: 17px;
  margin-bottom: 6px;
}

.lead {
  max-width: 66ch;
  font-size: 18px;
}

.body {
  max-width: 66ch;
}

.muted {
  color: var(--muted);
}

.navy .muted,
header .muted,
.sky-muted {
  color: var(--sky-muted);
}

.small {
  font-size: 14px;
}

.rule {
  width: 56px;
  height: 3px;
  background: var(--cyan);
  border: 0;
  margin: 0 0 22px;
}

/* ---- Cards ---- */

.grid {
  display: grid;
  gap: 20px;
  margin-top: 30px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 24px;
}

.alt .card {
  background: #fff;
}

.card-plain {
  border: 0;
  background: none;
  padding: 0;
}

.card p {
  font-size: 15.5px;
  color: var(--muted);
}

/* Not cyan: at 13px on white that is 3.09:1 and fails AA. Cyan stays on
   non-text decoration only (.rule, diagram strokes, borders). */
.num {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

/* ---- Bordered emphasis block ---- */

.note {
  border: 1px solid var(--line);
  border-left: 4px solid var(--cyan);
  border-radius: 0 8px 8px 0;
  padding: 22px 26px;
  margin-top: 28px;
  background: #fff;
  max-width: 72ch;
}

.chip {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 3px;
  margin-bottom: 14px;
}

.pull {
  border-top: 3px solid var(--cyan);
  padding-top: 18px;
  margin-top: 30px;
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  max-width: 46ch;
}

/* ---- Enforced-control rows ---- */

.rules {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  max-width: 74ch;
}

.rules li {
  position: relative;
  padding: 14px 0 14px 38px;
  border-bottom: 1px solid var(--line);
}

.rules li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 20px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2.5px solid var(--green-text);
}

.rules li::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 24px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--green-text);
  opacity: 0.22;
}

.plain {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  max-width: 72ch;
}

.plain li {
  padding: 9px 0 9px 20px;
  position: relative;
}

.plain li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
}

.steps {
  margin: 22px 0 0;
  padding-left: 22px;
  max-width: 70ch;
}

.steps li {
  padding: 6px 0;
}

/* ---- Tables ---- */

.tbl-scroll {
  overflow-x: auto;
  margin-top: 26px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 440px;
  font-size: 15.5px;
}

th,
td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--navy);
  font-weight: 700;
}

/* ---- Diagrams ---- */

figure {
  margin: 30px 0 0;
}

/* SVG text scales with the viewBox, so a diagram squeezed into a 375px screen
   renders its 14px labels at about 6px. Below min-width the diagram scrolls
   inside this box instead of shrinking further. Only the diagram scrolls: the
   caption stays full width and readable. */
.fig-scroll {
  overflow-x: auto;
}

/* 580px is the point at which the ring's 14px labels still render at 11px or
   above once scaled to its 720-wide viewBox. Do not lower it. */
.fig-scroll svg {
  display: block;
  width: 100%;
  min-width: 580px;
  max-width: 720px;
  height: auto;
  margin: 0 auto;
}

figcaption {
  max-width: 66ch;
  margin: 16px auto 0;
  font-size: 15px;
  color: var(--muted);
  text-align: center;
}

/* ---- Buttons and CTAs ---- */

.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 5px;
}

.btn:hover {
  background: var(--blue-dark);
  color: #fff;
}

.navy .btn,
header .btn {
  background: #fff;
  color: var(--navy);
}

.navy .btn:hover,
header .btn:hover {
  background: var(--sky);
  color: var(--navy);
}

/* A button inside a card fills its width and sits at the foot of the card, so
   three cards in a row present three equally-weighted actions. */
.card .btn {
  display: block;
  text-align: center;
  font-size: 15px;
  padding: 11px 16px;
  margin-top: 4px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 26px;
  align-items: center;
  margin-top: 26px;
}

.cta-secondary {
  font-weight: 700;
  font-size: 16px;
}

/* Blue on navy is only 3.15:1. Secondary links on any navy surface use sky. */
.navy .cta-secondary,
header .cta-secondary {
  color: var(--sky);
}

.cta-note {
  margin-top: 14px;
  font-size: 14.5px;
}

.cta-note-small {
  margin-top: 4px;
  font-size: 13.5px;
}

/* ---- Sector strip ---- */

.sectors {
  margin-top: 22px;
  max-width: 78ch;
  color: var(--muted);
  font-size: 16px;
}

/* The separator is rendered text, so it is held to the text contrast bar too. */
.sectors span {
  color: var(--muted);
  padding: 0 6px;
}

/* ---- Footer ---- */

footer {
  background: var(--navy);
  color: var(--sky-muted);
  padding: 44px 0 38px;
  font-size: 14.5px;
}

.foot-top {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-navy);
}

.foot-logo img {
  height: 26px;
  width: auto;
  display: block;
}

.foot-tag {
  margin-top: 10px;
  color: var(--sky-muted);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.foot-links a {
  color: var(--sky);
  text-decoration: none;
}

.foot-links a:hover {
  text-decoration: underline;
}

.fine {
  margin-top: 22px;
  font-size: 13px;
  color: var(--sky-muted);
  max-width: 84ch;
}

.fine p {
  margin-bottom: 8px;
}

/* ---- Responsive ---- */

@media (max-width: 860px) {
  .hero h1 {
    font-size: 40px;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 25px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16.5px;
  }

  section {
    padding: 52px 0;
  }

  .wrap,
  .wrap-narrow {
    padding: 0 20px;
  }

  .hero {
    padding: 46px 0 56px;
  }

  .hero h1 {
    font-size: 32px;
    max-width: 14ch;
  }

  .nav {
    justify-content: flex-start;
  }

  .nav-links {
    gap: 8px 18px;
  }

  .nav-links a {
    font-size: 14.5px;
  }
}
