/* ============================================================
   03. COMPONENTS — reusable, page-agnostic
   ============================================================ */

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.8rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.btn svg { width: 17px; height: 17px; flex: none; }

/* Primary — brand-700 fill carries 5.7:1 against white text */
.btn--fill {
  background: var(--brand-700);
  color: #fff;
  box-shadow: var(--sh-brand);
}
.btn--fill:hover { background: var(--brand-800); }
.btn--fill:active { background: var(--brand-900); }

/* Secondary — outlined */
.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink-900);
}
.btn--ghost:hover {
  border-color: var(--brand-500);
  color: var(--brand-800);
  background: var(--brand-050);
}

/* On navy */
.on-dark .btn--ghost,
.band--navy .btn--ghost {
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}
.on-dark .btn--ghost:hover,
.band--navy .btn--ghost:hover {
  border-color: var(--brand-300);
  color: var(--navy-900);
  background: var(--brand-300);
}

/* Text link with arrow */
.link-go {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--brand-700);
}
.link-go svg { width: 16px; height: 16px; flex: none;
  transition: transform var(--t-fast) var(--ease); }
.link-go:hover svg { transform: translateX(3px); }


/* ============================================================
   Navigation
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--t-med) var(--ease);
}
.nav.is-stuck { box-shadow: var(--sh-sm); }

.nav-inner {
  width: min(100% - (var(--gut) * 2), var(--measure));
  margin-inline: auto;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.25rem);
}

.brand { display: flex; align-items: center; gap: 0.75rem; flex: none; }
.brand img { width: 42px; height: 36px; object-fit: contain; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.2; }
.brand-txt b {
  font-size: 0.98rem; font-weight: 700;
  color: var(--ink-900); letter-spacing: -0.01em;
}
.brand-txt span {
  font-family: var(--sans);
  font-size: 0.585rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-700);
  margin-top: 2px;
}

.nav-links { display: none; align-items: center; gap: 0.35rem; margin-left: auto; }
.nav-links a {
  position: relative;
  padding: 0.55rem 0.7rem;
  border-radius: var(--r-xs);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-700);
  transition: color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.nav-links a:hover { color: var(--brand-800); background: var(--brand-050); }
.nav-links a[aria-current="page"] { color: var(--brand-800); font-weight: 600; }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.7rem; right: 0.7rem; bottom: 0.15rem;
  height: 2px;
  background: var(--brand-500);
  border-radius: 2px;
}

.nav-cta { display: none; flex: none; min-height: 42px; padding: 0.55rem 1.15rem; }

.nav-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--ink-900);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.nav-toggle:hover { border-color: var(--brand-500); background: var(--brand-050); }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .ico-close { display: none; }
.nav-toggle[aria-expanded="true"] .ico-open  { display: none; }
.nav-toggle[aria-expanded="true"] .ico-close { display: block; }

.nav-drawer {
  position: fixed;
  inset: var(--nav-h) 0 auto 0;
  z-index: var(--z-drawer);
  display: none;
  padding: 0.75rem var(--gut) 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--sh-md);
  max-height: calc(100dvh - var(--nav-h));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.nav-drawer.is-open { display: block; }
.nav-drawer a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 52px;
  padding: 0.9rem 0.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-900);
}
.nav-drawer a::after {
  content: "";
  width: 7px; height: 7px;
  border-right: 2px solid var(--brand-500);
  border-bottom: 2px solid var(--brand-500);
  transform: rotate(-45deg);
  flex: none;
}
.nav-drawer a[aria-current="page"] { color: var(--brand-800); font-weight: 600; }
.nav-drawer .btn { width: 100%; margin-top: 1.15rem; }
/* .nav-drawer a wins on specificity, so the fill button restates its colour */
.nav-drawer a.btn--fill { color: #fff; }
.nav-drawer a.btn--ghost { color: var(--ink-900); }
.nav-drawer a.btn::after { display: none; }


/* ============================================================
   Cards
   ============================================================ */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--card-pad);
  box-shadow: var(--sh-xs);
  transition: border-color var(--t-med) var(--ease),
              box-shadow var(--t-med) var(--ease);
}
.card--lift:hover {
  border-color: var(--brand-200);
  box-shadow: var(--sh-md);
}

/* Card with a top brand rule — used for the six platform cards */
.card--ruled { position: relative; overflow: hidden; }
.card--ruled::before {
  content: "";
  position: absolute; inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-500), var(--brand-300));
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
}
.card--ruled:hover::before { opacity: 1; }


/* ============================================================
   Chips, badges, pills
   ============================================================ */

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.35rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--line-brand);
  border-radius: var(--r-pill);
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--brand-800);
  white-space: nowrap;
}
.on-dark .chip {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--on-navy);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--r-xs);
  background: var(--brand-050);
  border: 1px solid var(--line-brand);
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-800);
}
.badge--gold {
  background: var(--gold-050);
  border-color: var(--gold-100);
  color: #7A5A10;
}


/* ============================================================
   Icon tile — a consistent container for every inline SVG icon
   ============================================================ */

.ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  flex: none;
  border-radius: var(--r-sm);
  background: var(--brand-050);
  border: 1px solid var(--line-brand);
  color: var(--brand-700);
}
.ico svg { width: 22px; height: 22px; }
.on-dark .ico {
  background: rgba(0, 166, 172, 0.14);
  border-color: rgba(0, 166, 172, 0.3);
  color: var(--brand-300);
}


/* ============================================================
   Stats
   ============================================================ */

.stats {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.stat {
  background: var(--surface);
  padding: clamp(1.35rem, 2.2vw, 1.85rem);
  min-width: 0;
}
.stat-num {
  font-size: clamp(1.875rem, 3.2vw, 2.625rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--brand-800);
  font-variant-numeric: tabular-nums;
}
.stat-num u {
  text-decoration: none;
  font-size: 0.45em;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-left: 0.2em;
  color: var(--brand-700);
}
.stat-lab {
  margin-top: 0.6rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-900);
}
.stat-sub {
  margin-top: 0.3rem;
  font-size: var(--fs-xs);
  line-height: 1.55;
  color: var(--ink-500);
}


/* ============================================================
   Callout
   ============================================================ */

.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.15rem;
  margin-top: clamp(1.5rem, 2.4vw, 2rem);
  padding: clamp(1.35rem, 2.4vw, 1.85rem) clamp(1.35rem, 2.4vw, 2rem);
  background: var(--brand-050);
  border: 1px solid var(--line-brand);
  border-left: 3px solid var(--brand-500);
  border-radius: var(--r-sm);
  color: var(--ink-700);
}
.callout > b:first-child {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--brand-800);
  line-height: 1;
}
.callout span { flex: 1 1 22ch; font-size: var(--fs-sm); line-height: 1.65; }
.callout span b { color: var(--brand-800); font-weight: 600; }


/* ============================================================
   Data tables
   ============================================================ */

/* Horizontal scroll container — the table scrolls, never the page */
.tw {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.tw:focus-visible { outline-offset: 0; }

.dtable { min-width: 640px; font-size: var(--fs-sm); }
.dtable thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--ink-900);
  color: #fff;
  text-align: left;
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.85rem 1.1rem;
  white-space: nowrap;
}
.dtable tbody th,
.dtable td {
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.55;
  text-align: left;
}
.dtable tbody tr:nth-child(even) { background: var(--surface-alt); }
.dtable tbody tr:hover { background: var(--brand-050); }
.dtable .pname { font-weight: 500; color: var(--ink-900); min-width: 15rem; }
.dtable .cas {
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--brand-700);
  white-space: nowrap;
}
.tnote {
  margin-top: 0.85rem;
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: var(--ink-500);
}
.tnote b { color: var(--ink-900); font-weight: 600; }


/* ============================================================
   Forms
   ============================================================ */

.form {
  display: grid;
  gap: 1.15rem;
  padding: clamp(1.5rem, 2.6vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
}
@media (min-width: 620px) { .form { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: 0.45rem; min-width: 0; }
.field--wide { grid-column: 1 / -1; }

.field label {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: 0.005em;
}
.field .req { color: var(--brand-700); margin-left: 0.15rem; }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  color: var(--ink-900);
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.field textarea { min-height: 128px; resize: vertical; line-height: 1.6; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B7185' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 18px;
  padding-right: 2.6rem;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-500); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(0, 166, 172, 0.18);
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline: none; }

/* Validation — only shown once the field has been interacted with,
   so the form never greets the user in an error state */
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: #C0392B;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.14);
}
.field-error {
  display: none;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: #A5281B;   /* 5.3:1 on white */
}
.field.is-invalid .field-error { display: block; }

/* Honeypot — hidden from humans, catnip for bots */
.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-note {
  grid-column: 1 / -1;
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: var(--ink-500);
}

.form-status {
  grid-column: 1 / -1;
  display: none;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.9rem 1.1rem;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  line-height: 1.6;
}
.form-status.is-shown { display: flex; }
.form-status.is-ok {
  background: var(--brand-050);
  border: 1px solid var(--line-brand);
  color: var(--brand-800);
}
.form-status.is-err {
  background: #FDF2F0;
  border: 1px solid #F3CFC9;
  color: #A5281B;
}
.form-status svg { width: 19px; height: 19px; flex: none; margin-top: 1px; }

.btn[aria-disabled="true"],
.btn:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }


/* ============================================================
   Footer
   ============================================================ */

.foot {
  background: var(--navy-900);
  color: var(--on-navy-mut);
  padding-block: clamp(3rem, 5vw, 4.5rem) 0;
}
.foot-grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(2.5rem, 4vw, 3.5rem);
}
@media (min-width: 620px)  { .foot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .foot-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1180px) {
  /* Brand block, then the four link columns */
  .foot-grid { grid-template-columns: 1.6fr repeat(3, 0.85fr) 1.05fr; }
}

.foot-brand img { width: 50px; height: 43px; object-fit: contain; }
.foot-brand p {
  margin-top: 1.15rem;
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--on-navy-mut);
  max-width: 44ch;
}
.foot-social { display: flex; gap: 0.55rem; margin-top: 1.5rem; }
.foot-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border: 1px solid var(--line-navy);
  border-radius: var(--r-sm);
  color: var(--on-navy-mut);
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.foot-social a:hover {
  color: var(--navy-900);
  background: var(--brand-300);
  border-color: var(--brand-300);
}
.foot-social svg { width: 18px; height: 18px; }

.foot-col h3 {
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--brand-300);
  margin-bottom: 1.15rem;
}
.foot-col ul { list-style: none; display: grid; gap: 0.1rem; }
.foot-col a,
.foot-contact a,
.foot-contact span {
  display: block;
  padding: 0.5rem 0;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--on-navy-mut);
  transition: color var(--t-fast) var(--ease);
}
.foot-col a:hover, .foot-contact a:hover { color: var(--brand-300); }
.foot-contact { list-style: none; display: grid; }
.foot-contact .lab {
  display: block;
  padding: 0;
  font-family: var(--sans);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.foot-contact li { padding: 0.45rem 0; }
.foot-contact li > a, .foot-contact li > span { padding: 0.1rem 0 0; }

.foot-base {
  border-top: 1px solid var(--line-navy);
  padding-block: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--ink-400);
}
.foot-base nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; }
.foot-base a { color: var(--ink-400); transition: color var(--t-fast) var(--ease); }
.foot-base a:hover { color: var(--brand-300); }

/* Footer address block */
.foot-addr {
  font-size: var(--fs-sm);
  line-height: 1.75;
  color: var(--on-navy-mut);
}
.foot-addr a { display: inline-block; padding-block: 0.22rem; color: var(--on-navy-mut); }
.foot-addr a:hover { color: var(--brand-300); }

.foot-partner {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.15rem;
  min-height: 44px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--brand-300);
}
.foot-partner:hover { color: #fff; }

/* Footer base links need a 24px target on a fine pointer too — the
   horizontal gap is under the WCAG 2.5.8 spacing exception. */
.foot-base nav a,
.mf-base nav a {
  display: inline-block;
  padding-block: 0.32rem;
}

/* ------------------------------------------------------------
   Form legibility
   The enquiry card sits on a white band, so a hairline border
   left it edgeless. It now carries a stronger rule and real
   elevation, and the inputs sit on a tinted ground so each
   field reads as a field before you click into it.
   ------------------------------------------------------------ */
.form {
  border-color: var(--line-strong);
  box-shadow: var(--sh-md);
}
.field input,
.field select,
.field textarea {
  background: var(--surface-alt);
}
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--ink-300); }
.field input:focus,
.field select:focus,
.field textarea:focus { background: var(--surface); }
