/* ==========================================================================
   Medjay: tokens, base, components, pages, responsive
   ========================================================================== */

[hidden] { display: none !important; }

:root {
  color-scheme: dark;

  /* Primitives: raw values. Components should not use these directly. */
  --ink-950: #0b0c0e;
  --ink-900: #111317;
  --ink-800: #16191e;
  --ink-700: #1a1e24;
  --bone-100: #efeae0;
  --bone-400: #a9a499;
  --sand-300: #f0cf96;
  --sand-400: #d9a95b;
  --sand-ink: #17120a;
  --coral-400: #f2846a;
  --gold-300: #e6bb52;
  --teal-300: #72c7bb;

  /* Semantic tokens: what each colour is for. */
  --bg: var(--ink-950);
  --bg-raised: var(--ink-900);
  --surface: var(--ink-800);
  --surface-hover: var(--ink-700);
  --line: rgba(239, 234, 224, 0.13);
  --line-strong: rgba(239, 234, 224, 0.26);
  --heading: var(--bone-100);
  --text: var(--bone-100);
  --muted: var(--bone-400);
  --caption: var(--bone-400);
  --emphasis: var(--sand-400);
  --emphasis-hover: var(--sand-300);
  --on-accent: var(--sand-ink);
  --accent: var(--sand-400);
  --accent-bright: var(--sand-300);
  --accent-soft: rgba(217, 169, 91, 0.13);
  --accent-faint: rgba(217, 169, 91, 0.05);
  --grid-line: rgba(239, 234, 224, 0.045);
  --high: var(--coral-400);
  --medium: var(--gold-300);
  --watch: var(--teal-300);
  --error: var(--coral-400);

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --gutter: clamp(20px, 5vw, 56px);
  --section: clamp(56px, 7.5vw, 108px);
  --header-height: 104px;
  --measure: 68ch;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 500ms;

  --z-header: 50;
  --z-skip: 100;
}

@view-transition {
  navigation: auto;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

main {
  flex: 1;
}

body.menu-open {
  overflow: hidden;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

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

h1,
h2,
h3 {
  color: var(--heading);
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.75rem, 7.4vw, 6.25rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 4.4vw, 3.5rem);
}

h3 {
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
  line-height: 1.2;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a,
button {
  touch-action: manipulation;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: var(--z-skip);
  padding: 10px 16px;
  background: var(--emphasis);
  color: var(--on-accent);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.container {
  width: min(1240px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.section {
  padding-block: var(--section);
}

.section--tight-top {
  padding-top: clamp(32px, 5vw, 56px);
}

/* The page hero already closes with its own padding, so the first section opens closer. */
.page-hero + .section {
  padding-top: clamp(48px, 6vw, 88px);
}

.page-hero + .section--tight-top {
  padding-top: clamp(32px, 5vw, 56px);
}

/* Short closing call-to-action bands need less air than full sections. */
.section:has(> .callout) {
  padding-block: clamp(48px, 6vw, 84px);
}

.section--raised {
  background: var(--bg-raised);
  border-block: 1px solid var(--line);
}

.eyebrow {
  font-family: var(--serif);
  font-size: clamp(1.1875rem, 1.6vw, 1.375rem);
  letter-spacing: 0.08em;
  font-variant-caps: all-small-caps;
  color: var(--emphasis);
}

.lede {
  max-width: 44rem;
  font-size: clamp(1.125rem, 1.7vw, 1.375rem);
  line-height: 1.55;
  color: var(--muted);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 48px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.section-head h2 {
  max-width: 20ch;
  margin-top: 14px;
}

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 26px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  background: var(--emphasis);
  color: var(--on-accent);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--dur-base) var(--ease),
    color var(--dur-base) var(--ease),
    border-color var(--dur-base) var(--ease),
    transform var(--dur-fast) var(--ease);
}

.btn:active,
.filter:active {
  transform: scale(0.97);
}

.btn:hover {
  background: var(--text);
  border-color: var(--text);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}

.btn--ghost:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--on-accent);
}

.btn--small {
  min-height: 44px;
  padding: 8px 18px;
  font-size: 0.9375rem;
}

.arrow {
  width: 18px;
  height: 18px;
  flex: none;
  transition: transform var(--dur-base) var(--ease);
}

a:hover > .arrow,
a:focus-visible > .arrow {
  transform: translateX(4px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--emphasis);
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  color: var(--text);
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-header);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease);
}

/* The blur sits on a pseudo-element: on the header itself it would trap the
   fixed mobile menu inside the header's box. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bg);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease);
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header::before {
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.site-header.is-scrolled::before {
  opacity: 1;
}

.site-header .btn--ghost {
  border-color: var(--accent);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1240px, 100% - 2 * var(--gutter));
  height: var(--header-height);
  margin-inline: auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 66px;
  padding-inline: 24px;
  background: var(--ink-950);
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  z-index: 2;
  box-shadow:
    inset 0 0 0 4px var(--ink-950),
    inset 0 0 0 5px rgba(217, 169, 91, 0.7),
    0 0 0 3px var(--bg),
    0 0 0 4px var(--accent),
    0 10px 24px rgba(0, 0, 0, 0.35);
  transition: box-shadow 0.2s ease;
}

.logo:hover {
  box-shadow:
    inset 0 0 0 4px var(--ink-950),
    inset 0 0 0 5px var(--accent),
    0 0 0 3px var(--bg),
    0 0 0 5px var(--accent-bright),
    0 10px 24px rgba(0, 0, 0, 0.4);
}

.logo__word {
  margin-right: -0.16em;
  color: var(--accent);
}

@media (max-width: 767px) {
  .logo {
    min-height: 52px;
    padding-inline: 18px;
    font-size: 1.5rem;
  }
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
}

.primary-nav ul {
  display: flex;
  gap: clamp(18px, 2.6vw, 32px);
}

.primary-nav li a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9375rem;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}

.primary-nav li a::after {
  content: "";
  position: absolute;
  inset: auto 0 8px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease);
}

.primary-nav li a:hover,
.primary-nav li a[aria-current] {
  color: var(--text);
}

.primary-nav li a:hover::after,
.primary-nav li a[aria-current]::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.menu-toggle__bars,
.menu-toggle__bars::before,
.menu-toggle__bars::after {
  position: absolute;
  left: 10px;
  width: 24px;
  height: 1.5px;
  background: var(--text);
  transition: transform var(--dur-base) var(--ease), background-color 0.2s;
}

.menu-toggle__bars {
  top: 21px;
}

.menu-toggle__bars::before,
.menu-toggle__bars::after {
  content: "";
  left: 0;
}

.menu-toggle__bars::before {
  transform: translateY(-7px);
}

.menu-toggle__bars::after {
  transform: translateY(7px);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before {
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after {
  transform: rotate(-45deg);
}

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

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: center;
  min-height: min(100vh, 960px);
  min-height: min(100svh, 960px);
  padding-top: calc(var(--header-height) + clamp(48px, 6vw, 88px));
  padding-bottom: clamp(72px, 8vw, 120px);
  background:
    radial-gradient(60rem 40rem at 82% 40%, rgba(217, 169, 91, 0.11), transparent 70%),
    var(--bg);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(ellipse 85% 80% at 60% 45%, #000 35%, transparent 100%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 4vw, 56px);
}

/* Corner marks: a full border masked down to its four corners. */
.hero__grid::before {
  content: "";
  position: absolute;
  --mark: 12px;
  border: 1px solid var(--line-strong);
  mask:
    conic-gradient(at var(--mark) var(--mark), transparent 75%, #000 0)
    0 0 / calc(100% - var(--mark)) calc(100% - var(--mark));
  pointer-events: none;
}

.hero__grid::before {
  --mark: 16px;
  inset: calc(-1 * clamp(10px, 2vw, 28px));
}

.hero .eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  animation: fade-up 0.9s var(--ease) both;
}

.hero .eyebrow::before {
  content: "";
  flex: none;
  width: 44px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  margin-top: 30px;
  font-size: clamp(3.4rem, min(8.6vw, 14.5vh), 7.75rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

/* The padding keeps descenders and italic overhang inside the masked lines. */
.hero h1 .line {
  display: block;
  overflow: hidden;
  margin-bottom: -0.14em;
}

.hero h1 .line > span {
  display: block;
  padding: 0 0.06em 0.14em 0;
  background: linear-gradient(180deg, var(--text) 45%, var(--muted) 135%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise 1s var(--ease) both;
}

.hero h1 .line:nth-child(2) > span {
  animation-delay: 0.1s;
}

.hero h1 .line:nth-child(3) > span {
  animation-delay: 0.2s;
}

.hero h1 .line:nth-child(2) > span {
  background-image: linear-gradient(100deg, var(--accent-bright), var(--accent) 70%);
}

.hero h1 em {
  font-style: italic;
}

.hero .lede {
  max-width: 40rem;
  margin-top: 36px;
  animation: fade-up 0.9s 0.35s var(--ease) both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  margin-top: 48px;
  animation: fade-up 0.9s 0.45s var(--ease) both;
}

.hero__actions .btn {
  min-height: 62px;
  padding: 12px 30px;
  font-family: var(--serif);
  font-size: 1.1875rem;
  font-weight: 500;
}

/* Box-shadow, not outline, draws the gold rule so the focus ring still shows. */
.hero__actions .btn:not(.btn--ghost) {
  justify-content: space-between;
  gap: 26px;
  padding-block: 0;
  padding-right: 0;
  border-color: var(--emphasis);
  background: var(--emphasis);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--accent);
  font-weight: 600;
  transition:
    background-color var(--dur-base) var(--ease),
    border-color var(--dur-base) var(--ease),
    transform var(--dur-fast) var(--ease);
}

.hero__actions .btn:not(.btn--ghost):hover {
  border-color: var(--emphasis-hover);
  background: var(--emphasis-hover);
}

.hero__actions .arrow {
  align-self: stretch;
  width: 58px;
  height: auto;
  padding-inline: 19px;
  border-left: 1px solid rgba(23, 18, 10, 0.22);
}

.hero__actions .arrow path {
  transition: transform var(--dur-base) var(--ease);
}

/* Only the arrow moves on hover; its divider line stays put. */
.hero__actions .btn:hover > .arrow,
.hero__actions .btn:focus-visible > .arrow {
  transform: none;
}

.hero__actions .btn:hover .arrow path {
  transform: translateX(2px);
}

.hero__actions .btn--ghost {
  background: rgba(239, 234, 224, 0.04);
  color: var(--text);
}

.hero__actions .btn--ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--emphasis);
}

/* Watch radar: five sectors around Cairo */

.radar {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  animation: fade-in 1.4s 0.3s var(--ease) both;
}

.radar-wrap {
  width: 100%;
  max-width: 500px;
  justify-self: end;
}

.radar-toggle {
  display: block;
  min-height: 44px;
  margin: 8px auto 0;
  padding: 8px 12px;
  border: 0;
  background: none;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--caption);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.radar-toggle:hover {
  color: var(--text);
}

.radar.is-paused .radar__sweep,
.radar.is-paused .radar__core::after,
.radar.is-paused .radar__blip::before {
  animation-play-state: paused;
}

.radar__rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--line-strong);
}

.radar__sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 290deg, rgba(217, 169, 91, 0.3) 360deg);
  animation: spin 11s linear infinite;
}

.radar__core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--accent);
}

.radar__core::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--accent);
  animation: ping 3.3s var(--ease) infinite;
}

.radar__coords {
  position: absolute;
  left: 50%;
  top: calc(50% + 14px);
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.75rem;
  white-space: nowrap;
  text-align: center;
  color: var(--caption);
}

.radar__blip {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text);
  white-space: nowrap;
}

.radar__blip::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: blip 5.5s var(--d) infinite;
}

/* ---------- Statement ---------- */

.statement {
  max-width: 22em;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.statement span {
  color: var(--muted);
}

.proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(40px, 6vw, 72px);
}

.proof > div {
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
}

.proof dt {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--emphasis);
}

.proof dd {
  margin-top: 8px;
  max-width: 24ch;
  font-size: 0.96875rem;
  color: var(--muted);
}

/* ---------- Page hero ---------- */

.page-hero {
  background: var(--bg);
  padding-top: calc(var(--header-height) + clamp(48px, 8vw, 112px));
  padding-bottom: clamp(44px, 6vw, 80px);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin-top: 18px;
  animation: fade-up 0.8s var(--ease) both;
}

.page-hero .eyebrow {
  font-size: clamp(1.625rem, 2.8vw, 2.5rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.1;
  animation: fade-up 0.8s var(--ease) both;
}

.page-hero .lede {
  margin-top: 24px;
  animation: fade-up 0.8s 0.1s var(--ease) both;
}

.page-hero .btn {
  margin-top: 28px;
}

/* ---------- Service cards ---------- */

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

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  --card-pad: clamp(26px, 3vw, 36px);
  padding: var(--card-pad);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  transition:
    border-color var(--dur-base) var(--ease),
    background-color var(--dur-base) var(--ease),
    translate var(--dur-slow) var(--ease);
}

/* Simple drawing for each service: risk map, signal, step-by-step plan. */
.service-card__visual {
  height: 156px;
  margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) var(--card-pad);
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(70% 90% at 50% 0%, var(--accent-soft), transparent 75%),
    var(--bg-raised);
}

.service-visual {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.service-visual__base {
  fill: var(--line);
}

.service-visual__cell {
  fill: var(--accent);
  opacity: 0.55;
  transition: opacity var(--dur-slow) calc(var(--i) * 70ms) var(--ease);
}

.service-visual__cell--high {
  fill: var(--high);
}

.service-visual__track,
.service-visual__line,
.service-visual__guide {
  fill: none;
  stroke-width: 1.5;
}

.service-visual__track {
  stroke: var(--line-strong);
}

.service-visual__line {
  stroke: var(--accent);
  stroke-dasharray: 1;
}

.service-visual__guide {
  stroke: var(--line-strong);
  stroke-dasharray: 2 6;
}

.service-visual__dot {
  fill: var(--accent);
}

.service-visual__ring {
  fill: none;
  stroke: var(--accent);
  transform-box: fill-box;
  transform-origin: center;
}

.service-visual__node {
  fill: var(--bg-raised);
  stroke: var(--accent);
  stroke-width: 1.5;
  transition: fill var(--dur-base) calc(var(--i) * 90ms) var(--ease);
}

.service-visual__node--last {
  fill: var(--accent);
}

.service-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
}

@media (hover: hover) {
  /* `translate`, not `transform`: the scroll reveal owns transform. */
  .service-card:hover {
    translate: 0 -5px;
  }

  .service-card:hover .arrow {
    transform: translateX(4px);
  }

  .service-card:hover .service-visual__cell {
    opacity: 1;
  }

  .service-card:hover .service-visual__line {
    animation: service-draw 1s var(--ease) both;
  }

  .service-card:hover .service-visual__ring {
    animation: service-ping 1.4s 0.3s var(--ease) infinite;
  }

  .service-card:hover .service-visual__node {
    fill: var(--accent);
  }
}

.service-card h2,
.service-card h3 {
  margin-top: 0;
  font-size: clamp(1.5rem, 2.2vw, 1.875rem);
  line-height: 1.15;
}

.service-card__promise {
  margin-top: 16px;
  font-family: var(--serif);
  font-size: 1.1875rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--emphasis);
}

.service-card__text {
  margin-top: 16px;
  color: var(--muted);
}

.service-card__receive {
  padding-top: 28px;
}

.service-card__receive h3,
.service-card__receive h4 {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  font-variant-caps: all-small-caps;
  color: var(--text);
}

.service-card__receive ul {
  margin-top: 12px;
}

.service-card__receive li {
  position: relative;
  padding: 5px 0 5px 20px;
  font-size: 0.96875rem;
  line-height: 1.45;
}

.service-card__receive li {
  color: var(--muted);
}

.service-card__receive li strong {
  font-weight: 600;
  color: var(--text);
}

.service-card__receive li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.82em;
  width: 10px;
  height: 1px;
  background: var(--accent);
}

.service-card > .text-link {
  margin-top: auto;
  padding-top: 18px;
}

.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
}

.callout h2 {
  max-width: 20em;
  font-size: clamp(1.625rem, 3.2vw, 2.625rem);
}

.callout h2 span {
  display: block;
  color: var(--muted);
}

/* ---------- Sectors ---------- */

.sector-list {
  border-top: 1px solid var(--line);
}

.sector-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 16px clamp(24px, 4vw, 56px);
  padding-block: clamp(30px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}

.sector-row h2 {
  font-size: clamp(1.625rem, 2.8vw, 2.375rem);
}

.sector-row__text {
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-list li {
  padding: 3px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.84375rem;
  color: var(--text);
}

.sector-row .text-link {
  margin-top: 10px;
}

.sector-links {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.sector-links a {
  position: relative;
  overflow: hidden;
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: 190px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color var(--dur-base) var(--ease), color var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}

.sector-links a:nth-child(-n + 2) {
  grid-column: span 3;
  min-height: 230px;
  padding: clamp(22px, 2.6vw, 32px);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.sector-links a > span {
  position: relative;
}

.sector-art {
  aspect-ratio: 4 / 3;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.1;
  stroke-linejoin: round;
  pointer-events: none;
}

.sector-art * {
  vector-effect: non-scaling-stroke;
}

.sector-links .sector-art {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 100%;
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(to right, transparent 15%, #000 65%);
  mask-image: linear-gradient(to right, transparent 15%, #000 65%);
  transition: stroke var(--dur-base) var(--ease), opacity var(--dur-base) var(--ease);
}

/* Below this width the text fills the tiles, so a drawing would sit behind it. */
@media (max-width: 1023px) {
  .sector-links .sector-art {
    display: none;
  }
}

.sector-row .sector-art {
  display: block;
  width: 200px;
  margin-top: 24px;
  opacity: 0.6;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
}

/* The rows stack here, so the drawing moves beside the heading. */
@media (max-width: 1023px) {
  .sector-row__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }

  .sector-row .sector-art {
    flex: none;
    width: clamp(104px, 24vw, 160px);
    margin-top: 0;
  }
}

.sector-links__latest {
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--caption);
}

.sector-links a:hover {
  background: var(--emphasis);
  border-color: var(--emphasis);
  color: var(--on-accent);
}

.sector-links a:hover .sector-art {
  stroke: var(--on-accent);
  opacity: 0.4;
}

.sector-links a:hover .sector-links__latest,
.sector-links a:hover .sample-tag {
  color: var(--on-accent);
  border-color: currentColor;
}

/* ---------- Rule Tracker ---------- */

.notice {
  padding: 14px 18px;
  border: 1px dashed rgba(217, 169, 91, 0.55);
  background: var(--accent-soft);
  border-radius: 3px;
  font-size: 0.96875rem;
}

.notice strong {
  color: var(--emphasis);
}

.tracker__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 28px 12px;
}

.filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: none;
  font-size: 0.9375rem;
  color: var(--muted);
  cursor: pointer;
  transition: background-color var(--dur-base) var(--ease), color var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}

.filter:hover {
  color: var(--text);
  border-color: var(--text);
}

.filter[aria-pressed="true"] {
  background: var(--emphasis);
  border-color: var(--emphasis);
  color: var(--on-accent);
}

.filter__count {
  font-family: var(--sans);
  font-size: 0.8125rem;
}

.tracker__status {
  margin-bottom: 20px;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--caption);
}

.rule-list {
  border-top: 1px solid var(--line);
}

.rule-row {
  border-bottom: 1px solid var(--line);
}

.rule-row--enter {
  animation: fade-up var(--dur-slow) var(--delay, 0ms) var(--ease) both;
}

.rule-row a {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 8px clamp(20px, 3vw, 40px);
  padding-block: 28px;
  text-decoration: none;
}

.rule-row a::before {
  content: "";
  position: absolute;
  inset: 0 -14px;
  z-index: -1;
  background: var(--accent-faint);
  border-radius: 3px;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease);
}

.rule-row__body {
  transition: transform var(--dur-base) var(--ease);
}

.rule-row a:hover h3 {
  color: var(--emphasis);
}

@media (hover: hover) {
  .rule-row a:hover .rule-row__body {
    transform: translateX(8px);
  }

  .rule-row a:hover::before {
    opacity: 1;
  }
}

.rule-row__date {
  padding-top: 3px;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--caption);
}

.rule-row__sector {
  font-size: 0.875rem;
  color: var(--caption);
}

.rule-row h3 {
  margin-top: 6px;
  font-size: clamp(1.3125rem, 2vw, 1.625rem);
  transition: color var(--dur-fast) var(--ease);
}

.rule-row p {
  margin-top: 8px;
  max-width: var(--measure);
  font-size: 0.96875rem;
  color: var(--muted);
}

.rule-row__impact {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  color: var(--muted);
}

.sample-tag {
  margin-left: 6px;
  padding: 1px 7px;
  border: 1px dashed rgba(217, 169, 91, 0.6);
  border-radius: 2px;
  font-family: var(--serif);
  font-size: 1.0625rem;
  letter-spacing: 0.04em;
  font-variant-caps: all-small-caps;
  color: var(--emphasis);
}

.impact {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 2px 11px;
  border: 1px solid color-mix(in srgb, currentColor 38%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 9%, transparent);
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

.impact::before {
  content: "";
  width: 8px;
  height: 8px;
  background: currentColor;
}

.impact--high {
  color: var(--high);
}

.impact--medium {
  color: var(--medium);
}

.impact--medium::before {
  transform: rotate(45deg);
}

.impact--watch {
  color: var(--watch);
}

.impact--watch::before {
  border-radius: 50%;
}

.tracker-empty {
  padding: 40px 0;
  color: var(--muted);
}

.tracker-empty .filter {
  margin-top: 14px;
}

/* Single entry */

.page-hero--rule h1 {
  max-width: 19em;
  font-size: clamp(2.25rem, 5.2vw, 4.25rem);
  line-height: 1.06;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-bottom: 16px;
  font-size: 0.9375rem;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--text);
}

.back-link .arrow {
  transform: rotate(180deg);
}

.rule__layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: clamp(32px, 7vw, 96px);
  padding-block: clamp(40px, 6vw, 72px) var(--section);
}

.rule__meta {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  align-self: start;
}

.rule__meta dl > div {
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}

.rule__meta dl > div:first-child {
  border-top: 1px solid var(--line);
}

.rule__meta dt {
  font-family: var(--serif);
  font-size: 1.0625rem;
  letter-spacing: 0.06em;
  font-variant-caps: all-small-caps;
  color: var(--caption);
}

.rule__meta dd {
  margin-top: 4px;
  font-size: 0.96875rem;
  line-height: 1.5;
}

.rule__meta dd a {
  color: var(--emphasis);
}

.rule__body {
  max-width: var(--measure);
}

.rule-section {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  padding-block: clamp(32px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
}

.rule-section__number {
  padding-top: 0.5em;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--emphasis);
}

.rule-section h2 {
  font-size: clamp(1.625rem, 2.8vw, 2.125rem);
  margin-bottom: 16px;
}

.rule-section p + p {
  margin-top: 14px;
}

.rule-section ol {
  counter-reset: step;
}

.rule-section ol li {
  counter-increment: step;
  position: relative;
  padding: 10px 0 10px 34px;
  border-top: 1px solid var(--line);
}

.rule-section ol li:first-child {
  border-top: 0;
}

.rule-section ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 11px;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--emphasis);
}

.rule__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 40px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
}

.rule__cta p {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.2;
}

.rule-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.rule-pager__link {
  display: block;
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.3;
  text-decoration: none;
}

.rule-pager__link:hover {
  color: var(--emphasis);
}

.rule-pager__link span {
  display: block;
  margin-bottom: 4px;
  font-family: var(--serif);
  font-size: 1.0625rem;
  letter-spacing: 0.06em;
  font-variant-caps: all-small-caps;
  color: var(--caption);
}

.rule-pager__link--older {
  grid-column: 2;
  text-align: right;
}

/* ---------- Execution ---------- */

.execution {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 104px);
  align-items: start;
}

.execution__text {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.1vw, 1.625rem);
  line-height: 1.5;
  letter-spacing: -0.005em;
}

.execution__text p + p {
  margin-top: 1em;
}

.execution .btn {
  margin-top: 36px;
}

.handover {
  position: relative;
}

/* Drawn over the step lines as the visitor scrolls: main.js sets both values. */
.handover::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 13px;
  width: 1px;
  height: var(--handover-length, 0);
  background: var(--accent);
  transform: scaleY(var(--handover-progress, 0));
  transform-origin: top;
}

.handover li {
  position: relative;
  padding: 0 0 34px 34px;
}

.handover li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 11px;
  height: 11px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  transition: background-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}

.handover li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 22px;
  bottom: 0;
  width: 1px;
  background: var(--line-strong);
}

.handover li:last-child {
  padding-bottom: 0;
}

.handover li:last-child::before,
.handover li.is-reached::before {
  background: var(--accent);
}

.handover li.is-reached::before {
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.js .handover li:last-child:not(.is-reached)::before {
  background: transparent;
}

.handover li:last-child::after {
  display: none;
}

.handover strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.3;
}

.handover span {
  display: block;
  margin-top: 4px;
  font-size: 0.96875rem;
  color: var(--caption);
}

.band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px clamp(40px, 7vw, 96px);
  align-items: end;
}

.band h2 {
  margin-top: 14px;
}

.band p {
  color: var(--muted);
}

.band__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 24px;
}

/* ---------- About ---------- */

.about-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 24px clamp(40px, 7vw, 96px);
}

.about-columns h2 {
  margin-top: 14px;
}

.about-columns__text p + p {
  margin-top: 1em;
}

.about-columns__text {
  color: var(--muted);
}

.mission {
  max-width: 19em;
  margin-top: 20px;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 4.25rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.mission em {
  font-style: italic;
  color: var(--emphasis);
}

.approach {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.approach li {
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
}

.approach span {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--emphasis);
}

.approach h3 {
  margin-top: 16px;
  font-size: 1.5rem;
}

.approach p {
  margin-top: 10px;
  font-size: 0.96875rem;
  color: var(--muted);
}

.founder {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
}

.placeholder-photo {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  border: 1px dashed var(--line-strong);
  background: repeating-linear-gradient(135deg, var(--surface) 0 12px, var(--bg-raised) 12px 24px);
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--caption);
  text-align: center;
  padding: 16px;
}

.founder h2 {
  margin-top: 12px;
}

.founder__role {
  margin-top: 8px;
  color: var(--emphasis);
}

.founder__bio {
  margin-top: 20px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
}

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

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 104px);
}

.error-summary {
  margin-bottom: 24px;
  padding: 18px 20px;
  border: 1px solid var(--error);
  border-radius: 3px;
}

.error-summary h2 {
  font-size: 1.25rem;
}

.error-summary ul {
  margin-top: 8px;
}

.error-summary a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--error);
  text-underline-offset: 3px;
}

.form-hint {
  margin-bottom: 20px;
  font-size: 0.9375rem;
  color: var(--caption);
}

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

.field--wide {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.field label small {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--caption);
}

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--surface);
  font-size: 1rem;
  transition: border-color var(--dur-fast) var(--ease);
}

.field select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.500l5 5 5-5' fill='none' stroke='%23a9a499' stroke-width='1.400'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 12px;
}

.field select option {
  background: var(--surface);
  color: var(--text);
}

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

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--muted);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.field [aria-invalid="true"] {
  border-color: var(--error);
}

.field__error {
  display: block;
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--error);
}

.field__error:empty {
  display: none;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 26px;
}

.form-status {
  flex: 1 1 260px;
  font-size: 0.9375rem;
  color: var(--caption);
}

.form-status--success {
  color: var(--watch);
}

.form-status--error {
  color: var(--error);
}

.contact-details > div {
  padding-block: 20px;
  border-bottom: 1px solid var(--line);
}

.contact-details > div:first-child {
  padding-top: 0;
}

.contact-details dt {
  font-family: var(--serif);
  font-size: 1.0625rem;
  letter-spacing: 0.06em;
  font-variant-caps: all-small-caps;
  color: var(--caption);
}

.contact-details dd {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 1.3125rem;
  line-height: 1.3;
}

.contact-details a {
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

.contact-details a:hover {
  color: var(--emphasis);
}

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

.site-footer {
  padding-block: clamp(48px, 6vw, 72px) 32px;
  background: var(--bg-raised);
  border-top: 1px solid var(--line);
}

.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px clamp(32px, 5vw, 72px);
}

.site-footer__tag {
  margin-top: 22px;
  max-width: 24em;
  color: var(--muted);
}

.site-footer__links a,
.site-footer__contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
}

.site-footer__links a:hover,
.site-footer__contact a:hover {
  color: var(--emphasis);
}

.site-footer__contact li {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--muted);
}

.site-footer__legal {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  max-width: var(--measure);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--caption);
}

.site-footer__copy {
  margin-top: 14px;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--caption);
}

/* ---------- Motion ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.8s var(--delay, 0ms) var(--ease),
    transform 0.8s var(--delay, 0ms) var(--ease);
}

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

/* Cards set their own hover transitions: keep the reveal from overriding them. */
.js .service-card[data-reveal] {
  transition:
    opacity 0.8s var(--delay, 0ms) var(--ease),
    transform 0.8s var(--delay, 0ms) var(--ease),
    border-color var(--dur-base) var(--ease),
    background-color var(--dur-base) var(--ease),
    translate var(--dur-slow) var(--ease);
}

@keyframes service-draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes service-ping {
  from {
    transform: scale(0.7);
    opacity: 0.9;
  }
  to {
    transform: scale(2.2);
    opacity: 0;
  }
}

@keyframes rise {
  from {
    transform: translateY(105%);
  }
  to {
    transform: none;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ping {
  from {
    transform: scale(1);
    opacity: 0.9;
  }
  to {
    transform: scale(5);
    opacity: 0;
  }
}

@keyframes blip {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(217, 169, 91, 0.5);
    opacity: 0.55;
  }
  12% {
    box-shadow: 0 0 0 9px rgba(217, 169, 91, 0);
    opacity: 1;
  }
  40% {
    box-shadow: 0 0 0 0 rgba(217, 169, 91, 0);
    opacity: 0.55;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  @view-transition {
    navigation: none;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .radar__sweep,
  .radar-toggle {
    display: none;
  }

  .service-card:hover {
    translate: none;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

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

/* Short laptop screens: keep both hero buttons above the fold. */
@media (min-width: 1024px) and (max-height: 800px) {
  .hero {
    padding-top: calc(var(--header-height) + 32px);
    padding-bottom: 56px;
  }

  .hero h1 {
    margin-top: 20px;
  }

  .hero .lede {
    margin-top: 24px;
  }

  .hero__actions {
    margin-top: 32px;
  }
}

@media (max-width: 1023px) {
  .approach {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 16px;
  }

  :root {
    --header-height: 88px;
  }

  .menu-toggle {
    display: block;
  }

  .primary-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 28px;
    padding: calc(var(--header-height) + 24px) var(--gutter) calc(32px + env(safe-area-inset-bottom));
    background: var(--bg);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur-fast) var(--ease), visibility var(--dur-fast);
  }

  .menu-open .primary-nav {
    opacity: 1;
    visibility: visible;
    transition-duration: var(--dur-base);
  }

  .primary-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .primary-nav li {
    border-bottom: 1px solid var(--line);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  }

  .menu-open .primary-nav li {
    opacity: 1;
    transform: none;
  }

  .menu-open .primary-nav li:nth-child(2) { transition-delay: 40ms; }
  .menu-open .primary-nav li:nth-child(3) { transition-delay: 80ms; }
  .menu-open .primary-nav li:nth-child(4) { transition-delay: 120ms; }
  .menu-open .primary-nav li:nth-child(5) { transition-delay: 160ms; }

  .primary-nav li a {
    display: flex;
    min-height: 66px;
    font-family: var(--serif);
    font-size: 1.875rem;
    color: var(--text);
  }

  .primary-nav li a::after {
    display: none;
  }

  .primary-nav li a[aria-current] {
    color: var(--emphasis);
  }

  .primary-nav .btn {
    min-height: 54px;
  }

  .hero {
    min-height: 0;
  }

  .hero h1 {
    font-size: clamp(2.75rem, 14.2vw, 7.75rem);
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 56px;
  }

  .radar-wrap {
    max-width: 400px;
    justify-self: center;
  }

  .service-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sector-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .execution,
  .band,
  .about-columns,
  .contact {
    grid-template-columns: minmax(0, 1fr);
  }

  .rule__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .rule__meta {
    position: static;
  }

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

  .rule__meta dl > div:nth-child(2) {
    border-top: 1px solid var(--line);
  }

  .site-footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__top > :first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 1rem;
  }

  .hero .eyebrow::before {
    display: none;
  }

  .hero__actions .btn {
    font-size: 1.0625rem;
  }

  .hero__actions .btn:not(.btn--ghost) {
    gap: 12px;
    padding-left: 20px;
  }

  .hero__actions .btn,
  .callout .btn,
  .execution .btn,
  .band .btn,
  .rule__cta .btn {
    width: 100%;
  }

  .sector-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .sector-links {
    gap: 10px;
  }

  .sector-links a:nth-child(n) {
    grid-column: auto;
    gap: 10px;
    min-height: 0;
    padding: 18px;
    font-size: 1.25rem;
  }

  .rule-row a {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-block: 22px;
  }

  .rule-row__date {
    grid-row: 1;
  }

  .rule-row__impact {
    grid-row: 1;
    grid-column: 2;
    justify-self: end;
    align-items: center;
  }

  .rule-row__impact .arrow {
    display: none;
  }

  .rule-row__body {
    grid-column: 1 / -1;
  }

  .approach,
  .proof,
  .form-grid,
  .founder,
  .rule__meta dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .rule__meta dl > div:nth-child(2) {
    border-top: 0;
  }

  .placeholder-photo {
    max-width: 280px;
  }

  .rule-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .rule-pager {
    grid-template-columns: minmax(0, 1fr);
  }

  .rule-pager__link--older {
    grid-column: 1;
    text-align: left;
  }

  .site-footer__top {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Justified body text. Display text (headlines, ledes, statements) stays ragged;
   short one-line paragraphs are unaffected because the last line is never stretched. */
.sector-row__text,
.about-columns__text p,
.execution__text p,
.band p,
.founder__bio,
.rule__body p,
.site-footer__legal {
  text-align: justify;
}

/* Page and section headings in the hero's voice: light serif fading from bone
   to stone, with the key phrase set in gold italic. */
.page-hero h1,
.section-head h2,
.about-columns h2,
.band h2 {
  font-weight: 400;
  letter-spacing: -0.03em;
  /* The gradient only paints inside the box, so give descenders (g, y, p) room. */
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
  background: linear-gradient(180deg, var(--text) 45%, var(--muted) 140%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-hero h1 em,
.section-head h2 em,
.about-columns h2 em,
.band h2 em {
  font-style: italic;
  /* Room for the italic overhang, pulled back so a following full stop sits close. */
  padding-right: 0.08em;
  margin-right: -0.08em;
  background: linear-gradient(100deg, var(--accent-bright), var(--accent) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.page-hero h1 {
  font-size: clamp(3rem, 7.8vw, 6.75rem);
  line-height: 1;
}

.section-head h2,
.band h2 {
  font-size: clamp(2.125rem, 4.2vw, 3.5rem);
  line-height: 1.08;
}

.service-card h2,
.sector-row h2 {
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* ---------- Sector rows: index, thesis and drawings that sketch themselves ---------- */

.sector-row__heading {
  position: relative;
}

.sector-row__index {
  display: block;
  font-family: var(--serif);
  font-size: clamp(3.5rem, 6vw, 5.5rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(217, 169, 91, 0.55);
  transition: color var(--dur-base) var(--ease), -webkit-text-stroke-color var(--dur-base) var(--ease);
}

.sector-row__title {
  margin-top: 14px;
}

.sector-row__thesis {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  font-style: italic;
  color: var(--emphasis);
}

.sector-row__label {
  margin-top: 22px;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  font-variant-caps: all-small-caps;
  color: var(--caption);
}

.sector-row__label + .tag-list {
  margin-top: 10px;
}

.sector-row .tag-list li {
  transition: border-color var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}

.sector-row {
  position: relative;
  transition: background-color var(--dur-base) var(--ease);
}

/* A faint gold wash and a filled index mark the row under the pointer. */
@media (hover: hover) {
  .sector-row:hover {
    background: linear-gradient(90deg, var(--accent-faint), transparent 70%);
  }

  .sector-row:hover .sector-row__index {
    color: var(--accent);
    -webkit-text-stroke-color: var(--accent);
  }

  .sector-row:hover .sector-art {
    opacity: 0.95;
  }

  .sector-row:hover .tag-list li {
    border-color: rgba(217, 169, 91, 0.45);
  }
}

.sector-row .sector-art {
  transition: opacity var(--dur-base) var(--ease);
}

.js .sector-row .sector-art path,
.js .sector-row .sector-art circle {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.js .sector-row.is-in .sector-art path,
.js .sector-row.is-in .sector-art circle {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 2.2s 0.25s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  .js .sector-row .sector-art path,
  .js .sector-row .sector-art circle {
    stroke-dashoffset: 0;
    transition: none;
  }
}

@media (max-width: 1023px) {
  .sector-row__heading {
    flex-wrap: wrap;
  }

  .sector-row__index {
    flex-basis: 100%;
  }

  .sector-row__title {
    flex: 1 1 0;
    min-width: 0;
    margin-top: 6px;
  }
}

/* Home sector tiles: same index and thesis as the Sectors page. */
.sector-links__index {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 3.4vw, 3rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(217, 169, 91, 0.6);
  transition: -webkit-text-stroke-color var(--dur-base) var(--ease);
}

.sector-links a:nth-child(-n + 2) .sector-links__index {
  font-size: clamp(2.75rem, 4.4vw, 3.75rem);
}

.sector-links__name {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 16em;
}

.sector-links__thesis {
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--emphasis);
  transition: color var(--dur-base) var(--ease);
}

.sector-links a:nth-child(-n + 2) .sector-links__thesis {
  font-size: 1.0625rem;
}

.sector-links a:hover .sector-links__index {
  -webkit-text-stroke-color: var(--on-accent);
}

.sector-links a:hover .sector-links__thesis {
  color: var(--on-accent);
}

/* Keep tile text clear of the drawing on the right; drawings are hidden below 1024px. */
@media (min-width: 1024px) {
  .sector-links__name {
    max-width: 58%;
  }
}

/* Desktop: the drawing sits beside the title rather than under it, so rows stay compact. */
@media (min-width: 1024px) {
  .sector-row {
    padding-block: clamp(28px, 3vw, 40px);
  }

  .sector-row__heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0 24px;
  }

  .sector-row__index {
    flex-basis: 100%;
  }

  .sector-row__title {
    flex: 1 1 0;
    min-width: 0;
  }

  .sector-row .sector-art {
    flex: none;
    width: 150px;
    margin-top: 0;
  }
}
