@font-face {
  font-family: "Questrial";
  src: url("../fonts/Questrial-Regular.ttf");
}

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat-Regular.ttf");
}

@font-face {
  font-family: "Montserrat";
  font-weight: 700;
  src: url("../fonts/Montserrat-SemiBold.ttf");
}

:root {
  --blue: #1157a0;
  --deep-blue: #061a45;
  --ink: #1f2630;
  --muted: #4d5968;
  --paper: #f4f4f4;
  --white: #ffffff;
  --cyan: #27c5d6;
  --shadow: 0 18px 45px rgba(2, 22, 62, 0.2);
  --hero-heading-size: 43px;
  --section-heading-size: 40px;
  --card-heading-size: clamp(16px, 1.35vw, 20px);
  --body-copy-size: 19.4px;
  --small-copy-size: 15px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Montserrat", Arial, sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 244, 244, 0.96);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(14px);
}

.nav-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand img {
  width: 72px;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 58px);
  margin: 0;
  padding: 0;
  list-style: none;
  color: #1f2a38;
  font-family: "Questrial", Arial, sans-serif;
  font-size: 14px;
  text-transform: uppercase;
}

.nav-links li {
  position: relative;
}

.nav-links a,
.solutions-trigger {
  position: relative;
  display: inline-block;
  padding: 8px 0;
}

.solutions-trigger {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  line-height: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.solutions-trigger:focus {
  outline: none;
}

.nav-links a::after,
.solutions-trigger::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 2px;
  background: var(--blue);
  content: "";
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.nav-links a.is-active::after,
.solutions-trigger:hover::after,
.solutions-trigger:focus-visible::after,
.solutions-trigger.is-active::after {
  transform: scaleX(1);
}

.nav-links a.is-active,
.solutions-trigger.is-active {
  color: var(--blue);
  font-weight: 700;
}

.solutions-menu {
  z-index: 2;
}

.solutions-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  min-width: 230px;
  padding: 12px;
  background: rgba(244, 244, 244, 0.98);
  border-radius: 6px;
  box-shadow: 0 18px 38px rgba(6, 26, 69, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.solutions-menu:hover .solutions-dropdown,
.solutions-trigger:hover + .solutions-dropdown,
.solutions-menu:focus-within .solutions-dropdown,
.solutions-dropdown:hover,
.solutions-menu.is-open .solutions-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.solutions-dropdown a {
  display: block;
  padding: 10px 12px;
  color: #1f2a38;
  white-space: nowrap;
}

.solutions-dropdown a::after {
  display: none;
}

.solutions-dropdown a:hover,
.solutions-dropdown a:focus-visible,
.solutions-dropdown a.is-active {
  color: var(--blue);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--blue);
}

.circuit-section {
  color: var(--white);
  background-color: var(--deep-blue);
  background-image: url("../images/homepage-v4/circuit-bg.png");
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  overflow: hidden;
}

.hero-industry {
  position: relative;
}

.hero {
  min-height: clamp(500px, 62vw, 710px);
  display: grid;
  place-items: center;
  padding: clamp(64px, 8vw, 112px) 20px;
  text-align: center;
}

.hero-content {
  width: min(1176px, 100%);
  animation: float-in 800ms ease both;
}

.hero h1 {
  margin: 0;
  color: var(--white);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(38px, 5vw, 67px) !important;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.05;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero p {
  width: min(640px, 100%);
  margin: 22px auto 42px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(16px, 1.5vw, 21px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 146px;
  min-height: 44px;
  padding: 12px 22px;
  border: 1px solid currentColor;
  font-family: "Questrial", Arial, sans-serif;
  font-size: 14px;
  line-height: 1;
  text-transform: uppercase;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.18);
}

.button-light {
  color: #1157a0;
  background: var(--white);
}

.button-blue {
  color: var(--white);
  background: var(--blue);
  border-color: var(--blue);
}

.section-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.industry {
  min-height: 620px;
  padding: clamp(72px, 8vw, 110px) 0;
  background: transparent;
}

.industry .section-inner {
  width: min(1232px, calc(100% - 32px));
  text-align: center;
}

.industry h2,
.blue-heading {
  margin: 0;
  font-family: "Questrial", Arial, sans-serif;
  font-size: clamp(32px, 4vw, 49px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 7vw, 100px);
  width: min(1105px, 100%);
  margin: clamp(42px, 6vw, 70px) auto 54px;
}

.metric-grid article {
  min-width: 0;
  text-align: center;
}

.metric-grid strong {
  display: block;
  color: var(--white);
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-size: clamp(29px, 4.1vw, 49px);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.metric-grid span {
  display: block;
  margin-top: 16px;
  color: var(--white);
  font-size: clamp(14px, 1.45vw, 18px);
  font-weight: 700;
  white-space: nowrap;
}

.industry-copy {
  width: min(620px, 100%);
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(16px, 1.45vw, 20px);
}

.industry-copy p {
  margin: 0 0 5px;
}

.industry-copy .strong-copy {
  margin-top: 34px;
  font-weight: 700;
}

.services-section,
.clients-section {
  padding: clamp(72px, 9vw, 116px) 0;
  background: var(--paper);
}

.blue-heading {
  color: #1157a0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 44px auto 62px;
}

.service-card {
  min-height: 278px;
  padding: 28px 22px 24px;
  color: var(--white);
  background: linear-gradient(160deg, #073279 0%, #0b73b6 58%, #08326f 100%);
  background-image: url("../images/homepage-v4/service-card-bg.png"), linear-gradient(160deg, #073279 0%, #0b73b6 58%, #08326f 100%);
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  box-shadow: var(--shadow);
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}

.service-card:nth-child(2),
.service-card:nth-child(4) {
  background-image: url("../images/homepage-v4/service-card-bg.png"), linear-gradient(160deg, #0a66a6 0%, #0879bd 48%, #07327d 100%);
}

.service-card:hover,
.service-card:focus-visible {
  transform: translateY(-8px);
  box-shadow: 0 24px 58px rgba(3, 37, 99, 0.26);
  filter: saturate(1.05);
}

.service-card img {
  width: 54px;
  height: 54px;
  margin-bottom: 22px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.86;
}

.service-card h3 {
  min-height: 58px;
  margin: 0 0 14px;
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.2;
}

.service-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  line-height: 1.45;
}

/* Shared type scale used by all V4 pages. */
.hero h1 {
  font-size: var(--hero-heading-size);
}

.hero p,
.industry-copy {
  font-size: var(--body-copy-size);
}

.industry h2,
.blue-heading {
  font-size: var(--section-heading-size);
}

.service-card h3 {
  font-size: var(--card-heading-size);
}

.service-card p {
  font-size: var(--small-copy-size);
}

.services-section .button {
  display: flex;
  width: max-content;
  margin: 0 auto;
}

.client-intro {
  margin: 20px 0 42px;
  text-align: center;
  font-size: clamp(15px, 1.3vw, 18px);
}

.client-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 4vw, 44px);
}

.client-logos img {
  width: auto;
  max-width: 218px;
  max-height: 62px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.client-logos img[src*="worldline"] {
  max-width: 247px;
}

.client-logos img:first-child {
  max-width: 328px;
  max-height: 94px;
}

.client-logos img[src*="commonwealth"] {
  max-width: 286px;
}

.site-footer {
  padding: clamp(46px, 6vw, 70px) 0;
  background: var(--paper);
  box-shadow: 0 -9px 18px rgba(24, 42, 72, 0.07);
}

.footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 280px);
  gap: 32px;
  align-items: end;
}

.footer-brand img {
  width: 70px;
  margin-bottom: 28px;
}

.footer-brand p,
.footer-links a {
  margin: 0;
  color: #2c3139;
  font-size: 14px;
}

.footer-brand a:hover,
.footer-links a:hover {
  color: var(--blue);
}

.footer-links {
  display: grid;
  gap: 4px;
  justify-self: center;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .circuit-section {
    background-attachment: scroll;
  }

  .nav-shell {
    min-height: 68px;
  }

  .brand img {
    width: 58px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    padding: 12px 24px 22px;
    background: rgba(244, 244, 244, 0.98);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a,
  .solutions-trigger {
    width: 100%;
    padding: 14px 0;
    text-align: center;
  }

  .solutions-dropdown {
    position: static;
    min-width: 0;
    padding: 0 0 8px;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    max-height: 0;
    overflow: hidden;
  }

  .solutions-menu:not(.is-open) .solutions-dropdown {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    max-height: 0;
  }

  .solutions-menu.is-open .solutions-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: none;
    max-height: 220px;
  }

  .solutions-dropdown a {
    padding: 9px 0;
    font-size: 13px;
  }

  .hero {
    min-height: 520px;
  }

  .hero h1 {
    white-space: normal;
  }

  .metric-grid {
    grid-template-columns: 1fr;
    gap: 34px;
    margin-bottom: 44px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    width: min(420px, 100%);
  }

  .service-card {
    min-height: 0;
  }

  .service-card h3 {
    min-height: 0;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 480px) {
  .section-inner,
  .nav-shell,
  .footer-inner {
    width: min(100% - 24px, 1120px);
  }

  .hero {
    min-height: 480px;
    padding: 58px 12px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero p {
    margin-bottom: 32px;
  }

  .industry {
    padding: 62px 0;
  }

  .client-logos {
    gap: 24px;
  }

  .client-logos img {
    max-width: 166px;
    max-height: 55px;
  }

  .client-logos img:first-child {
    max-width: 250px;
    max-height: 82px;
  }
}

/* Fixed V4 site-wide type scale. */
main h1 {
  font-size: 43px !important;
}

main h2 {
  font-size: 40px !important;
}

main p:not(.product-mark) {
  font-size: 19.4px !important;
}
