/* ==========================================================================
   SITE: design system for the public portfolio pages
   --------------------------------------------------------------------------
   Built on the existing brand: the logo navy (#05173E, sampled from
   images/mylogo.jpg), primary indigo #2a2a72 and its dark #1d1d54, secondary
   blue #009ffd, accent violet #7d3cff, paper #f9f9f9, text #2d3436 and
   Poppins. No new hues are introduced; deeper/lighter values are tints of
   these.
   ========================================================================== */

:root {
  /* Brand */
  --navy-950: #030d26;
  --navy-900: #05173e;            /* logo ink */
  --indigo-800: #1d1d54;          /* existing --color-primary-dark */
  --indigo-700: #2a2a72;          /* existing --primary-color */
  --blue-500: #009ffd;            /* existing --secondary-color */
  --blue-300: #66c5fe;
  --violet-500: #7d3cff;          /* existing --accent-color */
  --violet-600: #6b2cdd;          /* existing hover */
  --paper: #f9f9f9;               /* existing --bg-color */
  --white: #ffffff;
  --text: #2d3436;                /* existing --text-color */
  --muted: #5c6570;               /* existing --color-text-secondary */
  --line: rgba(5, 23, 62, .12);
  --line-dark: rgba(255, 255, 255, .14);
  --on-dark: #ffffff;
  --on-dark-muted: rgba(255, 255, 255, .72);
  --gradient: linear-gradient(135deg, var(--indigo-700) 0%, var(--blue-500) 100%);

  /* Legacy names, kept so older inline styles keep working */
  --primary-color: var(--indigo-700);
  --secondary-color: var(--blue-500);
  --accent-color: var(--violet-500);
  --text-color: var(--text);
  --bg-color: var(--paper);
  --card-bg: var(--white);

  /* Type */
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-hero: clamp(2.5rem, min(5.6vw, 9.4vh), 5.6rem);
  --fs-display: clamp(2.1rem, 4.6vw, 4rem);
  --fs-h2: clamp(1.75rem, 3.2vw, 2.75rem);
  --fs-h3: clamp(1.3rem, 2vw, 1.75rem);
  --fs-lead: clamp(1.05rem, 1.35vw, 1.25rem);
  --fs-body: 1rem;
  --fs-small: .875rem;
  --fs-label: .72rem;

  /* Layout */
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 1280px;
  --section: clamp(4.5rem, 10vw, 9rem);
  --radius: 4px;
  --radius-lg: 10px;
  --header-h: 76px;

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
h1, h2, h3, h4 { line-height: 1.12; font-weight: 600; letter-spacing: -.025em; color: var(--navy-900); }
p { text-wrap: pretty; }
::selection { background: var(--blue-500); color: var(--white); }
:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 2000;
  background: var(--white); color: var(--navy-900); padding: .75rem 1rem;
  border-radius: var(--radius); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 1rem; }
.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; }

/* ---------- Layout primitives ---------- */
.shell { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.shell--narrow { width: min(100% - 2 * var(--gutter), 860px); margin-inline: auto; }
.section { padding-block: var(--section); position: relative; }
.section--white { background: var(--white); }
.section--dark { background: var(--navy-900); color: var(--on-dark-muted); }
.section--dark h2, .section--dark h3, .section--dark h4 { color: var(--on-dark); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .75rem;
  font-size: var(--fs-label); font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--indigo-700); margin-bottom: 1.5rem;
}
.section--dark .eyebrow, .on-dark .eyebrow { color: var(--blue-300); }

.display { font-size: var(--fs-display); letter-spacing: -.035em; line-height: 1.05; }
.h2 { font-size: var(--fs-h2); letter-spacing: -.03em; }
.lead { font-size: var(--fs-lead); line-height: 1.7; color: var(--muted); max-width: 60ch; }
.section--dark .lead { color: var(--on-dark-muted); }
.accent { color: var(--blue-500); }
.section--dark .accent, .on-dark .accent { color: var(--blue-300); }

.section-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2rem 4rem; align-items: end; margin-bottom: clamp(3rem, 6vw, 5rem); }
.section-head .lead { justify-self: end; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } .section-head .lead { justify-self: start; } }

/* ---------- Buttons & links ---------- */
.btn {
  --btn-bg: var(--violet-500); --btn-fg: var(--white); --btn-bd: var(--violet-500);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .65rem;
  min-height: 52px; padding: .85rem 1.6rem; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg); border: 1.5px solid var(--btn-bd);
  font-weight: 600; font-size: .95rem; letter-spacing: .005em; text-decoration: none; cursor: pointer;
  overflow: hidden; isolation: isolate;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease), box-shadow .3s var(--ease);
}
.btn:hover { --btn-bg: var(--violet-600); --btn-bd: var(--violet-600); box-shadow: 0 12px 30px -10px rgba(125, 60, 255, .6); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--white); --btn-bd: rgba(255, 255, 255, .38); }
.btn--ghost:hover { --btn-bg: var(--white); --btn-fg: var(--navy-900); --btn-bd: var(--white); box-shadow: none; }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--navy-900); --btn-bd: rgba(5, 23, 62, .25); }
.btn--outline:hover { --btn-bg: var(--navy-900); --btn-fg: var(--white); --btn-bd: var(--navy-900); box-shadow: none; }
.btn--block { width: 100%; }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn[disabled] { opacity: .6; cursor: progress; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 600; font-size: .95rem; color: var(--indigo-700); text-decoration: none;
  padding-block: .35rem; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  transition: background-size .35s var(--ease), color .2s;
}
.link-arrow::after { content: '→'; transition: transform .3s var(--ease); }
.link-arrow:hover { background-size: 100% 1.5px; color: var(--violet-500); }
.link-arrow:hover::after { transform: translateX(4px); }
.section--dark .link-arrow, .on-dark .link-arrow { color: var(--white); }
.section--dark .link-arrow:hover, .on-dark .link-arrow:hover { color: var(--blue-300); }

.status {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .75rem; font-weight: 600; letter-spacing: .04em; color: var(--navy-900);
}
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status--live::before { background: #19b36b; box-shadow: 0 0 0 4px rgba(25, 179, 107, .16); }
.status--build::before { background: var(--blue-500); box-shadow: 0 0 0 4px rgba(0, 159, 253, .16); }
.status--draft::before { background: var(--violet-500); box-shadow: 0 0 0 4px rgba(125, 60, 255, .14); }
.on-dark .status, .section--dark .status, .page-hero .status { color: var(--white); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 1000; height: var(--header-h);
  color: var(--white);
  transition: transform .45s var(--ease), color .3s var(--ease);
}
/* Background lives on a pseudo-element: a backdrop-filter on the header itself
   would trap the fixed mobile menu inside it. */
.site-header::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
  box-shadow: 0 1px 0 var(--line);
  opacity: 0; transition: opacity .35s var(--ease);
}
.site-header.is-scrolled, .site-header--solid { color: var(--navy-900); }
.site-header.is-scrolled::before, .site-header--solid::before { opacity: 1; }
.site-header.is-hidden { transform: translateY(-100%); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }

.brand { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; color: inherit; position: relative; z-index: 2; }
.brand-mark { width: 40px; height: 40px; object-fit: contain; }
.brand-mark--dark { display: none; }
.is-scrolled .brand-mark--light, .site-header--solid .brand-mark--light { display: none; }
.is-scrolled .brand-mark--dark, .site-header--solid .brand-mark--dark { display: block; }
.brand-word { font-weight: 500; font-size: .95rem; letter-spacing: .34em; margin-right: -.34em; }

.nav-list { display: flex; align-items: center; gap: clamp(1.25rem, 2.6vw, 2.5rem); list-style: none; padding: 0; }
.nav-list a {
  position: relative; text-decoration: none; font-size: .9rem; font-weight: 500; color: inherit; opacity: .86;
  padding-block: .5rem; transition: opacity .2s;
}
.nav-list a:not(.nav-cta)::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease);
}
.nav-list a:hover, .nav-list a[aria-current="page"] { opacity: 1; }
.nav-list a:hover::after, .nav-list a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav-list .nav-cta {
  opacity: 1; padding: .6rem 1.25rem; border-radius: 999px; border: 1.5px solid currentColor;
  transition: background-color .25s, color .25s, border-color .25s;
}
.site-header:not(.is-scrolled):not(.site-header--solid) .nav-cta:hover { background: var(--white); color: var(--navy-900); border-color: var(--white); }
.is-scrolled .nav-cta, .site-header--solid .nav-cta { background: var(--violet-500); border-color: var(--violet-500); color: var(--white); }
.is-scrolled .nav-cta:hover, .site-header--solid .nav-cta:hover { background: var(--violet-600); border-color: var(--violet-600); }

.menu-toggle {
  display: none; position: relative; z-index: 2; width: 48px; height: 48px; margin-right: -10px;
  background: none; border: 0; cursor: pointer; color: inherit;
}
.menu-toggle span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: currentColor; transition: transform .4s var(--ease), top .4s var(--ease); }
.menu-toggle span:first-child { top: 19px; }
.menu-toggle span:last-child { top: 27px; }
.menu-open .menu-toggle span:first-child { top: 23px; transform: rotate(45deg); }
.menu-open .menu-toggle span:last-child { top: 23px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 0; z-index: 1; background: var(--navy-900);
    display: flex; flex-direction: column; justify-content: center; padding: calc(var(--header-h) + 1rem) var(--gutter) 3rem;
    visibility: hidden; opacity: 0; transition: opacity .4s var(--ease), visibility 0s .4s;
  }
  .site-nav::after {
    content: ''; position: absolute; inset: auto 0 0 0; height: 40%;
    background: radial-gradient(80% 100% at 100% 100%, rgba(42, 42, 114, .7), transparent 70%); pointer-events: none;
  }
  .menu-open .site-nav { visibility: visible; opacity: 1; transition: opacity .4s var(--ease); }
  .menu-open.site-header { color: var(--white); }
  .menu-open.site-header::before { opacity: 0; }
  .menu-open .brand-mark--light { display: block; }
  .menu-open .brand-mark--dark { display: none; }
  .nav-list { flex-direction: column; align-items: flex-start; gap: .25rem; }
  .nav-list li { overflow: hidden; }
  .nav-list a { display: block; font-size: clamp(2rem, 9vw, 2.75rem); font-weight: 500; letter-spacing: -.03em; opacity: 1; color: var(--white); padding-block: .3rem; }
  .nav-list a:not(.nav-cta)::after { display: none; }
  .nav-list .nav-cta, .is-scrolled .nav-cta, .site-header--solid .nav-cta { border: 0; padding: .3rem 0; background: none; color: var(--blue-300); }
  .nav-list li { transform: translateY(24px); opacity: 0; transition: transform .5s var(--ease-out), opacity .5s var(--ease-out); }
  .menu-open .nav-list li { transform: none; opacity: 1; }
  .menu-open .nav-list li:nth-child(2) { transition-delay: .05s; }
  .menu-open .nav-list li:nth-child(3) { transition-delay: .1s; }
  .menu-open .nav-list li:nth-child(4) { transition-delay: .15s; }
  .menu-open .nav-list li:nth-child(5) { transition-delay: .2s; }
  body.menu-locked { overflow: hidden; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  color: var(--on-dark); background: var(--navy-950); overflow: hidden; isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media { will-change: transform; }
/* Mirrored so the platform sits in the open right half, away from the headline. */
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 40%; scale: -1 1; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(3, 13, 38, .94) 0%, rgba(5, 23, 62, .78) 38%, rgba(29, 29, 84, .32) 72%, rgba(29, 29, 84, .18) 100%),
    linear-gradient(0deg, rgba(3, 13, 38, .95) 0%, rgba(3, 13, 38, 0) 38%),
    linear-gradient(180deg, rgba(3, 13, 38, .55) 0%, rgba(3, 13, 38, 0) 22%);
}
.hero::after { /* fine brand-gradient grain line under the header zone */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gradient); opacity: .7;
}
.hero-content { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: calc(var(--header-h) + 4vh); padding-bottom: 4rem; }
.hero .eyebrow { color: var(--blue-300); letter-spacing: .24em; }
.hero-title { font-size: var(--fs-hero); font-weight: 600; line-height: 1.02; letter-spacing: -.045em; color: var(--white); }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.hero-title .line > span { display: inline-block; }
.hero-title em { font-style: normal; color: var(--blue-300); }
.hero-lede { margin-top: 2rem; max-width: 54ch; font-size: var(--fs-lead); line-height: 1.7; color: var(--on-dark-muted); font-weight: 300; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.75rem; }
.hero-foot { border-top: 1px solid var(--line-dark); }
.hero-foot-inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 2rem; padding-block: 1.6rem; align-items: center; }
.hero-foot dt { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .5); margin-bottom: .3rem; }
.hero-foot dd { font-size: .9rem; color: var(--white); font-weight: 500; margin: 0; }
.scroll-cue { display: inline-flex; align-items: center; gap: .75rem; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .7); text-decoration: none; }
.scroll-cue i { position: relative; width: 1px; height: 38px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.scroll-cue i::after { content: ''; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--white); animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { to { top: 100%; } }
@media (max-width: 860px) {
  .hero-media img { object-position: 64% 50%; }
  .hero::before {
    background:
      linear-gradient(0deg, rgba(3, 13, 38, .97) 8%, rgba(5, 23, 62, .72) 55%, rgba(3, 13, 38, .55) 100%);
  }
  .hero-content { justify-content: flex-end; padding-bottom: 3rem; }
  .hero-foot-inner { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .hero-foot-inner > :nth-child(3) { display: none; }
  .scroll-cue { display: none; }
}
@media (max-width: 480px) {
  .hero-actions .btn { width: 100%; }
}

/* ---------- Interior page hero ---------- */
.page-hero {
  position: relative; color: var(--on-dark); background: var(--navy-900); overflow: hidden; isolation: isolate;
  padding: calc(var(--header-h) + clamp(4rem, 10vw, 8rem)) 0 clamp(3.5rem, 7vw, 6rem);
}
.page-hero-media { position: absolute; inset: 0; z-index: -2; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(3, 13, 38, .95) 0%, rgba(5, 23, 62, .82) 50%, rgba(29, 29, 84, .5) 100%), linear-gradient(0deg, rgba(3, 13, 38, .8), transparent 50%);
}
.page-hero:not(:has(.page-hero-media))::before {
  background: radial-gradient(70% 90% at 90% 0%, rgba(42, 42, 114, .9), transparent 70%), radial-gradient(50% 60% at 0% 100%, rgba(0, 159, 253, .14), transparent 70%);
}
.page-hero h1 { color: var(--white); font-size: var(--fs-display); letter-spacing: -.04em; line-height: 1.04; max-width: 18ch; }
.page-hero .lead { color: var(--on-dark-muted); margin-top: 1.5rem; }
.page-hero .eyebrow { color: var(--blue-300); font-size: var(--fs-label); opacity: 1; margin-inline: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .8rem; color: rgba(255, 255, 255, .6); margin-bottom: 2rem; list-style: none; padding: 0; }
.breadcrumb a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.breadcrumb a:hover { color: var(--white); text-decoration: underline; }
.breadcrumb li + li::before { content: '/'; margin-right: .5rem; opacity: .5; }

/* ---------- Intro ---------- */
.intro-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: start; }
.statement { font-size: clamp(1.9rem, 3.7vw, 3.25rem); line-height: 1.12; letter-spacing: -.035em; font-weight: 500; color: var(--navy-900); }
.statement .muted { color: rgba(5, 23, 62, .38); }
.intro-copy p { color: var(--muted); font-size: 1.05rem; }
.intro-copy p + p { margin-top: 1.25rem; }
.intro-copy .link-arrow { margin-top: 2rem; }
.triad {
  margin-top: clamp(4rem, 8vw, 6.5rem); padding-top: 2.25rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.5rem;
  font-size: clamp(1.15rem, 2.4vw, 2rem); font-weight: 500; letter-spacing: -.02em; color: var(--navy-900);
}
.triad .x { font-weight: 300; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.triad-label { flex-basis: 100%; font-size: var(--fs-label); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; }
@media (max-width: 860px) { .intro-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .triad { flex-direction: column; gap: .1rem; font-size: 1.5rem; }
  .triad .x { line-height: 1; font-size: 1.1rem; }
}

/* ---------- Approach (process) ---------- */
.approach { overflow: hidden; }
.approach::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 70% at 100% 0%, rgba(42, 42, 114, .75), transparent 70%), radial-gradient(40% 50% at 0% 100%, rgba(0, 159, 253, .1), transparent 70%);
}
.approach .shell { position: relative; }
.process { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; position: relative; counter-reset: step; }
.process::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: var(--line-dark); }
.process::after { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: linear-gradient(90deg, var(--blue-500), var(--violet-500)); transform-origin: left; }
.process li { position: relative; padding: 2.75rem 1.5rem 0 0; }
.process li::before { content: ''; position: absolute; left: 0; top: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--navy-900); border: 1.5px solid var(--blue-300); }
.process li:last-child::before { background: var(--blue-500); border-color: var(--blue-500); box-shadow: 0 0 0 6px rgba(0, 159, 253, .18); }
.process .step-no { display: block; font-size: .72rem; letter-spacing: .18em; color: var(--blue-300); font-weight: 600; margin-bottom: .9rem; }
.process h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -.015em; margin-bottom: .6rem; }
.process p { font-size: .9rem; line-height: 1.65; color: var(--on-dark-muted); }
@media (max-width: 1080px) {
  .process { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 3.5rem; }
  .process::before, .process::after { display: none; }
  .process li { border-top: 1px solid var(--line-dark); padding-top: 2.25rem; }
  .process li::before { top: -8px; }
}
@media (max-width: 640px) {
  .process { grid-template-columns: 1fr; row-gap: 0; }
  .process li { border-top: 0; border-left: 1px solid var(--line-dark); padding: 0 0 2.5rem 2rem; }
  .process li::before { top: 2px; left: -8px; }
  .process li:last-child { padding-bottom: 0; }
}

/* ---------- Industries ---------- */
.industry-grid {
  display: grid; gap: clamp(.75rem, 1.4vw, 1.25rem);
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(2, clamp(300px, 27vw, 400px));
}
.industry-tile { position: relative; overflow: hidden; border-radius: var(--radius-lg); color: var(--white); isolation: isolate; background: var(--navy-900); }
.industry-tile:nth-child(1) { grid-column: 1 / 7; grid-row: 1 / 3; }
.industry-tile:nth-child(2) { grid-column: 7 / 13; grid-row: 1; }
.industry-tile:nth-child(3) { grid-column: 7 / 10; grid-row: 2; }
.industry-tile:nth-child(4) { grid-column: 10 / 13; grid-row: 2; }
.industry-tile:nth-child(1) img { object-position: 50% 85%; }
.industry-tile:nth-child(3) h3, .industry-tile:nth-child(4) h3 { font-size: clamp(1.1rem, 1.45vw, 1.35rem); }
.industry-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s var(--ease-out); }
.industry-tile::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(3, 13, 38, .94) 0%, rgba(5, 23, 62, .5) 45%, rgba(5, 23, 62, .1) 100%); transition: background .5s; }
.industry-tile:hover img { transform: scale(1.05); }
.industry-body { position: absolute; inset: auto 0 0 0; padding: clamp(1.25rem, 2.4vw, 2.25rem); }
.industry-no { position: absolute; top: clamp(1.25rem, 2.4vw, 2rem); left: clamp(1.25rem, 2.4vw, 2.25rem); font-size: .72rem; letter-spacing: .2em; font-weight: 600; color: rgba(255, 255, 255, .75); }
.industry-tile h3 { color: var(--white); font-size: clamp(1.2rem, 1.9vw, 1.65rem); letter-spacing: -.025em; }
.industry-tile:nth-child(1) h3 { font-size: clamp(1.6rem, 3vw, 2.6rem); max-width: 14ch; }
.industry-tile p { margin-top: .75rem; color: rgba(255, 255, 255, .78); font-size: .92rem; line-height: 1.6; max-width: 42ch; }
.industry-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.1rem; list-style: none; padding: 0; }
.industry-tags li { font-size: .72rem; padding: .3rem .7rem; border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; color: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.industry-tile:nth-child(3) p, .industry-tile:nth-child(4) p { font-size: .85rem; }
.industry-tile:nth-child(4) .industry-tags, .industry-tile:nth-child(3) .industry-tags { display: none; }
@media (max-width: 1080px) {
  .industry-grid { grid-template-rows: none; grid-auto-rows: minmax(340px, auto); max-height: none; }
  .industry-tile:nth-child(1) { grid-column: 1 / -1; grid-row: auto; min-height: 460px; }
  .industry-tile:nth-child(2) { grid-column: 1 / -1; grid-row: auto; }
  .industry-tile:nth-child(3) { grid-column: 1 / 7; grid-row: auto; }
  .industry-tile:nth-child(4) { grid-column: 7 / 13; grid-row: auto; }
  .industry-tile:nth-child(3) .industry-tags, .industry-tile:nth-child(4) .industry-tags { display: flex; }
}
@media (max-width: 640px) {
  .industry-tile:nth-child(n) { grid-column: 1 / -1; min-height: 380px; }
}

/* ---------- Case studies ---------- */
.case-list { display: grid; gap: clamp(4.5rem, 9vw, 8rem); }
.case-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.case-row:nth-child(even) .case-media { order: 2; }
.case-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-lg); background: var(--navy-900); }
.case-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.case-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 23, 62, 0) 50%, rgba(5, 23, 62, .55)); pointer-events: none; }
a.case-media:hover img, .case-row:hover .case-media img { transform: scale(1.04); }
.case-index { position: absolute; left: 1.5rem; bottom: 1.25rem; z-index: 1; font-size: clamp(3rem, 6vw, 5rem); font-weight: 600; letter-spacing: -.05em; line-height: 1; color: rgba(255, 255, 255, .92); }
.case-badge { position: absolute; right: 1.25rem; top: 1.25rem; z-index: 1; background: rgba(255, 255, 255, .94); border-radius: 8px; padding: .6rem .9rem; box-shadow: 0 10px 30px -10px rgba(5, 23, 62, .5); }
.case-badge img { height: 26px; width: auto; }
.case-cat { font-size: var(--fs-label); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--blue-500); margin-bottom: 1rem; }
.case-title { font-size: var(--fs-h2); letter-spacing: -.035em; line-height: 1.08; }
.case-title a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .45s var(--ease); }
.case-title a:hover { background-size: 100% 2px; }
.case-summary { margin-top: 1.25rem; color: var(--muted); font-size: 1.02rem; max-width: 52ch; }
.case-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 2rem; margin: 2rem 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.case-facts dt { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.case-facts dd { margin: 0; font-size: .92rem; font-weight: 500; color: var(--navy-900); line-height: 1.5; }
.case-facts .wide { grid-column: 1 / -1; }
@media (max-width: 860px) {
  .case-row { grid-template-columns: 1fr; }
  .case-row:nth-child(even) .case-media { order: 0; }
}

/* ---------- Capabilities ---------- */
.cap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cap-item { padding: clamp(2rem, 4vw, 3.25rem) clamp(0rem, 3vw, 3rem) clamp(2rem, 4vw, 3.25rem) 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: 0 1.75rem; }
.cap-item:nth-child(odd) { border-right: 1px solid var(--line); }
.cap-item:nth-child(even) { padding-left: clamp(1.5rem, 3vw, 3rem); padding-right: 0; }
.cap-no { font-size: .8rem; font-weight: 600; letter-spacing: .1em; color: var(--blue-500); padding-top: .35rem; }
.cap-item h3 { font-size: var(--fs-h3); letter-spacing: -.025em; }
.cap-item > div > p { margin-top: .75rem; color: var(--muted); font-size: .95rem; max-width: 46ch; }
.cap-list { list-style: none; padding: 0; margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.cap-list li { font-size: .82rem; color: var(--navy-900); padding: .4rem .85rem; border-radius: 999px; background: rgba(42, 42, 114, .06); border: 1px solid rgba(42, 42, 114, .1); }
.toolkit { margin-top: clamp(2.5rem, 5vw, 3.5rem); display: flex; flex-wrap: wrap; align-items: baseline; gap: .75rem 1.5rem; font-size: .9rem; color: var(--muted); }
.toolkit strong { font-size: var(--fs-label); letter-spacing: .18em; text-transform: uppercase; color: var(--navy-900); font-weight: 600; }
.toolkit span + span::before { content: '·'; margin-right: 1.5rem; color: var(--blue-500); }
@media (max-width: 640px) {
  .toolkit { gap: .5rem; }
  .toolkit strong { flex-basis: 100%; margin-bottom: .25rem; }
  .toolkit span { padding: .3rem .75rem; border: 1px solid var(--line); border-radius: 999px; font-size: .82rem; }
  .toolkit span + span::before { display: none; }
}
@media (max-width: 860px) {
  .cap-grid { grid-template-columns: 1fr; }
  .cap-item:nth-child(n) { border-right: 0; padding-left: 0; padding-right: 0; }
}

/* ---------- Experience timeline ---------- */
.timeline { list-style: none; padding: 0; border-top: 1px solid var(--line-dark); }
.tl-item { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(0, 1.2fr) minmax(0, 1.6fr); gap: 1rem 3rem; padding: clamp(1.75rem, 3vw, 2.5rem) 0; border-bottom: 1px solid var(--line-dark); transition: background-color .4s; }
.tl-date { font-size: .85rem; color: var(--on-dark-muted); font-variant-numeric: tabular-nums; }
.tl-date .status { display: flex; margin-top: .5rem; }
.tl-org { color: var(--white); font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.tl-role { display: block; font-size: .9rem; color: var(--blue-300); font-weight: 500; margin-top: .35rem; letter-spacing: 0; }
.tl-text { font-size: .95rem; color: var(--on-dark-muted); }
.tl-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; list-style: none; padding: 0; }
.tl-tags li { font-size: .72rem; color: rgba(255, 255, 255, .85); border: 1px solid var(--line-dark); padding: .25rem .65rem; border-radius: 999px; }
.tl-item--feature .tl-org { font-size: 1.5rem; }
@media (hover: hover) { .tl-item:hover { background: linear-gradient(90deg, rgba(42, 42, 114, .35), transparent 80%); } }
@media (max-width: 860px) { .tl-item { grid-template-columns: 1fr; gap: .6rem; } }
.education { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 3rem; margin-top: 3rem; }
.education div { border-left: 2px solid var(--blue-500); padding-left: 1.25rem; }
.education strong { display: block; color: var(--white); font-weight: 600; }
.education span { font-size: .9rem; color: var(--on-dark-muted); }
@media (max-width: 640px) { .education { grid-template-columns: 1fr; } }

/* ---------- Profile ---------- */
.profile-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: center; }
.portrait { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden; background: var(--indigo-800); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.portrait::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(5, 23, 62, .55)); }
.portrait-cap { position: absolute; left: 1.5rem; right: 1.5rem; bottom: 1.25rem; z-index: 1; color: var(--white); font-size: .85rem; }
.portrait-cap strong { display: block; font-size: 1.05rem; font-weight: 600; }
.profile-copy div > p { color: var(--muted); font-size: 1.05rem; }
.profile-copy div > p + p { margin-top: 1.1rem; }
.cred-list { list-style: none; padding: 0; margin-top: 2.5rem; border-top: 1px solid var(--line); }
.cred-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.cred-list strong { font-weight: 600; color: var(--navy-900); }
.cred-list span { display: block; font-size: .82rem; color: var(--muted); }
.cred-list a { flex: none; font-size: .8rem; font-weight: 600; color: var(--indigo-700); text-decoration: none; white-space: nowrap; }
.cred-list a:hover { color: var(--violet-500); text-decoration: underline; }
.cred-list em { flex: none; font-style: normal; font-size: .78rem; color: var(--violet-500); font-weight: 600; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; margin-top: 2.25rem; }
@media (max-width: 860px) { .profile-grid { grid-template-columns: 1fr; } .portrait { max-width: 460px; } }

/* ---------- Project index (secondary work) ---------- */
.project-index { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.project-index li { border-bottom: 1px solid var(--line); }
.project-index a {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 1.5rem; align-items: center;
  padding: 1.35rem 0; text-decoration: none; color: inherit; transition: padding .35s var(--ease), background-color .35s;
}
.project-index a:hover { padding-inline: 1rem; background: var(--white); }
.pi-logo { width: 56px; height: 56px; border-radius: 10px; background: var(--white); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.pi-logo img { max-width: 80%; max-height: 80%; object-fit: contain; }
.pi-logo b { font-size: .78rem; font-weight: 700; letter-spacing: .02em; color: var(--indigo-700); }
.pi-name { font-size: 1.2rem; font-weight: 600; letter-spacing: -.02em; color: var(--navy-900); }
.pi-sector { display: block; font-size: .78rem; color: var(--blue-500); font-weight: 500; letter-spacing: .02em; }
.pi-desc { font-size: .92rem; color: var(--muted); }
.pi-go { font-size: 1.25rem; color: var(--indigo-700); transition: transform .35s var(--ease); }
.project-index a:hover .pi-go { transform: translateX(6px); color: var(--violet-500); }
@media (max-width: 760px) {
  .project-index a { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 1rem; }
  .pi-logo { width: 48px; height: 48px; }
  .pi-desc { display: none; }
}

/* ---------- Insights ---------- */
.insight-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); }
.insight-feature { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 520px; border-radius: var(--radius-lg); overflow: hidden; color: var(--white); padding: clamp(1.5rem, 3vw, 2.5rem); isolation: isolate; background: var(--navy-900); }
.insight-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s var(--ease-out); }
.insight-feature::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(3, 13, 38, .95) 10%, rgba(5, 23, 62, .35) 70%, rgba(5, 23, 62, .15)); }
.insight-feature:hover img { transform: scale(1.04); }
.insight-feature h3 { color: var(--white); font-size: clamp(1.5rem, 2.6vw, 2.2rem); letter-spacing: -.03em; max-width: 20ch; margin-top: 1rem; }
.insight-feature p { color: rgba(255, 255, 255, .78); margin-top: .9rem; max-width: 50ch; font-size: .95rem; }
.insight-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.insight-feature .insight-meta { color: rgba(255, 255, 255, .7); }
.insight-feature .status { color: var(--white); }
.insight-list { list-style: none; padding: 0; border-top: 1px solid var(--line); align-self: start; }
.insight-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); align-items: center; }
.insight-row .thumb { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--indigo-800); }
.insight-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.insight-row h3 { font-size: 1.12rem; letter-spacing: -.02em; line-height: 1.3; margin-top: .5rem; }
.insight-row p { font-size: .88rem; color: var(--muted); margin-top: .4rem; }
.insight-note { margin-top: 2rem; font-size: .88rem; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; align-items: center; }
@media (max-width: 960px) { .insight-layout { grid-template-columns: 1fr; } .insight-feature { min-height: 420px; } }
@media (max-width: 480px) { .insight-row { grid-template-columns: 84px minmax(0, 1fr); gap: 1rem; } }

/* Post cards (live articles from the blog) */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
.post-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.post-card-cover { aspect-ratio: 16 / 10; border-radius: var(--radius-lg); overflow: hidden; background: var(--gradient); }
.post-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.post-card:hover .post-card-cover img { transform: scale(1.04); }
.post-card .insight-meta { margin-top: 1.25rem; }
.post-card h3 { font-size: 1.35rem; letter-spacing: -.025em; line-height: 1.25; margin-top: .6rem; transition: color .2s; }
.post-card:hover h3 { color: var(--indigo-700); }
.post-card p { margin-top: .6rem; color: var(--muted); font-size: .95rem; }
.empty-state { padding: 3rem; border: 1px dashed rgba(5, 23, 62, .2); border-radius: var(--radius-lg); text-align: center; color: var(--muted); }

/* ---------- Contact ---------- */
.contact { position: relative; color: var(--on-dark-muted); background: var(--navy-950); overflow: hidden; isolation: isolate; }
.contact-media { position: absolute; inset: 0; z-index: -2; }
.contact-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; filter: grayscale(1) contrast(1.05); opacity: .55; }
.contact::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, rgba(3, 13, 38, .97) 20%, rgba(29, 29, 84, .86) 65%, rgba(42, 42, 114, .7)); }
.contact h2 { color: var(--white); font-size: var(--fs-display); letter-spacing: -.04em; line-height: 1.04; max-width: 16ch; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(3rem, 7vw, 7rem); align-items: start; }
.contact-copy .lead { margin-top: 1.75rem; color: var(--on-dark-muted); }
.contact-email { display: inline-block; margin-top: 2.5rem; font-size: clamp(1.1rem, 2.3vw, 1.75rem); font-weight: 500; color: var(--white); text-decoration: none; letter-spacing: -.02em; word-break: break-all; background: linear-gradient(var(--blue-500), var(--blue-500)) 0 100% / 100% 2px no-repeat; padding-bottom: .3rem; transition: color .2s, background-size .4s var(--ease); }
.contact-email:hover { color: var(--blue-300); }
.contact-links { list-style: none; padding: 0; margin-top: 2.5rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-dark); }
.contact-links a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line-dark); color: var(--white); text-decoration: none; font-size: .95rem; font-weight: 500; transition: color .2s, padding .35s var(--ease); }
.contact-links li:nth-child(odd) a { margin-right: 1.5rem; }
.contact-links a::after { content: '↗'; color: var(--blue-300); transition: transform .3s var(--ease); }
.contact-links a:hover { color: var(--blue-300); }
.contact-links a:hover::after { transform: translate(3px, -3px); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }
.form-card { background: rgba(255, 255, 255, .06); border: 1px solid var(--line-dark); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2.5rem); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.form-card h3 { color: var(--white); font-size: 1.35rem; letter-spacing: -.02em; }
.form-card > p { font-size: .9rem; margin-top: .4rem; margin-bottom: 1.75rem; }
.field { display: block; margin-bottom: 1.1rem; }
.field label { display: block; font-size: .78rem; font-weight: 500; letter-spacing: .04em; color: rgba(255, 255, 255, .8); margin-bottom: .45rem; }
.field input, .field textarea {
  width: 100%; padding: .85rem 1rem; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(3, 13, 38, .45); color: var(--white); font-size: .95rem; transition: border-color .2s, background-color .2s;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255, 255, 255, .4); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue-500); background: rgba(3, 13, 38, .7); box-shadow: 0 0 0 3px rgba(0, 159, 253, .2); }
.field textarea { min-height: 130px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-status { margin-top: 1rem; font-size: .9rem; color: var(--blue-300); min-height: 1.4em; }
@media (max-width: 960px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .contact-links { grid-template-columns: 1fr; } .contact-links li:nth-child(odd) a { margin-right: 0; } .field-row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: rgba(255, 255, 255, .6); padding: clamp(3.5rem, 7vw, 5.5rem) 0 2rem; font-size: .9rem; border-top: 1px solid var(--line-dark); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, .8fr)); gap: 2.5rem 3rem; }
.footer-brand img { width: 108px; height: auto; }
.footer-brand p { margin-top: 1.5rem; max-width: 40ch; line-height: 1.7; }
.footer-col h2 { font-size: var(--fs-label); letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .45); font-weight: 600; margin-bottom: 1.25rem; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: .65rem; }
.footer-col a { color: rgba(255, 255, 255, .85); text-decoration: none; transition: color .2s; }
.footer-col a:hover { color: var(--blue-300); }
.footer-bottom { margin-top: clamp(3rem, 6vw, 4.5rem); padding-top: 1.5rem; border-top: 1px solid var(--line-dark); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .8rem; }
.footer-bottom a { color: inherit; text-decoration: none; }
.footer-bottom a:hover { color: var(--white); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Case study detail ---------- */
.cs-hero { min-height: 82vh; min-height: 82svh; display: flex; align-items: flex-end; }
.cs-hero .page-hero-media img { object-position: 50% 50%; }
.cs-hero h1 { max-width: 20ch; }
.cs-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem 2rem; margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 1.75rem; border-top: 1px solid var(--line-dark); }
.cs-meta dt { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .55); margin-bottom: .35rem; }
.cs-meta dd { margin: 0; font-size: .92rem; color: var(--white); font-weight: 500; line-height: 1.5; }
@media (max-width: 860px) { .cs-meta { grid-template-columns: 1fr 1fr; } }
.cs-block { display: grid; grid-template-columns: minmax(180px, .32fr) minmax(0, 1fr); gap: 1.5rem clamp(2rem, 6vw, 6rem); padding-block: clamp(2.75rem, 5vw, 4rem); border-top: 1px solid var(--line); }
.cs-block:first-child { border-top: 0; padding-top: 0; }
.cs-label { font-size: var(--fs-label); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--blue-500); position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; }
.cs-label span { display: block; color: var(--muted); margin-bottom: .4rem; }
.cs-body > p { font-size: 1.08rem; color: var(--text); max-width: 64ch; }
.cs-body > p + p { margin-top: 1.1rem; }
.cs-body .big { font-size: clamp(1.35rem, 2.3vw, 1.85rem); line-height: 1.35; letter-spacing: -.02em; color: var(--navy-900); font-weight: 500; }
.cs-points { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; margin-top: 1.5rem; }
.cs-points li { padding: 1rem 0; border-bottom: 1px solid var(--line); font-size: .98rem; color: var(--navy-900); }
.cs-points--single { grid-template-columns: 1fr; }
@media (max-width: 760px) { .cs-block { grid-template-columns: 1fr; } .cs-label { position: static; } .cs-points { grid-template-columns: 1fr; } }
.cs-figure { margin-block: clamp(3rem, 6vw, 5rem); }
.cs-figure img { width: 100%; border-radius: var(--radius-lg); aspect-ratio: 21 / 9; object-fit: cover; }
.cs-figure figcaption { font-size: .8rem; color: var(--muted); margin-top: .75rem; }
.callout { margin-top: 1.75rem; padding: 1.25rem 1.5rem; border-left: 3px solid var(--violet-500); background: rgba(125, 60, 255, .05); border-radius: 0 8px 8px 0; font-size: .95rem; color: var(--navy-900); }

/* Workflow diagram */
.flow { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 1rem; counter-reset: flow; margin-top: 1.75rem; }
.flow li { position: relative; counter-increment: flow; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem 1.25rem 1.35rem; min-height: 132px; transition: border-color .3s, transform .3s var(--ease), box-shadow .3s; }
.flow li::before { content: counter(flow, decimal-leading-zero); display: block; font-size: .72rem; font-weight: 600; letter-spacing: .14em; color: var(--blue-500); margin-bottom: .7rem; }
.flow li strong { display: block; color: var(--navy-900); font-weight: 600; font-size: 1rem; letter-spacing: -.01em; line-height: 1.3; }
.flow li span { display: block; font-size: .82rem; color: var(--muted); margin-top: .35rem; line-height: 1.5; }
.flow li:hover { border-color: rgba(0, 159, 253, .5); transform: translateY(-3px); box-shadow: 0 16px 30px -18px rgba(5, 23, 62, .35); }
.flow--dark li { background: rgba(255, 255, 255, .04); border-color: var(--line-dark); }
.flow--dark li strong { color: var(--white); }
.flow--dark li span { color: var(--on-dark-muted); }
@media (max-width: 960px) { .flow { --cols: 2 !important; } }
@media (max-width: 520px) { .flow { --cols: 1 !important; } }
.flow-band { padding: clamp(2rem, 4vw, 3rem); border-radius: var(--radius-lg); background: var(--navy-900); position: relative; overflow: hidden; }
.flow-band::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 80% at 100% 0%, rgba(42, 42, 114, .8), transparent 70%); pointer-events: none; }
.flow-band > * { position: relative; }
.flow-band h3 { color: var(--white); font-size: 1.25rem; }
.flow-band p { color: var(--on-dark-muted); font-size: .92rem; margin-top: .4rem; }

.cs-next { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.cs-next a { display: block; padding: clamp(2rem, 4vw, 3.5rem) 0; text-decoration: none; color: inherit; }
.cs-next a + a { text-align: right; border-left: 1px solid var(--line); }
.cs-next small { display: block; font-size: var(--fs-label); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.cs-next strong { font-size: clamp(1.15rem, 2.4vw, 1.9rem); letter-spacing: -.03em; color: var(--navy-900); font-weight: 600; transition: color .2s; }
.cs-next a:hover strong { color: var(--violet-500); }
.cs-next a:first-child { padding-right: 1.5rem; }
.cs-next a + a { padding-left: 1.5rem; }

/* ---------- Methodology playbook ---------- */
.pb-principles { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.pb-principles li { padding: 2rem 2rem 2rem 0; border-bottom: 1px solid var(--line); }
.pb-principles li:not(:nth-child(3n)) { border-right: 1px solid var(--line); }
.pb-principles li:not(:nth-child(3n + 1)) { padding-left: 2rem; }
.pb-principles span { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .16em; color: var(--blue-500); margin-bottom: .8rem; }
.pb-principles strong { display: block; font-size: 1.15rem; font-weight: 600; letter-spacing: -.015em; color: var(--navy-900); }
.pb-principles p { margin-top: .5rem; font-size: .92rem; color: var(--muted); }
@media (max-width: 860px) {
  .pb-principles { grid-template-columns: 1fr 1fr; }
  .pb-principles li:nth-child(n) { padding: 1.75rem 1.25rem 1.75rem 0; border-right: 0; }
  .pb-principles li:nth-child(odd) { border-right: 1px solid var(--line); }
  .pb-principles li:nth-child(even) { padding-left: 1.25rem; }
}
@media (max-width: 560px) { .pb-principles { grid-template-columns: 1fr; } .pb-principles li:nth-child(n) { border-right: 0; padding-left: 0; } }

.pb-nav { position: sticky; top: 0; z-index: 20; background: rgba(249, 249, 249, .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-block: 1px solid var(--line); }
.pb-nav ol { list-style: none; display: flex; gap: .35rem; overflow-x: auto; padding: .7rem 0; scrollbar-width: none; }
.pb-nav ol::-webkit-scrollbar { display: none; }
.pb-nav a { display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; padding: .45rem .95rem; border-radius: 999px; border: 1px solid transparent; font-size: .82rem; font-weight: 500; color: var(--muted); text-decoration: none; transition: background-color .25s, color .25s, border-color .25s; }
.pb-nav a b { font-size: .7rem; font-weight: 600; color: var(--blue-500); }
.pb-nav a:hover { color: var(--navy-900); border-color: var(--line); }
.pb-nav a.is-active { background: var(--navy-900); color: var(--white); }
.pb-nav a.is-active b { color: var(--blue-300); }

.pb-phase { display: grid; grid-template-columns: minmax(220px, .42fr) minmax(0, 1fr); gap: 2rem clamp(2rem, 6vw, 6rem); padding-block: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.pb-phase:first-child { border-top: 0; }
.pb-head { position: sticky; top: 90px; align-self: start; }
.pb-no { display: block; font-size: clamp(3rem, 6vw, 4.5rem); font-weight: 600; letter-spacing: -.05em; line-height: 1; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pb-head h2 { font-size: var(--fs-h3); letter-spacing: -.025em; margin-top: 1rem; }
.pb-head p { margin-top: .6rem; font-size: .95rem; color: var(--muted); }
.pb-purpose { font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.45; font-weight: 500; letter-spacing: -.015em; color: var(--navy-900); max-width: 52ch; }
.pb-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 2rem; margin-top: 2.25rem; }
.pb-cols h3 { font-size: var(--fs-label); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--blue-500); margin-bottom: .6rem; }
.pb-cols ul { list-style: none; padding: 0; }
.pb-cols li { padding: .6rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; line-height: 1.5; color: var(--text); }
.pb-cols .pb-q li { color: var(--navy-900); }
.pb-outcome { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem 1.25rem; align-items: baseline; margin-top: 2rem; padding: 1.2rem 1.5rem; background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--violet-500); border-radius: 0 10px 10px 0; }
.pb-outcome strong { font-size: var(--fs-label); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--violet-500); white-space: nowrap; }
.pb-outcome p { font-size: 1rem; color: var(--navy-900); }
.pb-practice { margin-top: 1rem; font-size: .92rem; color: var(--muted); max-width: 70ch; }
.pb-practice b { color: var(--navy-900); font-weight: 600; }
.pb-practice a { color: var(--indigo-700); font-weight: 600; }
.pb-practice a:hover { color: var(--violet-500); }
@media (max-width: 1080px) { .pb-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .pb-phase { grid-template-columns: 1fr; }
  .pb-head { position: static; }
  .pb-cols { grid-template-columns: 1fr; }
  .pb-outcome { grid-template-columns: 1fr; }
}

.pb-table { border-top: 1px solid var(--line-dark); }
.pb-row { display: grid; grid-template-columns: 64px minmax(0, .9fr) minmax(0, 1.4fr); gap: .4rem 2rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line-dark); align-items: baseline; }
.pb-row > span:first-child { font-size: .78rem; font-weight: 600; letter-spacing: .12em; color: var(--blue-300); }
.pb-row strong { color: var(--white); font-weight: 600; }
.pb-row > span:last-child { font-size: .92rem; color: var(--on-dark-muted); }
@media (max-width: 760px) { .pb-row { grid-template-columns: 48px minmax(0, 1fr); } .pb-row > span:last-child { grid-column: 2; } }

.pb-scale { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.pb-scale article { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2rem); display: flex; flex-direction: column; }
.pb-scale h3 { font-size: 1.25rem; letter-spacing: -.02em; }
.pb-scale p { margin-top: .6rem; font-size: .95rem; color: var(--muted); }
.pb-scale small { display: block; margin-top: auto; padding-top: 1.25rem; font-size: .78rem; color: var(--indigo-700); font-weight: 600; letter-spacing: .02em; }
@media (max-width: 900px) { .pb-scale { grid-template-columns: 1fr; } }

/* ---------- Work page ---------- */
.work-detail { border-top: 1px solid var(--line); }
.work-detail details { border-bottom: 1px solid var(--line); }
.work-detail summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.3fr) 40px; gap: 1.5rem; align-items: center; padding: 1.5rem 0;
}
.work-detail summary::-webkit-details-marker { display: none; }
.work-detail summary:hover .pi-name { color: var(--indigo-700); }
.work-detail .pi-logo { width: 64px; height: 64px; }
.toggle-icon { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); justify-self: end; transition: transform .4s var(--ease), background-color .3s; }
.toggle-icon::before, .toggle-icon::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: var(--navy-900); transform: translate(-50%, -50%); }
.toggle-icon::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .4s var(--ease); }
details[open] .toggle-icon { background: var(--navy-900); }
details[open] .toggle-icon::before, details[open] .toggle-icon::after { background: var(--white); }
details[open] .toggle-icon::after { transform: translate(-50%, -50%) rotate(0); }
.work-detail-body { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2rem 4rem; padding: .5rem 0 2.5rem calc(64px + 1.5rem); }
.work-detail-body p { color: var(--muted); }
.work-detail-body h4 { font-size: var(--fs-label); letter-spacing: .18em; text-transform: uppercase; color: var(--blue-500); margin: 0 0 .75rem; font-weight: 600; }
.work-detail-body ul { padding-left: 1.1rem; color: var(--text); font-size: .93rem; display: grid; gap: .45rem; }
.work-detail-body .meta-block + .meta-block { margin-top: 1.5rem; }
.work-detail-body .meta-block p { font-size: .93rem; }
@media (max-width: 860px) {
  .work-detail summary { grid-template-columns: 48px minmax(0, 1fr) 40px; gap: 1rem; }
  .work-detail .pi-logo { width: 48px; height: 48px; }
  .work-detail summary .pi-desc { display: none; }
  .work-detail-body { grid-template-columns: 1fr; padding-left: 0; }
}

/* ---------- About page ---------- */
.about-hero { padding-bottom: 0; }
.about-hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(2rem, 6vw, 6rem); align-items: end; }
.about-hero .portrait { aspect-ratio: 4 / 5; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.about-hero-copy { padding-bottom: clamp(3rem, 7vw, 6rem); }
@media (max-width: 860px) { .about-hero-grid { grid-template-columns: 1fr; } .about-hero .portrait { max-width: 420px; } }
.story { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 6rem); }
.story-body p { font-size: 1.08rem; color: var(--text); }
.story-body p + p { margin-top: 1.25rem; }
@media (max-width: 860px) { .story { grid-template-columns: 1fr; } }
.focus-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-dark); list-style: none; padding: 0; }
.focus-grid li { padding: 2rem 2rem 2rem 0; border-bottom: 1px solid var(--line-dark); }
.focus-grid li:not(:nth-child(3n)) { border-right: 1px solid var(--line-dark); }
.focus-grid li:not(:nth-child(3n + 1)) { padding-left: 2rem; }
.focus-grid strong { display: block; color: var(--white); font-size: 1.1rem; font-weight: 600; letter-spacing: -.015em; }
.focus-grid span { display: block; margin-top: .5rem; font-size: .9rem; color: var(--on-dark-muted); }
@media (max-width: 860px) {
  .focus-grid { grid-template-columns: 1fr 1fr; }
  .focus-grid li:nth-child(n) { padding: 1.75rem 1.25rem 1.75rem 0; border-right: 0; }
  .focus-grid li:nth-child(odd) { border-right: 1px solid var(--line-dark); }
  .focus-grid li:nth-child(even) { padding-left: 1.25rem; }
}
@media (max-width: 520px) { .focus-grid { grid-template-columns: 1fr; } .focus-grid li:nth-child(n) { border-right: 0; padding-left: 0; } }
.lead-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; }
.lead-grid figure { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--indigo-800); }
.lead-grid figure:nth-child(1) { grid-column: span 7; aspect-ratio: 4 / 3; }
.lead-grid figure:nth-child(2) { grid-column: span 5; aspect-ratio: auto; }
.lead-grid figure:nth-child(3) { grid-column: span 5; aspect-ratio: auto; }
.lead-grid figure:nth-child(4) { grid-column: span 7; aspect-ratio: 4 / 3; }
.lead-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.lead-grid figure:hover img { transform: scale(1.04); }
.lead-grid figcaption { position: absolute; inset: auto 0 0 0; padding: 3rem 1.5rem 1.25rem; background: linear-gradient(0deg, rgba(3, 13, 38, .92), transparent); color: rgba(255, 255, 255, .82); font-size: .88rem; line-height: 1.5; }
.lead-grid figcaption strong { display: block; color: var(--white); font-size: 1.05rem; font-weight: 600; margin-bottom: .2rem; }
@media (max-width: 760px) { .lead-grid figure:nth-child(n) { grid-column: 1 / -1; aspect-ratio: 4 / 3; } }

/* ---------- Article (blog post) ---------- */
.article-wrap { padding: calc(var(--header-h) + clamp(3rem, 7vw, 5.5rem)) 0 var(--section); background: var(--white); }
.post-article { width: min(100% - 2 * var(--gutter), 760px); margin-inline: auto; }
.post-article > h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); letter-spacing: -.04em; line-height: 1.08; margin-bottom: 1.5rem; }
.post-article .post-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg); margin-bottom: 2.5rem; }
.post-content { font-size: 1.1rem; line-height: 1.85; color: var(--text); }
.post-content > * + * { margin-top: 1.4rem; }
.post-content h2 { font-size: 1.75rem; margin-top: 3rem; letter-spacing: -.03em; }
.post-content h3 { font-size: 1.35rem; margin-top: 2.25rem; }
.post-content a { color: var(--indigo-700); text-decoration-color: var(--blue-500); text-underline-offset: 3px; }
.post-content blockquote { border-left: 3px solid var(--violet-500); padding: .5rem 0 .5rem 1.5rem; font-size: 1.25rem; color: var(--navy-900); font-weight: 500; }
.post-content img { border-radius: var(--radius-lg); margin-block: 2rem; }
.post-content pre { background: var(--navy-900); color: #e8ecf5; padding: 1.25rem; border-radius: 8px; overflow-x: auto; font-size: .9rem; }
.post-content ul, .post-content ol { padding-left: 1.4rem; }
.post-back-link { display: inline-block; margin-top: 3rem; color: var(--indigo-700); font-weight: 600; text-decoration: none; }
.post-back-link:hover { color: var(--violet-500); }

/* ---------- Legacy interior pages (solutions, methodology) ---------- */
/* These pages also load design-tokens.css; neutralize its centered gradient hero. */
.legacy-page { font-family: var(--font); }
.legacy-page .page-hero { text-align: left; }
.legacy-page .page-hero h1 { font-weight: 600; }
.legacy-page .page-hero .lead { margin-inline: 0; max-width: 60ch; opacity: 1; }
.legacy-page .page-section { padding-block: clamp(3.5rem, 7vw, 6rem); }

/* ---------- Motion ---------- */
/* Content is only hidden once JS has confirmed it can reveal it (html.js). */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js [data-reveal="fade"] { transform: none; }
  /* Image reveal: a navy curtain wipes away. (Clipping the element itself would
     stop IntersectionObserver from ever reporting it as visible.) */
  .js [data-reveal="image"] { opacity: 1; transform: none; position: relative; }
  .js [data-reveal="image"]::before {
    content: ''; position: absolute; inset: 0; z-index: 3; background: var(--navy-900);
    transform-origin: 50% 0; transition: transform 1.25s var(--ease-out); transition-delay: var(--d, 0s); pointer-events: none;
  }
  .js [data-reveal="image"].is-in::before { transform: scaleY(0); }
  .js [data-reveal="image"] img { transform: scale(1.14); transition: transform 1.8s var(--ease-out); transition-delay: var(--d, 0s); }
  .js [data-reveal="image"].is-in img { transform: scale(1); }
  .js [data-reveal="image"].is-in:hover img { transform: scale(1.04); }
  .js .process::after { transform: scaleX(0); transition: transform 2.2s var(--ease-out) .2s; }
  .js .process.is-in::after { transform: scaleX(1); }
  .js .process li { opacity: 0; transform: translate3d(0, 20px, 0); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); }
  .js .process.is-in li { opacity: 1; transform: none; }
  .js .process.is-in li:nth-child(2) { transition-delay: .25s; }
  .js .process.is-in li:nth-child(3) { transition-delay: .5s; }
  .js .process.is-in li:nth-child(4) { transition-delay: .75s; }
  .js .process.is-in li:nth-child(5) { transition-delay: 1s; }
  .js .process.is-in li:nth-child(6) { transition-delay: 1.25s; }

  /* Hero entrance */
  .js .hero-media img { animation: hero-img 2.6s var(--ease-out) both; }
  .js .hero-title .line > span { animation: line-up 1.25s var(--ease-out) both; animation-delay: calc(.25s + var(--i, 0) * .12s); }
  .js .hero [data-enter] { animation: fade-up 1.1s var(--ease-out) both; animation-delay: var(--d, .6s); }
  .js .page-hero [data-enter] { animation: fade-up 1s var(--ease-out) both; animation-delay: var(--d, .1s); }
  .js .page-hero-media img { animation: hero-img 2.2s var(--ease-out) both; }
}
@keyframes hero-img { from { opacity: 0; transform: scale(1.12); } to { opacity: 1; transform: scale(1); } }
@keyframes line-up { from { transform: translateY(105%); } to { transform: translateY(0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .scroll-cue i::after { display: none; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
