/* About Us + Contact Us redesign (2026-11).
   Tokens follow the new homepage reference. Everything is scoped under .btp
   so Bootstrap and the legacy CSS on these pages are left alone. */

.btp {
  --btp-paper: #f3f5f7;
  --btp-surface: #fff;
  --btp-ink: #0a1b33;
  --btp-ink-soft: #3b4a5e;
  --btp-brand: #00428a;
  --btp-sky: #90caf9;
  --btp-line: #d5dce4;
  --btp-night: #071426;
  --btp-night-soft: #9fb0c6;
  --btp-error: #b42318;
  --btp-radius: 20px;
  --btp-ease: cubic-bezier(0.22, 1, 0.36, 1);

  background: var(--btp-paper);
  color: var(--btp-ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* Reset the Bootstrap/legacy defaults we rely on */
.btp h1, .btp h2, .btp h3, .btp p, .btp ul, .btp ol, .btp dl, .btp dd { margin: 0; padding: 0; }
.btp ul, .btp ol { list-style: none; }
.btp h1, .btp h2, .btp h3 { font-family: var(--font-display); color: inherit; text-transform: none; }
.btp a, .btp a:hover { text-decoration: none; }
.btp span, .btp strong { font-family: inherit; font-weight: inherit; } /* legacy CSS forces body font on every span */
.btp strong { font-weight: 600; }
.btp :focus-visible { outline: 3px solid var(--btp-brand); outline-offset: 3px; border-radius: 6px; }

.btp .screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.btp-wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 40px; }
.btp-section { padding: 120px 0; }

.btp-h2 { font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.025em; }
.btp-h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.btp-lead { font-size: 1.1875rem; line-height: 1.6; color: var(--btp-ink-soft); max-width: 46ch; }

/* Blueprint grid from the homepage hero, fading out towards the edges */
.btp-grid-bg { position: relative; isolation: isolate; }
.btp-grid-bg::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(0, 66, 138, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 66, 138, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, #000 30%, transparent 100%);
}

/* Buttons (.btp-btn and the form submit) are styled site-wide in css/bt-buttons.css */

/* ---------- About: hero ---------- */
.btp-hero { padding: 120px 0 72px; }
.btp-hero .btp-wrap {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 56px;
  align-items: end;
}
.btp-hero__title {
  grid-column: 1 / span 8;
  font-size: clamp(2.25rem, 4.8vw, 4.375rem); font-weight: 700; /* 36px mobile -> 70px desktop */
  line-height: 1.04; letter-spacing: -0.03em; max-width: 20ch; text-wrap: balance;
}
.btp-hero__title .btp-word { display: inline-block; }
.btp-hero__aside { grid-column: 9 / span 4; display: grid; gap: 28px; justify-items: start; }
.btp-hero__aside .btp-lead { font-size: 1.0625rem; }

.btp-stats {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--btp-line);
}
.btp-stats__item {
  display: flex; flex-direction: column-reverse; gap: 8px;
  padding: 28px 24px 0 0;
}
.btp-stats__item + .btp-stats__item { padding-left: 24px; border-left: 1px solid var(--btp-line); }
.btp-stats dt { font-weight: 500; color: var(--btp-ink-soft); font-size: 0.9375rem; }
.btp-stats dd {
  font-family: var(--font-display); font-size: clamp(2.25rem, 3.6vw, 3.25rem);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--btp-ink);
}
.btp-stats dd span { color: var(--btp-brand); }

/* ---------- About: vision + commitments ---------- */
.btp-vision { background: var(--btp-surface); border-top: 1px solid var(--btp-line); }
.btp-vision__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.btp-vision__copy { display: grid; gap: 24px; }
.btp-vision__copy p { color: var(--btp-ink-soft); max-width: 56ch; }
.btp-vision__list .btp-h3 { margin-bottom: 8px; }
.btp-vision__list li {
  display: grid; gap: 4px; padding: 24px 0;
  border-bottom: 1px solid var(--btp-line);
}
.btp-vision__list strong { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 700; }
.btp-vision__list span { color: var(--btp-ink-soft); }

/* ---------- About: process (the one animated moment) ---------- */
.btp-process { background: var(--btp-night); color: #fff; }
.btp-process__head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: end; margin-bottom: 80px;
}
.btp-process__head p { color: var(--btp-night-soft); max-width: 46ch; }

.btp-process__steps {
  --p: 1; /* fill progress, 0–1. JS scrubs it; without JS the line is complete */
  position: relative;
  display: grid; grid-template-columns: repeat(var(--steps, 5), 1fr); gap: 32px;
  counter-reset: none;
}
.btp-process__steps::before,
.btp-process__steps::after {
  content: ""; position: absolute; left: 0; right: 0; top: 47px; height: 2px;
}
.btp-process__steps::before { background: rgba(255, 255, 255, 0.14); }
.btp-process__steps::after {
  background: var(--btp-sky);
  transform: scaleX(var(--p)); transform-origin: left center;
}
.btp-process__step { position: relative; padding-top: 80px; }
.btp-process__step::before {
  content: ""; position: absolute; left: 0; top: 40px; z-index: 1;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--btp-sky); box-shadow: 0 0 0 6px var(--btp-night);
  transition: background-color 0.3s var(--btp-ease), transform 0.3s var(--btp-ease);
}
.btp-process__steps.btp-anim .btp-process__step:not(.is-on)::before {
  background: var(--btp-night); outline: 2px solid rgba(255, 255, 255, 0.3); outline-offset: -2px;
}
.btp-process__steps.btp-anim .btp-process__step.is-on::before { transform: scale(1.15); }
.btp-process__num {
  position: absolute; top: 0; left: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.875rem; color: var(--btp-sky);
}
.btp-process__step h3 { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 12px; }
.btp-process__step p { color: var(--btp-night-soft); font-size: 0.9875rem; }

/* ---------- About: CTA ---------- */
.btp-cta { padding: 96px 0; }
.btp-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.btp-cta__inner > div { display: grid; gap: 12px; max-width: 640px; }
.btp-cta p { color: var(--btp-ink-soft); }

/* ---------- Contact ---------- */
.btp-contact { padding: 112px 0 120px; }
.btp-contact__head { display: grid; gap: 20px; margin-bottom: 56px; }
.btp-contact__title {
  font-size: clamp(2.25rem, 4.8vw, 4.375rem); font-weight: 700; /* same scale as the other page heroes */
  line-height: 1.02; letter-spacing: -0.03em; max-width: 16ch; text-wrap: balance;
}
.btp-contact__grid { display: grid; grid-template-columns: 7fr 5fr; gap: 24px; align-items: start; }
.btp-contact__form {
  background: var(--btp-surface); border: 1px solid var(--btp-line);
  border-radius: var(--btp-radius); padding: 44px;
}
.btp-contact__panel {
  background: var(--btp-night); color: #fff;
  border-radius: var(--btp-radius); padding: 44px;
  display: grid; gap: 20px;
}
.btp-contact__panel .btp-h3 + .btp-next { margin-top: 4px; }
.btp-channels { margin-bottom: 28px; }
.btp-channels li {
  display: grid; gap: 2px; padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.btp-channels li:first-child { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.btp-channels__label { font-size: 0.875rem; color: var(--btp-night-soft); }
.btp-channels__value {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 1.0625rem;
  color: #fff; word-break: break-word; display: inline-flex; align-items: center; min-height: 32px;
}
.btp-channels__value--text { font-family: var(--font-body); }
a.btp-channels__value:hover { color: var(--btp-sky); }

.btp-next { counter-reset: btp-next; display: grid; gap: 20px; }
.btp-next li {
  counter-increment: btp-next; position: relative;
  display: grid; gap: 2px; padding-left: 44px;
}
.btp-next li::before {
  content: counter(btp-next, decimal-leading-zero);
  position: absolute; left: 0; top: 2px;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.875rem; color: var(--btp-sky);
}
.btp-next strong { font-weight: 600; }
.btp-next span { color: var(--btp-night-soft); font-size: 0.9375rem; }

/* Contact Form 7, restyled only: the form's fields and settings are unchanged */
.btp-contact .wpcf7 .wpcf7-form .short-description { display: none; } /* repeats the page intro */
.btp-contact .wpcf7 .wpcf7-form .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; margin: 0; }
.btp-contact .wpcf7 .wpcf7-form .single-field { margin-bottom: 24px; width: auto; }
.btp-contact .wpcf7 .wpcf7-form .single-field label {
  display: block; margin: 0 0 8px; font-size: 0.9375rem; font-weight: 600; color: var(--btp-ink);
}
.btp-contact .wpcf7 .wpcf7-form .wpcf7-form-control-wrap { display: block; }
.btp-contact .wpcf7 .wpcf7-form input[type="text"],
.btp-contact .wpcf7 .wpcf7-form input[type="email"],
.btp-contact .wpcf7 .wpcf7-form input[type="tel"],
.btp-contact .wpcf7 .wpcf7-form textarea {
  width: 100%; min-height: 52px; padding: 14px 16px;
  font: 400 1rem/1.5 var(--font-body); color: var(--btp-ink);
  background: var(--btp-paper); border: 1px solid var(--btp-line); border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.btp-contact .wpcf7 .wpcf7-form textarea { height: 148px; resize: vertical; }
.btp-contact .wpcf7 .wpcf7-form input:focus,
.btp-contact .wpcf7 .wpcf7-form textarea:focus {
  outline: none; background: #fff; border-color: var(--btp-brand);
  box-shadow: 0 0 0 3px rgba(0, 66, 138, 0.18);
}
.btp-contact .wpcf7 .wpcf7-form .wpcf7-not-valid { border-color: var(--btp-error); }
.btp-contact .wpcf7 .wpcf7-form .wpcf7-not-valid-tip { margin-top: 8px; font-size: 0.875rem; color: var(--btp-error); }

.btp-contact .wpcf7 .wpcf7-form .checkbox-field { margin: 4px 0 24px; font-size: 0.9375rem; color: var(--btp-ink-soft); }
.btp-contact .wpcf7 .wpcf7-form .wpcf7-list-item { margin: 0; }
.btp-contact .wpcf7 .wpcf7-form .wpcf7-list-item label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; margin: 0; }
.btp-contact .wpcf7 .wpcf7-form input[type="checkbox"] {
  flex: none; width: 20px !important; /* legacy .career-form sets width:auto !important */
  height: 20px; margin-top: 3px; accent-color: var(--btp-brand); cursor: pointer;
}

.btp-contact .wpcf7 .wpcf7-form .submit-btn { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.btp-contact .wpcf7 .wpcf7-form .submit-btn p { display: flex; align-items: center; gap: 12px; }
/* Explain why Submit is greyed out until consent is ticked */
.btp-contact .wpcf7-form:has(.wpcf7-submit:disabled) .submit-btn::after {
  content: "Tick the box above to enable Submit.";
  font-size: 0.875rem; color: var(--btp-ink-soft);
}
.btp-contact .wpcf7 .wpcf7-form .wpcf7-spinner { margin: 0; }
.btp-contact .wpcf7 .wpcf7-form:not(.submitting) .wpcf7-spinner { display: none; }
.btp-contact .wpcf7 .wpcf7-form .wpcf7-response-output {
  margin: 20px 0 0; padding: 12px 16px; border-radius: 12px; font-size: 0.9375rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .btp-hero__title { grid-column: 1 / -1; }
  .btp-hero__aside { grid-column: 1 / span 8; }
  .btp-process__steps { --steps: 3 !important; row-gap: 48px; }
  .btp-process__steps::before, .btp-process__steps::after { display: none; }
  .btp-contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .btp-wrap { padding: 0 20px; }
  .btp-section { padding: 80px 0; }
  .btp-hero { padding: 72px 0 48px; }
  .btp-hero .btp-wrap { row-gap: 36px; }
  .btp-hero__aside { grid-column: 1 / -1; }
  .btp-stats { grid-template-columns: 1fr 1fr; }
  .btp-stats__item, .btp-stats__item + .btp-stats__item { padding: 20px 0; border-left: 0; }
  .btp-stats__item:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--btp-line); }
  .btp-stats__item:nth-child(n+3) { border-top: 1px solid var(--btp-line); }

  .btp-vision__grid, .btp-process__head { grid-template-columns: 1fr; gap: 40px; }
  .btp-process__head { gap: 16px; margin-bottom: 48px; }

  /* Process becomes a vertical timeline */
  .btp .btp-process__steps { grid-template-columns: 1fr; gap: 36px; padding-left: 40px; }
  .btp-process__steps::before, .btp-process__steps::after {
    display: block; top: 8px; bottom: 8px; left: 7px; right: auto; width: 2px; height: auto;
  }
  .btp-process__steps::after { transform: scaleY(var(--p)); transform-origin: center top; }
  .btp-process__step { padding-top: 0; }
  .btp-process__step::before { left: -40px; top: 6px; }
  .btp-process__num { position: static; display: block; margin-bottom: 4px; }

  .btp-cta__inner { flex-direction: column; align-items: flex-start; }

  .btp-contact { padding: 64px 0 80px; }
  .btp-contact__head { margin-bottom: 36px; }
  .btp-contact__form, .btp-contact__panel { padding: 28px 20px; border-radius: 16px; }
  .btp-contact .wpcf7 .wpcf7-form .two-col { grid-template-columns: 1fr; }
  .btp-contact .wpcf7 .wpcf7-form .submit-btn p { width: 100%; }
  html body:not(#bt-none) .btp-contact .wpcf7-form .wpcf7-submit { width: 100% !important; } /* beats css/bt-buttons.css */
  .btp-contact .bt-submit { display: flex; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .btp *, .btp *::before, .btp *::after { transition: none !important; }
}

/* ---------- Services overview (/services/) ---------- */
.btp-svc-jump {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border-top: 1px solid var(--btp-line);
}
.btp-svc-jump a {
  display: grid; gap: 4px; padding: 24px 24px 0 0; color: var(--btp-ink);
}
.btp-svc-jump a + a { padding-left: 24px; border-left: 1px solid var(--btp-line); }
.btp .btp-svc-jump__title {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em;
  transition: color 0.2s;
}
.btp-svc-jump__count { font-size: 0.9375rem; color: var(--btp-ink-soft); }
.btp-svc-jump a:hover .btp-svc-jump__title { color: var(--btp-brand); }

.btp-svc-group { scroll-margin-top: 112px; }
.btp-svc-group:nth-of-type(even) { background: var(--btp-surface); }
.btp-svc-group + .btp-svc-group { border-top: 1px solid var(--btp-line); }
.btp-svc-group__grid { display: grid; grid-template-columns: 4fr 8fr; gap: 64px; align-items: start; }
.btp-svc-group__head { position: sticky; top: 140px; display: grid; gap: 16px; }
.btp-svc-group__head p { color: var(--btp-ink-soft); max-width: 34ch; }

.btp-svc-list { border-top: 1px solid var(--btp-line); }
.btp-svc-list > li { border-bottom: 1px solid var(--btp-line); }
.btp-svc {
  display: grid; grid-template-columns: 1fr auto; column-gap: 32px; row-gap: 12px;
  padding: 32px 24px; margin: 0 -24px; border-radius: 16px;
  color: var(--btp-ink);
  transition: background-color 0.25s var(--btp-ease);
}
.btp-svc:hover { background: rgba(0, 66, 138, 0.05); color: var(--btp-ink); }
/* hover: the row's grey top and bottom rules run on down/up the sides until they meet.
   The outline sits 1px out so its top/bottom lie on the list's own rules; 1px strips keep those always on. */
@property --btp-trace { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.btp-svc { position: relative; }
.btp-svc::before {
  content: ''; position: absolute; inset: -1px 0; border: 1px solid var(--btp-line); border-radius: inherit;
  pointer-events: none; --btp-trace: 0%;
  --btp-trace-mask:
    linear-gradient(#000 0 0) top / 100% 1px no-repeat,
    linear-gradient(#000 0 0) bottom / 100% 1px no-repeat,
    linear-gradient(#000 var(--btp-trace), transparent var(--btp-trace) calc(100% - var(--btp-trace)), #000 calc(100% - var(--btp-trace)));
  -webkit-mask: var(--btp-trace-mask);
  mask: var(--btp-trace-mask);
  transition: --btp-trace 1s cubic-bezier(0.45, 0, 0.55, 1);
}
.btp-svc:hover::before, .btp-svc:focus-visible::before { --btp-trace: 50%; }
.btp-svc__title {
  grid-column: 1; font-size: clamp(1.5rem, 2.2vw, 2rem); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.15; transition: color 0.2s;
}
.btp-svc:hover .btp-svc__title { color: var(--btp-brand); }
@media (min-width: 1101px) {
  /* the row whose work is in the group's preview frame (js/bt-pages.js) */
  .btp-svc-group:has(.btp-svc-preview) .btp-svc.is-current .btp-svc__title { color: var(--btp-brand); }
}
.btp-svc__summary { grid-column: 1; color: var(--btp-ink-soft); max-width: 60ch; }
/* every item gets a leading rule; the list is shifted left by one rule's width and that strip is
   clipped, so a rule that lands at the start of a wrapped line is never visible */
.btp .btp-svc__includes {
  grid-column: 1; display: flex; flex-wrap: wrap; gap: 4px 0; margin: 4px 0 0 -25px;
  clip-path: inset(0 0 0 25px);
}
.btp-svc__includes li {
  display: inline-flex; align-items: center;
  font-size: 0.875rem; line-height: 1.4; color: var(--btp-ink-soft);
}
.btp-svc__includes li::before {
  content: ""; width: 1px; height: 12px; margin: 0 12px; background: var(--btp-line);
}
.btp-svc__arrow {
  grid-column: 2; grid-row: 1 / span 3; align-self: center;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--btp-line);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M4 10L10 4M10 4H5M10 4V9' stroke='%230a1b33' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
  transition: transform 0.3s var(--btp-ease), background-color 0.25s, border-color 0.25s;
}
.btp-svc:hover .btp-svc__arrow,
.btp-svc:focus-visible .btp-svc__arrow { background-color: var(--btp-sky); border-color: var(--btp-sky); transform: rotate(45deg); }

@media (max-width: 1100px) {
  .btp-svc-group__grid { grid-template-columns: 1fr; gap: 32px; }
  .btp-svc-group__head { position: static; }
}
@media (max-width: 768px) {
  .btp-svc-jump { grid-template-columns: 1fr; }
  .btp-svc-jump a, .btp-svc-jump a + a { padding: 16px 0; border-left: 0; border-bottom: 1px solid var(--btp-line); grid-template-columns: 1fr auto; align-items: baseline; }
  .btp-svc-jump__title { font-size: 1.25rem; }
  .btp-svc { padding: 24px 12px; margin: 0 -12px; column-gap: 16px; }
  .btp-svc__arrow { width: 44px; height: 44px; grid-row: 1; align-self: start; }
}

/* Services: work previews. Desktop = one sticky frame per group that switches with the
   hovered service; below 1100px each row shows its own image instead. */
.btp-svc-preview {
  position: relative; margin-top: 16px;
  aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden;
  background: var(--btp-paper); border: 1px solid var(--btp-line);
  box-shadow: 0 24px 48px -28px rgba(7, 20, 38, 0.35);
}
.btp-svc-preview__item {
  position: absolute; inset: 0; margin: 0;
  opacity: 0;
  transition: opacity 0.4s var(--btp-ease);
}
.btp-svc-preview__item.is-active { opacity: 1; }
.btp-svc-preview__item img,
.btp-svc__media img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; /* a lazy-load script sets inline sizes */ object-fit: cover; object-position: top center; display: block; }
.btp-svc-preview__item figcaption,
.btp-svc__media figcaption {
  position: absolute; left: 12px; bottom: 12px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.95); color: var(--btp-ink);
  border: 1px solid var(--btp-line); box-shadow: 0 4px 14px -6px rgba(7, 20, 38, 0.35);
  font-size: 0.8125rem; font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s var(--btp-ease) 0.1s;
}
.btp-svc-preview__item.is-active figcaption { opacity: 1; }

.btp-svc__media { display: none; }

@media (max-width: 1100px) {
  .btp-svc-preview { display: none; }
  .btp-svc__media {
    display: block; position: relative; grid-column: 1 / -1; grid-row: 1; margin: 0 0 8px;
    aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; border: 1px solid var(--btp-line);
  }
  .btp-svc__media figcaption { opacity: 1; }
  .btp-svc:has(.btp-svc__media) .btp-svc__arrow { grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .btp-svc-preview__item, .btp-svc-preview__item figcaption { transition: none; transform: none; }
  .btp-svc::before { transition: none; }
}
