/* ==========================================================================
   Vanguard Avionics — components
   Every component reads only the semantic tokens from base.css, so dropping
   .theme-paper on any section re-tones the lot without an override here.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Icons
   -------------------------------------------------------------------------- */

.ico {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  vertical-align: middle;
}
.ico--sm { width: 1em; height: 1em; }
.ico--lg { width: 1.75em; height: 1.75em; }
.ico--xl { width: 2.5em; height: 2.5em; }

/* --------------------------------------------------------------------------
   Buttons
   The primary button is always the logo blue with white on it, on both the
   dark and paper themes — it is the one element that should never re-tone,
   because it is the closest thing on the page to the mark itself.
   -------------------------------------------------------------------------- */

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--fg-strong);
  --btn-bd: var(--rule-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  padding: 0.95rem 1.7rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
  isolation: isolate;
  transition: background var(--dur) var(--ease-out-quart),
    border-color var(--dur) var(--ease-out-quart),
    color var(--dur) var(--ease-out-quart),
    transform var(--dur) var(--ease-out-expo),
    box-shadow var(--dur) var(--ease-out-expo);
}

.btn .ico {
  width: 1.15em;
  height: 1.15em;
  transition: transform var(--dur) var(--ease-out-expo);
}

.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}
.btn:hover .ico {
  transform: translateX(3px);
}

.btn--primary {
  --btn-bg: var(--vg-600);
  --btn-fg: #fff;
  --btn-bd: var(--vg-600);
}
.btn--primary:hover {
  --btn-bg: var(--vg-500);
  --btn-bd: var(--vg-500);
  box-shadow: 0 12px 30px -10px var(--accent-glow);
}

.btn--ghost {
  --btn-bd: var(--rule-strong);
}
.btn--ghost:hover {
  --btn-bd: var(--accent);
  --btn-fg: var(--accent);
  background: var(--accent-wash);
}

.btn--solid {
  --btn-bg: var(--fg-strong);
  --btn-fg: var(--bg);
  --btn-bd: var(--fg-strong);
}
.btn--solid:hover {
  --btn-bg: var(--accent);
  --btn-bd: var(--accent);
  --btn-fg: #fff;
}

.btn--sm {
  padding: 0.65rem 1.15rem;
  font-size: 0.75rem;
}
.btn--lg {
  padding: 1.15rem 2.2rem;
  font-size: 0.875rem;
}
.btn--block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

/* The quiet text link with a rule that draws itself on hover. Used far more
   than the buttons — most of the site's forward motion runs through it. */
.alink {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  padding-block-end: 0.45em;
  position: relative;
}

.alink::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.28;
  transform-origin: left;
  transform: scaleX(1);
  transition: opacity var(--dur) var(--ease-out-quart);
}

.alink .ico {
  width: 1.15em;
  height: 1.15em;
  transition: transform var(--dur) var(--ease-out-expo);
}

.alink:hover::after {
  opacity: 1;
}
.alink:hover .ico {
  transform: translate(3px, -3px);
}
.alink--right .ico {
  margin-inline-start: auto;
}
.alink:hover .ico[data-slide="x"] {
  transform: translateX(4px);
}

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

.nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 900;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-block-end: 1px solid transparent;
  transition: background var(--dur) var(--ease-out-quart),
    border-color var(--dur) var(--ease-out-quart),
    backdrop-filter var(--dur) var(--ease-out-quart);
}

/* Solid by default (interior pages); .nav--over lets the hero show through
   until the page is scrolled. */
.nav,
.nav.is-stuck {
  background: rgba(5, 8, 15, 0.82);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-block-end-color: var(--rule);
}

.nav--over:not(.is-stuck) {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-block-end-color: transparent;
}

/* A thin reading-progress line along the bottom edge of the nav. Purely
   ambient — it is the kind of live, responsive detail that separates a site
   someone tuned from one that was only laid out. */
.nav__progress {
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(var(--scroll, 0));
  transform-origin: left center;
  background: linear-gradient(90deg, var(--vg-400), var(--vg-200));
  opacity: 0.85;
  will-change: transform;
}

.nav__inner {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
  display: flex;
  align-items: center;
  gap: var(--s-5);
}

/* --- the brand lockup: mark + two-line wordmark ------------------------- */
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: none;
}

.brand__mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(0, 53, 167, 0.55));
}

.brand__type {
  display: grid;
  gap: 2px;
  line-height: 1;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  color: var(--vg-300);
  text-indent: 0.42em; /* optical: cancels the trailing letterspace */
}

/* The wordmark used to hide below 400px on the assumption there was no room
   for it. There is — at the narrowest supported width (320px) there is still
   about 190px between the mark and the menu toggle, nearly double what the
   wordmark needs — so a phone header was shipping with just an unlabeled
   icon. It stays visible at every width now; only its size steps down. */
@media (max-width: 360px) {
  .brand__name { font-size: 0.8rem; }
  .brand__sub { font-size: 0.4375rem; letter-spacing: 0.36em; }
}

/* --- desktop menu -------------------------------------------------------- */
.nav__menu {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-inline-start: auto;
}

.nav__item {
  position: relative;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(242, 246, 253, 0.72);
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast) var(--ease-out-quart);
}

.nav__link .ico {
  width: 0.85em;
  height: 0.85em;
  opacity: 0.6;
  transition: transform var(--dur) var(--ease-out-quart);
}

.nav__link:hover,
.nav__item:focus-within .nav__link {
  color: #fff;
}

.nav__link[aria-current="page"] {
  color: #fff;
}

.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.15rem;
  height: 2px;
  background: var(--vg-400);
  border-radius: 2px;
}

/* --- dropdown ------------------------------------------------------------ */
.nav__panel {
  position: absolute;
  inset-block-start: calc(100% + 0.6rem);
  inset-inline-start: 50%;
  translate: -50% 0;
  min-width: 320px;
  padding: 0.5rem;
  background: rgba(10, 16, 32, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--dur) var(--ease-out-quart),
    transform var(--dur) var(--ease-out-expo), visibility var(--dur);
}

.nav__item:hover > .nav__panel,
.nav__item:focus-within > .nav__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__item:hover > .nav__link .ico,
.nav__item:focus-within > .nav__link .ico {
  transform: rotate(180deg);
}

.nav__panel-link {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) var(--ease-out-quart);
}

.nav__panel-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav__panel-link .ico {
  color: var(--vg-300);
  width: 1.1rem;
  height: 1.1rem;
}

.nav__panel-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
}

.nav__panel-desc {
  grid-column: 2;
  font-size: 0.75rem;
  color: var(--ink-400);
  line-height: 1.4;
}

.nav__actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-inline-start: 0.6rem;
}

/* The link-list copies of "Team login" and "Contact us" exist only for the
   mobile drawer — the desktop row already has both as proper buttons in
   .nav__actions, so showing these too would duplicate the same destinations
   in the same row. */
.nav__item--login,
.nav__item--cta {
  display: none;
}

/* --- mobile -------------------------------------------------------------- */
.nav__toggle {
  display: none;
  margin-inline-start: auto;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
}

@media (max-width: 1024px) {
  .nav__toggle { display: inline-flex; }
  .nav__menu,
  .nav__actions { display: none; }

  .nav__menu.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: fixed;
    inset: var(--nav-h) 0 0;
    margin: 0;
    padding: var(--s-5) var(--page-gutter) var(--s-8);
    /* Opaque, and deliberately no backdrop-filter. The panel is a full-screen
       position:fixed layer, and a blur on one of those is the same class of
       WebKit compositing bug that the grain overlay hit earlier in this build
       — it can leave the drawer painting blank on mobile Safari. At 0.98 alpha
       the blur was invisible anyway. */
    background: rgb(5, 8, 15);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-block-start: 1px solid var(--rule);
  }

  .nav__menu.is-open .nav__item {
    border-block-end: 1px solid var(--rule);
  }

  .nav__menu.is-open .nav__link {
    padding: 1.1rem 0;
    font-size: 1.15rem;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
    width: 100%;
    justify-content: space-between;
  }

  .nav__menu.is-open .nav__link[aria-current="page"]::after { display: none; }

  .nav__menu.is-open .nav__panel {
    position: static;
    translate: none;
    transform: none;
    opacity: 1;
    visibility: visible;
    min-width: 0;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0 0 var(--s-4) 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: none;
  }

  .nav__item.is-expanded .nav__panel { display: block; }
  .nav__item.is-expanded .nav__link .ico { transform: rotate(180deg); }

  /* Staggered entrance for the drawer items.

     Deliberately a transition out of .is-opening rather than an animation
     with `backwards` fill. Fill-mode pins the item at opacity 0 for the whole
     delay, so anything that stops the animation from starting leaves the
     drawer permanently blank — a catastrophic failure in exchange for a
     decorative stagger. Here the resting state is visible; site.js adds
     .is-opening for one frame and the items transition in from it. No JS, no
     transitions, or reduced motion all land on "visible", never "blank". */
  @media (prefers-reduced-motion: no-preference) {
    .nav__menu.is-open .nav__item {
      transition: opacity 460ms var(--ease-out-expo),
        transform 460ms var(--ease-out-expo);
      transition-delay: calc(var(--i, 0) * 45ms + 60ms);
    }

    .nav__menu.is-opening .nav__item {
      opacity: 0;
      transform: translateY(14px);
    }
  }

  /* Team login and Contact us close the drawer as a pair of real buttons —
     stacked page links above a rule, then the two actions below it — rather
     than reading as two more items in the same list. */
  .nav__menu.is-open .nav__item--login,
  .nav__menu.is-open .nav__item--cta {
    display: block;
    border-block-end: 0;
    margin-block-start: var(--s-2);
  }

  .nav__menu.is-open .nav__item--login {
    margin-block-start: var(--s-6);
    padding-block-start: var(--s-5);
    border-block-start: 1px solid var(--rule);
  }

  .nav__menu.is-open .nav__link--login,
  .nav__menu.is-open .nav__link--cta {
    width: 100%;
    justify-content: center;
    padding: 0.95rem 1.5rem;
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
  }

  .nav__menu.is-open .nav__link--login {
    border: 1px solid var(--rule-strong);
    color: #fff;
  }

  .nav__menu.is-open .nav__link--cta {
    background: var(--vg-600);
    border: 1px solid var(--vg-600);
    color: #fff;
  }

  .nav__menu.is-open .nav__link--cta .ico {
    opacity: 1;
    margin-inline-start: 0.3em;
  }
}

body.nav-open {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Page header (interior pages)
   -------------------------------------------------------------------------- */

.page-head {
  position: relative;
  color: var(--fg);
  padding-block: calc(var(--nav-h) + var(--s-9)) var(--s-8);
  background: var(--bg-sunken);
  overflow: hidden;
  border-block-end: 1px solid var(--rule);
}

/* The image previously sat at 22% opacity under a gradient that ran to 94%
   black — the two together left it effectively invisible, just a faint grain.
   It now reads as a real photograph: full strength at the top-right, easing
   into the ground colour toward the bottom-left where the title and intro
   sit, so text contrast is untouched but the picture is actually there. */
.page-head__bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.85;
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.06);
  animation: bg-settle 1400ms var(--ease-out-expo) both;
}

@keyframes bg-settle {
  from { transform: scale(1.14); filter: saturate(1.08) contrast(1.04) brightness(0.9); }
  to { transform: scale(1.06); filter: saturate(1.08) contrast(1.04) brightness(1); }
}

.page-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(4, 7, 14, 0.96) 0%, rgba(4, 7, 14, 0.82) 26%, rgba(4, 7, 14, 0.38) 52%, rgba(4, 7, 14, 0.2) 72%, rgba(4, 7, 14, 0.55) 100%),
    linear-gradient(0deg, rgba(3, 5, 9, 0.97) 0%, rgba(3, 5, 9, 0.35) 42%, transparent 62%),
    radial-gradient(60% 90% at 8% 100%, rgba(0, 53, 167, 0.55), transparent 65%);
}

@media (prefers-reduced-motion: reduce) {
  .page-head__bg { animation: none; transform: none; }
}

.page-head > .wrap {
  position: relative;
  z-index: 2;
}

.page-head__title {
  font-size: var(--t-title);
  max-width: 16ch;
}

.page-head__intro {
  max-width: 56ch;
  margin-block-start: var(--s-5);
  font-size: var(--t-lead);
  color: var(--ink-200);
}

/* --- breadcrumb ---------------------------------------------------------- */
.crumbs {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-block-end: var(--s-5);
}

.crumbs a:hover {
  color: var(--accent);
}
.crumbs .ico {
  width: 0.85em;
  height: 0.85em;
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   Cards
   The cursor-tracked wash is driven by --mx/--my set in motion.js. It is
   deliberately very low contrast — you notice it as material, not as a glow.
   -------------------------------------------------------------------------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-6);
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease-out-quart),
    background var(--dur) var(--ease-out-quart),
    transform var(--dur-slow) var(--ease-out-expo),
    box-shadow var(--dur-slow) var(--ease-out-expo);
}

.card::before,
.prog::before,
.post::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    260px circle at var(--mx, 50%) var(--my, 0%),
    var(--accent-wash),
    transparent 70%
  );
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out-quart);
  pointer-events: none;
}

.card:hover {
  border-color: var(--rule-accent);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* .prog and .post keep their own hover rules further down (different lift
   distances, no background swap) — this only turns the shared cursor wash
   on, the same way :hover can trigger declarations from more than one rule
   without them needing to be merged into one. */
.card:hover::before,
.prog:hover::before,
.post:hover::before {
  opacity: 1;
}


.card__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent-wash);
  border: 1px solid var(--rule-accent);
  color: var(--accent);
  margin-block-end: var(--s-2);
}

.card__icon .ico { width: 22px; height: 22px; }

.card__title {
  font-size: var(--t-h4);
}

.card__body {
  color: var(--fg-muted);
  font-size: var(--t-sm);
  line-height: 1.62;
}

.card__foot {
  margin-block-start: auto;
  padding-block-start: var(--s-4);
}

/* Whole-card link: the anchor covers the card but text stays selectable. */
.card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* --- numbered card (services, process) ----------------------------------- */
.card--numbered {
  padding-block-start: var(--s-7);
}

.card__num {
  position: absolute;
  inset-block-start: var(--s-5);
  inset-inline-end: var(--s-5);
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.16em;
  color: var(--fg-subtle);
}

/* --------------------------------------------------------------------------
   Program cards (Projects index)
   -------------------------------------------------------------------------- */

.prog {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease-out-quart),
    transform var(--dur-slow) var(--ease-out-expo),
    box-shadow var(--dur-slow) var(--ease-out-expo);
}

.prog:hover {
  border-color: var(--rule-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.prog__art {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink-900);
}

.prog__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease-out-expo), filter var(--dur-slow) var(--ease-out-quart);
  filter: saturate(0.7) contrast(1.05) brightness(0.85);
}

.prog:hover .prog__art img {
  transform: scale(1.045);
  filter: saturate(1) contrast(1.05) brightness(0.95);
}

.prog__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 22, 116, 0.15) 0%, rgba(5, 8, 15, 0.85) 100%);
}

.prog__code {
  position: absolute;
  z-index: 2;
  inset-block-start: var(--s-4);
  inset-inline-start: var(--s-4);
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--vg-200);
  background: rgba(0, 22, 116, 0.55);
  border: 1px solid rgba(110, 155, 255, 0.3);
  padding: 0.35rem 0.6rem;
  border-radius: 3px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.prog__body {
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.prog__title {
  font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem);
  letter-spacing: -0.03em;
}

.prog__desc {
  color: var(--fg-muted);
  font-size: var(--t-sm);
}

.prog__foot {
  margin-block-start: auto;
  padding-block-start: var(--s-4);
}

/* --------------------------------------------------------------------------
   Editorial cards (stories / blog / testimonials)
   -------------------------------------------------------------------------- */

.post {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease-out-quart),
    transform var(--dur-slow) var(--ease-out-expo),
    box-shadow var(--dur-slow) var(--ease-out-expo);
}

.post:hover {
  border-color: var(--rule-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.post__art {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--ink-900);
}

.post__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease-out-expo);
}

.post:hover .post__art img {
  transform: scale(1.05);
}

.post__body {
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  flex: 1;
}

.post__meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

.post__cat {
  color: var(--accent);
}

.post__meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

.post__title {
  font-size: var(--t-h4);
  line-height: 1.25;
}

.post:hover .post__title {
  color: var(--accent);
}

.post__excerpt {
  color: var(--fg-muted);
  font-size: var(--t-sm);
}

.post__foot {
  margin-block-start: auto;
  padding-block-start: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

/* --- featured (first item on a hub) -------------------------------------- */
.post--feature {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: stretch;
}

.post--feature .post__art {
  aspect-ratio: auto;
  min-height: 380px;
}

.post--feature .post__body {
  padding: var(--s-7);
  justify-content: center;
  gap: var(--s-4);
}

.post--feature .post__title {
  font-size: var(--t-h2);
  line-height: 1.08;
}

.post--feature .post__excerpt {
  font-size: var(--t-lead);
}

@media (max-width: 860px) {
  .post--feature {
    grid-template-columns: 1fr;
  }
  .post--feature .post__art {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
  .post--feature .post__body {
    padding: var(--s-5);
  }
}

/* --------------------------------------------------------------------------
   Filterable cards
   [data-cat] covers both the .post cards (Stories, Blog) and the
   .quote--card testimonials — one fade treatment for whichever is filtering.
   The class is added/removed by site.js around the moment `hidden` actually
   flips, so a card visibly settles out rather than vanishing between one
   frame and the next.
   -------------------------------------------------------------------------- */

[data-cat] {
  transition: opacity 260ms var(--ease-out-quart), transform 260ms var(--ease-out-quart);
}

[data-cat].is-filtering {
  opacity: 0;
  transform: translateY(10px) scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
  [data-cat] {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Filter chips
   -------------------------------------------------------------------------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.55rem 1rem;
  font-family: var(--font-mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--dur) var(--ease-out-quart);
}

.chip:hover {
  color: var(--fg-strong);
  border-color: var(--rule-strong);
}

.chip[aria-pressed="true"] {
  color: #fff;
  background: var(--vg-600);
  border-color: var(--vg-600);
}

.chip__count {
  opacity: 0.6;
  font-size: 0.9em;
}

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */

.stat {
  display: grid;
  gap: var(--s-2);
  padding-block: var(--s-4);
  border-block-start: 1px solid var(--rule);
}

.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 1.8rem + 3vw, 4.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--fg-strong);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 0.06em;
}

.stat__suffix {
  font-size: 0.45em;
  color: var(--accent);
  font-weight: 600;
}

.stat__label {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Spec table — a datasheet, not a table of contents.
   Dotted leaders tie the key to its value across the gap.
   -------------------------------------------------------------------------- */

.spec {
  width: 100%;
  font-variant-numeric: tabular-nums;
}

.spec caption {
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  padding-block-end: var(--s-4);
  border-block-end: 1px solid var(--rule-accent);
  margin-block-end: var(--s-2);
}

.spec tr {
  border-block-end: 1px solid var(--rule);
}

.spec tr:last-child {
  border-block-end: 0;
}

.spec th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--fg-subtle);
  padding: 0.85rem 0;
  width: 46%;
  vertical-align: baseline;
  position: relative;
}

.spec th span {
  background: var(--bg);
  padding-inline-end: 0.5em;
  position: relative;
  z-index: 1;
}

/* the leader */
.spec th::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0.75rem;
  bottom: 0.95rem;
  border-block-end: 1px dotted var(--rule-strong);
  opacity: 0.55;
}

.spec td {
  text-align: right;
  padding: 0.85rem 0;
  font-size: var(--t-sm);
  color: var(--fg);
  vertical-align: baseline;
}

.spec .unit {
  color: var(--fg-subtle);
  font-family: var(--font-mono);
  font-size: 0.82em;
  margin-inline-start: 0.35em;
}

/* --------------------------------------------------------------------------
   Standards band
   The scrolling strip needs a label. Acronyms sliding past with no heading
   read as decoration, and the visitor cannot tell certifications from clients.
   -------------------------------------------------------------------------- */

.certs {
  display: grid;
  gap: var(--s-4);
}

.certs__head {
  display: flex;
  align-items: baseline;
  gap: var(--s-4) var(--s-5);
  flex-wrap: wrap;
  padding-block-end: var(--s-4);
  border-block-end: 1px solid var(--rule);
}

.certs__note {
  font-size: var(--t-sm);
  color: var(--fg-muted);
  margin: 0;
}

@media (max-width: 720px) {
  .certs__head {
    gap: var(--s-2);
  }
  .certs__note {
    font-size: var(--t-xs);
  }
}

/* On a narrow screen the two-column datasheet cannot hold a value like
   "ASTERIX CAT 001/002/021/034/048/062" without pushing the page wide, so each
   row stacks: key above, value below, and the dotted leader retires. */
@media (max-width: 560px) {
  .spec,
  .spec tbody,
  .spec tr,
  .spec th,
  .spec td {
    display: block;
    width: auto;
  }

  .spec tr {
    padding-block: 0.8rem;
  }

  .spec th {
    padding: 0 0 0.2rem;
  }

  .spec th::after {
    display: none;
  }

  .spec th span {
    background: none;
    padding-inline-end: 0;
  }

  .spec td {
    text-align: left;
    padding: 0;
  }
}

/* --------------------------------------------------------------------------
   Marquee — certifications
   -------------------------------------------------------------------------- */

.marquee {
  --speed: 46s;
  position: relative;
  overflow: hidden;
  padding-block: var(--s-4);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee var(--speed) linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__group {
  display: flex;
  align-items: center;
  gap: var(--s-7);
  padding-inline-end: var(--s-7);
  flex: none;
}

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  white-space: nowrap;
}

.marquee__item .ico {
  color: var(--accent);
  opacity: 0.75;
  width: 1.1em;
  height: 1.1em;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  .marquee { mask-image: none; -webkit-mask-image: none; }
  .marquee__track { flex-wrap: wrap; width: 100%; justify-content: center; }
}

/* --------------------------------------------------------------------------
   Pull quote
   -------------------------------------------------------------------------- */

.quote {
  display: grid;
  gap: var(--s-5);
  padding-inline-start: var(--s-6);
  border-inline-start: 2px solid var(--accent);
}

.quote__text {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.05rem + 1.3vw, 2rem);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.022em;
  color: var(--fg-strong);
  text-wrap: pretty;
  /* hanging opening quote */
  text-indent: -0.42em;
}

.quote__who {
  display: flex;
  align-items: center;
  gap: var(--s-4);
}

.quote__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--rule-strong);
  flex: none;
}

.quote__name {
  font-weight: 600;
  color: var(--fg-strong);
  font-size: var(--t-sm);
}

.quote__role {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  line-height: 1.5;
}

/* Monogram stands in for a portrait on customer quotations. We do not have
   photographs of other companies' engineers, and using a stock face — or worse,
   one of our own staff photos — would be a small lie on a page about trust. */
.mono-avatar {
  width: 48px;
  height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-wash);
  border: 1px solid var(--rule-accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

/* Testimonial card variant */
.quote--card {
  padding: var(--s-6);
  border-inline-start: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg-card);
  position: relative;
  height: 100%;
}

.quote--card .quote__mark {
  color: var(--accent);
  opacity: 0.22;
  width: 40px;
  height: 40px;
}

.quote--card .quote__text {
  font-size: var(--t-h4);
  font-weight: 500;
  line-height: 1.5;
  text-indent: 0;
  font-family: var(--font-body);
  letter-spacing: -0.005em;
}

.quote--card .quote__who {
  margin-block-start: auto;
  padding-block-start: var(--s-4);
  border-block-start: 1px solid var(--rule);
}

/* --------------------------------------------------------------------------
   Figure + credit line
   -------------------------------------------------------------------------- */

.figure {
  display: grid;
  gap: var(--s-3);
}

.figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
}

.figure figcaption {
  font-size: var(--t-xs);
  color: var(--fg-subtle);
  line-height: 1.5;
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}

.figure figcaption .credit {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
  flex: none;
}

/* --------------------------------------------------------------------------
   Annotated diagram — numbered hotspots over line art
   -------------------------------------------------------------------------- */

.diagram {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--s-7);
  align-items: center;
}

.diagram__stage {
  position: relative;
}

/* The canvas is what the hotspots are positioned against, so it — not the
   stage — is the element that keeps a minimum width when the stage scrolls. */
.diagram__canvas {
  position: relative;
  width: 100%;
}

.diagram__art {
  width: 100%;
  height: auto;
}

.diagram__hint {
  display: none;
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-block-start: var(--s-3);
}

.hotspot {
  position: absolute;
  translate: -50% -50%;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(5, 8, 15, 0.8);
  border: 1px solid var(--rule-accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur) var(--ease-out-expo);
  z-index: 2;
}

.hotspot::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid var(--rule-accent);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out-quart), scale var(--dur) var(--ease-out-quart);
  scale: 0.7;
}

.hotspot:hover,
.hotspot[aria-selected="true"] {
  background: var(--vg-600);
  border-color: var(--vg-400);
  color: #fff;
  scale: 1.12;
}

.hotspot:hover::before,
.hotspot[aria-selected="true"]::before {
  opacity: 1;
  scale: 1;
}

.diagram__readout {
  display: grid;
  gap: var(--s-4);
  border-inline-start: 1px solid var(--rule);
  padding-inline-start: var(--s-6);
  min-height: 220px;
  align-content: center;
}

.diagram__readout h3 {
  font-size: var(--t-h3);
}

@media (max-width: 900px) {
  .diagram {
    grid-template-columns: 1fr;
    gap: var(--s-6);
  }
  .diagram__readout {
    border-inline-start: 0;
    border-block-start: 1px solid var(--rule);
    padding-inline-start: 0;
    padding-block-start: var(--s-5);
    min-height: 0;
  }
}

/* Below this the 1000-unit drawing would render its labels at about 6px.
   It scrolls sideways instead, keeping the type legible. */
@media (max-width: 780px) {
  .diagram__stage {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    padding-block-end: var(--s-2);
  }
  .diagram__canvas {
    min-width: 660px;
  }
  .diagram__hint {
    display: block;
  }
}

/* 30px is under the comfortable minimum for a finger. */
@media (pointer: coarse), (max-width: 780px) {
  .hotspot {
    width: 38px;
    height: 38px;
    font-size: 0.75rem;
  }
}

/* --------------------------------------------------------------------------
   Timeline / mission profile
   -------------------------------------------------------------------------- */

.phases {
  display: grid;
  gap: 0;
  counter-reset: phase;
}

.phase {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: var(--s-6);
  padding-block: var(--s-6);
  border-block-start: 1px solid var(--rule);
  position: relative;
}

.phase:last-child {
  border-block-end: 1px solid var(--rule);
}

.phase__t {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  padding-block-start: 0.4rem;
  font-variant-numeric: tabular-nums;
}

.phase__title {
  font-size: var(--t-h4);
  margin-block-end: var(--s-2);
}

.phase__body {
  color: var(--fg-muted);
  max-width: 62ch;
  font-size: var(--t-sm);
}

@media (max-width: 720px) {
  .phase {
    grid-template-columns: 1fr;
    gap: var(--s-3);
  }
}

/* --------------------------------------------------------------------------
   Feature rows (alternating editorial spreads)
   -------------------------------------------------------------------------- */

.feature {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-6) var(--s-5);
  align-items: center;
}

/* Long-hand, for the same reason as the main grid: the shorthand also writes
   grid-column-start, so the responsive reset below was only half-applying and
   the copy column ended up auto-placed one column in — which pushed it off the
   right edge of the page on a phone. */
.feature__media {
  grid-column-start: auto;
  grid-column-end: span 7;
}
.feature__copy {
  grid-column-start: auto;
  grid-column-end: span 5;
}

.feature--flip .feature__media {
  grid-column-start: 6;
  grid-column-end: span 7;
  grid-row: 1;
}
.feature--flip .feature__copy {
  grid-column-start: 1;
  grid-column-end: span 5;
  grid-row: 1;
}

@media (max-width: 900px) {
  .feature {
    gap: var(--s-5);
  }
  .feature__media,
  .feature__copy,
  .feature--flip .feature__media,
  .feature--flip .feature__copy {
    grid-column-start: 1;
    grid-column-end: span 12;
    grid-row: auto;
  }
  /* Image above the copy, whichever way round the row is on desktop. */
  .feature--flip .feature__media { order: -1; }
}

/* --------------------------------------------------------------------------
   Long-form article
   -------------------------------------------------------------------------- */

.prose {
  max-width: var(--measure);
  font-size: 1.0625rem;
  line-height: 1.78;
  color: var(--fg);
}

.prose > * + * {
  margin-block-start: 1.4em;
}

.prose h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem);
  margin-block-start: 2.2em;
  margin-block-end: -0.4em;
}

.prose h3 {
  font-size: var(--t-h4);
  margin-block-start: 1.9em;
  margin-block-end: -0.5em;
}

.prose strong {
  color: var(--fg-strong);
  font-weight: 600;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule-accent);
}

.prose a:hover {
  text-decoration-color: currentColor;
}

.prose ul,
.prose ol {
  display: grid;
  gap: 0.7em;
  padding-inline-start: 1.3em;
}

.prose ul li {
  list-style: none;
  position: relative;
}

.prose ul li::before {
  content: "";
  position: absolute;
  inset-inline-start: -1.15em;
  inset-block-start: 0.72em;
  width: 6px;
  height: 1px;
  background: var(--accent);
}

.prose ol {
  list-style: decimal;
}
.prose ol li::marker {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--accent);
}

.prose blockquote {
  border-inline-start: 2px solid var(--accent);
  padding-inline-start: var(--s-5);
  margin-block: 2em;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1rem + 0.9vw, 1.6rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--fg-strong);
}

.prose blockquote cite {
  display: block;
  margin-block-start: 0.8em;
  font-family: var(--font-mono);
  font-size: var(--t-label);
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

.prose figure {
  margin-block: 2.2em;
}

/* The standfirst: one size up, no indent, sets the tone of the piece. */
.standfirst {
  font-size: var(--t-lead);
  line-height: 1.62;
  color: var(--fg-muted);
  max-width: var(--measure);
}

/* Margin note — sits in the gutter on wide screens, inline on narrow. */
.note {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  line-height: 1.6;
  color: var(--fg-subtle);
  border-inline-start: 1px solid var(--rule-accent);
  padding-inline-start: var(--s-4);
}

@media (min-width: 1180px) {
  .prose .note {
    float: inline-end;
    width: 220px;
    margin-inline-end: -290px;
    margin-block: 0.4em 1.4em;
  }
}

.dateline {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

.dateline .sep {
  opacity: 0.4;
}
.dateline .cat {
  color: var(--accent);
}

/* --- share row ----------------------------------------------------------- */
.share {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.share__btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
  transition: all var(--dur) var(--ease-out-quart);
}

.share__btn:hover {
  color: var(--accent);
  border-color: var(--rule-accent);
  background: var(--accent-wash);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.field {
  display: grid;
  gap: 0.5rem;
}

.field__label {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

.field__label .req {
  color: var(--accent);
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 0.9rem 1.05rem;
  background: var(--bg-inset);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-size: var(--t-sm);
  transition: border-color var(--dur-fast) var(--ease-out-quart),
    box-shadow var(--dur-fast) var(--ease-out-quart),
    background var(--dur-fast) var(--ease-out-quart);
}

.textarea {
  min-height: 160px;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--fg-subtle);
  opacity: 0.7;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
  background: transparent;
}

.field__error {
  font-size: var(--t-xs);
  color: #ff8080;
}

.theme-paper .field__error,
body.paper .field__error {
  color: #c2261a;
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"] {
  border-color: #ff8080;
}

.honey {
  position: absolute !important;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

.form-status {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: var(--t-sm);
  border: 1px solid var(--rule);
}

.form-status[data-state="ok"] {
  border-color: rgba(110, 155, 255, 0.4);
  background: var(--accent-wash);
  color: var(--fg-strong);
}

.form-status[data-state="err"] {
  border-color: rgba(255, 128, 128, 0.45);
  background: rgba(255, 80, 80, 0.08);
  color: #ffb3b3;
}

.theme-paper .form-status[data-state="err"],
body.paper .form-status[data-state="err"] {
  color: #a81f14;
}

/* --------------------------------------------------------------------------
   Contact page
   -------------------------------------------------------------------------- */

/* The form sits on its own surface so it reads as the primary action on the
   page rather than as one more column of text. */
.form-card {
  padding: var(--s-6);
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
}

.form-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  padding-block-start: var(--s-5);
  border-block-start: 1px solid var(--rule);
}

@media (max-width: 720px) {
  .form-card {
    padding: var(--s-5) var(--s-4);
  }
  .form-card__foot .btn {
    width: 100%;
  }
  .form-card__foot {
    justify-content: center;
  }
}

/* The three things worth including in a first email. */
.brief {
  counter-reset: brief;
  display: grid;
  gap: var(--s-4);
  margin-block-start: var(--s-4);
}

.brief li {
  counter-increment: brief;
  position: relative;
  padding-inline-start: 2.1rem;
  font-size: var(--t-sm);
  line-height: 1.6;
  color: var(--fg-muted);
}

.brief li::before {
  content: counter(brief, decimal-leading-zero);
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0.1em;
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.1em;
  color: var(--accent);
}

.brief strong {
  color: var(--fg-strong);
  font-weight: 600;
}

/* Site list — a plain two-up register rather than ten cramped tiles. */
.sites {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0;
  border-block-start: 1px solid var(--rule);
}

.sites__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  padding-block: 0.85rem;
  border-block-end: 1px solid var(--rule);
}

/* Vertical hairline between the columns, without a border on the last one. */
@media (min-width: 721px) {
  .sites {
    column-gap: var(--s-7);
  }
}

.sites__city {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--t-sm);
  color: var(--fg-strong);
}

.sites__role {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  text-align: right;
}

@media (max-width: 480px) {
  .sites__item {
    flex-direction: column;
    gap: 0.2rem;
  }
  .sites__role {
    text-align: left;
  }
}

/* --------------------------------------------------------------------------
   Contact / info tiles
   -------------------------------------------------------------------------- */

.tile {
  display: grid;
  gap: var(--s-2);
  padding: var(--s-5);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.tile .ico {
  color: var(--accent);
  width: 20px;
  height: 20px;
  margin-block-end: var(--s-2);
}

.tile__k {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

.tile__v {
  font-size: var(--t-sm);
  color: var(--fg-strong);
  line-height: 1.55;
  /* holds an email address at 375px */
  overflow-wrap: anywhere;
}

.tile__note {
  font-size: var(--t-xs);
  color: var(--fg-subtle);
  line-height: 1.5;
  margin-block-start: var(--s-2);
  padding-block-start: var(--s-3);
  border-block-start: 1px solid var(--rule);
}

/* --------------------------------------------------------------------------
   People
   -------------------------------------------------------------------------- */

.person {
  display: grid;
  gap: var(--s-4);
}

.person__photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  background: var(--ink-900);
}

.person__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06) brightness(0.95);
  transition: filter var(--dur-slow) var(--ease-out-quart),
    transform 900ms var(--ease-out-expo);
}

.person:hover .person__photo img {
  filter: grayscale(0) contrast(1.02);
  transform: scale(1.03);
}

.person__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 22, 116, 0.35) 100%);
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-out-quart);
}

.person:hover .person__photo::after {
  opacity: 1;
}

.person__name {
  font-size: var(--t-h4);
}

.person__role {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.person__bio {
  font-size: var(--t-sm);
  color: var(--fg-muted);
}

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */

.cta {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(90% 140% at 12% 0%, rgba(0, 53, 167, 0.55), transparent 62%),
    radial-gradient(70% 120% at 100% 100%, rgba(0, 22, 116, 0.8), transparent 60%),
    var(--ink-900);
  border-block: 1px solid var(--rule);
}

.cta__grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(110, 155, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 155, 255, 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(80% 80% at 50% 50%, #000, transparent);
  -webkit-mask-image: radial-gradient(80% 80% at 50% 50%, #000, transparent);
  pointer-events: none;
  animation: cta-drift 34s linear infinite;
}

@keyframes cta-drift {
  to { background-position: 72px 144px; }
}

@media (prefers-reduced-motion: reduce) {
  .cta__grid { animation: none; }
}

.cta > .wrap {
  position: relative;
  z-index: 2;
}

.cta h2 {
  max-width: 18ch;
}

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

.footer {
  background: var(--bg-sunken);
  border-block-start: 1px solid var(--rule);
  padding-block: var(--s-9) var(--s-5);
  color: var(--ink-300);
}

.footer__top {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr) 1.3fr;
  gap: var(--s-7) var(--s-5);
  padding-block-end: var(--s-8);
  border-block-end: 1px solid var(--rule);
}

@media (max-width: 1024px) {
  .footer__top {
    grid-template-columns: 1fr 1fr;
  }
  .footer__brandcol,
  .footer__sub {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .footer__top {
    grid-template-columns: 1fr;
  }
  .footer__brandcol,
  .footer__sub {
    grid-column: span 1;
  }
}

.footer__blurb {
  font-size: var(--t-sm);
  color: var(--ink-400);
  max-width: 34ch;
  margin-block-start: var(--s-4);
}

.footer__title {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-200);
  margin-block-end: var(--s-4);
}

.footer__links {
  display: grid;
  gap: 0.7rem;
}

.footer__links a {
  font-size: var(--t-sm);
  color: var(--ink-400);
  transition: color var(--dur-fast) var(--ease-out-quart);
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.footer__links a:hover {
  color: var(--vg-300);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
  padding-block-start: var(--s-5);
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-400); /* --ink-500 was 2.85:1 on the footer ground */
}

.footer__legal {
  display: flex;
  gap: var(--s-4);
  flex-wrap: wrap;
}

.footer__legal a:hover {
  color: var(--vg-300);
}

.social {
  display: flex;
  gap: 0.5rem;
}

.social a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  color: var(--ink-300);
  transition: all var(--dur) var(--ease-out-quart);
}

.social a:hover {
  color: #fff;
  background: var(--vg-600);
  border-color: var(--vg-600);
  transform: translateY(-2px);
}

.social .ico {
  width: 17px;
  height: 17px;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
}

.pager a,
.pager span {
  min-width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
  transition: all var(--dur) var(--ease-out-quart);
  padding-inline: 0.6rem;
}

.pager a:hover {
  border-color: var(--rule-accent);
  color: var(--accent);
}

.pager [aria-current="page"] {
  background: var(--vg-600);
  border-color: var(--vg-600);
  color: #fff;
}

.pager .is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Reveal-on-scroll (driven by motion.js)
   -------------------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 780ms var(--ease-out-quart),
    transform 780ms var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

[data-reveal="fade"] {
  transform: none;
}
[data-reveal="left"] {
  transform: translateX(-26px);
}
[data-reveal="right"] {
  transform: translateX(26px);
}
[data-reveal="scale"] {
  transform: scale(0.965);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* If JS never runs, nothing should stay invisible. */
.no-js [data-reveal] {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Card tilt-on-hover
   Deliberately last in the file, and the pseudo-class is doubled to win on
   specificity too (0,0,2,1 vs the 0,0,1,1 of .card:hover/.prog:hover/
   .post:hover above) — belt and braces so a future edit earlier in this
   file can't silently cancel it out again the way an earlier draft of this
   rule did against .prog's and .post's own, later, hover declarations.
   -------------------------------------------------------------------------- */

@media (hover: hover) and (pointer: fine) {
  .card,
  .prog,
  .post {
    transform: perspective(900px) rotateX(0) rotateY(0) translateY(0);
    transition: border-color var(--dur) var(--ease-out-quart),
      background var(--dur) var(--ease-out-quart),
      box-shadow var(--dur-slow) var(--ease-out-expo),
      transform 420ms var(--ease-out-quart);
  }

  .card:hover:hover,
  .prog:hover:hover,
  .post:hover:hover {
    transform: perspective(900px)
      rotateX(calc(var(--tilty, 0) * -6deg))
      rotateY(calc(var(--tiltx, 0) * 6deg))
      translateY(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .prog,
  .post {
    transform: none !important;
  }
}
