/* =========================================================================
   IME Solutions — styles.css
   Accessible (WCAG 2.0 AA), responsive, modern engineering aesthetic.
   ========================================================================= */

/* ----------------------------- Design tokens ----------------------------- */
:root {
  --navy-900: #0d1b35;
  --navy-800: #112444;
  --navy-700: #16315b;
  --navy-600: #1d3e72;
  --blue-500: #2b7de9;   /* brand accent (decorative / non-text use) */
  --blue-600: #1763c9;   /* button fill — white text = 5.7:1 (AA) */
  --blue-700: #134f9f;   /* button hover */
  --blue-400: #4a9bf0;
  --blue-300: #7bb6f5;
  --blue-link: #0e5fc0;  /* AA-contrast link colour on white (5.3:1) */

  --ink-900: #16243f;    /* primary text on light (13:1 on white) */
  --ink-700: #3a4a66;    /* secondary text (7.4:1) */
  --ink-500: #586b88;    /* muted, large text only */

  --bg: #ffffff;
  --bg-alt: #f3f7fc;
  --bg-soft: #eef4fb;
  --line: #dde7f3;

  --white: #ffffff;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(13, 27, 53, .06);
  --shadow-md: 0 14px 38px rgba(13, 27, 53, .12);
  --shadow-lg: 0 24px 60px rgba(13, 27, 53, .18);

  --maxw: 1180px;
  --header-h: 76px;
  --espa-bar-h: 86px;

  --ff-head: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ff-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ----------------------------- Reset / base ----------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: clamp(16px, 1.05vw + 0.7rem, 18px);
  line-height: 1.7;
  color: var(--ink-900);
  background: var(--bg);
  /* leave space for fixed ESPA bar (+ breathing room so footer clears it) */
  padding-bottom: calc(var(--espa-bar-h) + 1.75rem);
  overflow-x: hidden;
}
body.espa-hidden { padding-bottom: 0; }

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

h1, h2, h3 { font-family: var(--ff-head); line-height: 1.15; color: var(--ink-900); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 800; letter-spacing: -.015em; }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); font-weight: 700; }

p { margin: 0 0 1rem; }
a { color: var(--blue-link); text-decoration-color: rgba(14, 95, 192, .35); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: min(100% - 2.4rem, var(--maxw)); margin-inline: auto; }

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }

/* Visible focus for every interactive element (WCAG 2.4.7) */
:where(a, button, [tabindex], iframe, input, summary):focus-visible {
  outline: 3px solid var(--blue-500);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ----------------------------- Skip link ----------------------------- */
.skip-link {
  position: fixed;
  top: .6rem; left: .6rem;
  z-index: 2000;
  background: var(--navy-900);
  color: #fff;
  padding: .7rem 1.1rem;
  border-radius: 10px;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* Shared eyebrow / section heads */
.eyebrow {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue-link);
  margin: 0 0 .8rem;
}
.section-head { max-width: 720px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-sub { color: var(--ink-700); font-size: 1.05rem; margin: 0; }

/* ----------------------------- Buttons ----------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 1rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
}
.btn--primary {
  background: var(--blue-600);
  color: #fff;
  box-shadow: 0 10px 24px rgba(23, 99, 201, .38);
}
.btn--primary:hover { background: var(--blue-700); transform: translateY(-2px); box-shadow: 0 16px 30px rgba(23, 99, 201, .45); }
.btn--ghost {
  background: rgba(8, 18, 38, .35);
  color: #fff;
  border-color: rgba(255, 255, 255, .7);
}
.btn--ghost:hover { background: rgba(8, 18, 38, .55); border-color: #fff; transform: translateY(-2px); }
.btn--ghost-dark { color: var(--ink-900); border-color: var(--ink-900); background: transparent; }
.btn--ghost-dark:hover { background: var(--ink-900); color: #fff; transform: translateY(-2px); }

/* ----------------------------- Header ----------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); border-color: var(--line); }

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { height: 44px; width: auto; }

.main-nav { display: flex; align-items: center; }
.nav-list { display: flex; align-items: center; gap: .35rem; }
.nav-link {
  display: inline-block;
  font-family: var(--ff-head);
  font-weight: 600;
  font-size: .98rem;
  color: var(--ink-900);
  text-decoration: none;
  padding: .55rem .9rem;
  border-radius: 999px;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.nav-link:hover { background: var(--bg-soft); color: var(--blue-link); }
.nav-link.is-active { color: var(--blue-link); }
.nav-link.is-active::after {
  content: "";
  display: block;
  height: 2px;
  width: 60%;
  margin: 2px auto 0;
  background: var(--blue-500);
  border-radius: 2px;
}
.nav-cta {
  background: var(--navy-900);
  color: #fff !important;
  padding-inline: 1.2rem;
}
.nav-cta:hover { background: var(--navy-700); }
.nav-cta.is-active::after { display: none; }

/* Language switch (globe toggle) */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  margin-left: 1.1rem;
  padding: .46rem .82rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: .84rem;
  letter-spacing: .04em;
  line-height: 1;
  color: var(--ink-700);
  text-decoration: none;
  flex-shrink: 0;
  transition: color .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease);
}
.lang-switch:hover { background: var(--bg-soft); color: var(--blue-link); border-color: var(--blue-300); }
.lang-switch:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 2px; }
.lang-globe { color: var(--blue-link); flex-shrink: 0; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px; height: 46px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink-900);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
  margin-inline: auto;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----------------------------- Hero ----------------------------- */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  background: radial-gradient(120% 120% at 80% 0%, var(--navy-700) 0%, var(--navy-900) 55%, #081428 100%);
  padding: clamp(3rem, 7vw, 5rem) 0;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(rgba(122, 173, 245, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 173, 245, .09) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(120% 90% at 70% 10%, #000 35%, transparent 80%);
  mask-image: radial-gradient(120% 90% at 70% 10%, #000 35%, transparent 80%);
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .5;
}
.hero-blob--1 { width: 460px; height: 460px; right: -90px; top: -120px; background: radial-gradient(circle, rgba(43,125,233,.75), transparent 70%); }
.hero-blob--2 { width: 380px; height: 380px; left: -120px; bottom: -140px; background: radial-gradient(circle, rgba(74,155,240,.5), transparent 70%); animation: floaty 9s ease-in-out infinite; }

@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(26px); } }

.hero-inner { position: relative; z-index: 1; max-width: 820px; }
.hero-logo {
  width: clamp(220px, 30vw, 340px);
  height: auto;
  margin-bottom: 1.6rem;
  animation: rise .7s var(--ease) both;
}
.hero-eyebrow {
  font-family: var(--ff-head);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: .82rem;
  color: var(--blue-300);
  margin: 0 0 .8rem;
  animation: rise .7s var(--ease) .05s both;
}
.hero h1 { color: #fff; margin-bottom: 1.1rem; animation: rise .7s var(--ease) .12s both; }
.hero-lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: #d6e3f5;
  max-width: 620px;
  margin: 0 0 2rem;
  animation: rise .7s var(--ease) .2s both;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; animation: rise .7s var(--ease) .28s both; }

@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }

.hero-scroll {
  position: absolute;
  left: 50%; bottom: 1.4rem;
  transform: translateX(-50%);
  width: 28px; height: 46px;
  border: 2px solid rgba(255,255,255,.5);
  border-radius: 999px;
  z-index: 1;
  display: flex; justify-content: center;
}
.hero-scroll-dot {
  width: 5px; height: 9px;
  margin-top: 7px;
  background: #fff;
  border-radius: 999px;
  animation: scrolldot 1.8s var(--ease) infinite;
}
@keyframes scrolldot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ----------------------------- About ----------------------------- */
.about { background: var(--bg); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.about-intro {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}
.about-intro p { color: var(--ink-700); }
.about-intro p:first-of-type { color: var(--ink-900); font-size: 1.12rem; }

.about-values { display: grid; gap: 1rem; }
.value-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-300); }
.value-icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 50px; height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue-500), var(--navy-700));
  color: #fff;
  margin-bottom: .9rem;
}
.value-card h3 { margin-bottom: .3rem; }
.value-card p { margin: 0; color: var(--ink-700); font-size: .98rem; }

/* ----------------------------- Services ----------------------------- */
.services { background: var(--bg-alt); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(1.2rem, 2.4vw, 1.8rem);
}
.service-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.service-card::before {
  content: "";
  position: absolute; top: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--blue-500), var(--blue-300));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 54px; height: 54px;
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--blue-link);
  margin-bottom: 1.1rem;
  transition: background .22s var(--ease), color .22s var(--ease);
}
.service-card:hover .service-icon { background: linear-gradient(135deg, var(--blue-500), var(--navy-700)); color: #fff; }
.service-card h3 { margin-bottom: .6rem; }
.service-card > p { color: var(--ink-700); font-size: .98rem; }

.service-list { margin-top: 1.1rem; display: grid; gap: .55rem; }
.service-list li {
  position: relative;
  padding-left: 1.7rem;
  color: var(--ink-900);
  font-size: .96rem;
}
.service-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--blue-500);
  transform: rotate(45deg);
}

/* ----------------------------- Contact ----------------------------- */
.contact { background: var(--bg); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: stretch;
}
.contact-details {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-700));
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(1.8rem, 4vw, 2.8rem);
  box-shadow: var(--shadow-md);
}
.contact-name { color: #fff; font-size: 1.5rem; margin-bottom: 1.6rem; }
.contact-list { display: grid; gap: 1.3rem; margin-bottom: 2rem; }
.contact-list li { display: flex; align-items: flex-start; gap: 1rem; }
.contact-ic {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(122, 173, 245, .16);
  color: var(--blue-300);
}
.contact-label {
  display: block;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue-300);
  margin-bottom: .15rem;
}
.contact-list a, .contact-static { color: #fff; font-weight: 600; font-size: 1.05rem; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; text-decoration-color: var(--blue-300); }
.contact-cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.contact-cta .btn--ghost-dark { color: #fff; border-color: rgba(255,255,255,.6); }
.contact-cta .btn--ghost-dark:hover { background: #fff; color: var(--navy-900); }

.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
  min-height: 380px;
}
.contact-map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }

/* ----------------------------- ESPA section ----------------------------- */
.espa { background: var(--bg-alt); text-align: center; }
.espa-title { margin-bottom: 1.6rem; }
.espa-banner-link {
  display: inline-block;
  max-width: 880px;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.espa-banner-link:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.espa-banner-link img { width: 100%; }
.espa-banner-cta {
  display: block;
  background: var(--navy-900);
  color: #fff;
  font-family: var(--ff-head);
  font-weight: 600;
  font-size: .95rem;
  padding: .8rem 1rem;
}

/* ----------------------------- Footer ----------------------------- */
.site-footer {
  background: var(--navy-900);
  color: #c6d4e8;
  padding: clamp(3rem, 6vw, 4.5rem) 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.3fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.footer-brand img { height: 64px; width: auto; margin-bottom: 1rem; }
.footer-brand p { color: #9fb3d1; max-width: 320px; margin: 0; }
.site-footer h2 { color: #fff; font-size: 1.05rem; margin-bottom: 1rem; }
.footer-nav ul { display: grid; gap: .55rem; }
.footer-nav a, .footer-contact a { color: #c6d4e8; text-decoration: none; }
.footer-nav a:hover, .footer-contact a:hover { color: #fff; text-decoration: underline; }
.footer-contact address { font-style: normal; line-height: 2; color: #c6d4e8; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .6rem;
  padding-top: 1.5rem;
  font-size: .88rem;
  color: #8ea4c4;
}
.footer-bottom p { margin: 0; }
.footer-credit {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .35rem;
  padding-top: .9rem;
  margin-top: .4rem;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: #8ea4c4;
}
.footer-credit strong { color: #fff; font-weight: 700; }
.footer-credit a { color: #fff; text-decoration: none; }
.footer-credit a:hover { text-decoration: underline; }
.footer-heart {
  display: inline-flex;
  color: #ff5d73;
  animation: heartbeat 1.6s var(--ease) infinite;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.25); }
  30% { transform: scale(1); }
  45% { transform: scale(1.18); }
}

/* Screen-reader-only utility */
.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;
}

/* ----------------------------- Sticky ESPA bar ----------------------------- */
.espa-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1100;
  display: flex;
  align-items: stretch;
  background: #11407e;
  box-shadow: 0 -6px 24px rgba(8, 20, 40, .35);
  transition: transform .35s var(--ease);
}
.espa-bar.is-hidden { transform: translateY(110%); }
.espa-bar-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  min-height: var(--espa-bar-h);
}
.espa-bar-link img {
  max-height: calc(var(--espa-bar-h) - 14px);
  width: auto;
  object-fit: contain;
}
.espa-bar-close {
  flex-shrink: 0;
  width: 44px;
  background: rgba(0, 0, 0, .22);
  border: 0;
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s var(--ease);
}
.espa-bar-close:hover { background: rgba(0, 0, 0, .4); }

/* Re-open chip after dismissal */
.espa-reopen {
  position: fixed;
  left: 1rem; bottom: 1rem;
  z-index: 1100;
  display: none;
  align-items: center; gap: .5rem;
  background: var(--navy-900);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: .6rem 1rem;
  font-family: var(--ff-head);
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}
.espa-reopen.is-visible { display: inline-flex; }

/* ----------------------------- Back to top ----------------------------- */
.to-top {
  position: fixed;
  right: 1.2rem;
  bottom: calc(var(--espa-bar-h) + 1rem);
  z-index: 1050;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 0;
  background: var(--blue-500);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(16px) scale(.9);
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease), background .15s var(--ease);
}
.to-top.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.to-top:hover { background: #1f6fd6; }
body.espa-hidden .to-top { bottom: 1.2rem; }

/* ----------------------------- Reveal on scroll ----------------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ----------------------------- Responsive ----------------------------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .main-nav { gap: .6rem; }
  .lang-switch { order: 1; }
  .nav-toggle { order: 2; }
  .nav-list {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    padding: .5rem .9rem 1rem;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-130%);
    transition: transform .3s var(--ease);
    max-height: calc(100svh - var(--header-h));
    overflow-y: auto;
  }
  .nav-list.is-open { transform: translateY(0); }
  .nav-link { padding: .9rem 1rem; border-radius: 12px; font-size: 1.05rem; }
  .nav-link.is-active::after { display: none; }
  .nav-cta { margin-top: .4rem; text-align: center; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1; justify-content: center; }
  :root { --espa-bar-h: 70px; }
}

/* ----------------------------- Reduced motion (WCAG 2.3.3) ----------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================================
   MULTI-PAGE COMPONENTS
   ========================================================================= */

/* ----------------------------- Inner page hero ----------------------------- */
.page-hero {
  position: relative;
  color: #fff;
  overflow: hidden;
  background: radial-gradient(130% 150% at 88% -20%, var(--navy-700) 0%, var(--navy-900) 58%, #081428 100%);
  padding: clamp(2.6rem, 6vw, 4.4rem) 0 clamp(2.6rem, 6vw, 4rem);
}
.page-hero .hero-grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(rgba(122, 173, 245, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 173, 245, .09) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(110% 100% at 80% 0%, #000 30%, transparent 80%);
  mask-image: radial-gradient(110% 100% at 80% 0%, #000 30%, transparent 80%);
}
.page-hero .hero-blob {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .45;
  width: 360px; height: 360px; right: -80px; top: -120px;
  background: radial-gradient(circle, rgba(43, 125, 233, .7), transparent 70%);
}
.page-hero-inner { position: relative; z-index: 1; max-width: 760px; }
.page-hero .eyebrow { color: var(--blue-300); }
.page-hero h1 { color: #fff; margin-bottom: .6rem; animation: rise .6s var(--ease) both; }
.page-hero-lead { color: #d6e3f5; font-size: clamp(1.02rem, 1.5vw, 1.18rem); margin: 0; max-width: 640px; animation: rise .6s var(--ease) .08s both; }

/* Breadcrumb */
.breadcrumb { position: relative; z-index: 1; margin-bottom: 1.1rem; font-size: .9rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.breadcrumb a { color: var(--blue-300); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current] { color: #e3edfa; }
.breadcrumb li + li::before { content: "›"; margin-right: .5rem; color: rgba(255, 255, 255, .45); }

/* ----------------------------- Highlights band (home) ----------------------------- */
.highlights { background: var(--bg); }
.highlights-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: clamp(1rem, 2.5vw, 1.6rem); }
.highlight-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.highlight-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-300); }
.highlight-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, var(--blue-500), var(--navy-700)); color: #fff;
  margin-bottom: 1rem;
}
.highlight-card h3 { margin-bottom: .3rem; }
.highlight-card p { margin: 0; color: var(--ink-700); font-size: .98rem; }

/* ----------------------------- Services teaser (home) ----------------------------- */
.svc-teaser { background: var(--bg-alt); }
.svc-mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: clamp(1.1rem, 2.4vw, 1.6rem); }
.svc-mini-grid > li { display: flex; }
a.svc-mini {
  display: flex; flex-direction: column;
  height: 100%; width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
a.svc-mini::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--blue-500), var(--blue-300));
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
a.svc-mini:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
a.svc-mini:hover::before { transform: scaleX(1); }
.svc-mini .service-icon { margin-bottom: 1rem; }
a.svc-mini:hover .service-icon { background: linear-gradient(135deg, var(--blue-500), var(--navy-700)); color: #fff; }
.svc-mini h3 { margin-bottom: .5rem; color: var(--ink-900); }
.svc-mini p { color: var(--ink-700); font-size: .96rem; margin: 0 0 1.1rem; }
.svc-mini .more { margin-top: auto; display: inline-flex; align-items: center; gap: .4rem; color: var(--blue-link); font-family: var(--ff-head); font-weight: 700; font-size: .95rem; }
.svc-mini .more svg { transition: transform .2s var(--ease); }
a.svc-mini:hover .more svg { transform: translateX(4px); }

/* Number the full service cards */
.services-grid { counter-reset: svc; }
.service-card { counter-increment: svc; }
.service-card .service-num {
  position: absolute; top: 1.4rem; right: 1.6rem;
  font-family: var(--ff-head); font-weight: 800; font-size: 2.4rem;
  color: var(--bg-soft); line-height: 1; pointer-events: none;
}
.service-card .service-num::before { content: counter(svc, decimal-leading-zero); }
.service-card:hover .service-num { color: var(--blue-300); }

/* ----------------------------- About teaser strip (home) ----------------------------- */
.about-teaser { background: var(--bg); }
.about-teaser-inner {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.about-teaser-media {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, var(--navy-900), var(--navy-700));
  min-height: 320px; display: grid; place-items: center; padding: 2.5rem;
  box-shadow: var(--shadow-md);
}
.about-teaser-media .hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(122, 173, 245, .1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 173, 245, .1) 1px, transparent 1px);
  background-size: 40px 40px;
}
.about-teaser-media img { position: relative; width: min(78%, 320px); }

/* ----------------------------- Process / steps ----------------------------- */
.process { background: var(--bg-alt); }
.process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: clamp(1.1rem, 2.4vw, 1.7rem); counter-reset: step; }
.step {
  position: relative; counter-increment: step;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2.2rem 1.6rem 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 12px; margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--blue-500), var(--navy-700));
  color: #fff; font-family: var(--ff-head); font-weight: 800; font-size: 1.2rem;
}
.step-num::before { content: counter(step, decimal-leading-zero); }
.step h3 { margin-bottom: .4rem; font-size: 1.12rem; }
.step p { margin: 0; color: var(--ink-700); font-size: .96rem; }

/* ----------------------------- CTA band ----------------------------- */
.cta-wrap { padding: clamp(3rem, 7vw, 5rem) 0; background: var(--bg); }
.cta-band {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-600) 100%);
  color: #fff; border-radius: calc(var(--radius) + 6px);
  padding: clamp(2.4rem, 6vw, 4rem) clamp(1.5rem, 5vw, 3.5rem);
  text-align: center;
  box-shadow: var(--shadow-md);
}
.cta-band .hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(122, 173, 245, .1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 173, 245, .1) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(90% 120% at 80% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(90% 120% at 80% 0%, #000 20%, transparent 75%);
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #d6e3f5; max-width: 560px; margin: 0 auto 1.8rem; font-size: 1.05rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* ----------------------------- Inner-page tweaks ----------------------------- */
.section--tight { padding-top: clamp(2.5rem, 5vw, 3.5rem); }

@media (max-width: 900px) {
  .about-teaser-inner { grid-template-columns: 1fr; }
}

/* ----------------------------- Print ----------------------------- */
@media print {
  .site-header, .espa-bar, .espa-reopen, .to-top, .hero-scroll, .nav-toggle { display: none !important; }
  body { padding-bottom: 0; }
  .page-hero, .cta-band, .contact-details { background: #fff !important; color: #000 !important; }
}
