/* RisGard site styles. Brand tokens from docs/DESIGN_SYSTEM.md. */
:root {
  --navy: #0b3b75;
  --ink: #0a2342;
  --cyan: #15bdf1;
  --cyan-deep: #0b7fa8;
  --sky: #ddf5fd;
  --canvas: #f8fbfd;
  --slate: #42566f;
  --rule: #d3dee8;
  --white: #ffffff;

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --measure: 66ch;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --space: clamp(3.5rem, 8vw, 6.5rem);
  --radius: 6px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.62;
  font-optical-sizing: auto;
}
img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
.h3 {
  font-family: var(--sans);
  color: var(--ink);
  text-wrap: balance;
  margin: 0 0 0.6em;
}
h1 {
  font-size: clamp(2.35rem, 5.2vw, 4rem);
  font-weight: 760;
  font-stretch: 118%;
  font-variation-settings: "wdth" 118;
  line-height: 1.04;
  letter-spacing: -0.012em;
}
h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  font-weight: 700;
  font-variation-settings: "wdth" 112;
  line-height: 1.15;
}
h3,
.h3 {
  font-size: 1.25rem;
  font-weight: 650;
  font-variation-settings: "wdth" 104;
  line-height: 1.3;
}
p,
ul,
ol,
dl {
  margin: 0 0 1em;
}
ul,
ol {
  padding-left: 1.2em;
}
li + li {
  margin-top: 0.35em;
}

a {
  color: var(--navy);
  text-decoration-color: var(--cyan);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--cyan-deep);
}
:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--white);
  padding: 0.6rem 1rem;
  font-family: var(--sans);
  z-index: 20;
}
.skip:focus {
  top: 1rem;
}
.lead {
  font-size: clamp(1.15rem, 1.6vw, 1.32rem);
  line-height: 1.55;
  color: var(--slate);
  max-width: 58ch;
}
.fine {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--slate);
}

/* ------------------------------------------------------------ buttons */
.button {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  padding: 0.85rem 1.3rem;
  border-radius: var(--radius);
  border: 2px solid var(--navy);
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
  cursor: pointer;
}
.button:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}
.button--quiet {
  background: transparent;
  color: var(--navy);
}
.button--quiet:hover {
  background: var(--sky);
  color: var(--ink);
  border-color: var(--navy);
}
.button--light {
  background: var(--white);
  border-color: var(--white);
  color: var(--navy);
}
.button--light:hover {
  background: var(--sky);
  border-color: var(--sky);
  color: var(--ink);
}
.button--small {
  padding: 0.55rem 0.95rem;
  font-size: 0.95rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* ------------------------------------------------------------ masthead */
.masthead {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 10;
}
.masthead__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0.85rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand img {
  display: block;
  height: 40px;
  width: auto;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-family: var(--sans);
}
.site-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav li + li {
  margin: 0;
}
.site-nav ul a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav ul a:hover,
.site-nav ul a[aria-current="page"] {
  border-bottom-color: var(--cyan);
}
.nav-toggle {
  display: none;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  background: none;
  border: 2px solid var(--navy);
  color: var(--navy);
  border-radius: var(--radius);
  padding: 0.45rem 0.8rem;
}
@media (max-width: 920px) {
  .masthead__inner {
    flex-wrap: wrap;
  }
  .js .nav-toggle {
    display: block;
  }
  .site-nav {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .js .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--rule);
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem var(--gutter) 1.25rem;
    gap: 1rem;
  }
  .js .site-nav.is-open {
    display: flex;
  }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }
  .site-nav ul a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--rule);
  }
}

/* ------------------------------------------------------------ hero and record */
.hero {
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero h1 {
  max-width: 14ch;
}
.record {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--rule);
  border-top: 6px solid var(--navy);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem 1.5rem;
  box-shadow: 0 18px 40px -24px rgba(11, 59, 117, 0.45);
  position: relative;
}
.record figcaption {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--slate);
  margin-bottom: 0.5rem;
}
.record dl {
  margin: 0;
}
.record dl > div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--rule);
}
.record dt {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
  padding-top: 0.15rem;
}
.record dd {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
}
.record__stamp {
  position: absolute;
  right: 1.25rem;
  bottom: -1.1rem;
  margin: 0;
  font-family: var(--sans);
  font-weight: 700;
  font-variation-settings: "wdth" 120;
  font-size: 0.95rem;
  color: var(--navy);
  background: var(--sky);
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  padding: 0.35rem 0.8rem;
  transform: rotate(-3deg);
}
@media (prefers-reduced-motion: no-preference) {
  .js .record dd {
    opacity: 0;
    animation: fill 380ms ease-out forwards;
  }
  .js .record dl > div:nth-child(1) dd {
    animation-delay: 250ms;
  }
  .js .record dl > div:nth-child(2) dd {
    animation-delay: 520ms;
  }
  .js .record dl > div:nth-child(3) dd {
    animation-delay: 790ms;
  }
  .js .record dl > div:nth-child(4) dd {
    animation-delay: 1060ms;
  }
  .js .record dl > div:nth-child(5) dd {
    animation-delay: 1330ms;
  }
  .js .record dl > div:nth-child(6) dd {
    animation-delay: 1600ms;
  }
  .js .record__stamp {
    opacity: 0;
    animation: stamp 260ms cubic-bezier(0.2, 1.4, 0.4, 1) 2050ms forwards;
  }
}
@keyframes fill {
  from {
    opacity: 0;
    transform: translateX(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes stamp {
  from {
    opacity: 0;
    transform: rotate(-3deg) scale(1.35);
  }
  to {
    opacity: 1;
    transform: rotate(-3deg) scale(1);
  }
}
@media (max-width: 860px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------ bands */
.band {
  padding: var(--space) 0;
}
.band--white {
  background: var(--white);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.band--navy {
  background: var(--navy);
  color: var(--white);
}
.band--navy h2,
.band--navy strong {
  color: var(--white);
}
.band--navy a:not(.button) {
  color: var(--white);
}
.band--navy :focus-visible {
  outline-color: var(--cyan);
}
.section-intro {
  max-width: 46rem;
  margin-bottom: 2.5rem;
}
.section-intro p {
  color: var(--slate);
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
}
@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
  }
}

/* services as rows: problem paired with outcome */
.rows {
  list-style: none;
  padding: 0;
  margin: 0 0 3rem;
  border-bottom: 1px solid var(--rule);
}
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}
.row h3,
.row .h3 {
  margin: 0;
}
.row h3 a,
.row .h3 a {
  text-decoration: none;
  color: var(--ink);
}
.row h3 a:hover,
.row .h3 a:hover {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--cyan);
}
.row p {
  margin: 0;
  font-size: 1rem;
}
.row__problem {
  color: var(--slate);
}
.row__label {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--navy);
  margin-bottom: 0.2rem;
}
@media (max-width: 860px) {
  .row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* engagement sequence */
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  padding: 0;
  margin: 0;
}
.steps li {
  counter-increment: step;
  margin: 0;
  padding-top: 1rem;
  border-top: 3px solid var(--navy);
}
.steps li::before {
  content: counter(step);
  font-family: var(--sans);
  font-weight: 700;
  color: var(--cyan-deep);
  margin-right: 0.5rem;
}
.steps strong {
  font-family: var(--sans);
  font-size: 1.15rem;
}
.steps span {
  display: block;
  margin-top: 0.35rem;
  color: var(--slate);
  font-size: 1rem;
}
@media (max-width: 700px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.85rem 1rem 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}
thead th {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate);
  border-bottom: 2px solid var(--navy);
}
tbody th {
  font-weight: 600;
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-right: 0;
}
.tier-table td:last-child {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.catalog__lead {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--slate);
  margin-top: 0.25rem;
  max-width: 62ch;
}
.catalog tr[hidden] {
  display: none;
}
@media (max-width: 640px) {
  .tier-table thead {
    display: none;
  }
  .tier-table tr {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--rule);
  }
  .tier-table th,
  .tier-table td {
    display: block;
    border: 0;
    padding: 0.15rem 0;
  }
}

/* modules and credentials */
.module-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.module-list li {
  padding: 1.1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  margin: 0;
}
.module-list strong {
  display: block;
  font-family: var(--sans);
  font-size: 1.2rem;
  font-variation-settings: "wdth" 112;
  margin-bottom: 0.2rem;
}
.credentials {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 2rem;
}
.credentials li {
  margin: 0;
}
.credentials abbr {
  display: block;
  font-family: var(--sans);
  font-weight: 760;
  font-variation-settings: "wdth" 122;
  font-size: 1.6rem;
  color: var(--navy);
  text-decoration: none;
}
.credentials span {
  font-size: 0.95rem;
  color: var(--slate);
}
blockquote {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  border-left: 4px solid var(--cyan);
  font-style: italic;
  font-size: 1.2rem;
}

/* closing call to action */
.closing {
  background: var(--ink);
  color: var(--white);
  padding: var(--space) 0;
}
.closing h2 {
  color: var(--white);
}
.closing__inner > * {
  max-width: 46rem;
}
.closing p {
  color: #c9d6e6;
}
.closing .button {
  background: var(--white);
  border-color: var(--white);
  color: var(--ink);
}
.closing .button:hover {
  background: var(--sky);
  border-color: var(--sky);
}
.closing :focus-visible {
  outline-color: var(--cyan);
}

/* ------------------------------------------------------------ inner pages */
.page-head {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 2.5rem;
  border-bottom: 1px solid var(--rule);
  background: var(--white);
}
.page-head h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  max-width: 22ch;
}
.page-head__meta {
  font-family: var(--sans);
  color: var(--slate);
  font-size: 0.95rem;
}
.status {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  background: var(--sky);
  border-left: 4px solid var(--navy);
  padding: 0.6rem 0.9rem;
  margin-top: 0.5rem;
}
.spec {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.5rem;
  font-family: var(--sans);
  margin: 1.5rem 0 0;
}
.spec dt {
  font-size: 0.85rem;
  color: var(--slate);
}
.spec dd {
  margin: 0;
  font-weight: 650;
  font-size: 1.15rem;
}
.prose {
  padding-top: 2.5rem;
  padding-bottom: var(--space);
}
.prose > *,
.prose-section > * {
  max-width: var(--measure);
}
.prose-section {
  margin-bottom: 2.75rem;
}
.prose-section h2 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-variation-settings: "wdth" 106;
  line-height: 1.25;
}
.facts {
  display: grid;
  gap: 1.25rem;
}
.facts > div {
  border-left: 3px solid var(--rule);
  padding-left: 1rem;
}
.facts dt {
  font-family: var(--sans);
  font-weight: 650;
  margin-bottom: 0.25rem;
}
.facts dd {
  margin: 0;
}
.facts dd p:last-child {
  margin-bottom: 0;
}
.facts--wide > div {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 1.5rem;
  border-left: 0;
  border-top: 1px solid var(--rule);
  padding: 1.25rem 0 0;
}
.facts--wide dt {
  font-size: 1.25rem;
  font-variation-settings: "wdth" 112;
  color: var(--navy);
}
@media (max-width: 640px) {
  .facts--wide > div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
.ladder {
  padding-left: 1.4em;
}
.note {
  background: var(--sky);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
}
.note p:last-child {
  margin-bottom: 0;
}
.qa {
  border-top: 1px solid var(--rule);
  padding: 1rem 0;
}
.qa summary {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
}
.qa[open] summary {
  margin-bottom: 0.75rem;
}
.docs,
.reading {
  list-style: none;
  padding: 0;
}
.docs li,
.reading li {
  padding: 0.9rem 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}
.docs a {
  font-family: var(--sans);
  font-weight: 600;
}
.docs p {
  margin: 0.3rem 0 0;
  color: var(--slate);
}

/* filters */
.filters fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--sans);
}
.filters legend {
  font-weight: 600;
  margin-bottom: 0.5rem;
  width: 100%;
}
.filters label {
  border: 2px solid var(--rule);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
}
.filters label:has(input:checked) {
  border-color: var(--navy);
  background: var(--sky);
}
.filters input {
  accent-color: var(--navy);
}
.tier {
  margin-bottom: 3rem;
}

/* contact form */
.contact-form {
  max-width: 46rem;
  padding: 2.5rem 0 var(--space);
  font-family: var(--sans);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 640px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}
.field {
  margin: 0 0 1.25rem;
  border: 0;
  padding: 0;
}
.field label,
.field legend {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
fieldset.field label {
  display: inline-flex;
  gap: 0.4rem;
  font-weight: 400;
  margin-right: 1.25rem;
}
.optional {
  font-weight: 400;
  color: var(--slate);
}
input:not([type="radio"]),
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.7rem 0.8rem;
  border: 1.5px solid #8ea2b6;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--navy);
}

/* ------------------------------------------------------------ footer */
.footer {
  background: var(--white);
  border-top: 1px solid var(--rule);
  padding: 3rem 0 2rem;
  font-family: var(--sans);
  font-size: 0.95rem;
}
.footer__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 2rem;
}
.footer__brand p {
  color: var(--slate);
  max-width: 32ch;
}
.footer__nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.footer__nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer__nav a {
  color: var(--ink);
  text-decoration: none;
}
.footer__nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--cyan);
}
.footer__legal {
  grid-column: 1 / -1;
  color: var(--slate);
  font-size: 0.85rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
  margin: 0;
}
@media (max-width: 760px) {
  .footer__inner,
  .footer__nav {
    grid-template-columns: 1fr;
  }
}

/* RisGard OS modules on the home page */
.section-intro--light p {
  color: #c9d6e6;
}
.module-cards {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}
.module-cards li {
  margin: 0;
  padding: 1.5rem 1.5rem 1.5rem 0;
}
.module-cards li + li {
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  padding-left: 1.5rem;
}
.module-cards h3 {
  font-size: 1.6rem;
  font-variation-settings: "wdth" 120;
  margin-bottom: 0.4rem;
}
.module-cards h3 a {
  color: var(--white);
}
.module-cards p {
  margin: 0;
  color: #dbe6f2;
}
.status--dark {
  background: rgba(255, 255, 255, 0.1);
  border-left-color: var(--cyan);
  color: var(--white);
}
@media (max-width: 760px) {
  .module-cards {
    grid-template-columns: 1fr;
  }
  .module-cards li,
  .module-cards li + li {
    border-left: 0;
    padding: 1.25rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
  }
}

/* service stages: a real sequence, so numbered */
.stages {
  list-style: none;
  counter-reset: stage;
  padding: 0;
  margin: 0 0 2rem;
}
.stage {
  counter-increment: stage;
  margin: 0 0 2.5rem;
}
.stage__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--navy);
  font-family: var(--sans);
}
.stage__head strong {
  font-size: 1.35rem;
  font-variation-settings: "wdth" 118;
}
.stage__head strong::before {
  content: counter(stage) " ";
  color: var(--cyan-deep);
}
.stage__head span {
  color: var(--slate);
  font-family: var(--serif);
}
.stage .rows {
  margin-bottom: 0;
  border-bottom: 0;
}
.stage .row:first-child {
  border-top: 0;
}

/* pricing */
.price-table td,
.price-table th {
  font-size: 1.05rem;
}
.price-table td.num {
  font-weight: 600;
}
@media (max-width: 700px) {
  .price-table thead {
    display: none;
  }
  .price-table tr {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid var(--rule);
  }
  .price-table th,
  .price-table td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border: 0;
    padding: 0.2rem 0;
  }
  .price-table td::before {
    content: attr(data-label);
    font-weight: 400;
    color: var(--slate);
  }
}
