/* Avotrax corporate website */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-variable.7660bd9909fb.woff2") format("woff2-variations"),
       url("../fonts/plus-jakarta-sans-variable.7660bd9909fb.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0b1220;
  --navy-deep: #070d1c;
  --text: #1f2937;
  --muted: #5b6475;
  --line: #e5e8ef;
  --soft: #f5f7fb;
  --blue: #1f4fff;
  --blue-tint: #edf2ff;
  --teal: #2f7bff;
  --grad: linear-gradient(90deg, #1f4fff 0%, #3b82f6 55%, #38bdf8 100%);
  --grad-text: linear-gradient(90deg, #1f4fff 0%, #2563eb 50%, #0369a1 100%);
  --on-dark: #ffffff;
  --on-dark-muted: #9aa6bf;

  --font: "Plus Jakarta Sans", "Segoe UI", Arial, Helvetica, sans-serif;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.06), 0 2px 8px rgba(11, 18, 32, 0.05);
  --shadow-md: 0 10px 30px -12px rgba(11, 18, 32, 0.22);
  --header-h: 74px;
}

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

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

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }

h1, h2, h3 { color: var(--navy); text-wrap: balance; }
p { text-wrap: pretty; }

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

.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;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 6px;
  background: var(--navy); color: #fff; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

.icon { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- Type ---------- */

.display {
  font-size: clamp(2.3rem, 4.4vw, 3.6rem);
  font-weight: 300;
  line-height: 1.13;
  letter-spacing: -0.025em;
}
.display-sm {
  font-size: clamp(2.1rem, 3.8vw, 3.1rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.022em;
}
.h2 {
  font-size: clamp(1.75rem, 2.9vw, 2.4rem);
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: -0.018em;
}
.h3 { font-size: 1.3rem; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; }
.center { text-align: center; margin-inline: auto; }
.lead { font-size: 1.15rem; color: var(--text); line-height: 1.6; }
.muted { color: var(--muted); }

.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-sub {
  max-width: 62ch;
  margin-top: 12px;
  margin-bottom: 48px;
  color: var(--muted);
  font-size: 1.08rem;
}

.pill {
  display: inline-block;
  margin-bottom: 22px;
  padding: 6px 14px;
  border: 1px solid #d6e0fb;
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 600;
}

.prose p { margin-bottom: 14px; font-size: 1.06rem; color: var(--text); }
.prose .h2 { margin-bottom: 18px; }

.text-link { color: var(--blue); font-weight: 600; text-underline-offset: 4px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.btn .icon { width: 18px; height: 18px; transition: transform 0.2s ease; }
.btn:hover .icon { transform: translateX(2px); }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1rem; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--blue); }
.btn-outline { border-color: #d3d9e6; background: #fff; color: var(--navy); }
.btn-outline:hover { border-color: var(--navy); }
.btn-gradient { background: var(--grad); color: #fff; box-shadow: 0 8px 24px -10px rgba(31, 79, 255, 0.7); }
.btn-gradient:hover { box-shadow: 0 12px 28px -8px rgba(31, 79, 255, 0.85); }
.btn-outline-light { border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.btn-outline-light:hover { border-color: #fff; }
.btn > .hide-mobile { margin-left: -10px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
}
.link-arrow .icon { width: 16px; height: 16px; transition: transform 0.2s ease; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header.is-scrolled { box-shadow: 0 6px 20px -16px rgba(11, 18, 32, 0.4); }

.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; }
.brand-logo { width: auto; height: 40px; }
.footer-brand .brand-logo { height: 44px; }
@media (max-width: 640px) { .brand-logo { height: 34px; } }
.brand-light { color: #fff; }

.primary-nav { display: flex; align-items: center; gap: 28px; }
.primary-nav > a:not(.btn) {
  position: relative;
  color: #334155;
  font-size: 0.95rem;
  font-weight: 550;
  text-decoration: none;
  transition: color 0.2s ease;
}
.primary-nav > a:not(.btn):hover { color: var(--blue); }
.primary-nav > a:not(.btn)[aria-current="page"] { color: var(--navy); }
.primary-nav > a:not(.btn)[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -26px;
  height: 2px;
  background: var(--grad);
}
.nav-cta { min-height: 42px; padding: 0 18px; margin-left: 4px; }

.nav-toggle {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.nav-toggle span:not(.sr-only) {
  position: absolute; left: 12px; right: 12px; height: 2px;
  background: var(--navy); border-radius: 2px;
  transition: transform 0.25s ease, top 0.25s ease;
}
.nav-toggle span:nth-of-type(2) { top: 17px; }
.nav-toggle span:nth-of-type(3) { top: 25px; }
.nav-toggle[aria-expanded="true"] span:nth-of-type(2) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-of-type(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */

.hero,
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(55% 80% at 88% 8%, rgba(47, 107, 255, 0.30), transparent 70%),
    radial-gradient(40% 60% at 0% 100%, rgba(56, 189, 248, 0.10), transparent 70%),
    linear-gradient(180deg, #0b1220 0%, #0a1430 100%);
  color: var(--on-dark-muted);
}
.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../img/hero-trails.bf7cd14b6a34.svg") right center / cover no-repeat;
  pointer-events: none;
}
.hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 90% at 70% 30%, #000, transparent 75%);
  mask-image: radial-gradient(70% 90% at 70% 30%, #000, transparent 75%);
  pointer-events: none;
}
.hero h1, .page-hero h1 { color: #fff; }
.hero .grad-text, .page-hero .grad-text { background: linear-gradient(90deg, #8fb4ff, #5ee7ff); -webkit-background-clip: text; background-clip: text; }
.hero .hero-lede, .page-hero .hero-lede, .page-hero-inner > p:last-child:not(.pill) { color: #b8c2d9; }
.hero .pill, .page-hero .pill { border-color: rgba(143, 180, 255, 0.28); background: rgba(255, 255, 255, 0.05); box-shadow: none; color: #a9c4ff; }
.hero .btn-dark, .page-hero .btn-dark { background: var(--blue); box-shadow: 0 10px 30px -12px rgba(47, 107, 255, 0.9); }
.hero .btn-dark:hover, .page-hero .btn-dark:hover { background: #3b6bff; }
.hero .btn-outline, .page-hero .btn-outline { border-color: rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.04); color: #fff; }
.hero .btn-outline:hover, .page-hero .btn-outline:hover { border-color: #fff; }
.hero .link-arrow, .page-hero .link-arrow { color: #8fb4ff; }
.hero-proof .icon { color: #5ee7ff; }
.page-hero .crumbs { color: #9aa6bf; }
.page-hero .crumbs a { color: #8fb4ff; }
.page-hero .crumbs [aria-current] { color: #fff; }
.hero-photo { border: 1px solid rgba(255, 255, 255, 0.10); }
.hero { padding: clamp(48px, 7vw, 88px) 0 clamp(64px, 8vw, 104px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}
.hero-lede { margin: 22px 0 32px; max-width: 58ch; color: var(--muted); font-size: 1.12rem; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 30px; color: #b8c2d9; font-size: 0.92rem; font-weight: 500; }
.hero-proof li { display: inline-flex; align-items: center; gap: 8px; }

.hero-visual { position: relative; padding: 28px 0 44px 36px; }
.hero-photo { overflow: hidden; border-radius: 12px; box-shadow: var(--shadow-md); }
.hero-photo img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }

.float-card {
  position: absolute;
  display: grid;
  gap: 10px;
  width: min(250px, 46%);
  padding: 10px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 40px -18px rgba(11, 18, 32, 0.45);
  text-decoration: none;
  transition: transform 0.25s ease;
}
.float-card:hover { transform: translateY(-3px); }
.float-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; border-radius: 6px; }
.float-card span { display: grid; padding-inline: 4px; line-height: 1.3; }
.float-card strong { color: var(--navy); font-size: 0.92rem; }
.float-card small { color: var(--muted); font-size: 0.78rem; }
.float-card-a { left: 0; bottom: 0; }
.float-card-b { right: -12px; top: 0; }

.tag {
  position: absolute;
  top: 12px; left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  background: rgba(11, 18, 32, 0.8);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.3;
}
.tag .icon { width: 14px; height: 14px; }
.tag-accent { background: var(--grad); border-color: transparent; }

.float-stat {
  position: absolute;
  right: 28px; bottom: 16px;
  display: grid;
  justify-items: center;
  padding: 12px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-md);
}
.float-stat strong { font-size: 1.9rem; font-weight: 400; line-height: 1.1; }
.float-stat span { color: var(--muted); font-size: 0.82rem; font-weight: 550; }

.clients-strip { border-block: 1px solid var(--line); background: #fff; }
.clients-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 48px; padding-block: 26px; }
.clients-inner p { color: var(--muted); font-size: 0.9rem; font-weight: 550; }
.clients-inner ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 44px; }
.clients-inner a { color: #7c869a; text-decoration: none; transition: color 0.2s ease; }
.clients-inner a:hover { color: var(--navy); }
.clients-inner li { font-size: 1.12rem; font-weight: 750; letter-spacing: -0.02em; }

/* ---------- Sections ---------- */

.section { padding-block: clamp(64px, 8vw, 104px); }
.section-tight { padding-block: clamp(44px, 6vw, 72px); }
.section-soft { background: var(--soft); }
.center-actions { display: flex; justify-content: center; margin-top: 44px; }

/* Case studies */

.case-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.case-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
/* Homepage grid adapts to the number of case studies (up to six) */
.case-grid-home:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.case-grid-home:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.case-grid-home:has(> :nth-child(4):last-child) .case-body { padding: 20px; }
.case-grid-home:has(> :nth-child(4):last-child) .case-body p { font-size: 0.9rem; }
.case-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.case-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.case-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--soft); }
.case-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.case-body { display: flex; flex-direction: column; gap: 14px; flex: 1; padding: 22px 24px 26px; }
.case-body h3 { font-size: 1.08rem; font-weight: 700; line-height: 1.4; }
.case-body h3 a { text-decoration: none; }
.case-body h3 a:hover { color: var(--blue); }
.case-body p { color: var(--muted); font-size: 0.93rem; flex: 1; }

.case-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.case-facts div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; }
.case-facts dd { color: var(--navy); font-size: 1.3rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.case-facts dt { color: var(--muted); font-size: 0.78rem; line-height: 1.35; }
.case-facts-lg { grid-template-columns: repeat(2, minmax(0, max-content)); column-gap: 72px; margin-top: 32px; padding-top: 24px; }
.case-facts-lg dd { font-size: 2rem; font-weight: 300; }
.case-facts-lg dd { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.case-facts-lg dt { font-size: 0.9rem; }

.case-cover {
  display: grid;
  align-content: center;
  gap: 16px;
  width: 100%;
  height: 100%;
  padding: 28px 32px;
  background:
    radial-gradient(80% 90% at 100% 0%, rgba(56, 189, 248, 0.28), transparent 60%),
    linear-gradient(135deg, #0b1220 0%, #16308f 100%);
  color: #fff;
}
.case-cover-name { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 700; letter-spacing: -0.02em; }
.case-cover-line { max-width: 34ch; color: #c3cff0; font-size: 0.98rem; line-height: 1.5; }
.case-media .case-cover-line { display: none; }
.case-cover ul { display: grid; gap: 8px; }
.case-cover li { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; font-weight: 550; color: #dbe4ff; }
.case-cover .icon { color: var(--teal); }

/* Stats */

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.stats div { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.stats dd { order: -1; }
.stats dd {
  font-size: clamp(2.6rem, 4.6vw, 3.6rem);
  font-weight: 300;
  line-height: 1.05;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stats dt { color: var(--muted); font-size: 0.95rem; font-weight: 500; max-width: 22ch; }

/* Services */

.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.service-card,
.value-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.service-card:hover { box-shadow: var(--shadow-md); border-color: #d3dcf2; }
.service-icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 10px;
  background: var(--blue-tint);
  color: var(--blue);
}
.service-icon .icon { width: 24px; height: 24px; }
.service-card h3,
.value-card h3 { margin: 18px 0 8px; font-size: 1.1rem; font-weight: 700; }
.service-card p,
.value-card p { color: var(--muted); font-size: 0.95rem; flex: 1; }
.service-card .link-arrow { margin-top: 18px; }

.value-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

/* Process */

.process-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 5vw, 64px); align-items: center; }
.process-grid-single { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.process-photo { overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.process-photo img { width: 100%; aspect-ratio: 4 / 3.2; object-fit: cover; }
.process-grid .section-sub { margin-bottom: 28px; }
.steps { display: grid; gap: 18px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  display: grid; place-items: center;
  flex: none;
  width: 36px; height: 36px;
  border-radius: 6px;
  background: var(--blue-tint);
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 750;
}
.steps h3 { font-size: 1rem; font-weight: 700; line-height: 1.4; }
.steps p { color: var(--muted); font-size: 0.93rem; }

/* Products */

.product-feature,
.product-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}
.product-feature-copy,
.product-panel-copy { display: grid; gap: 16px; justify-items: start; }
.product-feature-copy .pill { margin-bottom: 0; }
.product-feature-copy p:not(.pill):not(.lead),
.product-panel-copy > p:not(.lead) { color: var(--muted); }
.product-panel[hidden] { display: none; }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-list li {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 550;
}
.chip-list .chip-status { border-color: rgba(31, 79, 255, 0.3); background: var(--blue-tint); color: #1d4ed8; }

.logo-chip { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.logo-chip img { width: 180px; height: 50px; object-fit: cover; }

.media-frame { overflow: hidden; border-radius: var(--radius); background: var(--navy); box-shadow: var(--shadow-md); border: 1px solid var(--line); }
.product-video, .product-image-figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #070d1c; }

.portfolio-proof { display: grid; grid-template-rows: auto 1fr auto; aspect-ratio: 16 / 10; color: #fff; background: linear-gradient(135deg, #0b1220, #16308f); }
.proof-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.14); font-weight: 650; }
.proof-bar span { margin-right: auto; }
.proof-bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); }
.proof-body { display: grid; align-content: center; gap: 12px; padding: clamp(22px, 4vw, 44px); }
.proof-kicker { color: var(--teal); font-weight: 650; }
.proof-body strong { font-size: clamp(1.4rem, 2.6vw, 2.1rem); font-weight: 400; line-height: 1.2; }
.proof-body p { color: var(--on-dark-muted); }
.proof-footer { padding: 12px 16px; border-top: 1px solid rgba(255, 255, 255, 0.14); color: var(--on-dark-muted); font-size: 0.88rem; }

.portfolio-selector { margin-bottom: 36px; }
.portfolio-selector ol { display: flex; flex-wrap: wrap; gap: 10px; }
.portfolio-selector a {
  display: grid;
  min-width: 170px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.portfolio-selector a:hover { border-color: var(--navy); }
.portfolio-selector strong { color: var(--navy); font-weight: 700; }
.portfolio-selector small { color: var(--muted); font-size: 0.82rem; }
.portfolio-selector a[aria-current="true"] { border-color: var(--navy); background: var(--navy); }
.portfolio-selector a[aria-current="true"] strong { color: #fff; }
.portfolio-selector a[aria-current="true"] small { color: var(--on-dark-muted); }

/* Capabilities */

.capability-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.capability { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.capability h3 { margin: 16px 0 12px; font-size: 1.05rem; font-weight: 700; }
.capability ul { display: grid; gap: 8px; }
.capability li { display: flex; align-items: center; gap: 8px; color: #334155; font-size: 0.93rem; }
.capability li .icon { width: 17px; height: 17px; color: var(--teal); }

/* CTA band */

.cta-band {
  padding-block: clamp(56px, 7vw, 88px);
  background:
    radial-gradient(50% 120% at 100% 0%, rgba(56, 189, 248, 0.20), transparent 60%),
    radial-gradient(50% 120% at 0% 100%, rgba(31, 79, 255, 0.34), transparent 60%),
    var(--navy);
  color: #fff;
}
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; }
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 300; line-height: 1.2; letter-spacing: -0.02em; }
.cta-band .grad-text, .dark-surface .grad-text { background: linear-gradient(90deg, #8fb4ff, #5ee7ff); -webkit-background-clip: text; background-clip: text; }
.cta-band p { margin-top: 10px; max-width: 56ch; color: var(--on-dark-muted); }
.cta-inner > div:first-child { flex: 1 1 480px; max-width: 620px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Inner pages ---------- */

.page-hero { padding: clamp(56px, 7vw, 96px) 0 clamp(52px, 6vw, 84px); }
.page-hero-inner > * { max-width: 860px; }
.page-hero-inner > p:last-child:not(.pill) { margin-top: 20px; max-width: 62ch; font-size: 1.12rem; line-height: 1.7; }
.page-hero-inner .hero-lede { margin-bottom: 0; }
.page-hero-inner .hero-actions { margin-top: 30px; }

.crumbs { margin-bottom: 18px; color: var(--muted); font-size: 0.9rem; }
.crumbs a { color: var(--blue); text-decoration: none; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }

.jump-nav { position: sticky; top: var(--header-h); z-index: 20; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.jump-nav ul { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.jump-nav a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  padding: 16px 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: color 0.2s ease;
}
.jump-nav a .icon { width: 18px; height: 18px; flex: none; color: currentColor; }
.jump-nav a::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.jump-nav a:hover { color: var(--navy); }
.jump-nav a[aria-current="true"] { color: var(--navy); }
.jump-nav a[aria-current="true"] .icon { color: var(--blue); }
.jump-nav a[aria-current="true"]::after { transform: scaleX(1); }

.service-list { display: grid; }
.service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(28px, 5vw, 64px);
  padding-block: 48px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 72px);
}
.service-row:first-child { padding-top: 0; }
.service-row:last-child { border-bottom: 0; padding-bottom: 0; }
.service-row-head h2 { margin: 18px 0 10px; font-size: clamp(1.4rem, 2.2vw, 1.75rem); font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.service-row-head .lead { color: var(--muted); font-size: 1.05rem; }
.service-row-body > p { font-size: 1.05rem; }
.service-row-body h3 { margin: 22px 0 12px; font-size: 1rem; font-weight: 700; }

.check-list { display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list .icon { width: 20px; height: 20px; margin-top: 3px; color: var(--teal); }

.case-hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.case-hero .hero-lede { margin-bottom: 0; }
.case-meta { display: grid; padding: 8px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.case-meta div { padding-block: 14px; border-bottom: 1px solid var(--line); }
.case-meta div:last-child { border-bottom: 0; }
.case-meta dt { color: var(--muted); font-size: 0.82rem; font-weight: 550; }
.case-meta dd { color: var(--navy); font-weight: 650; }
.case-meta dd small { display: block; color: var(--muted); font-weight: 500; }
.case-meta a { display: inline-flex; align-items: center; gap: 4px; color: var(--blue); text-decoration: none; }
.case-meta .icon { width: 15px; height: 15px; }

.case-figure { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-md); background: var(--soft); }
.case-figure img { width: 100%; }
.case-figure .case-cover { min-height: 360px; padding: clamp(28px, 5vw, 56px); }

.case-body-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.case-story { max-width: 70ch; }
.case-story .h3 { margin: 36px 0 12px; }
.case-story .h3:first-child { margin-top: 0; }
.case-story p { font-size: 1.06rem; line-height: 1.75; }
.case-story .check-list li { font-size: 1.02rem; }
.case-aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 18px; justify-items: start; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.case-aside h2 { font-size: 1rem; font-weight: 700; }

.next-case { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.next-case .h3 a { text-decoration: none; }
.next-case .h3 a:hover { color: var(--blue); }

.split-media { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 5vw, 64px); align-items: center; }
.rounded-photo { overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.rounded-photo img { width: 100%; aspect-ratio: 4 / 3.2; object-fit: cover; }

.split-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.split-text .prose { display: grid; gap: 14px; justify-items: start; }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 28px; }
.detail-grid div { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.detail-grid dt { color: var(--muted); font-size: 0.85rem; }
.detail-grid dd { color: var(--navy); font-weight: 650; overflow-wrap: anywhere; }
.detail-grid a { color: var(--blue); text-decoration: none; }

.contact-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
.contact-main { display: grid; gap: 28px; }
.contact-card { display: grid; gap: 14px; justify-items: start; padding: clamp(24px, 4vw, 36px); border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.contact-card h2 { font-size: 1.15rem; font-weight: 700; }
.contact-card p { color: var(--muted); }
.contact-email { color: var(--blue); font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 600; letter-spacing: -0.015em; overflow-wrap: anywhere; text-decoration: none; }
.contact-email:hover { text-decoration: underline; text-underline-offset: 5px; }
.contact-aside { display: grid; gap: 16px; }
.aside-card { display: grid; gap: 8px; justify-items: start; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.aside-card h2 { font-size: 1rem; font-weight: 700; }
.aside-card p { color: var(--muted); font-size: 0.93rem; }

.empty-state { display: grid; gap: 12px; max-width: 52ch; }
.empty-state a { color: var(--blue); }

.legal-layout { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.legal-aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 6px; color: var(--muted); font-size: 0.92rem; }
.legal-aside a { color: var(--blue); font-weight: 600; overflow-wrap: anywhere; text-decoration: none; }
.legal-copy { display: grid; max-width: 70ch; }
.legal-copy section { padding-block: 26px; border-top: 1px solid var(--line); }
.legal-copy section:first-child { padding-top: 0; border-top: 0; }
.legal-copy h2 { margin-bottom: 10px; font-size: 1.15rem; font-weight: 700; }
.legal-copy p { color: #334155; }
.legal-copy a { color: var(--blue); }

/* ---------- Footer ---------- */

.footer-legal::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid rgba(255, 255, 255, 0.1); }
.site-footer { padding-top: clamp(56px, 7vw, 80px); background: var(--navy-deep); color: var(--on-dark-muted); }
.site-footer :focus-visible { outline-color: var(--teal); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding-bottom: 56px; }
.footer-brand { display: grid; gap: 18px; justify-items: start; align-content: start; }
.footer-brand p { max-width: 38ch; }
.footer-mail { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.footer-mail:hover { color: var(--teal); }
.footer-col { display: grid; gap: 4px; align-content: start; }
.footer-col h2 { margin-bottom: 12px; color: #fff; font-size: 0.98rem; font-weight: 700; }
.footer-col a { padding-block: 4px; color: var(--on-dark-muted); font-size: 0.92rem; text-decoration: none; }
.footer-col a:hover { color: #fff; }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  position: relative;
  padding-block: 24px 32px;
  color: #8792aa;
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .case-grid-home:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jump-nav ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .case-grid, .service-grid, .value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .primary-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px var(--gutter) 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px -24px rgba(11, 18, 32, 0.4);
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav > a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.02rem; }
  .primary-nav > a:not(.btn)[aria-current="page"]::after { display: none; }
  .primary-nav > a:not(.btn)[aria-current="page"] { color: var(--blue); }
  .nav-cta { margin: 16px 0 0; min-height: 48px; }

  .hero-grid, .process-grid, .product-feature, .product-panel, .split-media, .split-text,
  .case-hero-grid, .case-body-grid, .contact-grid, .legal-layout, .service-row { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .case-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .case-aside, .legal-aside { position: static; }
  .product-panel-media { order: -1; }
}

@media (max-width: 640px) {
  .hero::before, .page-hero::before { inset: 0 0 auto 0; height: 340px; background-size: 260% auto; background-position: 92% 18%; opacity: 0.45; -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent); mask-image: linear-gradient(180deg, #000 40%, transparent); }
  /* Never allow sideways page scrolling; carousels scroll inside themselves */
  body { overflow-x: hidden; }

  /* Rhythm */
  .section { padding-block: 56px; }
  .section-tight { padding-block: 40px; }
  .section-sub { margin-bottom: 32px; font-size: 1rem; }
  .hero { padding: 32px 0 48px; }
  .page-hero { padding: 36px 0 36px; }
  .hero-lede { margin: 16px 0 24px; font-size: 1.04rem; line-height: 1.65; }
  .page-hero-inner > p:last-child:not(.pill) { font-size: 1.04rem; }
  .pill { margin-bottom: 16px; }
  .center-actions { margin-top: 28px; }

  /* Buttons: paired actions share one row; single actions span the width */
  .hero-actions, .cta-actions { width: 100%; justify-self: stretch; flex-direction: row; flex-wrap: nowrap; align-items: stretch; gap: 10px; }
  .hero-actions .btn, .cta-actions .btn { flex: 1 1 0; min-width: 0; min-height: 50px; padding: 0 10px; font-size: 0.9rem; white-space: nowrap; }
  .hero-actions .btn .icon, .cta-actions .btn .icon { display: none; }
  .center-actions .btn, .next-case .btn, .case-aside .btn, .contact-card .btn, .footer-brand .btn { width: 100%; }
  .btn-lg { min-height: 50px; }
  .hero-actions .link-arrow { justify-content: center; padding: 10px 0; }
  .hero-proof { margin-top: 22px; gap: 8px 18px; }
  .hide-mobile { display: none; }

  /* Hero visual */
  .hero-visual { padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-top: 8px; }
  .hero-photo { grid-column: 1 / -1; }
  .hero-photo img { aspect-ratio: 4 / 3; }
  .float-card { position: static; width: auto; padding: 8px 8px 10px; }
  .float-stat { right: 12px; top: 12px; bottom: auto; padding: 8px 16px; }
  .float-stat strong { font-size: 1.4rem; }

  /* Selected work strip is redundant on phones: the case-study grid follows directly */
  .clients-strip { display: none; }

  /* Case studies: compact two-column grid on the homepage, full cards elsewhere */
  .case-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .case-grid-home, .case-grid-home:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .case-grid-home:has(> :nth-child(4):last-child) .case-body { padding: 12px 12px 14px; }
  .case-grid-home .case-card:hover { transform: none; }
  .case-grid-home .case-media { aspect-ratio: 4 / 3; }
  .case-grid-home .tag { top: 8px; left: 8px; padding: 3px 7px; font-size: 0.66rem; }
  .case-grid-home .case-body { padding: 12px 12px 14px; gap: 8px; }
  .case-grid-home .case-body h3 { font-size: 0.88rem; line-height: 1.35; }
  .case-grid-home .case-facts, .case-grid-home .case-body p { display: none; }
  .case-grid-home .link-arrow { margin-top: auto; font-size: 0.82rem; }
  .case-body { padding: 18px 18px 20px; gap: 12px; }
  .case-facts dd { font-size: 1.12rem; }
  .case-facts-lg { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; margin-top: 24px; }
  .case-facts-lg dd { font-size: 1.6rem; }

  /* Services: compact cards with icon beside the title */
  .service-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .service-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 4px;
    padding: 18px;
  }
  .service-card .service-icon { grid-row: span 3; width: 44px; height: 44px; }
  .service-card h3 { margin: 0; font-size: 1.02rem; }
  .service-card p { font-size: 0.92rem; }
  .service-card .link-arrow { margin-top: 6px; }
  .value-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .value-card { padding: 20px; }

  /* Services page */
  .service-row { padding-block: 32px; gap: 16px; }
  .service-row-head h2 { margin-top: 14px; }
  .jump-nav { position: static; border-bottom: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; padding-top: 24px; }
  .jump-nav ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .jump-nav a {
    justify-content: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
    color: var(--navy);
    text-align: left;
  }
  .jump-nav a .icon { width: 30px; height: 30px; padding: 6px; border-radius: 8px; background: var(--blue-tint); color: var(--blue); }
  .jump-nav a::after { display: none; }

  /* Capabilities: two compact columns */
  .capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .capability { padding: 16px; }
  .capability .service-icon { width: 36px; height: 36px; border-radius: 8px; }
  .capability .service-icon .icon { width: 19px; height: 19px; }
  .capability h3 { margin: 12px 0 8px; font-size: 0.95rem; }
  .capability ul { gap: 6px; }
  .capability li { font-size: 0.84rem; align-items: flex-start; }
  .capability li .icon { width: 15px; height: 15px; margin-top: 2px; }

  /* Process and stats */
  .steps { gap: 14px; }
  .stats { row-gap: 28px; column-gap: 12px; }
  .stats dt { font-size: 0.86rem; }

  /* Products */
  .product-feature-media { order: -1; }
  .portfolio-selector li { flex: 1 1 140px; display: flex; }
  .portfolio-selector a { min-width: 0; flex: 1; }

  /* Case study pages */
  .case-meta { padding: 4px 18px; }
  .case-aside { padding: 20px; }
  .case-story .h3 { margin-top: 28px; }
  .case-story p { font-size: 1rem; }
  .next-case { flex-direction: column; align-items: stretch; gap: 14px; }

  /* Contact */
  .contact-card { padding: 22px; }
  .contact-email { font-size: 1.3rem; }

  /* CTA band */
  .cta-band { padding-block: 48px; }
  .cta-inner { gap: 24px; }
  .cta-inner > div:first-child { flex-basis: auto; }

  /* Footer: comfortable tap targets */
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; padding-bottom: 40px; }
  .footer-col-wide { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
  .footer-col-wide h2 { grid-column: 1 / -1; }
  .footer-col a { padding-block: 7px; }
  .footer-brand .btn { width: 100%; }
  .footer-legal { justify-content: center; text-align: center; }
}

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