:root {
  --blue: #1c73d8;
  --blue-deep: #0f4fa0;
  --navy: #0c2340;
  --ink: #1f2933;
  --grey: #333333;
  --muted: #5b6875;
  --line: #d9e1ea;
  --tint: #eef4fc;
  --paper: #ffffff;
  --high: #b4281e;
  --medium: #a86400;
  --low: #1f7a4d;
  --font: 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-block-start: 5rem; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-inline-size: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

a { color: var(--blue-deep); }
a:focus-visible, input:focus-visible + span, .matrix td:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  inset-block-start: -4rem;
  background: var(--navy);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip:focus { inset-block-start: 1rem; }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
p { margin: 0 0 1em; }

/* Header */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-block-end: 1px solid var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-block-size: 4rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--blue);
  text-decoration: none;
}
.wordmark {
  color: var(--grey);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
nav { display: flex; align-items: center; gap: clamp(0.9rem, 3vw, 2rem); }
nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.975rem;
}
nav a:hover { color: var(--blue-deep); }
nav .nav-contact {
  border: 1.5px solid var(--blue);
  color: var(--blue-deep);
  padding: 0.4rem 0.9rem;
}

/* Hero */
.hero { padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5.5rem); }

.creed {
  position: relative;
  display: inline-block;
  font-size: clamp(1.75rem, 8.2vw, 6.25rem);
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--grey);
  padding-block: 0.3em;
  padding-inline: 0.7em;
}
.creed span { display: block; white-space: nowrap; }
.creed::before, .creed::after {
  content: '';
  position: absolute;
  inset-block: 0;
  inline-size: 0.32em;
  border: 0.085em solid var(--blue);
  animation: open 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.creed::before { inset-inline-start: 0; border-inline-end: 0; --from: 1.2em; }
.creed::after { inset-inline-end: 0; border-inline-start: 0; --from: -1.2em; }

@keyframes open {
  from { transform: translateX(var(--from)); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.lede {
  max-inline-size: 38rem;
  margin-block: clamp(2rem, 4vw, 3rem) 0;
  font-size: clamp(1.15rem, 1.9vw, 1.4rem);
  line-height: 1.45;
}

.hero-products {
  list-style: none;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  border-block-start: 2px solid var(--grey);
  max-inline-size: 52rem;
}
.hero-products a {
  display: block;
  padding-block: 1.1rem;
  padding-inline-end: 1.5rem;
  text-decoration: none;
  color: var(--ink);
}
.hero-products strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--blue-deep);
}
.hero-products a:hover strong { text-decoration: underline; text-underline-offset: 0.2em; }
.hero-products span { color: var(--muted); font-size: 0.975rem; }

/* Product sections */
.product { padding-block: clamp(3.5rem, 8vw, 6.5rem); border-block-start: 1px solid var(--line); }
.product-head { margin-block-end: clamp(2rem, 4vw, 3rem); }
.product-head h2 { font-size: clamp(2.25rem, 5.5vw, 4rem); letter-spacing: -0.03em; }
.status { margin: 0.6rem 0 0; color: var(--muted); font-weight: 500; }

.cols {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.prose p { max-inline-size: 34rem; }
.big {
  font-size: clamp(1.3rem, 2.3vw, 1.7rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 500;
}

.jobs, .points { margin: 0; padding: 0; list-style: none; }
.jobs { counter-reset: job; }
.jobs li, .points li {
  padding-block: 1.15rem;
  border-block-start: 1px solid var(--line);
}
.jobs li:first-child, .points li:first-child { border-block-start: 0; padding-block-start: 0; }
.jobs li {
  counter-increment: job;
  display: grid;
  grid-template-columns: 2.25rem 1fr;
}
.jobs li::before {
  content: counter(job);
  grid-row: span 2;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--blue);
}
.jobs h3, .points h3 { font-size: 1.2rem; letter-spacing: -0.015em; margin-block-end: 0.3rem; }
.jobs p, .points p { margin: 0; color: var(--muted); grid-column: 2; }

/* Risk matrix */
.matrix-block {
  margin-block-start: clamp(3rem, 6vw, 4.5rem);
  background: var(--tint);
  padding: clamp(1.5rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.matrix-intro h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-block-end: 0.75rem; }
.matrix-intro > p { max-inline-size: 30rem; }

.seg { border: 0; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; }
.seg legend { padding: 0; margin-block-end: 0.4rem; font-weight: 600; font-size: 0.95rem; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span {
  display: block;
  padding: 0.5rem 1.05rem;
  background: #fff;
  border: 1.5px solid var(--blue);
  margin-inline-end: -1.5px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--blue-deep);
}
.seg input:checked + span { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }

.verdict { margin: 1.75rem 0 0; font-size: 1.35rem; font-weight: 500; }
.verdict strong { font-weight: 600; }
.verdict .high { color: var(--high); }
.verdict .medium { color: var(--medium); }
.verdict .low { color: var(--low); }

.matrix { inline-size: 100%; border-collapse: separate; border-spacing: 5px; table-layout: fixed; }
.matrix th { font-weight: 500; font-size: 0.9rem; color: var(--muted); padding: 0.3rem; }
.matrix .axis-title { color: var(--ink); font-weight: 600; }
.matrix tbody th { text-align: end; padding-inline-end: 0.6rem; }
.matrix td[data-r] {
  text-align: center;
  padding-block: clamp(0.9rem, 2.4vw, 1.6rem);
  font-weight: 600;
  background: #fff;
  cursor: pointer;
  border: 3px solid transparent;
  opacity: 0.55;
  transition: opacity 150ms, border-color 150ms;
}
.matrix td.high { color: var(--high); }
.matrix td.medium { color: var(--medium); }
.matrix td.low { color: var(--low); }
.matrix td.on { opacity: 1; border-color: currentColor; }
.matrix td[data-r]:hover { opacity: 1; }

.cta-row { margin: clamp(2.5rem, 5vw, 3.5rem) 0 0; }
.button {
  display: inline-block;
  background: var(--blue-deep);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.85rem 1.5rem;
}
.button:hover { background: var(--navy); }

/* PLEXA */
.dark { background: var(--navy); color: #e8eef6; border-block-start: 0; }
.dark h2, .dark h3 { color: #fff; }
.dark .status, .dark .points p { color: #a9bdd4; }
.dark .points li { border-color: rgba(255, 255, 255, 0.16); }
.dark .button { background: #fff; color: var(--navy); }
.dark .button:hover { background: var(--tint); }
.dark a:focus-visible { outline-color: #fff; }

.chain {
  list-style: none;
  margin: clamp(3rem, 6vw, 4.5rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
}
.chain li {
  position: relative;
  padding: 1.1rem 1.2rem;
  border: 2px solid #6fa8ea;
  border-inline-end: 0;
}
.chain li::after {
  content: '';
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 100%;
  inline-size: 2.5rem;
  border-block-start: 2px solid #6fa8ea;
}
.chain li:last-child { border-inline-end: 2px solid #6fa8ea; }
.chain li:last-child::after { display: none; }
.chain span { display: block; font-weight: 600; font-size: 1.15rem; color: #fff; letter-spacing: -0.01em; }
.chain small { color: #a9bdd4; font-size: 0.9rem; }

/* Contact and footer */
.contact { padding-block: clamp(3.5rem, 8vw, 6rem); }
.contact h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); letter-spacing: -0.03em; margin-block-end: 1rem; }
.contact p { max-inline-size: 36rem; }
.mail {
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-underline-offset: 0.2em;
}

.site-footer { border-block-start: 1px solid var(--line); padding-block: 1.5rem; color: var(--muted); font-size: 0.9rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }

@media (max-width: 52rem) {
  .cols, .matrix-block { grid-template-columns: 1fr; }
  .chain { grid-template-columns: 1fr; gap: 1.5rem; }
  .chain li { border-inline-end: 2px solid #6fa8ea; border-block-end: 0; }
  .chain li::after {
    inset-block-start: 100%;
    inset-inline-start: 1.5rem;
    inline-size: 0;
    block-size: 1.5rem;
    border-block-start: 0;
    border-inline-start: 2px solid #6fa8ea;
  }
  .chain li:last-child { border-block-end: 2px solid #6fa8ea; }
}

@media (max-width: 34rem) {
  nav a:not(.nav-contact) { display: none; }
  .wordmark { font-size: 1.3rem; }
  .matrix tbody th { font-size: 0.8rem; padding-inline-end: 0.2rem; }
  .matrix td[data-r] { font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .creed::before, .creed::after { animation: none; }
  .matrix td[data-r] { transition: none; }
}
