/* ============================================================
   Courtfield Trading FZCO — design system
   Palette: navy/ink, officer brass, canvas/stone, deep olive
   Type: Fraunces (display, opsz) + Switzer (body)
   ============================================================ */

:root, [data-theme="light"] {
  /* Surfaces — canvas / stone */
  --color-bg: #EFEAE0;            /* canvas */
  --color-bg-2: #E5DECF;          /* stone fold */
  --color-surface: #F5F1E7;       /* lighter card */
  --color-paper: #FBF8F1;         /* document paper */
  --color-rule: #2B2A28;          /* hairline rule */
  --color-rule-soft: #C9C0AB;

  /* Ink */
  --color-text: #14161C;          /* near-black, slight blue */
  --color-text-muted: #54534F;
  --color-text-faint: #8F8C84;
  --color-text-inverse: #F5F1E7;

  /* Brand — pulled from the official Courtfield logo */
  --color-ink: #001A3F;            /* logo navy */
  --color-ink-2: #0F2A50;
  --color-accent: #B0832C;         /* logo gold (deeper for readable contrast on cream) */
  --color-accent-hi: #CC993D;      /* logo gold (as-is) */
  --color-olive: #3D4A2A;          /* deep field olive */
  --color-oxblood: #6B1F1F;        /* sparingly */

  /* Type */
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body: 'Switzer', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --text-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.8125rem);
  --text-sm: clamp(0.8125rem, 0.78rem + 0.2vw, 0.9375rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.6vw, 3.5rem);
  --text-hero: clamp(2.75rem, 1rem + 6vw, 6.5rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --content-narrow: 720px;
  --content-default: 1080px;
  --content-wide: 1320px;
  --gutter: clamp(var(--space-5), 4vw, var(--space-12));

  --shadow-sm: 0 1px 2px rgba(14, 27, 44, 0.06);
  --shadow-md: 0 8px 24px rgba(14, 27, 44, 0.08);
  --shadow-lg: 0 24px 60px rgba(14, 27, 44, 0.16);
}

[data-theme="dark"] {
  --color-bg: #08111E;
  --color-bg-2: #0B1A33;
  --color-surface: #102140;
  --color-paper: #142847;
  --color-rule: #E6DFCB;
  --color-rule-soft: #213557;

  --color-text: #ECE6D6;
  --color-text-muted: #A09F95;
  --color-text-faint: #6F6E68;
  --color-text-inverse: #08111E;

  --color-ink: #E6DFCB;
  --color-ink-2: #C8C2AE;
  --color-accent: #CC993D;
  --color-accent-hi: #E5B85A;
  --color-olive: #889B5B;
  --color-oxblood: #B86E60;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.5);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.6);
}

/* ===== Layout primitives ===== */

.container {
  width: 100%;
  max-width: var(--content-wide);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--content-narrow); }
.container--default { max-width: var(--content-default); }

.section {
  padding-block: clamp(var(--space-16), 9vw, var(--space-32));
}
.section--tight { padding-block: clamp(var(--space-12), 6vw, var(--space-20)); }

/* Eyebrow label — small uppercase, accent color, monospace numerals */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}
.eyebrow--center { justify-content: center; }
.eyebrow--plain::before { display: none; }

/* Numeric reference — like a publication issue number */
.ref-num {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-style: italic;
  font-weight: 300;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

/* ===== Typography utilities ===== */

.display-1 {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 300;
  line-height: 0.96;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144;
}
.display-1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--color-text-muted);
}

.h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 96;
}
.h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.h4 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}

.lede {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 0.95rem + 0.85vw, 1.5rem);
  font-weight: 300;
  line-height: 1.45;
  font-style: italic;
  font-variation-settings: "opsz" 36;
  color: var(--color-text);
  max-width: 36ch;
}

.muted { color: var(--color-text-muted); }
.faint { color: var(--color-text-faint); }

p { max-width: 62ch; }
p + p { margin-top: var(--space-4); }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in oklab, currentColor 30%, transparent);
}
a:hover { text-decoration-color: currentColor; }

/* ===== Header / Nav ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--color-bg) 92%, transparent);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid color-mix(in oklab, var(--color-rule) 12%, transparent);
}
.site-header__inner {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-6);
  padding-block: var(--space-4);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}
.brand__mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  object-fit: contain;
}
.brand__mark--light { display: block; }
.brand__mark--dark { display: none; }
[data-theme="dark"] .brand__mark--light { display: none; }
[data-theme="dark"] .brand__mark--dark { display: block; }
.brand__type {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand__name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--color-ink);
}
[data-theme="dark"] .brand__name { color: var(--color-text); }
.brand__sub {
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-top: 4px;
}
[data-theme="dark"] .brand__sub { color: var(--color-accent-hi); }

/* Brand-mark used standalone in editorial moments */
.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}
.brand-lockup__full--light { display: block; max-width: 360px; width: 100%; height: auto; }
.brand-lockup__full--dark { display: none; max-width: 360px; width: 100%; height: auto; }
[data-theme="dark"] .brand-lockup__full--light { display: none; }
[data-theme="dark"] .brand-lockup__full--dark { display: block; }

.nav {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
}
.nav a {
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text-muted);
  position: relative;
  padding-block: var(--space-2);
}
.nav a:hover, .nav a:focus-visible { color: var(--color-text); }

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--color-text-muted);
  border: 1px solid color-mix(in oklab, var(--color-rule) 15%, transparent);
}
.theme-toggle:hover { color: var(--color-text); border-color: color-mix(in oklab, var(--color-rule) 30%, transparent); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid var(--color-text);
  color: var(--color-text);
  background: transparent;
  white-space: nowrap;
}
.btn:hover { background: var(--color-text); color: var(--color-bg); }

.btn--primary {
  background: var(--color-ink);
  color: var(--color-text-inverse);
  border-color: var(--color-ink);
}
[data-theme="dark"] .btn--primary { background: var(--color-accent-hi); color: #0B121C; border-color: var(--color-accent-hi); }
.btn--primary:hover {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-text);
}

.btn--ghost {
  border-color: color-mix(in oklab, var(--color-rule) 25%, transparent);
  padding: var(--space-2) var(--space-4);
}

.menu-toggle { display: none; }

/* ===== Hero ===== */

.hero {
  position: relative;
  padding-block: clamp(var(--space-16), 11vw, var(--space-32));
  border-bottom: 1px solid color-mix(in oklab, var(--color-rule) 14%, transparent);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: end;
}
.hero__lead { display: flex; flex-direction: column; gap: var(--space-6); }
.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144;
}
.hero__title em {
  font-style: italic;
  color: var(--color-accent);
  font-weight: 300;
}
.hero__sub {
  max-width: 50ch;
  font-size: var(--text-base);
  color: var(--color-text-muted);
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid color-mix(in oklab, var(--color-rule) 18%, transparent);
}
.hero__meta-item { display: flex; flex-direction: column; gap: 2px; }
.hero__meta-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-text-faint);
  font-weight: 500;
}
.hero__meta-value {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
}

.hero__visual {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--color-ink);
  border-radius: 2px;
  overflow: hidden;
  isolation: isolate;
}
[data-theme="dark"] .hero__visual { background: var(--color-bg-2); }
.hero__visual::before {
  /* warp/weft weave overlay */
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(200,166,100,0.12) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 4px);
  z-index: 1;
}
.hero__visual::after {
  /* officer braid corner */
  content: "";
  position: absolute;
  right: -120px; bottom: -120px;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--color-accent-hi), transparent 60%);
  opacity: 0.35;
  z-index: 0;
}
.hero__visual-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-6);
  color: #ECE6D6;
}
.hero__plate {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-accent-hi);
}
.hero__plate-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.625rem;
  letter-spacing: 0.22em;
  color: rgba(236, 230, 214, 0.55);
  margin-bottom: 4px;
}
.hero__plate-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.02em;
  color: #ECE6D6;
  line-height: 1;
  display: block;
  margin-top: var(--space-1);
}
.hero__plate-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  border-top: 1px solid rgba(236, 230, 214, 0.18);
  padding-top: var(--space-5);
}

/* Hairline rule with label (editorial divider) */
.rule {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-text-faint);
  padding-block: var(--space-4);
  font-weight: 500;
}
.rule__line {
  flex: 1;
  height: 1px;
  background: color-mix(in oklab, var(--color-rule) 18%, transparent);
}
.rule > span:first-child { color: var(--color-accent); }

/* ===== Marquee — client institutions ===== */
.marquee {
  border-block: 1px solid color-mix(in oklab, var(--color-rule) 14%, transparent);
  padding-block: var(--space-5);
  overflow: hidden;
  background: var(--color-bg-2);
}
.marquee__track {
  display: flex;
  gap: var(--space-12);
  white-space: nowrap;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.25rem, 0.9rem + 1.6vw, 2rem);
  color: var(--color-text-muted);
  animation: marquee 38s linear infinite;
  width: max-content;
}
.marquee__track > span { display: inline-flex; align-items: center; gap: var(--space-12); }
.marquee__track > span::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  display: inline-block;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ===== Intro / two-column editorial ===== */

.intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
}
@media (min-width: 880px) {
  .intro { grid-template-columns: 1.1fr 1.6fr; gap: clamp(var(--space-12), 8vw, var(--space-24)); }
}
.intro__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 96;
}
.intro__title em { font-style: italic; color: var(--color-accent); font-weight: 400; }

.intro__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.intro__body p { font-size: var(--text-base); }
.intro__pillars {
  margin-top: var(--space-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  border-top: 1px solid color-mix(in oklab, var(--color-rule) 18%, transparent);
  padding-top: var(--space-6);
}
.pillar__num {
  font-family: var(--font-display);
  font-size: 1rem;
  font-style: italic;
  font-weight: 400;
  color: var(--color-accent);
}
.pillar__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  margin-top: var(--space-2);
}
.pillar__copy {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

/* ===== Categories (asymmetric editorial) ===== */

.cats {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
}
.cat {
  position: relative;
  border: 1px solid color-mix(in oklab, var(--color-rule) 14%, transparent);
  border-radius: 2px;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
  overflow: hidden;
  isolation: isolate;
  text-decoration: none;
  color: inherit;
  background: var(--color-surface);
  transition: transform 250ms cubic-bezier(0.16,1,0.3,1), border-color 250ms;
}
.cat:hover {
  border-color: color-mix(in oklab, var(--color-rule) 35%, transparent);
}
.cat__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.875rem;
  color: var(--color-accent);
}
.cat__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 0.9rem + 1.4vw, 2.25rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.018em;
  font-variation-settings: "opsz" 72;
}
.cat__list {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  line-height: 1.6;
  margin-top: var(--space-3);
  text-transform: uppercase;
}
.cat__list span { display: inline; }
.cat__list span + span::before { content: " · "; color: var(--color-text-faint); }

/* visual layer */
.cat__photo {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(0.94);
  opacity: 0.82;
}
.cat.has-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(8, 18, 34, 0.24), rgba(8, 18, 34, 0.78)),
    radial-gradient(circle at 85% 18%, rgba(204, 153, 61, 0.24), transparent 42%);
}
.cat--paper.has-photo::before {
  background:
    linear-gradient(180deg, rgba(251,248,241,0.82), rgba(251,248,241,0.92)),
    radial-gradient(circle at 85% 18%, rgba(204,153,61,0.22), transparent 44%);
}
.cat--paper.has-photo .cat__photo { opacity: 0.45; filter: saturate(0.58) contrast(0.9); }
.cat--paper.has-photo .cat__title,
.cat--paper.has-photo .cat__list { text-shadow: 0 1px 0 rgba(251,248,241,0.45); }
.cat--ink.has-photo .cat__photo,
.cat--olive.has-photo .cat__photo,
.cat--brass.has-photo .cat__photo,
.cat--ribbon.has-photo .cat__photo { opacity: 0.55; }
.cat__art {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.95;
}
.cat__head, .cat__foot {
  position: relative;
  z-index: 1;
}

/* span helpers */
.cat--12 { grid-column: span 12; }
.cat--8 { grid-column: span 8; }
.cat--6 { grid-column: span 6; }
.cat--5 { grid-column: span 5; }
.cat--4 { grid-column: span 4; }
.cat--7 { grid-column: span 7; }
@media (max-width: 880px) {
  .cat--12, .cat--8, .cat--6, .cat--5, .cat--4, .cat--7 { grid-column: span 12; }
}

/* category-specific palettes */
.cat--ink { background: #001A3F; color: #ECE6D6; }
[data-theme="dark"] .cat--ink { background: #050E1C; }
.cat--ink .cat__num, .cat--ink .cat__list { color: rgba(236,230,214,0.7); }
.cat--ink .cat__num { color: var(--color-accent-hi); }

.cat--brass { background: linear-gradient(160deg, #B8924E 0%, #84682F 70%); color: #FBF8F1; }
.cat--brass .cat__num { color: rgba(251,248,241,0.75); font-style: italic; }
.cat--brass .cat__list { color: rgba(251,248,241,0.78); }

.cat--olive { background: var(--color-olive); color: #ECE6D6; }
.cat--olive .cat__num, .cat--olive .cat__list { color: rgba(236,230,214,0.7); }
.cat--olive .cat__num { color: var(--color-accent-hi); }

.cat--paper { background: var(--color-paper); }

.cat--ribbon {
  /* dress uniform: fine warp threads */
  background: #001A3F;
  color: #ECE6D6;
}
[data-theme="dark"] .cat--ribbon { background: #050E1C; }
.cat--ribbon .cat__art {
  background:
    repeating-linear-gradient(90deg, rgba(200,166,100,0.18) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, rgba(0,0,0,0.2), transparent);
}
.cat--ribbon .cat__num { color: var(--color-accent-hi); }
.cat--ribbon .cat__list { color: rgba(236,230,214,0.75); }

/* ===== Value chain timeline ===== */

.chain {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}
.chain__intro { max-width: 60ch; }
.chain__steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border-top: 1px solid var(--color-rule);
  border-bottom: 1px solid var(--color-rule);
}
.chain__step {
  padding: var(--space-6) var(--space-4);
  border-right: 1px solid color-mix(in oklab, var(--color-rule) 22%, transparent);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
  min-height: 220px;
}
.chain__step:last-child { border-right: none; }
.chain__step-num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 1rem;
  color: var(--color-accent);
}
.chain__step-name {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 0.9rem + 0.6vw, 1.5rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.05;
}
.chain__step-copy {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-top: auto;
}
@media (max-width: 880px) {
  .chain__steps { grid-template-columns: 1fr 1fr; }
  .chain__step { border-bottom: 1px solid color-mix(in oklab, var(--color-rule) 22%, transparent); }
  .chain__step:nth-child(2n) { border-right: none; }
}
@media (max-width: 480px) {
  .chain__steps { grid-template-columns: 1fr; }
  .chain__step { border-right: none; }
}

/* ===== Quality / compliance grid ===== */

.qual {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
}
@media (min-width: 920px) {
  .qual { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr); gap: clamp(var(--space-12), 7vw, var(--space-20)); }
}
.qual__pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid color-mix(in oklab, var(--color-rule) 22%, transparent);
}
.qual__pillar {
  padding: var(--space-6) var(--space-5) var(--space-6) 0;
  border-bottom: 1px solid color-mix(in oklab, var(--color-rule) 22%, transparent);
  border-right: 1px solid color-mix(in oklab, var(--color-rule) 22%, transparent);
  padding-left: var(--space-5);
}
.qual__pillar:nth-child(2n) { border-right: none; }
.qual__pillar-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.qual__pillar-copy {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  line-height: 1.55;
}
.qual__pillar-tag {
  display: inline-block;
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* ===== Process / sourcing strip ===== */

.process {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
}
@media (min-width: 880px) {
  .process { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
}
.process__steps {
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.process__step {
  counter-increment: step;
  padding: var(--space-6) 0;
  border-top: 1px solid color-mix(in oklab, var(--color-rule) 22%, transparent);
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-5);
}
.process__step:last-child { border-bottom: 1px solid color-mix(in oklab, var(--color-rule) 22%, transparent); }
.process__step-num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.5rem;
  color: var(--color-accent);
}
.process__step-num::before { content: "0" counter(step) "."; }
.process__step-name {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.process__step-copy {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  line-height: 1.55;
}

/* ===== Clients / institutions grid ===== */

.insts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
@media (max-width: 760px) { .insts { grid-template-columns: repeat(2, 1fr); } }
.inst {
  border: 1px solid color-mix(in oklab, var(--color-rule) 18%, transparent);
  padding: var(--space-5);
  border-radius: 2px;
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 160px;
}
.inst__icon {
  width: 32px; height: 32px;
  color: var(--color-accent);
}
.inst__name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
}
.inst__copy {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: auto;
  line-height: 1.5;
}

/* ===== Presence / contact ===== */

.presence {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  background: var(--color-paper);
  padding: clamp(var(--space-8), 4vw, var(--space-16));
  border: 1px solid color-mix(in oklab, var(--color-rule) 18%, transparent);
}
@media (min-width: 880px) {
  .presence { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
}
.presence__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 300;
  line-height: 1.0;
  letter-spacing: -0.025em;
}
.presence__title em { font-style: italic; color: var(--color-accent); }
.presence__copy { color: var(--color-text-muted); max-width: 50ch; margin-top: var(--space-5); }

.contact-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  border-top: 1px solid color-mix(in oklab, var(--color-rule) 22%, transparent);
  padding-top: var(--space-6);
}
.presence-photo {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid color-mix(in oklab, var(--color-rule) 18%, transparent);
  background: var(--color-ink);
  margin-bottom: var(--space-2);
}
.presence-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.72) contrast(0.96);
}
.presence-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,26,63,0.78));
}
.presence-photo figcaption {
  position: absolute;
  left: var(--space-4);
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 1;
  color: #ECE6D6;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.contact-row { display: flex; flex-direction: column; gap: 4px; }
.contact-row__label {
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  font-weight: 500;
}
.contact-row__value {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--color-text);
  text-decoration: none;
}
.contact-row__value:hover { color: var(--color-accent); }
.contact-row__address {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.55;
  color: var(--color-text);
}

/* ===== Footer ===== */

.site-footer {
  border-top: 1px solid color-mix(in oklab, var(--color-rule) 18%, transparent);
  padding-block: var(--space-12);
  background: var(--color-bg-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-2); }
.footer-col a {
  text-decoration: none;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}
.footer-col a:hover { color: var(--color-text); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding-top: var(--space-6);
  border-top: 1px solid color-mix(in oklab, var(--color-rule) 14%, transparent);
  font-size: 0.8125rem;
  color: var(--color-text-faint);
}

/* ===== Decorative weave / textile motif ===== */

.weave-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    repeating-linear-gradient(0deg, color-mix(in oklab, var(--color-rule) 6%, transparent) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, color-mix(in oklab, var(--color-rule) 4%, transparent) 0 1px, transparent 1px 24px);
}

.section--ink {
  /* Always navy regardless of theme — this is a fixed editorial moment */
  background: #001A3F;
  color: #ECE6D6;
}
[data-theme="dark"] .section--ink {
  /* Slightly deeper in dark mode so the section still reads as a separate plate */
  background: #050E1C;
}
.section--ink .h2,
.section--ink .display-1 { color: #ECE6D6; }
.section--ink .muted { color: rgba(236, 230, 214, 0.65); }
.section--ink .eyebrow { color: var(--color-accent-hi); }
.section--ink .qual__pillar-name { color: #ECE6D6; }
.section--ink .qual__pillar-copy { color: rgba(236, 230, 214, 0.7); }
.section--ink .qual__pillars,
.section--ink .qual__pillar { border-color: rgba(236,230,214,0.18); }
.section--ink .qual__pillar-tag { color: var(--color-accent-hi); }

/* ===== Mobile nav ===== */

@media (max-width: 880px) {
  .nav { display: none; }
  .nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-top: 1px solid color-mix(in oklab, var(--color-rule) 22%, transparent);
    border-bottom: 1px solid color-mix(in oklab, var(--color-rule) 22%, transparent);
    box-shadow: 0 24px 48px -24px rgba(0,26,63,0.18);
    padding: var(--space-6) var(--gutter);
    gap: var(--space-4);
    align-items: flex-start;
    z-index: 50;
  }
  .nav.is-open a { font-size: 1.0625rem; padding: var(--space-2) 0; }
  .menu-toggle {
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    border-radius: 999px;
    color: var(--color-text-muted);
    border: 1px solid color-mix(in oklab, var(--color-rule) 15%, transparent);
  }
  .header-actions .btn { display: none; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { aspect-ratio: 16 / 11; max-width: 100%; }
}

/* fade-up reveal — progressive enhancement only (JS adds .js-reveal) */
.js-reveal.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 800ms cubic-bezier(0.16,1,0.3,1), transform 800ms cubic-bezier(0.16,1,0.3,1);
}
.js-reveal.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .js-reveal.reveal { opacity: 1; transform: none; transition: none; }
}
