/* ==========================================================================
   components.css — reusable UI. Defined once, identical on every page.
   ========================================================================== */

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
    border-color var(--transition);
  /* 44px minimum touch target, WCAG 2.5.5 */
  min-height: 44px;
}

.btn--primary {
  background: var(--petrol-blue);
  border-color: var(--petrol-blue);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--petrol-blue-dark);
  border-color: var(--petrol-blue-dark);
  color: var(--white);
}

/* Deep Ink on orange, never white — brand guide rule. */
.btn--accent {
  background: var(--process-orange);
  border-color: var(--process-orange);
  color: var(--deep-ink);
}

.btn--accent:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  color: var(--deep-ink);
}

.btn--ghost {
  background: transparent;
  border-color: currentColor;
  color: var(--petrol-blue);
}

.btn--ghost:hover {
  background: var(--petrol-blue);
  border-color: var(--petrol-blue);
  color: var(--white);
}

/* On dark backgrounds the ghost button inverts. */
.section--blue .btn--ghost,
.section--ink .btn--ghost,
.hero .btn--ghost {
  color: var(--white);
}

.section--blue .btn--ghost:hover,
.section--ink .btn--ghost:hover,
.hero .btn--ghost:hover {
  background: var(--white);
  color: var(--petrol-blue);
}

.btn--lg {
  padding: 1rem 2rem;
  font-size: 1.25rem;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* --- Cards -------------------------------------------------------------- */

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  height: 100%;
  transition: border-color var(--transition), box-shadow var(--transition),
    transform var(--transition);
}

/* A 3px orange rule on hover — accent used as a line, not as text. */
.card--link:hover {
  border-color: var(--process-orange);
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}

.card__icon {
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-2);
  color: var(--process-orange);
}

.card__title {
  margin-bottom: var(--space-1);
  font-size: 1.0625rem;
  color: var(--petrol-blue);
}

.card p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.card a {
  text-decoration: none;
}

/* The whole card is the hover target and already signals it with an orange
   border and a lift, so the title keeps its colour. */
.card--link a:hover {
  color: var(--petrol-blue);
}

/* The whole card is clickable, while the link text stays the accessible name. */
.card--link {
  position: relative;
}

/* The overlay below covers the entire card. Any interactive element inside .card--link
   (e.g., icons, additional links) needs position: relative; z-index: 1 to receive clicks. */
.card--link a::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* --- Navigation --------------------------------------------------------- */

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__list a {
  display: inline-block;   /* same box for every item, so plain and dropdown
                              links share one text line */
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--deep-ink);
  text-decoration: none;
  padding-block: 0.5rem;
  border-bottom: 2px solid transparent;
}

.site-nav__list a:hover {
  color: var(--petrol-blue);
  border-bottom-color: var(--process-orange);
}

/* Current page is marked by an orange rule AND the aria-current attribute,
   so the signal is not carried by colour alone. */
.site-nav__list a[aria-current="page"] {
  color: var(--petrol-blue);
  border-bottom-color: var(--process-orange);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
}

/* Hamburger drawn from one element plus two pseudo-elements. */
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  position: absolute;
  left: 50%;
  width: 20px;
  height: 2px;
  background: var(--petrol-blue);
  transform: translateX(-50%);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle__bar {
  top: 50%;
  margin-top: -1px;
}

.nav-toggle__bar::before {
  content: "";
  top: -6px;
}

.nav-toggle__bar::after {
  content: "";
  top: 6px;
}

/* Open state: the bar becomes an X. */
.nav-toggle[aria-expanded="true"] .nav-toggle__bar {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before {
  top: 0;
  transform: translateX(-50%) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after {
  top: 0;
  transform: translateX(-50%) rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* Below 1200px the logo (238px), the six items with two dropdown toggles
   (~610px in Inter) and the CTA (~200px) stop fitting on one row. The breakpoint is chosen from that
   measured content, not from a round number. */
@media (max-width: 1199px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: var(--z-menu);
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    padding: var(--space-3) var(--gutter) var(--space-4);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-2);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__list li {
    margin: 0;
    border-bottom: 1px solid var(--border);
  }

  .site-nav__list a {
    display: block;
    padding: var(--space-2) 0;
    border-bottom: none;
  }

  .site-nav__cta {
    margin-top: var(--space-2);
  }
}

/* --- Services dropdown --------------------------------------------------- */
/* Desktop: a panel under the parent, opened by hover (mouse) or by the
   toggle button (keyboard and touch) — the standard disclosure pattern, so
   Escape can genuinely close it. Mobile: always shown,
   indented under its parent inside the open menu panel. */

.has-sub {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}

.site-nav__sub-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 4px;   /* room for the focus ring without touching the label */
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--deep-ink);
}

/* Chevron drawn with borders, so it inherits colour and needs no icon. */
.site-nav__sub-toggle::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  /* A rotated square reads lower than its box; lift it onto the text's
     optical centre. */
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--transition);
}

.site-nav__sub-toggle[aria-expanded="true"]::before {
  transform: translateY(1px) rotate(-135deg);
}

.site-nav__sub {
  display: none;
  position: absolute;
  top: 100%;
  left: calc(-1 * var(--space-3));
  z-index: var(--z-menu);
  min-width: 300px;
  margin: 0;
  padding: var(--space-1) 0;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--process-orange);
  box-shadow: var(--shadow-2);
}

.has-sub:hover > .site-nav__sub,
.site-nav__sub-toggle[aria-expanded="true"] + .site-nav__sub {
  display: block;
}

.site-nav__sub a {
  display: block;
  padding: 0.6rem var(--space-3);
  border-bottom: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0;
  text-transform: none;
}

.site-nav__sub a:hover,
.site-nav__sub a[aria-current="page"] {
  background: var(--mist);
  color: var(--petrol-blue);
  border-bottom-color: transparent;
  box-shadow: inset 3px 0 0 var(--process-orange);
}

@media (max-width: 1199px) {
  .has-sub {
    flex-wrap: wrap;
  }

  .has-sub > a {
    flex: 1;
  }

  .site-nav__sub-toggle {
    display: none;
  }

  .site-nav__sub,
  .has-sub:hover > .site-nav__sub {
    display: block;
    position: static;
    flex-basis: 100%;
    min-width: 0;
    padding: 0 0 var(--space-1) var(--space-3);
    border: 0;
    box-shadow: none;
  }

  .site-nav__list .site-nav__sub li {
    border-bottom: 0;
  }

  .site-nav__sub a {
    padding: var(--space-1) 0 var(--space-1) var(--space-2);
  }
}

/* --- Hero slider -------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--petrol-blue);
  min-height: 420px;
  height: 60vh;
}

@media (min-width: 640px) { .hero { height: 70vh; } }
@media (min-width: 1024px) { .hero { height: 85vh; max-height: 820px; } }

.hero__track { position: absolute; inset: 0; }

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 600ms ease;
}

.hero__slide.is-active { opacity: 1; visibility: visible; }

.no-js .hero__slide:first-child { opacity: 1; visibility: visible; }

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(11, 79, 108, 0.94) 0%,
    rgba(11, 79, 108, 0.80) 55%,
    rgba(10, 42, 56, 0.72) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 46rem;
  padding-block: var(--space-5);
}

.hero__title {
  /* Slide 1 is an h1 and slides 2-3 are h2, so their default sizes differ.
     Pin the size here so every slide reads identically while the heading
     levels stay semantically correct. */
  font-size: clamp(2rem, 4.8vw, 3.5rem);
  color: var(--white);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
}

.hero__text {
  color: var(--white);
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  margin-bottom: var(--space-3);
  max-width: 34rem;
}

.hero__rule {
  width: 64px;
  height: 4px;
  background: var(--process-orange);
  margin-bottom: var(--space-3);
}

.hero__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  color: var(--white);
  cursor: pointer;
  transition: background var(--transition);
}

.hero__arrow:hover {
  background: var(--process-orange);
  border-color: var(--process-orange);
  color: var(--deep-ink);
}

.hero__arrow--prev { left: var(--space-2); }
.hero__arrow--next { right: var(--space-2); }

@media (max-width: 639px) { .hero__arrow { display: none; } }

.hero__dots {
  position: absolute;
  bottom: var(--space-3);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: var(--space-1);
}

.hero__dot {
  width: 40px;
  height: 4px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
}

.hero__dot::before { content: ""; position: absolute; inset: -20px 0; }

.hero__dot[aria-current="true"] { background: var(--process-orange); }

/* --- Workflow steps ----------------------------------------------------- */

.steps {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: var(--space-3);
  border-top: 3px solid var(--border);
  margin: 0;
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  margin-bottom: var(--space-1);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--process-orange);
}

.step__title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--petrol-blue);
  margin-bottom: var(--space-1);
}

.step p { font-size: 0.9375rem; color: var(--text-muted); margin: 0; }

/* --- Software strip ----------------------------------------------------- */

.logo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.logo-strip li {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1rem, 2vw, 1.25rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0;
  padding-bottom: 0.25rem;
  border-bottom: 3px solid var(--process-orange);
}

/* --- Checklist ---------------------------------------------------------- */

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 1;
}

@media (min-width: 640px) {
  .checklist { columns: 2; column-gap: var(--space-4); }
}

.checklist li {
  position: relative;
  padding-left: 1.5rem;
  break-inside: avoid;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 8px;
  height: 8px;
  background: var(--process-orange);
}

/* --- Forms -------------------------------------------------------------- */

.form {
  display: grid;
  gap: var(--space-3);
}

.form__row {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.field label {
  display: block;
  margin-bottom: 0.375rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--petrol-blue);
}

.field__required {
  color: var(--orange-dark);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  /* 16px minimum stops iOS zooming the page on focus. */
  min-height: 48px;
}

.field textarea {
  min-height: 160px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--petrol-blue);
  box-shadow: 0 0 0 3px rgba(11, 79, 108, 0.12);
}

/* Errors are signalled by a red border AND a text message — never colour
   alone, per WCAG 1.4.1. */
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: #B3261E;
}

.field__error {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #B3261E;
}

.field__hint {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* The honeypot: hidden from people, reachable by naive bots.
   display:none is avoided because some bots skip such fields. */
.field--honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__alert {
  padding: var(--space-2);
  border-left: 4px solid;
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

.form__alert--error {
  background: #FDECEA;
  border-color: #B3261E;
  color: #7A1A14;
}

.form__alert--success {
  background: var(--mist);
  border-color: var(--petrol-blue);
  color: var(--deep-ink);
}

/* --- Contact detail list ------------------------------------------------ */

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list li {
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--border);
}

/* The office email address is a single long unbreakable string; without
   this it overflows the viewport at narrow widths. Scoped to the mailto
   link only, so it does not affect min-content sizing for the other
   (short) items in the list. */
.contact-list a[href^="mailto:"] {
  overflow-wrap: anywhere;
}

.contact-list dt,
.contact-list__label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange-text);
  margin-bottom: 0.25rem;
}

.map-embed {
  aspect-ratio: 4 / 3;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Intro band with brand mark ----------------------------------------- */
/* Two columns from 900px so the copy does not float in white space. Below
   that the mark is hidden entirely and the copy runs single-column. */

.intro {
  display: grid;
  gap: var(--space-4);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .intro {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: var(--space-7);
  }
}

.intro__mark {
  /* Purely decorative. On a phone it only adds scroll length before the
     copy, so it is hidden there and appears from 900px where it fills the
     space the narrow column used to waste. */
  display: none;
  position: relative;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  width: 100%;
  padding: var(--space-4);
  background: var(--mist);
  border-radius: var(--radius-lg);
}

@media (min-width: 900px) {
  .intro__mark {
    display: flex;
    max-width: 280px;
  }
}

/* Orange rule anchoring the panel — accent as a line, per the brand guide. */
.intro__mark::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  background: var(--process-orange);
}

.intro__mark img {
  width: 100%;
  height: auto;
  max-width: 150px;
}

.intro__body > :last-child {
  margin-bottom: 0;
}

/* --- Scroll reveal ------------------------------------------------------ */
/* The hidden state is scoped to .js-reveal, which JavaScript adds to <html>.
   With JS off the class never appears and every element renders normally —
   content must never depend on script to become visible. */

.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
}

.js-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  transition:
    opacity 600ms ease var(--reveal-delay, 0ms),
    transform 600ms cubic-bezier(0.2, 0.7, 0.3, 1) var(--reveal-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .js-reveal [data-reveal],
  .js-reveal [data-reveal].is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Printing must never drop content that had not yet scrolled into view. */
@media print {
  .js-reveal [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* --- Card icon ---------------------------------------------------------- */

.card__icon {
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-2);
  color: var(--process-orange);
  transition: transform var(--transition), color var(--transition);
}

.card--link:hover .card__icon {
  transform: translateY(-3px) scale(1.06);
  color: var(--petrol-blue);
}

@media (prefers-reduced-motion: reduce) {
  .card--link:hover .card__icon { transform: none; }
}

/* Step numerals lift with the row they belong to. */
.step { transition: transform var(--transition), border-color var(--transition); }

.step:hover {
  transform: translateY(-2px);
  border-top-color: var(--process-orange);
}

@media (prefers-reduced-motion: reduce) {
  .step:hover { transform: none; }
}

/* --- Hero image drift --------------------------------------------------- */
/* A slow settle on the active slide so the hero is not wholly static. Scale
   only — no position change — so the subject stays centred. */

@media (prefers-reduced-motion: no-preference) {
  .hero__slide.is-active .hero__image {
    animation: hero-settle 6s ease-out both;  /* matches the 6s slide interval, so it never cuts off mid-scale */
  }
}

@keyframes hero-settle {
  from { transform: scale(1.07); }
  to   { transform: scale(1); }
}

/* --- Photo card --------------------------------------------------------- */
/* A card whose image carries the meaning, so no icon is needed. Padding moves
   from the card to the content block, letting the image reach the edges. */

.card--photo {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--mist);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

.card--photo:hover .card__media img {
  transform: scale(1.06);
}

@media (prefers-reduced-motion: reduce) {
  .card__media img,
  .card--photo:hover .card__media img {
    transition: none;
    transform: none;
  }
}

.card__content {
  padding: var(--space-3);
}

.card__content > :last-child {
  margin-bottom: 0;
}

/* Photo cards are wide (two to a row), so the text is scaled up to match the
   image and ruled off from it as its own panel. */
.card--photo .card__content {
  border-top: 1px solid var(--border);
  padding: var(--space-3) var(--space-4);
}

.card--photo .card__title {
  font-size: 1.3125rem;
  margin-bottom: var(--space-1);
}

.card--photo p {
  font-size: 1rem;
}

.card--link.card--photo:hover .card__content {
  border-top-color: var(--process-orange);
}

/* --- Workflow flow diagram ---------------------------------------------- */
/* Boxes joined by chevrons, so the sequence reads as a process rather than a
   list. The chevron sits between boxes and is suppressed at the end of each
   row, where the flow wraps instead of continuing sideways. */

.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-5) var(--space-5);
  grid-template-columns: 1fr;
  counter-reset: flow;
}

@media (min-width: 640px) {
  .flow { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .flow { grid-template-columns: repeat(3, 1fr); }
}

.flow__step {
  position: relative;
  margin: 0;
  padding: var(--space-3);
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--petrol-blue);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition),
    transform var(--transition);
}

.flow__step:hover {
  border-top-color: var(--process-orange);
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .flow__step:hover { transform: none; }
}

/* Numeral in a chip, so it reads as a stage marker rather than body text. */
.flow__step::before {
  counter-increment: flow;
  content: "0" counter(flow);
  position: absolute;
  top: calc(var(--space-3) * -1);
  left: var(--space-3);
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: var(--petrol-blue);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  border-radius: 2px;
}

/* Connector chevron. Points down when stacked, right once side by side. */
.flow__step::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border-top: 2px solid var(--process-orange);
  border-right: 2px solid var(--process-orange);
  left: 50%;
  bottom: calc(var(--space-5) * -0.5);
  transform: translate(-50%, 50%) rotate(135deg);
}

.flow__step:last-child::after { content: none; }

@media (min-width: 640px) {
  .flow__step::after {
    left: auto;
    right: calc(var(--space-5) * -0.5);
    bottom: auto;
    top: 50%;
    transform: translate(50%, -50%) rotate(45deg);
  }
  /* No chevron where the row wraps. */
  .flow__step:nth-child(2n)::after { content: none; }
}

@media (min-width: 1024px) {
  .flow__step:nth-child(2n)::after { content: ""; }
  .flow__step:nth-child(3n)::after { content: none; }
  .flow__step:last-child::after { content: none; }
}

.flow__title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  color: var(--petrol-blue);
  margin: var(--space-1) 0 var(--space-1);
}

.flow__step p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
}

/* --- Drawing-grid section background ------------------------------------ */
/* Graph-paper ruling drawn with gradients rather than an image: no extra
   request, scales to any viewport, and stays crisp on high-density screens.
   Two rules — a fine 24px grid and a heavier 96px one — the way a drawing
   sheet is ruled. Kept faint so cards and text stay dominant. */

.section--grid {
  position: relative;
  background-color: var(--mist);
  background-image:
    linear-gradient(to right, rgba(11, 79, 108, 0.16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11, 79, 108, 0.16) 1px, transparent 1px),
    linear-gradient(to right, rgba(11, 79, 108, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11, 79, 108, 0.08) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
}

/* Fade the ruling out at the top and bottom edges so the section joins its
   neighbours instead of ending on a hard line of grid. */
.section--grid::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    var(--mist) 0%,
    rgba(238, 243, 245, 0) 8%,
    rgba(238, 243, 245, 0) 92%,
    var(--mist) 100%
  );
}

/* Content must sit above the fade overlay. */
.section--grid > * {
  position: relative;
  z-index: 1;
}

/* On the ruled ground the cards read better with a touch more lift. */
.section--grid .card {
  box-shadow: var(--shadow-1);
}

/* Restated so the rule above does not cancel the hover lift. */
.section--grid .card--link:hover {
  box-shadow: var(--shadow-2);
}
