/* ==========================================================================
   AJ TechWork — main stylesheet
   Structure: 1. Tokens  2. Base  3. Layout  4. Components  5. Sections
              6. Pages   7. Utilities & motion
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  /* Neutrals */
  --ink: #0b1324;
  --text: #3a4659;
  --muted: #64748b;
  --bg: #ffffff;
  --surface: #f5f7fb;
  --surface-2: #eef2f8;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;

  /* Brand navy */
  --navy-950: #070d1a;
  --navy-900: #0b1528;
  --navy-800: #122039;
  --navy-700: #1b2c4b;

  /* Brand blue (single accent) */
  --blue-700: #1c47bd;
  --blue-600: #2459e0;
  --blue-500: #2f6bf2;
  --blue-300: #8fb0ff;
  --blue-100: #e6edff;
  --blue-50: #f2f6ff;

  /* Type */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Plus Jakarta Sans", var(--font-sans);
  --fs-display: clamp(2.5rem, 5.2vw, 4.375rem);
  --fs-h1: clamp(2.375rem, 4.4vw, 3.625rem);
  --fs-h2: clamp(1.875rem, 3.2vw, 2.75rem);
  --fs-h3: 1.25rem;

  /* Shape & depth */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(11, 19, 36, 0.05), 0 1px 3px rgba(11, 19, 36, 0.04);
  --shadow: 0 12px 32px -14px rgba(11, 19, 36, 0.18), 0 2px 6px rgba(11, 19, 36, 0.04);
  --shadow-lg: 0 32px 64px -24px rgba(3, 8, 20, 0.55), 0 4px 12px rgba(3, 8, 20, 0.12);

  /* Layout */
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --section-y: clamp(80px, 9vw, 128px);
  --header-h: 76px;
  --subnav-h: 64px; /* height of the sticky services sub-nav (.subnav) */

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.nav-open { overflow: hidden; }

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

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }

a { color: var(--blue-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-700); }

:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 3px; border-radius: 4px; }

::selection { background: var(--blue-100); color: var(--ink); }

.icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 12px; }

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

/* 3. Layout ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--surface { background: var(--surface); }
.section--tight { padding-block: clamp(56px, 6vw, 88px); }

.section--dark {
  position: relative;
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.7);
  overflow: hidden;
}
.section--dark h2, .section--dark h3 { color: #fff; }

.section-head { max-width: 720px; margin-bottom: clamp(44px, 5vw, 64px); }
.section-head h2 { font-size: var(--fs-h2); }
.section-head p { margin-top: 18px; font-size: 1.125rem; color: var(--muted); }
.section--dark .section-head p { color: rgba(255, 255, 255, 0.66); }

.section-head--split {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px 72px;
  align-items: end;
}
.section-head--split p { margin-top: 0; }
.section-head--split .section-head__aside { display: grid; gap: 24px; justify-items: start; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-600);
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: currentColor; }
.section--dark .eyebrow, .hero .eyebrow, .page-hero .eyebrow { color: var(--blue-300); }

.lead { font-size: clamp(1.125rem, 1.4vw, 1.25rem); line-height: 1.6; }

/* Subtle engineering grid used on dark backgrounds */
.grid-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 75% 30%, #000 10%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 70% at 75% 30%, #000 10%, transparent 75%);
  pointer-events: none;
}
.grid-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(700px circle at 85% 10%, rgba(47, 107, 242, 0.16), transparent 60%);
  pointer-events: none;
}
.grid-bg > * { position: relative; z-index: 1; }

/* 4. Components ------------------------------------------------------------ */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 600 1rem/1 var(--font-sans);
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease);
}
.btn .icon { width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--blue-600);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(36, 89, 224, 0.7);
}
.btn--primary:hover { background: var(--blue-700); color: #fff; }

.btn--light {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
}
.btn--light:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.5); color: #fff; }

.btn--outline { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.btn--outline:hover { border-color: var(--ink); color: var(--ink); }

.btn--sm { min-height: 42px; padding: 0 18px; font-size: 0.9375rem; border-radius: 9px; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--blue-600);
  text-decoration: none;
}
.text-link .icon { width: 17px; height: 17px; transition: transform 0.2s var(--ease); }
.text-link:hover .icon { transform: translateX(3px); }
.section--dark .text-link { color: var(--blue-300); }
.section--dark .text-link:hover { color: #fff; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.logo:hover { color: inherit; }
.logo__mark { width: 38px; height: 38px; }
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__name { font-family: var(--font-display); font-weight: 700; font-size: 1.1875rem; letter-spacing: -0.02em; }
.logo__tag { margin-top: 4px; font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.6; }

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  color: #fff;
  transition: background-color 0.3s, box-shadow 0.3s, color 0.3s;
}
.site-header.is-scrolled,
.nav-open .site-header {
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
          backdrop-filter: saturate(1.4) blur(14px);
}

.nav { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav__menu { display: flex; align-items: center; gap: 40px; }
.nav__links { display: flex; gap: 34px; list-style: none; }
.nav__link {
  position: relative;
  padding-block: 8px;
  color: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  opacity: 0.78;
  transition: opacity 0.2s;
}
.nav__link:hover { color: inherit; opacity: 1; }
.nav__link[aria-current="page"] { opacity: 1; }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--blue-500);
}

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.nav__toggle .icon-close { display: none; }
.nav-open .nav__toggle .icon-open { display: none; }
.nav-open .nav__toggle .icon-close { display: block; }

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 49;
  display: flex;
  flex-direction: column;
  padding: 12px var(--gutter) 40px;
  overflow-y: auto;
  background: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}
.nav-open .mobile-nav { opacity: 1; visibility: visible; transform: none; }
.mobile-nav ul { list-style: none; }
.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.mobile-nav__link[aria-current="page"] { color: var(--blue-600); }
.mobile-nav__link .icon { width: 20px; height: 20px; color: var(--muted); }
.mobile-nav__footer { margin-top: auto; padding-top: 32px; display: grid; gap: 16px; }
.mobile-nav__footer a:not(.btn) { color: var(--muted); text-decoration: none; text-align: center; }

@media (max-width: 1023px) {
  .nav__menu { display: none; }
  .nav__toggle { display: inline-flex; }
}
@media (min-width: 1024px) {
  .mobile-nav { display: none; }
}
@media (max-width: 439px) {
  .logo__tag { display: none; }
}

/* Cards */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s var(--ease);
}
.card h3 { font-size: var(--fs-h3); }
.card p { margin-top: 12px; color: var(--muted); font-size: 1rem; }

.icon-tile {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  border-radius: 12px;
  background: var(--blue-50);
  color: var(--blue-600);
  box-shadow: inset 0 0 0 1px rgba(36, 89, 224, 0.12);
}
.section--dark .icon-tile { background: rgba(143, 176, 255, 0.1); color: var(--blue-300); box-shadow: inset 0 0 0 1px rgba(143, 176, 255, 0.18); }

/* Check list */
.check-list { list-style: none; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 32px; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--blue-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232459e0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
  box-shadow: inset 0 0 0 1px rgba(36, 89, 224, 0.16);
}

/* Illustration panel */
.vignette {
  position: relative;
  padding: clamp(12px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 1px 1px, rgba(11, 21, 40, 0.07) 1px, transparent 0) 0 0 / 20px 20px,
    linear-gradient(180deg, var(--surface) 0%, #fff 100%);
  overflow: hidden;
}
.vignette svg { width: 100%; height: auto; font-family: var(--font-sans); }

/* CTA band */
.cta-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto;
  gap: 32px 64px;
  align-items: center;
  padding: clamp(40px, 6vw, 72px);
  border-radius: var(--radius-lg);
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}
.cta-panel h2 { color: #fff; font-size: var(--fs-h2); }
.cta-panel p { margin-top: 16px; font-size: 1.125rem; max-width: 560px; }
.cta-panel__actions { display: grid; gap: 14px; justify-items: stretch; }
.cta-panel__mail { color: rgba(255, 255, 255, 0.72); text-align: center; font-size: 0.9375rem; text-decoration: none; }
.cta-panel__mail:hover { color: #fff; }

@media (max-width: 860px) {
  .cta-panel { grid-template-columns: 1fr; }
  .cta-panel__actions { justify-items: start; }
  .cta-panel__mail { text-align: left; }
}

/* 5. Sections -------------------------------------------------------------- */

/* Home hero */
.hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(48px, 6.5vw, 96px)) 0 0;
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(48px, 6vw, 96px);
  align-items: center;
}
.hero h1 { color: #fff; font-size: clamp(2.625rem, 4.6vw, 4.375rem); line-height: 1.03; letter-spacing: -0.038em; }
.hero h1 .accent { color: var(--blue-300); }
.hero__lead { max-width: 560px; margin: 24px 0 36px; font-size: clamp(1.0625rem, 1.35vw, 1.1875rem); color: rgba(255, 255, 255, 0.74); }
.hero__points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 32px;
  list-style: none;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.66);
}
.hero__points li { display: inline-flex; align-items: center; gap: 9px; }
.hero__points .icon { width: 18px; height: 18px; color: var(--blue-300); }

/* Hero visual: one enquiry flowing through connected systems */
.hero-system { position: relative; width: 100%; max-width: 480px; margin-left: auto; padding-bottom: 28px; }
.hero-system::before {
  content: "";
  position: absolute;
  inset: 22px -22px 6px 22px;
  border: 1px solid rgba(143, 176, 255, 0.14);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(47, 107, 242, 0.2), rgba(27, 44, 75, 0.35));
}
.system-card {
  position: relative;
  padding: 4px 24px 10px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}
.system-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
}
.system-card__head strong { font-weight: 600; line-height: 1.35; text-wrap: balance; }
.system-card__head em {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: 0.6875rem;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}
.live-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(47, 107, 242, 0.16);
  animation: live-dot 2.4s ease-in-out infinite;
}

.system-flow { position: relative; list-style: none; padding: 8px 0; }
/* Connecting rail between the step icons, and the pulse that travels down it */
.system-flow::before,
.system-flow::after { content: ""; position: absolute; left: 19px; width: 2px; border-radius: 2px; }
.system-flow::before { top: 40px; bottom: 40px; background: var(--line); }
.system-flow::after {
  top: 4px;
  height: 36px;
  background: linear-gradient(to bottom, rgba(47, 107, 242, 0), var(--blue-500));
  animation: rail-pulse 5s linear infinite;
}

.sys-node {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
}
.sys-node__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--blue-50);
  color: var(--blue-600);
  box-shadow: inset 0 0 0 1px rgba(36, 89, 224, 0.14);
  animation: node-ping 5s ease-out infinite;
  animation-delay: calc(var(--i) * 1s);
}
.sys-node__icon .icon { width: 20px; height: 20px; }
.sys-node__text small { display: block; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em; line-height: 1.3; text-transform: uppercase; color: var(--blue-600); }
.sys-node__text strong { display: block; margin-top: 2px; font-size: 0.9375rem; font-weight: 600; line-height: 1.35; }
.sys-node__text span { display: block; font-size: 0.8125rem; line-height: 1.4; color: var(--muted); }
.sys-node__tick { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--blue-600); color: #fff; }
.sys-node__tick .icon { width: 12px; height: 12px; stroke-width: 3; }
.sys-node__bars { width: 44px; height: 28px; fill: var(--blue-100); }
.sys-node__bars rect:last-child { fill: var(--blue-600); }

.system-chip {
  position: absolute;
  left: -28px;
  bottom: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: var(--navy-800);
  box-shadow: var(--shadow-lg);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
}
.system-chip__icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(143, 176, 255, 0.16); color: var(--blue-300); }
.system-chip__icon .icon { width: 14px; height: 14px; }

@keyframes live-dot { 50% { box-shadow: 0 0 0 7px rgba(47, 107, 242, 0.05); } }
@keyframes rail-pulse {
  0% { top: 4px; opacity: 0; }
  8% { opacity: 1; }
  80% { top: calc(100% - 76px); opacity: 1; }
  90%, 100% { top: calc(100% - 76px); opacity: 0; }
}
@keyframes node-ping {
  0% { background: var(--blue-100); box-shadow: inset 0 0 0 1px rgba(36, 89, 224, 0.3), 0 0 0 0 rgba(47, 107, 242, 0.35); }
  20%, 100% { background: var(--blue-50); box-shadow: inset 0 0 0 1px rgba(36, 89, 224, 0.14), 0 0 0 10px rgba(47, 107, 242, 0); }
}

/* "What we do" strip along the base of the hero */
.hero-services {
  margin-top: clamp(56px, 7vw, 96px);
  padding: 24px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.hero-services__label { margin-bottom: 10px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); }
.hero-services ul { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px 8px; list-style: none; margin-inline: -12px; }
.hero-services a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.hero-services a span { font: 600 0.75rem/1 var(--font-display); letter-spacing: 0.04em; color: var(--blue-300); }
.hero-services a .icon { width: 15px; height: 15px; margin-left: auto; opacity: 0; transform: translateX(-4px); transition: opacity 0.2s, transform 0.2s var(--ease); }
.hero-services a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.hero-services a:hover .icon,
.hero-services a:focus-visible .icon { opacity: 1; transform: none; }

@media (max-width: 1180px) {
  .hero-services ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero-system { margin: 8px auto 0; }
}
@media (max-width: 560px) {
  .hero-system { padding-bottom: 32px; }
  .hero-system::before { inset: 16px -8px 8px 16px; }
  .system-card { padding: 2px 16px 6px; }
  .system-card__head strong { font-size: 0.8125rem; }
  .sys-node { gap: 12px; }
  .system-chip { left: -6px; }
  .hero-services ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-services a { font-size: 0.875rem; }
}
@media (max-width: 480px) {
  .hero .btn-row .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot, .sys-node__icon { animation: none; }
  .system-flow::after { display: none; }
}

/* Inner page hero */
.page-hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(40px, 5vw, 72px)) 0 clamp(64px, 7vw, 104px);
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}
.page-hero h1 { max-width: 18ch; color: #fff; font-size: var(--fs-h1); line-height: 1.08; letter-spacing: -0.03em; }
.page-hero p { max-width: 640px; margin-top: 24px; font-size: clamp(1.125rem, 1.4vw, 1.25rem); }
.page-hero .btn-row { margin-top: 36px; }

/* Problems */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.split__intro { position: sticky; top: calc(var(--header-h) + 40px); }
.split__intro h2 { font-size: var(--fs-h2); }
.split__intro p { margin-top: 18px; font-size: 1.125rem; color: var(--muted); }
.split__intro .text-link { margin-top: 28px; }

.problem-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.problem { padding: 30px 28px 32px; background: #fff; }
.problem .icon { width: 26px; height: 26px; color: var(--blue-600); margin-bottom: 18px; }
.problem h3 { font-size: 1.0625rem; letter-spacing: -0.01em; }
.problem p { margin-top: 8px; font-size: 0.9375rem; color: var(--muted); }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split__intro { position: static; }
}
@media (max-width: 560px) {
  .problem-grid { grid-template-columns: 1fr; }
}

/* Services grid */
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.service-card { min-height: 100%; }
.service-card__num { position: absolute; top: 30px; right: 30px; font: 600 0.8125rem/1 var(--font-display); color: var(--line-strong); letter-spacing: 0.04em; }
.service-card p { flex-grow: 1; }
.service-card .text-link { margin-top: 24px; }
.service-card .text-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.service-card:hover { border-color: rgba(36, 89, 224, 0.35); box-shadow: var(--shadow); transform: translateY(-3px); }
.service-card:focus-within { border-color: var(--blue-500); }
.service-card:has(.text-link:focus-visible) .text-link { outline: none; }

@media (max-width: 1024px) { .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .service-grid { grid-template-columns: 1fr; }
  .section-head--split { grid-template-columns: 1fr; }
}

/* Why */
.why { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 88px); align-items: stretch; }
.why__statement {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: clamp(32px, 4vw, 52px);
  border-radius: var(--radius-lg);
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.7);
  overflow: hidden;
}
.why__statement blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #fff;
}
.why__statement blockquote span { color: var(--blue-300); }
.why__statement small { font-size: 0.9375rem; }
.why__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 36px; align-content: center; }
.why__item .icon-tile { margin-bottom: 18px; }
.why__item h3 { font-size: 1.125rem; }
.why__item p { margin-top: 8px; font-size: 0.9875rem; color: var(--muted); }

@media (max-width: 960px) { .why { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .why__list { grid-template-columns: 1fr; gap: 32px; } }

/* Steps */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.step { position: relative; padding-top: 28px; counter-increment: step; }
.step::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: -24px;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}
.step:last-child::before { right: 0; }
.step::after {
  content: "";
  position: absolute;
  top: -4px; left: 0;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--blue-500);
  box-shadow: 0 0 0 5px rgba(47, 107, 242, 0.18);
}
.step__num::before { content: "STEP " counter(step, decimal-leading-zero); }
.step__num { display: block; margin-bottom: 14px; font: 600 0.8125rem/1 var(--font-display); letter-spacing: 0.1em; color: var(--blue-300); }
.step h3 { font-size: 1.1875rem; }
.step p { margin-top: 10px; font-size: 0.9875rem; }
.steps + .text-link { margin-top: 56px; }

@media (max-width: 960px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 32px; }
  .step::before { right: 0; }
}
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; gap: 40px; } }

/* 6. Pages ----------------------------------------------------------------- */

/* Services page sub-navigation */
.subnav {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
}
.subnav ul { display: flex; gap: 8px; list-style: none; overflow-x: auto; scrollbar-width: none; padding-block: 12px; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.subnav a:hover { color: var(--ink); background: var(--surface); }
.subnav a.is-active { color: var(--blue-600); background: var(--blue-50); }

.service-detail { padding-block: clamp(72px, 8vw, 112px); border-bottom: 1px solid var(--line); scroll-margin-top: var(--subnav-h); }
.service-detail--alt { background: var(--surface); }
.service-detail--alt .vignette { background: radial-gradient(circle at 1px 1px, rgba(11, 21, 40, 0.07) 1px, transparent 0) 0 0 / 20px 20px, #fff; }
.service-detail__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.service-detail--alt .service-detail__visual { order: -1; }
.service-detail__num { display: inline-block; margin-bottom: 16px; font: 600 0.8125rem/1 var(--font-display); letter-spacing: 0.1em; color: var(--blue-600); }
.service-detail h2 { font-size: clamp(1.75rem, 2.8vw, 2.375rem); }
.service-detail__intro { margin-top: 18px; font-size: 1.0625rem; }
.service-detail__lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 36px; }
.service-detail__lists h3 { margin-bottom: 16px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); font-family: var(--font-sans); }
.service-detail__lists .check-list { gap: 10px; font-size: 0.9625rem; }
.service-detail .btn-row { margin-top: 40px; }

@media (max-width: 960px) {
  .service-detail__grid { grid-template-columns: 1fr; }
  .service-detail--alt .service-detail__visual { order: 0; }
  .service-detail__visual { max-width: 560px; }
}
@media (max-width: 560px) { .service-detail__lists { grid-template-columns: 1fr; } }

/* About */
.about-intro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.prose { display: grid; gap: 20px; font-size: 1.0625rem; }
.prose h2 { font-size: var(--fs-h2); margin-bottom: 4px; }
.prose .lead { color: var(--ink); }

.fact-card { position: sticky; top: calc(var(--header-h) + 32px); padding: 32px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.fact-card h3 { font-size: 1rem; margin-bottom: 8px; }
.fact-card dl { margin: 0; display: grid; }
.fact-card div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.fact-card div:last-child { border-bottom: 0; padding-bottom: 0; }
.fact-card dt { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.fact-card dd { margin: 4px 0 0; color: var(--ink); font-weight: 500; }

.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.expect-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; list-style: none; }
.expect-list li { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 28px 0; border-top: 1px solid var(--line); }
.expect-list .icon { width: 26px; height: 26px; color: var(--blue-600); margin-top: 2px; }
.expect-list h3 { font-size: 1.0625rem; }
.expect-list p { margin-top: 6px; font-size: 0.9625rem; color: var(--muted); }

@media (max-width: 900px) {
  .about-intro { grid-template-columns: 1fr; }
  .fact-card { position: static; }
}
@media (max-width: 640px) {
  .principles, .expect-list { grid-template-columns: 1fr; }
}

/* Approach timeline */
.timeline { list-style: none; display: grid; gap: 0; counter-reset: timeline; }
.timeline__item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px clamp(32px, 5vw, 72px);
  padding: clamp(40px, 5vw, 56px) 0;
  border-top: 1px solid var(--line);
  counter-increment: timeline;
}
.timeline__item:last-child { border-bottom: 1px solid var(--line); }
.timeline__num::before { content: counter(timeline, decimal-leading-zero); }
.timeline__num { font: 700 clamp(2.75rem, 5vw, 3.75rem)/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.04em; color: var(--blue-600); }
/* Share a baseline so each step number sits level with its heading and panel label */
.timeline__num, .timeline__main, .timeline__detail { align-self: baseline; }
.timeline__main h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.timeline__main p { margin-top: 14px; }
.timeline__detail { padding: 24px 28px; border-radius: var(--radius); background: var(--surface); }
.timeline__detail h3 { margin-bottom: 14px; font: 600 0.8125rem/1.3 var(--font-sans); letter-spacing: 0.1em; text-transform: uppercase; }
.timeline__detail .check-list { gap: 10px; font-size: 0.9625rem; }

@media (max-width: 960px) {
  .timeline__item { grid-template-columns: 80px minmax(0, 1fr); }
  .timeline__detail { grid-column: 2; }
}
@media (max-width: 560px) {
  .timeline__item { grid-template-columns: 1fr; }
  .timeline__detail { grid-column: auto; }
}

/* FAQ */
.faq { max-width: 860px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { width: 20px; height: 20px; color: var(--blue-600); transition: transform 0.25s var(--ease); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { padding: 0 48px 28px 0; color: var(--muted); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.form-card { padding: clamp(28px, 4vw, 48px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.form-card h2 { font-size: clamp(1.5rem, 2.4vw, 1.875rem); }
.form-card > p { margin-top: 10px; color: var(--muted); }

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; margin-top: 32px; }
.field { display: grid; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.field label .optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
.field select {
  appearance: none;
  padding-right: 44px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center / 18px no-repeat;
}
.field input::placeholder, .field textarea::placeholder { color: #94a3b8; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #94a3b8; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(47, 107, 242, 0.14); }
.field [aria-invalid="true"] { border-color: #c62828; }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(198, 40, 40, 0.12); }
.field__error { font-size: 0.875rem; color: #b42318; }
.field__error:empty { display: none; }

.form__privacy { grid-column: 1 / -1; font-size: 0.875rem; color: var(--muted); line-height: 1.55; }
.form__footer { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form__hp { position: absolute; left: -9999px; }
.form-status { grid-column: 1 / -1; display: none; padding: 14px 16px; border-radius: 10px; font-size: 0.9375rem; line-height: 1.55; }
.form-status.is-visible { display: block; }
.form-status--info { background: var(--blue-50); color: var(--navy-800); border: 1px solid rgba(36, 89, 224, 0.2); }
.form-status--error { background: #fef3f2; color: #912018; border: 1px solid #fecdca; }
.btn[aria-busy="true"] { opacity: 0.7; pointer-events: none; }

.contact-aside { display: grid; gap: 20px; }
.aside-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.aside-card h3 { font-size: 1.0625rem; }
.aside-card > p { margin-top: 8px; font-size: 0.9375rem; color: var(--muted); }
.aside-card--dark { background: var(--navy-900); border-color: var(--navy-900); color: rgba(255, 255, 255, 0.7); }
.aside-card--dark h3 { color: #fff; }
.aside-card--dark > p { color: rgba(255, 255, 255, 0.66); }
.aside-card__email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  word-break: break-all;
}
.aside-card__email .icon { width: 20px; height: 20px; color: var(--blue-300); }
.aside-card__email:hover { color: var(--blue-300); }
.next-steps { list-style: none; counter-reset: n; display: grid; gap: 18px; margin-top: 20px; }
.next-steps li { position: relative; padding-left: 40px; font-size: 0.9375rem; counter-increment: n; }
.next-steps li::before {
  content: counter(n);
  position: absolute;
  left: 0; top: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line-strong);
  font: 600 0.8125rem/1 var(--font-display);
  color: var(--ink);
}
.aside-meta { display: flex; align-items: center; gap: 12px; font-size: 0.9375rem; color: var(--muted); padding: 0 8px; }
.aside-meta .icon { width: 20px; height: 20px; color: var(--blue-600); }

@media (max-width: 960px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

/* Legal / simple prose pages */
.legal { max-width: 760px; }
.legal h2 { margin: 48px 0 14px; font-size: 1.5rem; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal ul { margin-bottom: 16px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal .updated { color: var(--muted); font-size: 0.9375rem; }

/* Message pages (thank-you, 404) */
.page-hero--full { min-height: min(88vh, 820px); display: flex; align-items: center; }
.page-hero--full h1 { max-width: 20ch; }
.page-hero p a { color: #fff; }

/* Footer */
.site-footer { background: var(--navy-950); color: rgba(255, 255, 255, 0.62); font-size: 0.9375rem; }
.footer__top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 48px 40px; padding-block: clamp(64px, 7vw, 88px); }
.footer__brand .logo { color: #fff; }
.footer__brand p { max-width: 320px; margin-top: 20px; }
.footer__col h2 { margin-bottom: 18px; font: 600 0.8125rem/1.2 var(--font-sans); letter-spacing: 0.1em; text-transform: uppercase; color: #fff; }
.footer__col ul { list-style: none; display: grid; gap: 12px; }
.footer__col a { color: rgba(255, 255, 255, 0.62); text-decoration: none; transition: color 0.2s; }
.footer__col a:hover { color: #fff; }
.footer__col .btn { margin-top: 20px; color: #fff; }
.footer__email { word-break: break-all; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}
.footer__bottom a { color: rgba(255, 255, 255, 0.62); text-decoration: none; }
.footer__bottom a:hover { color: #fff; }
.footer__legal { display: flex; gap: 24px; }

@media (max-width: 960px) {
  .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer__top { grid-template-columns: 1fr; }
}

/* 7. Utilities & motion ---------------------------------------------------- */
.mt-0 { margin-top: 0 !important; }
.pt-0 { padding-top: 0 !important; }
.center { text-align: center; margin-inline: auto; }

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .mobile-nav, .subnav, .site-footer { display: none; }
  .hero, .page-hero { padding-top: 32px; }
}
