/* Parallel Web: site stylesheet (design C: design A layout on white, navy/teal/red palette, Red Hat Display) */

@font-face {
  font-family: "Red Hat Display";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/red-hat-display-latin-wght-normal.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;
}

:root {
  /* Brand colours from the logo: navy #02253e, teal #00737e. */
  --ink: #02253e;
  --heading: #00737e;
  --text: #333333;
  --muted: #666666;
  --line: #e2e6e9;
  --line-strong: #c8d0d6;
  --surface: #ffffff;
  --surface-alt: #f8f8f8;
  --tint: #e8f3f4;
  --link: #00737e;
  --focus: #00737e;

  --accent: #d7262e;
  --accent-hover: #b81f26;

  --font-sans: "Red Hat Display", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-label: var(--font-sans);

  --container: 76rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 9vw, 7.5rem);
  --radius: 10px;
  --header-h: 4.5rem;

  color-scheme: light;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background-color: #ffffff;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-optical-sizing: auto;
  color: var(--text);
  background-color: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body:has(.site-nav:popover-open) {
  overflow: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

/* Display headings: bold capitals with open tracking, teal on light backgrounds. */
h1,
.h2,
.cta-band__title {
  color: var(--heading);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

p,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

p {
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background-color: #00737e;
  color: #fff;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.nowrap {
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  background: #fff;
  color: #0b1220;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.icon {
  display: inline-block;
  flex: none;
  width: 1rem;
  height: 1rem;
}

.icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.section--alt {
  background-color: var(--surface-alt);
}

.section--tight {
  padding-block: clamp(3rem, 6vw, 4.5rem);
}

.section-head {
  display: grid;
  gap: 1.25rem;
  max-width: 48rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head--split {
  max-width: none;
  grid-template-columns: minmax(0, 48rem) auto;
  justify-content: space-between;
  align-items: end;
}

@media (max-width: 47.99rem) {
  .section-head--split {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Section heading with an illustration on the right (home: Services). */
.section-head--media {
  max-width: none;
  align-items: center;
  gap: 2.5rem 4rem;
}

@media (min-width: 56rem) {
  .section-head--media {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }

  .section-head--media-small {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }
}

.section-head--media-small .section-head__media img {
  max-width: 26rem;
}

/* drop-shadow follows the transparent outline of the illustration; hover lifts it a little. */
.section-head__media img {
  width: 100%;
  max-width: 34rem;
  height: auto;
  margin-inline: auto;
  filter: drop-shadow(0 6px 10px rgba(2, 37, 62, 0.12)) drop-shadow(0 1px 2px rgba(2, 37, 62, 0.08));
  transition: filter 0.3s ease, transform 0.3s ease;
}

.section-head__media img:hover {
  filter: drop-shadow(0 16px 24px rgba(2, 37, 62, 0.2)) drop-shadow(0 3px 6px rgba(2, 37, 62, 0.1));
  transform: translateY(-4px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-label);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--link);
}

/* Mini logo mark: two slanted bars, navy and teal, the teal one set slightly lower. */
.eyebrow::before {
  content: "";
  flex: none;
  width: 0.875rem;
  height: 0.75rem;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 42% 82% no-repeat,
    linear-gradient(var(--heading), var(--heading)) 100% 100% / 42% 82% no-repeat;
  transform: skewX(-32deg);
}

.h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  line-height: 1.12;
}

.lead {
  font-size: clamp(1.125rem, 1.03rem + 0.45vw, 1.3125rem);
  line-height: 1.55;
  color: var(--muted);
}

.split {
  display: grid;
  gap: 2rem 4rem;
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.stack > * + * {
  margin-top: 1.25rem;
}

.block-title {
  margin-bottom: 2rem;
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn .icon {
  transition: transform 0.15s ease;
}

.btn:hover .icon {
  transform: translateX(2px);
}

.btn--primary {
  background-color: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background-color: var(--accent-hover);
  color: #fff;
}

/* Arrow in a white circle at the end of the pill. */
.btn--primary:has(.icon) {
  gap: 0.875rem;
  padding: 0.3125rem 0.3125rem 0.3125rem 1.5rem;
}

.btn--primary .icon {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.625rem;
  border-radius: 50%;
  background-color: #fff;
  color: var(--accent);
}

.btn--primary .icon path {
  stroke-width: 2.2;
}

.btn--secondary {
  border-color: var(--line-strong);
  background-color: transparent;
  color: var(--ink);
}

.btn--secondary:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn--small {
  min-height: 2.5rem;
  padding: 0.5rem 1.125rem;
  font-size: 0.8125rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 500;
  color: var(--link);
  text-decoration: none;
}

.link-arrow:hover {
  text-decoration: underline;
}

.link-arrow .icon {
  transition: transform 0.15s ease;
}

.link-arrow:hover .icon {
  transform: translateX(2px);
}

/* ---------- Header & navigation ---------- */

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* Logo image (720x83); the height sets the size, the width follows. */
.brand__logo {
  display: block;
  width: auto;
  height: 2rem;
}

@media (max-width: 47.99rem) {
  .brand__logo {
    height: 1.375rem;
  }
}

.site-footer .brand__logo {
  height: 1.625rem;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.site-nav__list a:not(.btn) {
  display: block;
  padding: 0.5rem 0.875rem;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav__list a:not(.btn):hover {
  color: var(--ink);
  background-color: rgba(2, 37, 62, 0.06);
}

.site-nav__list a[aria-current]:not(.btn) {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--link);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.55em;
}

.site-nav__cta {
  margin-left: 0.75rem;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
}

.site-nav__top {
  display: none;
}

/* Desktop: the popover nav is always shown inline. */
@media (min-width: 48rem) {
  .site-nav[popover] {
    display: block;
    position: static;
    inset: auto;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: visible;
    background: transparent;
    color: inherit;
  }
}

/* Mobile: the nav opens as a full-screen popover (no JavaScript needed). */
@media (max-width: 47.99rem) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav:popover-open {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 0 var(--gutter) 2rem;
    border: 0;
    overflow-y: auto;
    background-color: var(--surface);
    color: var(--text);
  }

  .site-nav__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: var(--header-h);
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 1rem;
  }

  .site-nav__list a:not(.btn) {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
  }

  .site-nav__list a:not(.btn):hover {
    background: none;
  }

  .site-nav__cta {
    margin: 2rem 0 0;
  }

  .site-nav__list .btn {
    width: 100%;
    min-height: 3rem;
    font-size: 1rem;
  }
}

/* Browsers without popover support: show the links as a wrapped row. */
@supports not selector(:popover-open) {
  .nav-toggle,
  .site-nav__top {
    display: none !important;
  }

  .site-header__inner {
    flex-wrap: wrap;
    padding-block: 0.75rem;
  }

  .site-nav__list {
    flex-wrap: wrap;
  }
}

/* ---------- Faint engineering grid behind heroes ---------- */

.grid-bg {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.grid-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(2, 37, 62, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(2, 37, 62, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 70% 10%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 90% at 70% 10%, #000 20%, transparent 75%);
}

/* ---------- Home hero ---------- */

.hero {
  padding-block: clamp(4rem, 9vw, 7.5rem) clamp(4rem, 8vw, 6.5rem);
}

.hero__grid {
  display: grid;
  gap: clamp(3rem, 6vw, 4rem);
  align-items: center;
}

.hero__title {
  margin-top: 1.5rem;
  color: var(--ink);
  font-size: clamp(2.25rem, 1.4rem + 3.8vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: 0.03em;
}

@media (min-width: 62rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }

  /* Scale with the column so "BUSINESS SOFTWARE." (~11.5em in caps) stays on one line. */
  .hero__title {
    font-size: clamp(2.25rem, 2.9vw, 3.25rem);
  }
}

.hero__title span {
  display: block;
  color: var(--heading);
}

.hero__lead {
  margin-top: 1.75rem;
  max-width: 34rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.hero__note {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  max-width: 34rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}

.hero__note strong {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- Architecture diagram (inline SVG) ---------- */

.diagram {
  width: 100%;
  max-width: 34rem;
  height: auto;
  margin-inline: auto;
}

.diagram .caption {
  fill: var(--muted);
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.diagram .node {
  fill: var(--surface);
  stroke: var(--line-strong);
}

.diagram .node--core {
  fill: var(--tint);
  stroke: var(--heading);
  stroke-width: 1.5;
}

.diagram .chip {
  fill: var(--surface);
  stroke: var(--line-strong);
}

.diagram .label {
  fill: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
}

.diagram .label--core {
  font-size: 15px;
}

.diagram .sub {
  fill: var(--muted);
  font-family: var(--font-label);
  font-size: 10.5px;
}

.diagram .chip-label {
  fill: var(--text);
  font-family: var(--font-label);
  font-size: 10.5px;
}

.diagram .wire {
  fill: none;
  stroke: var(--line-strong);
}

.diagram .flow {
  fill: none;
  stroke: var(--heading);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 1 11;
  animation: flow 2.8s linear infinite;
}

.diagram .port {
  fill: var(--surface);
  stroke: #9fb0bc;
}

@keyframes flow {
  to {
    stroke-dashoffset: -24;
  }
}

/* ---------- Key facts ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 2rem 2rem;
  list-style: none;
}

.fact {
  position: relative;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.fact::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 2rem;
  height: 2px;
  background-color: var(--link);
}

.fact__value {
  display: block;
  color: var(--ink);
  font-size: clamp(2rem, 1.55rem + 1.5vw, 2.625rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.fact__label {
  display: block;
  margin-top: 0.75rem;
  max-width: 17rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Five facts in one row on wide screens (the auto-fit grid would leave one on its own row). */
@media (min-width: 64rem) {
  .facts--five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2rem 1.5rem;
  }

  .facts--five .fact__value {
    font-size: clamp(1.625rem, 1rem + 1.4vw, 2.125rem);
  }
}

/* Proof strip: real numbers on the left, one supporting statement on the right. */
.proof {
  display: grid;
  gap: 2.5rem;
}

.proof .facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (min-width: 56rem) {
  .proof {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: end;
    gap: 4rem;
  }
}

.proof__statement {
  padding-left: 1.5rem;
  border-left: 2px solid var(--heading);
  color: var(--ink);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  font-weight: 500;
  line-height: 1.5;
}

.section-foot {
  margin-top: 2.5rem;
}

/* ---------- Services list (home) ---------- */

.service-list {
  list-style: none;
  border-top: 1px solid var(--line);
}

.service-row {
  position: relative;
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 0.625rem 1rem;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--line);
}

.service-row > :not(.service-row__num) {
  grid-column: 2;
}

.service-row__num {
  padding-top: 0.3rem;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.8125rem;
}

.service-row__title {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  letter-spacing: -0.01em;
}

.service-row__title a {
  color: var(--ink);
  text-decoration: none;
}

.service-row__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.service-row__text {
  color: var(--muted);
}

.service-row__more {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--link);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
}

.service-row__more .icon {
  transition: transform 0.15s ease;
}

.service-row:hover .service-row__title a {
  color: var(--link);
}

.service-row:hover .service-row__more .icon {
  transform: translateX(3px);
}

@media (min-width: 56rem) {
  .service-row {
    grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 1.15fr) 7.5rem;
    align-items: baseline;
    gap: 2rem;
    padding-block: 2.25rem;
  }

  .service-row > :not(.service-row__num) {
    grid-column: auto;
  }

  .service-row__more {
    justify-self: end;
  }
}

/* ---------- Tags & chips ---------- */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.75rem;
  line-height: 1.5;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.chips li {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background-color: var(--surface);
  color: var(--ink);
  font-size: 0.9375rem;
  line-height: 1.4;
}

/* ---------- Lists ---------- */

.check-list {
  display: grid;
  gap: 0.75rem;
  list-style: none;
}

.check-list li {
  display: flex;
  gap: 0.75rem;
  color: var(--ink);
}

.check-list .icon {
  margin-top: 0.3rem;
  color: var(--link);
}

.dash-list {
  display: grid;
  gap: 0.75rem;
  list-style: none;
}

.dash-list li {
  position: relative;
  padding-left: 1.5rem;
}

.dash-list li::before {
  content: "";
  position: absolute;
  top: 0.8em;
  left: 0;
  width: 0.75rem;
  height: 1px;
  background-color: var(--muted);
}

/* ---------- Case study card ---------- */

/* Soft shadow and one large rounded corner, bottom right. */
.case-card {
  --card-radius: 6px 6px 56px 6px;
  position: relative;
  display: grid;
  gap: 2.5rem;
  padding: clamp(1.75rem, 4vw, 3rem);
  border-radius: var(--card-radius);
  background-color: var(--surface);
  box-shadow: 0 2px 16px rgba(2, 37, 62, 0.1);
  transition: box-shadow 0.2s ease;
}

.case-card:hover {
  box-shadow: 0 6px 28px rgba(2, 37, 62, 0.16);
}

.case-card + .case-card {
  margin-top: 2.5rem;
}

@media (min-width: 60rem) {
  .case-card {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 2.5rem 4rem;
  }
}

.case-card__shot {
  grid-column: 1 / -1;
  margin: 0;
}

.case-card__title {
  margin-top: 1.5rem;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  line-height: 1.15;
}

.case-card__title a {
  color: var(--ink);
  text-decoration: none;
}

.case-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--card-radius);
}

.case-card:hover .case-card__title a {
  color: var(--link);
}

.case-card__summary {
  margin-top: 1rem;
  max-width: 36rem;
  color: var(--muted);
}

.case-card__cta {
  margin-top: 2rem;
}

.case-card__facts {
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

@media (min-width: 60rem) {
  .case-card__facts {
    padding-top: 0;
    padding-left: 3rem;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

.stat-big {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.stat-big__value {
  color: var(--ink);
  font-size: clamp(2.75rem, 2rem + 2.4vw, 3.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.stat-big__label {
  color: var(--muted);
}

.case-card__facts .check-list {
  margin-top: 2rem;
}

/* ---------- Process ---------- */

.steps {
  display: grid;
  gap: 2.25rem;
  list-style: none;
}

@media (min-width: 40rem) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem 2rem;
  }
}

@media (min-width: 64rem) {
  .steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.75rem;
  }
}

.step {
  position: relative;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-strong);
}

.step::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--link);
}

.step__num {
  color: var(--link);
  font-family: var(--font-label);
  font-size: 0.8125rem;
  font-weight: 700;
}

.step__title {
  margin-top: 0.75rem;
  font-size: 1.25rem;
}

.step__text {
  margin-top: 0.625rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.note {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--surface);
  color: var(--text);
}

.note .icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  color: var(--link);
}

.note strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Feature grid (Why Parallel Web) ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px 6px 56px 6px;
  background-color: var(--line);
  list-style: none;
}

.feature {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background-color: var(--surface);
}

.feature__title {
  font-size: 1.1875rem;
}

.feature__text {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9875rem;
}

.feature--highlight {
  display: flex;
  flex-direction: column;
  background-color: var(--tint);
}

.feature--highlight .feature__title {
  font-size: 1.375rem;
  letter-spacing: -0.01em;
}

.feature--highlight .link-arrow {
  margin-top: auto;
  padding-top: 1.5rem;
}

/* ---------- Technology ---------- */

.tech {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 2rem 1.5rem;
}

.tech__title {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tech__list {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
  list-style: none;
  color: var(--ink);
  font-weight: 500;
}

/* ---------- Call-to-action band ---------- */

.cta-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(4.5rem, 9vw, 7rem);
  background-color: var(--tint);
}

/* Faint parallel diagonals on the right-hand side. */
.cta-band::after {
  content: "";
  position: absolute;
  inset: 0 0 0 40%;
  z-index: -1;
  background-image: repeating-linear-gradient(-68deg, transparent 0 26px, rgba(0, 115, 126, 0.09) 26px 27px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%);
  mask-image: linear-gradient(90deg, transparent, #000 70%);
}

.cta-band__inner {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 56rem) {
  .cta-band__inner {
    grid-template-columns: minmax(0, 1.5fr) auto;
    align-items: end;
    gap: 4rem;
  }
}

.cta-band__title {
  font-size: clamp(1.875rem, 1.35rem + 2.2vw, 2.875rem);
  line-height: 1.1;
}

.cta-band__text {
  margin-top: 1.25rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.125rem;
}

.cta-band__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.cta-band__email {
  color: var(--muted);
  font-size: 0.9375rem;
}

.cta-band__email a {
  color: var(--ink);
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: clamp(3.5rem, 6vw, 4.5rem) 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  gap: 2.5rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
}

@media (min-width: 60rem) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  }
}

.footer-brand__tagline {
  margin-top: 0.75rem;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-brand__text {
  margin-top: 1.25rem;
  max-width: 21rem;
  color: var(--muted);
}

.footer-brand__email {
  margin-top: 1.25rem;
}

.footer-brand__email a {
  color: var(--ink);
}

.footer-col__title {
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-col ul {
  display: grid;
  gap: 0.625rem;
  margin-top: 1.125rem;
  list-style: none;
}

.footer-col a {
  color: var(--text);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* The 404 page has a footer with only the bottom row: no second divider. */
.footer-bottom:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---------- Inner page hero ---------- */

.page-hero {
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(3rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--line);
}

/* Hero and first section are both white: don't stack two full section paddings. */
.page-hero + .section:not(.section--alt) {
  padding-top: clamp(2.5rem, 5vw, 4rem);
}

.page-hero__title {
  margin-top: 1.25rem;
  max-width: 24ch;
  font-size: clamp(2rem, 1.4rem + 2.8vw, 3.5rem);
  line-height: 1.08;
}

.page-hero__title--wide {
  max-width: 28ch;
}

.page-hero__lead {
  margin-top: 1.5rem;
  max-width: 44rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  color: var(--muted);
  font-size: 0.875rem;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
  opacity: 0.6;
}

.breadcrumbs a {
  color: var(--text);
}

.breadcrumbs + .eyebrow {
  margin-top: 2rem;
}

/* ---------- Services page ---------- */

.services-layout {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 64rem) {
  .services-layout {
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 5rem;
  }
}

.toc {
  align-self: start;
}

@media (min-width: 64rem) {
  .toc {
    position: sticky;
    top: 2rem;
  }
}

.toc__title {
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toc ol {
  display: grid;
  gap: 0.25rem;
  margin-top: 1rem;
  list-style: none;
  border-left: 1px solid var(--line);
}

.toc a {
  display: flex;
  gap: 0.75rem;
  margin-left: -1px;
  padding: 0.375rem 0 0.375rem 1rem;
  border-left: 1px solid transparent;
  color: var(--text);
  font-size: 0.9375rem;
  text-decoration: none;
}

.toc a:hover {
  border-left-color: var(--link);
  color: var(--ink);
}

.toc a span {
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.8125rem;
  line-height: 1.8;
}

.service-block {
  padding-block: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line);
  scroll-margin-top: 1.5rem;
}

.service-block:first-child {
  padding-top: 0;
  border-top: 0;
}

.service-block:last-child {
  padding-bottom: 0;
}

.service-block__title {
  margin-top: 1rem;
  font-size: clamp(1.75rem, 1.35rem + 1.5vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.service-block__lead {
  margin-top: 1rem;
  max-width: 42rem;
}

.service-block__intro {
  margin-top: 1.25rem;
  max-width: 42rem;
}

.service-block__cols {
  display: grid;
  gap: 2.5rem;
  margin-top: 2.5rem;
}

@media (min-width: 48rem) {
  .service-block__cols {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
  }
}

.list-title {
  margin-bottom: 1.125rem;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.approach {
  margin-top: 2.5rem;
  padding: 1.5rem 1.75rem;
  border-left: 2px solid var(--link);
  background-color: var(--surface-alt);
}

.approach .list-title {
  margin-bottom: 0;
}

.approach p {
  margin-top: 0.5rem;
}

.related {
  margin-top: 1.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ---------- Application screenshots ---------- */

/* Screenshot in a simple browser frame: a top bar with three dots, drawn in CSS. */
.shot {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: var(--surface);
  box-shadow: 0 2px 16px rgba(2, 37, 62, 0.1);
}

.shot::before {
  content: "";
  display: block;
  height: 1.75rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle, #cfd6dc 0 4px, transparent 4.5px) 0.75rem 50% / 10px 10px no-repeat,
    radial-gradient(circle, #cfd6dc 0 4px, transparent 4.5px) 1.5rem 50% / 10px 10px no-repeat,
    radial-gradient(circle, #cfd6dc 0 4px, transparent 4.5px) 2.25rem 50% / 10px 10px no-repeat,
    #f4f6f8;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

a.shot {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

a.shot:hover {
  box-shadow: 0 8px 28px rgba(2, 37, 62, 0.18);
  transform: translateY(-2px);
}

.shot-figure {
  margin: 0;
}

.shot-figure + .shot-figure {
  margin-top: 2.5rem;
}

.shot-figure figcaption {
  margin-top: 0.875rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.shot-note {
  color: var(--muted);
  font-size: 0.8125rem;
  font-style: italic;
}

/* Phone screenshots: QSE POM is used on phones, so its screens are shown in a simple phone frame.
   Below 48rem the phones form a swipeable row; above it they share the width equally. */
.phone-shot {
  overflow: hidden;
  border: 5px solid var(--ink);
  border-radius: 24px;
  background-color: var(--ink);
  box-shadow: 0 2px 16px rgba(2, 37, 62, 0.14);
}

.phone-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.phones {
  display: flex;
  gap: 1.25rem;
  padding-bottom: 0.75rem;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x mandatory;
}

.phones > li {
  flex: 0 0 min(15rem, 68vw);
  scroll-snap-align: start;
}

.phone {
  margin: 0;
}

.phone figcaption {
  margin-top: 0.875rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (min-width: 48rem) {
  .phones {
    gap: 2rem;
    padding-bottom: 0;
    overflow: visible;
  }

  .phones > li {
    flex: 1 1 0;
    min-width: 0;
  }
}

.phones + .shot-figure {
  margin-top: 2.5rem;
}

.phones + .shot-note,
.shot-figure + .shot-note {
  margin-top: 1.5rem;
}

/* A document (the PDF report) is shown as a plain page with a soft shadow. */
.doc-shot {
  max-width: 36rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: var(--surface);
  box-shadow: 0 2px 16px rgba(2, 37, 62, 0.1);
}

.doc-shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* On the case cards the phones sit side by side on a light panel, cropped at the bottom. */
.case-card__phones {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 2rem);
  max-height: clamp(15rem, 36vw, 25rem);
  padding: clamp(1.25rem, 3vw, 2rem) 1rem 0;
  overflow: hidden;
  border-radius: 10px;
  background-color: #eef2f5;
}

.case-card__phones .phone-shot {
  flex: 0 0 min(30%, 15rem);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
}

/* ---------- Case study page ---------- */

.cs-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 1.5rem 2rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.cs-meta dt {
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cs-meta dd {
  margin-top: 0.5rem;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.45;
}

.cs-section {
  display: grid;
  gap: 1.25rem 4rem;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
}

.cs-section:first-child {
  border-top: 0;
  padding-top: 0;
}

@media (min-width: 56rem) {
  .cs-section {
    grid-template-columns: 15rem minmax(0, 46rem);
  }
}

.cs-section__title {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.cs-section__body {
  min-width: 0;
}

.cs-section__body > * + * {
  margin-top: 1.25rem;
}

.solution-list {
  display: grid;
  gap: 1.5rem;
  list-style: none;
}

.solution-list li {
  padding-left: 1.25rem;
  border-left: 2px solid var(--heading);
}

.solution-list strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.solution-list span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
}

.back-link {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

/* ---------- About page ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 2.5rem 2.5rem;
  list-style: none;
  counter-reset: principle;
}

.principle {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-strong);
  counter-increment: principle;
}

.principle::before {
  content: counter(principle, decimal-leading-zero);
  color: var(--link);
  font-family: var(--font-label);
  font-size: 0.8125rem;
  font-weight: 700;
}

.principle h3 {
  margin-top: 0.75rem;
  font-size: 1.1875rem;
}

.principle p {
  margin-top: 0.625rem;
  color: var(--muted);
}

/* ---------- Contact page ---------- */

.contact-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 56rem) {
  .contact-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 5rem;
  }
}

.email-card {
  align-self: start;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  border-radius: 6px 6px 56px 6px;
  background-color: var(--surface);
  box-shadow: 0 2px 16px rgba(2, 37, 62, 0.1);
}

.email-card__link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--ink);
  font-size: clamp(1.25rem, 1rem + 1.1vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-decoration-color: var(--line-strong);
}

.email-card__link:hover {
  color: var(--link);
  text-decoration-color: currentColor;
}

.email-card__text {
  margin-top: 1rem;
  color: var(--muted);
}

.email-card .btn {
  margin-top: 2rem;
}

.contact-info h2 {
  font-size: 1.25rem;
  letter-spacing: -0.015em;
}

.contact-info h2 + * {
  margin-top: 1.25rem;
}

.contact-info * + h2 {
  margin-top: 3rem;
}

.contact-info__hint {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.next-steps {
  display: grid;
  gap: 1.5rem;
  list-style: none;
  counter-reset: next;
}

.next-steps li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 1rem;
  counter-increment: next;
}

.next-steps li::before {
  content: counter(next);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  font-family: var(--font-label);
  font-size: 0.875rem;
}

.next-steps strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.next-steps span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
}

/* ---------- Long-form text (legal pages) ---------- */

.prose {
  max-width: 44rem;
}

.prose h2 {
  margin-top: 3rem;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h2 + p,
.prose p + p,
.prose p + ul,
.prose ul + p {
  margin-top: 1rem;
}

.prose ul {
  display: grid;
  gap: 0.5rem;
  padding-left: 1.25rem;
}

.prose .updated {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ---------- 404 ---------- */

.not-found {
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.not-found__code {
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.875rem;
  letter-spacing: 0.12em;
}

/* ---------- Motion & print ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  .site-nav,
  .nav-toggle,
  .cta-band,
  .skip-link {
    display: none !important;
  }

  .grid-bg::before {
    display: none;
  }
}
