/* ==========================================================================
   L39 TECH — Global stylesheet
   Implements the L39 Tech UI Style Guide (l39-logo-style.md)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Colour */
  --ink:        #020408;
  --navy:       #050E15;
  --gold:       #D4AF37;
  --gold-hi:    #E8C84A;
  --gold-dim:   rgba(212, 175, 55, 0.15);
  --gold-line:  rgba(212, 175, 55, 0.35);
  --gold-faint: rgba(212, 175, 55, 0.06);
  --text:       #D9D9D9;
  --text-body:  #C4CACB;
  --text-sub:   #B8BEC0;
  --nav-link:   #C0C6C8;
  --footer-text:#A8AFAF;
  --slate:      #373C3C;
  --slate-lt:   #888E8E;
  --green:      #3DBA6B;
  --placeholder:#6B7280;

  /* Type */
  --font-display: 'Michroma', 'Arial Narrow', sans-serif;
  --font-mono:    'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --container:  1480px;
  --gutter:     64px;
  --nav-h:      68px;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--text);
  margin: 0;
  line-height: 1.15;
  letter-spacing: 0.03em;
}

p { margin: 0 0 18px; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--gold); color: var(--ink); }

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

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--slate); }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }
html { scrollbar-width: thin; scrollbar-color: var(--slate) var(--ink); }

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section        { padding: 120px 0; border-bottom: 1px solid var(--slate); position: relative; }
.section--mid   { padding: 80px 0; }
.section--tight { padding: 64px 0; }
.section--navy  { background: var(--navy); }
.section--gold-edge { border-bottom-color: var(--gold-line); }

/* Engineering graph-paper texture.
   The radial mask is borrowed from the r6.1 prototype: the grid is strongest
   at the centre of a band and dissolves before it reaches the edges, so it
   never collides with the hairline borders between sections. */
.grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Intensity lives in these two numbers: line alpha x opacity is the
     effective contrast at the centre of a band. 0.11 x 0.85 = 0.094.
     For reference: 0.055 was too faint, 0.198 too strong, 0.119 still a touch
     strong once it was on every band. Now used on the hero only. */
  background-image:
    linear-gradient(to right, rgba(212, 175, 55, 0.11) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(212, 175, 55, 0.11) 1px, transparent 1px);
  background-size: 84px 84px;
  /* Solid centre pulled back a little too, so the grid fades out sooner. */
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 32%, transparent 90%);
  mask-image: radial-gradient(circle at 50% 50%, #000 32%, transparent 90%);
  opacity: 0.85;
  z-index: 0;
}
.grid-bg > * { position: relative; z-index: 1; }

/* Section label / overline */
.label {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 24px;
}
.label::after {
  content: '';
  height: 1px;
  flex: 1;
  max-width: 120px;
  background: var(--gold-line);
}
.label--center { justify-content: center; }
.label--center::before,
.label--center::after {
  content: '';
  height: 1px;
  width: 48px;
  flex: 0 0 48px;
  max-width: 48px;
  background: var(--gold-line);
}

.section-head { margin-bottom: 64px; }
.section-head--center { text-align: center; max-width: 760px; margin-left: auto; margin-right: auto; }
.section-head h2 {
  font-size: clamp(28px, 2.6vw, 42px);
  line-height: 1.2;
  margin-bottom: 20px;
}
.section-head p {
  font-size: 15.5px;
  color: var(--text-sub);
  line-height: 1.8;
  max-width: 760px;
}
.section-head--center p { margin-left: auto; margin-right: auto; }

.lead { font-size: 16px; color: var(--text-sub); line-height: 1.8; }
.muted { color: var(--slate-lt); }

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--slate-lt);
}

.hairline { height: 1px; background: var(--slate); border: 0; margin: 32px 0; }

.stack-sm > * + * { margin-top: 16px; }

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn-gold, .btn-gold-filled {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.22s ease;
  white-space: nowrap;
}

.btn-gold {
  padding: 12px 28px;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-weight: 500;
}
.btn-gold:hover {
  background: var(--gold-dim);
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.14);
  transform: translateY(-1px);
}

.btn-gold-filled {
  padding: 13px 32px;
  background: var(--gold);
  border: 1px solid var(--gold);
  color: var(--ink);
  font-weight: 600;
}
.btn-gold-filled:hover {
  background: var(--gold-hi);
  border-color: var(--gold-hi);
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.28);
  transform: translateY(-1px);
}

.btn-gold-filled:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }
.btn-row--center { justify-content: center; }

/* Inline arrow link */
.link-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  transition: gap 0.22s ease, opacity 0.22s ease;
}
.link-gold:hover { gap: 14px; opacity: 0.85; }

/* --------------------------------------------------------------------------
   5. Navbar
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(2, 4, 8, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate);
  transition: border-color 0.3s ease;
}
.nav.scrolled { border-bottom-color: rgba(55, 60, 60, 0.4); }

.nav .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 32px; }

.nav-logo { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.nav-logo img { width: 36px; height: 36px; }
.nav-logo span {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.14em;
  color: var(--text);
}

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--nav-link);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a.active { color: var(--gold); }
/* Must re-state colour and family: `.nav-links a` outranks `.btn-gold` alone. */
.nav-links .btn-gold {
  padding: 9px 20px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--gold);
}

/* --------------------------------------------------------------------------
   5b. Mobile navigation
   --------------------------------------------------------------------------
   The original spec said only that nav links are hidden below 768px, which on
   its own leaves no way to navigate. This is the replacement: a trigger in the
   bar and a full-height panel.

   The trigger is an anchor to #mobile-menu and the panel opens on :target, so
   it works with scripting disabled. main.js adds aria state, Escape, a scroll
   lock and focus handling on top.
   -------------------------------------------------------------------------- */
/* Icon-only trigger. 48×48 hit area, comfortably over the 44px guideline. */
.menu-trigger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--slate);
  background: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.menu-trigger:hover { border-color: var(--gold); }

/* Three bars that fold into a cross. The outer two travel to the vertical
   centre and counter-rotate; the middle one fades. 12px box, 1.5px bars, so
   each outer bar is 5.25px from centre. */
.burger { position: relative; display: block; width: 18px; height: 12px; }
.burger i {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--gold);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}
.burger i:nth-child(1) { top: 0; }
.burger i:nth-child(2) { top: 50%; margin-top: -0.75px; }
.burger i:nth-child(3) { bottom: 0; }

/* Open state comes from aria-expanded (JS) or :target (no JS). */
:is(.menu-trigger[aria-expanded='true'], body:has(#mobile-menu:target) .menu-trigger) .burger i:nth-child(1) {
  transform: translateY(5.25px) rotate(45deg);
}
:is(.menu-trigger[aria-expanded='true'], body:has(#mobile-menu:target) .menu-trigger) .burger i:nth-child(2) {
  opacity: 0;
}
:is(.menu-trigger[aria-expanded='true'], body:has(#mobile-menu:target) .menu-trigger) .burger i:nth-child(3) {
  transform: translateY(-5.25px) rotate(-45deg);
}

/* The panel drops out of the navbar rather than covering the screen: it
   animates its own height, so the bar appears to extend downwards. */
.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 250;
  display: flex;
  flex-direction: column;
  background: rgba(2, 4, 8, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  padding: 0 var(--gutter);
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition:
    max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s ease,
    visibility 0s linear 0.5s;
}
.mobile-menu:target,
.mobile-menu.is-open {
  max-height: calc(100vh - var(--nav-h));
  padding: 6px var(--gutter) 26px;
  border-bottom-color: var(--gold-line);
  overflow-y: auto;
  visibility: visible;
  transition:
    max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s ease,
    visibility 0s;
}

.mobile-menu-system {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 0;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--slate-lt);
}
.mobile-menu-system b { color: var(--gold); font-weight: 500; }
.mobile-menu-system i { flex: 1; height: 1px; background: var(--slate); }
.mobile-menu-system .status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.8s ease-in-out infinite;
}

.mobile-menu nav { display: flex; flex-direction: column; }

/* Each link slides in from the left as it fades up, staggered down the list. */
.mobile-menu nav a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--slate);
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--text);
  opacity: 0;
  transform: translateX(-34px);
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.45s ease,
    color 0.2s ease;
}
:is(.mobile-menu.is-open, .mobile-menu:target) nav a {
  opacity: 1;
  transform: none;
}
:is(.mobile-menu.is-open, .mobile-menu:target) nav a:nth-child(1) { transition-delay: 0.12s; }
:is(.mobile-menu.is-open, .mobile-menu:target) nav a:nth-child(2) { transition-delay: 0.17s; }
:is(.mobile-menu.is-open, .mobile-menu:target) nav a:nth-child(3) { transition-delay: 0.22s; }
:is(.mobile-menu.is-open, .mobile-menu:target) nav a:nth-child(4) { transition-delay: 0.27s; }
:is(.mobile-menu.is-open, .mobile-menu:target) nav a:nth-child(5) { transition-delay: 0.32s; }
:is(.mobile-menu.is-open, .mobile-menu:target) nav a:nth-child(6) { transition-delay: 0.37s; }
:is(.mobile-menu.is-open, .mobile-menu:target) nav a:nth-child(7) { transition-delay: 0.42s; }
.mobile-menu nav a:hover { color: var(--gold); }
.mobile-menu nav a small {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--gold);
  flex: 0 0 auto;
}
.mobile-menu nav a span { margin-left: auto; color: var(--gold); opacity: 0.6; }
.mobile-menu nav a.is-cta { color: var(--gold); }

.mobile-menu-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 22px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--slate-lt);
}
/* Present for the no-JS path: without scripting the trigger cannot toggle
   back, so :target needs somewhere to be cleared from. */
.mobile-menu-close {
  padding: 8px 12px;
  border: 1px solid var(--slate);
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.mobile-menu-close:hover { border-color: var(--gold); color: var(--gold); }

/* Locked while the panel is open, so the page behind cannot scroll. */
body.menu-open { overflow: hidden; }

/* The nav swaps to the trigger at 860px, not at the 768px used elsewhere.
   The desktop links need 822px of bar; below about 840px they were being
   clipped, so 769–839px showed a truncated nav with no menu button. */
@media (max-width: 860px) {
  .nav-links a:not(.menu-trigger) { display: none; }
  .menu-trigger { display: inline-flex; }
}

/* Never present above that breakpoint, whatever the hash says. */
@media (min-width: 861px) {
  .mobile-menu { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu, .mobile-menu nav a, .burger i { transition: none; }
  :is(.mobile-menu.is-open, .mobile-menu:target) nav a { transition-delay: 0s; }
}

/* --------------------------------------------------------------------------
   6. Hero (homepage)
   -------------------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 80px) 0 80px;
  border-bottom: 1px solid var(--slate);
  position: relative;
  /* The radar is meant to bleed off the right edge, and its x-axis runs wider
     still. Clip at the section rather than leaning on body{overflow-x:hidden},
     which lets the document itself grow. */
  overflow: hidden;
}
/* Constrained so the copy never runs under the radar on the right. */
.hero-copy { max-width: 720px; }
.hero h1 {
  font-size: clamp(42px, 4.5vw, 68px);
  line-height: 1.08;
  letter-spacing: 0.02em;
  margin-bottom: 28px;
}
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-sub {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text-sub);
  max-width: 640px;
  margin-bottom: 40px;
}

/* Terminal widget */
.terminal {
  background: var(--navy);
  border: 1px solid var(--slate);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--slate);
  background: rgba(255, 255, 255, 0.015);
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot.r { background: #FF5F57; }
.terminal-dot.y { background: #FEBC2E; }
.terminal-dot.g { background: #28C840; }
.terminal-title {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate-lt);
}
.terminal-body {
  padding: 24px 22px 28px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 2;
}
.terminal-body .p { color: var(--gold); margin-right: 10px; }
.terminal-body .line { color: var(--text-sub); }
.terminal-body .ok { color: var(--green); }
.dot-live {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  margin-left: 8px;
  animation: pulse 1.8s ease-in-out infinite;
}
.cursor {
  display: inline-block;
  width: 8px; height: 15px;
  background: var(--gold);
  vertical-align: -2px;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(61, 186, 107, 0.5); }
  50% { opacity: 0.55; box-shadow: 0 0 0 5px rgba(61, 186, 107, 0); }
}

/* --------------------------------------------------------------------------
   7. Calendar strip
   -------------------------------------------------------------------------- */
.cal-strip {
  background: var(--navy);
  border-bottom: 1px solid var(--gold-line);
  padding: 16px 0;
}
.cal-strip .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-sub);
}
.cal-strip i { color: var(--gold); }
.cal-strip a { color: var(--gold); border-bottom: 1px solid var(--gold-line); padding-bottom: 2px; }
.cal-strip a:hover { border-bottom-color: var(--gold); }

/* --------------------------------------------------------------------------
   8. Cards — shared
   -------------------------------------------------------------------------- */
.card-grid { display: grid; gap: 2px; }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
/* A single card, centred — used while the team has one published member. */
.card-grid--1-center {
  grid-template-columns: 1fr;
  max-width: 440px;
  margin: 0 auto;
}

/* Two cards whose width exactly matches two columns of the 3-up grid above,
   so the 2px gutters line up: (2W - gap) / 3. */
.card-grid--2-center {
  grid-template-columns: repeat(2, 1fr);
  width: calc(66.6667% - 0.6667px);
  margin: 2px auto 0;
}

.card {
  background: var(--navy);
  border: 1px solid var(--slate);
  border-top: 2px solid var(--gold);
  padding: 40px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(212, 175, 55, 0.07);
}
.card-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--gold-line);
  color: var(--gold);
  font-size: 17px;
  margin-bottom: 26px;
}
.card h3 {
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.card p { font-size: 14px; line-height: 1.8; color: var(--text-body); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tags--top { margin-top: 0; margin-bottom: 20px; }
.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  border: 1px solid var(--gold-line);
  background: var(--gold-faint);
  padding: 5px 10px;
}
.tag--slate { color: var(--slate-lt); border-color: var(--slate); background: transparent; }

.footnote {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.7;
  letter-spacing: 0.05em;
  color: var(--slate-lt);
  margin-top: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  border: 1px solid var(--gold-line);
  background: var(--gold-faint);
  padding: 5px 12px;
}
.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex: 0 0 auto;
}
.badge--pulse::before { animation: pulse-gold 2s ease-in-out infinite; }
@keyframes pulse-gold {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.5); }
  50% { opacity: 0.5; box-shadow: 0 0 0 5px rgba(212, 175, 55, 0); }
}

/* --------------------------------------------------------------------------
   9. Case study cards
   -------------------------------------------------------------------------- */
.case-card {
  background: var(--navy);
  border: 1px solid var(--slate);
  border-left: 3px solid var(--gold);
  padding: 40px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.case-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(212, 175, 55, 0.07);
}
.case-card h3 {
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: 0.04em;
  margin: 18px 0;
}
.case-card p { font-size: 14.5px; line-height: 1.8; }
.case-card .link-gold { margin-top: auto; padding-top: 28px; align-self: flex-start; }

.case-card.featured {
  grid-column: 1 / -1;
  border-top: 2px solid var(--gold);
}

/* A standard card that still spans the grid — used while the portfolio is
   small enough that a half-width card would leave an empty column. Drop this
   class once there are enough case studies to fill a row. */
.case-card--wide { grid-column: 1 / -1; }
.case-inner {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 64px;
}
.case-inner > div { display: flex; flex-direction: column; }

.outcomes { list-style: none; margin: 0; padding: 0; }
.outcomes li {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--text-sub);
  padding: 12px 0 12px 24px;
  border-bottom: 1px solid var(--slate);
  position: relative;
}
.outcomes li:last-child { border-bottom: 0; }
.outcomes li::before {
  content: '\2192';
  position: absolute;
  left: 0;
  color: var(--gold);
}
.outcomes-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gold-line);
  margin-bottom: 4px;
}

.stat-row { display: flex; flex-wrap: wrap; gap: 2px; margin: 24px 0 4px; }
.stat {
  flex: 1;
  min-width: 130px;
  background: rgba(212, 175, 55, 0.03);
  border: 1px solid var(--slate);
  padding: 16px 18px;
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.stat span {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--slate-lt);
  line-height: 1.5;
  display: block;
}

.meta-panel {
  border: 1px solid var(--slate);
  background: rgba(255, 255, 255, 0.012);
  padding: 22px 24px;
  margin-top: 24px;
}
.meta-panel dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 12px 20px; }
.meta-panel dt {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--slate-lt);
}
.meta-panel dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-sub);
  text-align: right;
}

/* --------------------------------------------------------------------------
   10. Testimonials
   --------------------------------------------------------------------------
   NOT dead code, despite there being no testimonials on the site today. These
   are the styles the admin's Reviews tab renders with: publish a review and
   render.js emits .quote-card / .quote-mark / .quote-attr into the homepage,
   and the section reappears. Delete these and the first real review renders
   unstyled. Keep them until the Reviews feature itself goes.
   -------------------------------------------------------------------------- */
.quote-card {
  background: var(--navy);
  border: 1px solid var(--slate);
  border-top: 2px solid var(--gold);
  padding: 40px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.quote-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.quote-mark {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 64px;
  line-height: 0.8;
  color: var(--gold);
  opacity: 0.28;
  margin-bottom: 20px;
  height: 34px;
}
.quote-card blockquote {
  margin: 0;
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-body);
}
.quote-attr {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--slate);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.9;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--slate-lt);
}
.quote-attr b { display: block; color: var(--gold); font-weight: 500; }

/* --------------------------------------------------------------------------
   11. Team teaser + Cerberus
   -------------------------------------------------------------------------- */
.teaser { text-align: center; }
.teaser h2 { font-size: clamp(28px, 2.6vw, 42px); margin-bottom: 20px; }
.teaser p { color: var(--text-sub); max-width: 640px; margin: 0 auto 36px; }

/* align-items:start now the left column carries copy plus the terminal and is
   much taller than the marks beside it. */
.cerberus-grid {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 72px;
  align-items: start;
}

/* --------------------------------------------------------------------------
   12. Contact
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}
.contact-list { list-style: none; margin: 40px 0 0; padding: 0; }
.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--slate);
}
.contact-list li:first-child { border-top: 1px solid var(--slate); }
.contact-list i { color: var(--gold); font-size: 15px; width: 20px; margin-top: 5px; flex: 0 0 20px; }
.contact-list .k {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--slate-lt);
  margin-bottom: 4px;
}
.contact-list .v { font-size: 14.5px; color: var(--text); line-height: 1.6; }
.contact-list a.v { transition: color 0.2s ease; }
.contact-list a.v:hover { color: var(--gold); }

.scoping-block {
  border: 1px solid var(--gold-line);
  background: var(--gold-faint);
  padding: 24px 28px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.scoping-block p {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.05em;
  color: var(--text-sub);
  margin: 0;
}
.scoping-block b { color: var(--gold); font-weight: 500; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
}
.field label .opt { color: var(--slate-lt); letter-spacing: 0.08em; }
.field input, .field select, .field textarea {
  background: var(--navy);
  border: 1px solid var(--slate);
  border-radius: 0;
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 150px; line-height: 1.7; }
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.12);
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23D4AF37' stroke-width='1.5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}
.field select option { background: var(--navy); color: var(--text); }
.form-actions { margin-top: 28px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form-note {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--slate-lt);
}

.form-status {
  margin: 16px 0 0;
  min-height: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--green);
}
.form-status.is-error { color: #E5714F; }

/* Honeypot — off-screen rather than display:none, which bots skip. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.footer { padding: 40px 0; background: var(--ink); }
.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { width: 28px; height: 28px; opacity: 0.85; }
.footer-copy {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.9;
  letter-spacing: 0.06em;
  color: var(--footer-text);
}
/* Armed Forces Covenant credential — built to the published AFC guidelines:
     - "Our positive brand mark should be present on all brand communications,
        always appearing on a white background or logo panel." Hence the white
        panel, rather than the negative mark on our dark footer.
     - "Exclusion zone ... based on the height of the Crown. No other elements
        should encroach on this zone." The Crown is ~18% of the mark's height,
        so the panel padding is 19px against a 103px mark.
     - "Never adjust or modify the files in any way." The master artwork is
        referenced directly and only scaled for display — no derivative file.
     - Print minimum is 20mm; 76px wide is the rough digital equivalent. */
.footer-cred {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  line-height: 1.6;
  color: var(--text-sub);
}
.afc-panel {
  display: inline-flex;
  background: #fff;
  padding: 19px;          /* the exclusion zone */
  flex: 0 0 auto;
}
.afc-panel img {
  display: block;
  width: 76px;
  height: 103px;
}

.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--footer-text);
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--gold); }

/* --------------------------------------------------------------------------
   14. Page header (sub-pages)
   -------------------------------------------------------------------------- */
.page-head {
  padding: calc(var(--nav-h) + 100px) 0 80px;
  border-bottom: 1px solid var(--slate);
  position: relative;
}
.page-head h1 {
  font-size: clamp(32px, 3.6vw, 56px);
  line-height: 1.12;
  margin-bottom: 24px;
}
.page-head p { font-size: 16px; line-height: 1.8; color: var(--text-sub); max-width: 780px; }

/* --------------------------------------------------------------------------
   15. Filter bar (case studies)
   -------------------------------------------------------------------------- */
.filter-bar {
  position: sticky;
  top: var(--nav-h);
  z-index: 90;
  background: var(--navy);
  border-bottom: 1px solid var(--slate);
  padding: 18px 0;
}
.filter-bar .container { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--slate-lt);
  background: transparent;
  border: 1px solid var(--slate);
  padding: 9px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover { color: var(--text-sub); border-color: var(--slate-lt); }
.filter-btn.active { color: var(--gold); border-color: var(--gold); background: var(--gold-faint); }

.case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; }
.case-card.is-hidden { display: none; }
.case-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 64px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--slate-lt);
}
.case-empty[hidden] { display: none; }
.case-card.featured.is-narrow { grid-column: auto; }
.case-card.featured.is-narrow .case-inner { grid-template-columns: 1fr; gap: 32px; }

/* --------------------------------------------------------------------------
   16. Pricing
   -------------------------------------------------------------------------- */
.panel {
  border: 1px solid var(--slate);
  border-top: 2px solid var(--gold);
  background: var(--navy);
  padding: 48px;
}
.panel h3 { font-size: 20px; margin-bottom: 20px; letter-spacing: 0.05em; }

.rate-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.rate-table caption {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  padding-bottom: 18px;
}
.rate-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  text-align: left;
  padding: 0 20px 14px 0;
  border-bottom: 1px solid var(--gold-line);
  white-space: nowrap;
}
.rate-table td {
  padding: 16px 20px 16px 0;
  border-bottom: 1px solid var(--slate);
  font-size: 14px;
  color: var(--text-body);
  vertical-align: top;
  line-height: 1.65;
}
.rate-table tbody tr:last-child td { border-bottom: 0; }
.rate-table td:first-child { color: var(--text); font-weight: 500; }
.rate-table td.num, .rate-table th.num { text-align: right; padding-right: 0; white-space: nowrap; }
.rate-table td.num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 0.02em;
  font-weight: 400;
}
.rate-table td .sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--slate-lt);
  margin-top: 6px;
  font-weight: 400;
}
.table-scroll { overflow-x: auto; }

.tier-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.tier-card {
  background: var(--navy);
  border: 1px solid var(--slate);
  border-top: 2px solid var(--gold);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.tier-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.tier-card.featured { box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.15); }
.tier-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 20px;
  min-height: 14px;
}
.tier-card h3 { font-size: 15px; letter-spacing: 0.06em; margin-bottom: 18px; }
.tier-price {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--text);
  letter-spacing: 0.01em;
  line-height: 1;
}
.tier-cadence {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--slate-lt);
  margin: 14px 0 26px;
  line-height: 1.6;
}
.feature-list { list-style: none; margin: 0 0 32px; padding: 0; }
.feature-list li {
  position: relative;
  padding: 0 0 14px 24px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-body);
}
.feature-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  font-size: 12px;
}
.tier-card .btn-gold, .tier-card .btn-gold-filled { margin-top: auto; justify-content: center; }

.entry-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; }
.entry-card { padding: 48px; }
.entry-card .tier-price { font-size: 44px; }
.entry-card h3 { font-size: 18px; }

.tooltip-note {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.75;
  letter-spacing: 0.05em;
  color: var(--slate-lt);
  display: flex;
  gap: 10px;
}
.tooltip-note i { color: var(--gold); margin-top: 3px; flex: 0 0 auto; }

.terms-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; }
.terms-list li { padding: 18px 0; border-bottom: 1px solid var(--slate); font-size: 14px; line-height: 1.7; }
.terms-list .k {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 6px;
}

.split-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 64px; }
.split-copy { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }

.worked-example {
  border: 1px solid var(--gold-line);
  background: var(--gold-faint);
  padding: 26px 30px;
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--text-sub);
}
.worked-example .k { color: var(--gold); display: block; margin-bottom: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-size: 10px; }
.worked-example b { color: var(--gold); font-weight: 500; }

/* FAQ accordion */
.faq-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 64px; align-items: start; }
.faq-item { border-bottom: 1px solid var(--slate); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  text-align: left;
  background: none;
  border: 0;
  padding: 26px 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--text);
  transition: color 0.2s ease;
}
.faq-q:hover { color: var(--gold); }
.faq-q i { color: var(--gold); font-size: 12px; transition: transform 0.3s ease; flex: 0 0 auto; }
.faq-item.open .faq-q i { transform: rotate(180deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.35s ease;
}
.faq-item.open .faq-a { max-height: 520px; opacity: 1; padding-bottom: 26px; }
.faq-a p { font-size: 14px; line-height: 1.8; color: var(--text-sub); }

/* --------------------------------------------------------------------------
   17. Team
   -------------------------------------------------------------------------- */
.team-card {
  background: var(--navy);
  border: 1px solid var(--slate);
  border-top: 2px solid var(--gold);
  padding: 40px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.team-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(212, 175, 55, 0.07);
}
.avatar {
  width: 132px; height: 132px;
  border-radius: 50%;
  border: 1px solid var(--gold-line);
  overflow: hidden;
  background: var(--ink);
  margin-bottom: 28px;
  flex: 0 0 auto;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-card h3 { font-size: 16px; letter-spacing: 0.05em; margin-bottom: 12px; }
.team-role {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 20px;
  line-height: 1.6;
}
.team-card p { font-size: 14px; line-height: 1.8; }
.team-links {
  margin-top: auto;
  padding-top: 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--slate-lt);
  transition: color 0.2s ease;
}
.icon-link:hover { color: var(--gold); }
.icon-link--gold { color: var(--gold); }

.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.value {
  padding: 36px 32px;
  border: 1px solid var(--slate);
  background: rgba(255, 255, 255, 0.008);
}
.value i { color: var(--gold); font-size: 18px; margin-bottom: 22px; display: block; }
.value h3 {
  font-size: 13px;
  letter-spacing: 0.06em;
  line-height: 1.55;
  margin-bottom: 14px;
}
.value p { font-size: 13.5px; line-height: 1.8; color: var(--text-body); }

/* --------------------------------------------------------------------------
   18. Team profile page
   -------------------------------------------------------------------------- */
.crumb-bar {
  margin-top: var(--nav-h);
  background: var(--navy);
  border-bottom: 1px solid var(--slate);
  padding: 16px 0;
}
.crumb-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.crumb {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--slate-lt);
}
.crumb span { color: var(--gold); }
.crumb .sep { margin: 0 8px; opacity: 0.5; }

.profile-grid { display: grid; grid-template-columns: 340px 1fr; gap: 80px; align-items: start; }
.profile-photo {
  width: 200px; height: 200px;
  border-radius: 50%;
  border: 1px solid var(--gold-line);
  overflow: hidden;
  margin-bottom: 36px;
}
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.connect-panel { border: 1px solid var(--slate); padding: 26px 28px; }
.connect-panel .k {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  display: block;
  margin-bottom: 16px;
}
.connect-panel a { display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: 13.5px; color: var(--text-sub); transition: color 0.2s ease; word-break: break-word; }
.connect-panel a:hover { color: var(--gold); }
.connect-panel a i { color: var(--gold); width: 16px; font-size: 14px; flex: 0 0 16px; }
.connect-panel .hairline { margin: 22px 0; }

.profile-role {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 22px;
}
.profile-name { font-size: 44px; line-height: 1.05; letter-spacing: 0.03em; }
.name-rule { height: 1px; background: var(--gold-line); margin: 28px 0; max-width: 220px; }
.profile-sub { font-size: 16px; color: var(--text-sub); line-height: 1.8; margin-bottom: 36px; }
.pull-quote {
  border-left: 2px solid var(--gold);
  background: var(--gold-faint);
  padding: 24px 32px;
  margin: 0 0 36px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  font-style: italic;
}
.bio p { font-size: 15px; line-height: 1.85; color: var(--text-body); margin-bottom: 22px; }

.eng-split { display: grid; grid-template-columns: 340px 1fr; gap: 80px; align-items: start; }
.eng-list { display: grid; gap: 2px; }
.eng-card {
  background: var(--ink);
  border: 1px solid var(--slate);
  border-left: 3px solid var(--gold);
  padding: 32px 36px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.eng-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.eng-card h3 { font-size: 16px; letter-spacing: 0.04em; margin: 16px 0 12px; line-height: 1.45; }
.eng-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--slate-lt);
  margin-bottom: 22px;
}
/* No link follows it any more, so don't leave a gap under the card. */
.eng-card > .eng-meta:last-child { margin-bottom: 0; }

/* CTA band */
.cta-band { text-align: center; padding: 120px 0; position: relative; }
.cta-band h2 { font-size: clamp(28px, 2.8vw, 44px); margin-bottom: 20px; line-height: 1.2; }
.cta-band p { color: var(--text-sub); max-width: 640px; margin: 0 auto 40px; font-size: 15.5px; }

/* --------------------------------------------------------------------------
   18b. Cookie consent
   -------------------------------------------------------------------------- */
.consent {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 200;
  background: rgba(2, 4, 8, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--gold-line);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.5);
  animation: consent-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes consent-in { from { transform: translateY(100%); } to { transform: none; } }

.consent-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.consent-body .label { margin-bottom: 12px; }
.consent-body p {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-body);
  max-width: 780px;
  margin: 0;
}
.consent-body a { color: var(--gold); border-bottom: 1px solid var(--gold-line); }
.consent-body a:hover { border-bottom-color: var(--gold); }

/* Equal visual weight on accept and reject is a compliance requirement,
   not a style choice — a buried "reject" invalidates the consent. */
.consent-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.consent-actions .btn-gold,
.consent-actions .btn-gold-filled {
  padding: 11px 22px;
  font-size: 12px;
  white-space: nowrap;
}
.consent-actions .consent-quiet { border-color: var(--slate); color: var(--slate-lt); }
.consent-actions .consent-quiet:hover {
  border-color: var(--slate-lt);
  color: var(--text-body);
  background: transparent;
  box-shadow: none;
}

.consent-prefs { margin-top: 20px; display: grid; gap: 14px; max-width: 780px; }
.consent-prefs.hidden { display: none; }
.consent-cat {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--slate);
  background: rgba(255, 255, 255, 0.012);
  cursor: pointer;
}
.consent-cat:hover { border-color: var(--slate-lt); }
.consent-cat input {
  width: 16px; height: 16px;
  margin-top: 2px;
  accent-color: var(--gold);
  flex: 0 0 16px;
  cursor: pointer;
}
.consent-cat span { font-size: 12.5px; line-height: 1.7; color: var(--text-sub); }
.consent-cat b {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 4px;
}

@media (max-width: 900px) {
  .consent-inner { grid-template-columns: 1fr; gap: 22px; padding: 22px var(--gutter); }
  .consent-actions .btn-gold,
  .consent-actions .btn-gold-filled { flex: 1 1 auto; justify-content: center; }
  .consent { max-height: 85vh; overflow-y: auto; }
}

/* --------------------------------------------------------------------------
   18c. Intro screen — ported from the r6.1 prototype
   --------------------------------------------------------------------------
   A split logo sits across two shutters. A scan line sweeps, then the
   shutters part and carry each half of the logo off-screen.

   Timings match the prototype, which is well judged: long enough to read,
   short enough not to be in the way. Total 2.12s, once per session, with a
   skip control and no intro at all under prefers-reduced-motion.
   -------------------------------------------------------------------------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  animation: intro-hide 0.01s 2.12s forwards;
}

.intro-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 175, 55, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.055) 1px, transparent 1px);
  background-size: 84px 84px;
  -webkit-mask-image: radial-gradient(circle, #000 12%, transparent 82%);
  mask-image: radial-gradient(circle, #000 12%, transparent 82%);
}

.intro-scan {
  position: absolute;
  z-index: 4;
  width: 1px;
  height: 100%;
  background: linear-gradient(transparent, var(--gold), transparent);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.35);
  animation: intro-scan 1s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.intro-kicker {
  position: absolute;
  z-index: 8;
  bottom: 8%;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: rgba(212, 175, 55, 0.55);
  animation: intro-fade-out 0.25s 1.25s forwards;
}

.intro-skip {
  position: absolute;
  z-index: 12;
  right: 26px;
  top: 22px;
  border: 0;
  background: none;
  padding: 12px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate-lt);
}
.intro-skip:hover { color: var(--text); }
.intro-skip span { color: var(--gold); }

/* The two shutters. Each carries a clipped half of the same lockup, so the
   logo looks whole until the moment they separate. */
.intro-door {
  position: absolute;
  z-index: 6;
  top: 0;
  bottom: 0;
  width: 50%;
  background: var(--navy);
  animation: intro-door 0.72s 1.35s cubic-bezier(0.8, 0, 0.2, 1) forwards;
}
.intro-door--left { left: 0; border-right: 1px solid var(--gold-line); --door-x: -100%; }
.intro-door--right { right: 0; border-left: 1px solid var(--gold-line); --door-x: 100%; }

/* The prototype ran this at 0.5 opacity. Our mark is fine gold strokes on a
   1200px canvas — scaled to 148px and half-faded it all but disappeared, which
   is why the logo read as "not loading". Full opacity plus a soft glow so the
   thin strokes hold against near-black. */
.intro-lockup {
  position: fixed;
  z-index: 8;
  left: 50%;
  top: 50%;
  width: 300px;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  opacity: 1;
  animation: intro-lockup-left 0.72s 1.35s cubic-bezier(0.8, 0, 0.2, 1) forwards;
}
.intro-lockup img {
  width: 172px;
  height: 172px;
  filter: drop-shadow(0 0 18px rgba(212, 175, 55, 0.35));
}
.intro-lockup strong {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.3em;
  margin-right: -0.3em;
  color: var(--gold);
}
.intro-lockup--left { clip-path: inset(0 50% 0 0); }
.intro-lockup--right { clip-path: inset(0 0 0 50%); animation-name: intro-lockup-right; }

@keyframes intro-scan {
  0% { transform: translateX(-48vw); opacity: 0; }
  20%, 80% { opacity: 1; }
  100% { transform: translateX(48vw); opacity: 0; }
}
@keyframes intro-fade-out { to { opacity: 0; } }
@keyframes intro-door { to { transform: translateX(var(--door-x)); } }
@keyframes intro-hide { to { visibility: hidden; } }
@keyframes intro-lockup-left { to { transform: translate(-115vw, -50%); opacity: 0.18; } }
@keyframes intro-lockup-right { to { transform: translate(105vw, -50%); opacity: 0.18; } }

/* --------------------------------------------------------------------------
   18e. Project marks — ported from the r6.1 prototype, used by Cerberus
   --------------------------------------------------------------------------
   Two animated glyphs: an acoustic array (concentric rings + level bars) and
   a mesh network (a packet traversing a chain of nodes). In the prototype
   these stood for Caracal and Wynspan; here they stand for the two halves of
   Cerberus — what it senses, and what it watches over.
   -------------------------------------------------------------------------- */
.project-marks { display: grid; gap: 2px; }
.project-mark-cell {
  background: var(--navy);
  border: 1px solid var(--slate);
  border-top: 2px solid var(--gold);
  padding: 32px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
  transition: border-color 0.25s ease;
}
.project-mark-cell:hover { border-color: var(--gold); }
.project-mark-cell b {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 8px;
}
.project-mark-cell span {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-body);
}

.project-mark { width: 108px; flex: 0 0 108px; aspect-ratio: 1; position: relative; }

/* Acoustic array */
.acoustic-mark { display: grid; place-items: center; }
.acoustic-ring {
  position: absolute;
  border: 1px solid var(--gold-line);
  border-radius: 50%;
  animation: acoustic-pulse 3s ease-out infinite;
}
.acoustic-ring.ring-a { inset: 7%; }
.acoustic-ring.ring-b { inset: 22%; animation-delay: 0.2s; }
.acoustic-ring.ring-c { inset: 37%; animation-delay: 0.4s; }
@keyframes acoustic-pulse {
  0%, 65%, 100% { opacity: 0.28; }
  25% { opacity: 1; box-shadow: 0 0 18px rgba(212, 175, 55, 0.12); }
}
.wave-bars {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 40px;
  position: relative;
  z-index: 2;
}
.wave-bars i {
  display: block;
  width: 2px;
  background: var(--gold);
  height: 24%;
  animation: wave 1.3s ease-in-out infinite;
}
.wave-bars i:nth-child(2), .wave-bars i:nth-child(8) { height: 42%; animation-delay: 0.1s; }
.wave-bars i:nth-child(3), .wave-bars i:nth-child(7) { height: 70%; animation-delay: 0.2s; }
.wave-bars i:nth-child(4), .wave-bars i:nth-child(6) { height: 95%; animation-delay: 0.3s; }
.wave-bars i:nth-child(5) { height: 55%; animation-delay: 0.4s; }
@keyframes wave { 50% { transform: scaleY(0.52); opacity: 0.55; } }

/* Mesh network */
.mesh-mark svg { width: 100%; height: 100%; overflow: visible; }
.mesh-orbits { fill: none; stroke: rgba(212, 175, 55, 0.22); stroke-width: 0.62; }
.mesh-orbits circle:nth-child(2) { stroke: rgba(212, 175, 55, 0.32); }
.mesh-orbits circle:nth-child(3) { stroke: rgba(212, 175, 55, 0.34); }
.mesh-relays circle { fill: var(--gold); opacity: 0.34; }
.mesh-chain {
  fill: none;
  stroke: rgba(212, 175, 55, 0.68);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 0 2px rgba(212, 175, 55, 0.2));
  animation: mesh-build 10s cubic-bezier(0.2, 0.7, 0.25, 1) infinite;
}
.mesh-nodes { fill: #7a6641; stroke: rgba(212, 175, 55, 0.18); stroke-width: 4; }
.mesh-nodes circle { transform-box: fill-box; transform-origin: center; }
.mesh-nodes circle:nth-child(1) { animation: mesh-node-1 10s ease-in-out infinite; }
.mesh-nodes circle:nth-child(2) { animation: mesh-node-2 10s ease-in-out infinite; }
.mesh-nodes circle:nth-child(3) { animation: mesh-node-3 10s ease-in-out infinite; }
.mesh-nodes circle:nth-child(4) { animation: mesh-node-4 10s ease-in-out infinite; }
.mesh-nodes circle:nth-child(5) { animation: mesh-node-5 10s ease-in-out infinite; }
.mesh-packet {
  fill: #e3c37d;
  opacity: 0;
  filter: drop-shadow(0 0 4px rgba(227, 195, 125, 0.95));
  animation: mesh-packet 10s cubic-bezier(0.35, 0.05, 0.65, 0.95) infinite;
}
@keyframes mesh-build {
  0%, 8% { stroke-dashoffset: 1; opacity: 0.2; }
  42%, 92% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 1; opacity: 0.2; }
}
@keyframes mesh-packet {
  0%, 47% { opacity: 0; transform: translateX(0); }
  49% { opacity: 1; transform: translateX(0); }
  85% { opacity: 1; transform: translateX(76px); }
  89%, 100% { opacity: 0; transform: translateX(76px); }
}
@keyframes mesh-node-1 {
  0%, 46%, 53%, 100% { transform: scale(1); fill: #7a6641; }
  49% { transform: scale(1.5); fill: #e3c37d; }
}
@keyframes mesh-node-2 {
  0%, 54%, 61%, 100% { transform: scale(1); fill: #7a6641; }
  57% { transform: scale(1.5); fill: #e3c37d; }
}
@keyframes mesh-node-3 {
  0%, 63%, 70%, 100% { transform: scale(1); fill: #7a6641; }
  66% { transform: scale(1.5); fill: #e3c37d; }
}
@keyframes mesh-node-4 {
  0%, 72%, 79%, 100% { transform: scale(1); fill: #7a6641; }
  75% { transform: scale(1.5); fill: #e3c37d; }
}
@keyframes mesh-node-5 {
  0%, 81%, 88%, 100% { transform: scale(1); fill: #7a6641; }
  84% { transform: scale(1.5); fill: #e3c37d; }
}

@media (max-width: 768px) {
  .project-mark-cell { flex-direction: column; align-items: flex-start; gap: 20px; padding: 26px; }
}

/* --------------------------------------------------------------------------
   18d. Radar field — ambient hero background, from the r6.1 prototype
   -------------------------------------------------------------------------- */
.radar-field {
  position: absolute;
  right: -6%;
  top: 50%;
  transform: translateY(-50%);
  width: min(46vw, 680px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.13);
  background: radial-gradient(circle, rgba(212, 175, 55, 0.035), transparent 62%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}
.radar-orbit { position: absolute; border: 1px solid rgba(212, 175, 55, 0.18); border-radius: 50%; }
.radar-orbit.orbit-1 { inset: 11%; }
.radar-orbit.orbit-2 { inset: 25%; border-style: dashed; }
.radar-orbit.orbit-3 { inset: 38%; }
.radar-orbit.orbit-4 { inset: 47%; }

.radar-axis { position: absolute; background: rgba(212, 175, 55, 0.16); }
.radar-axis--x { left: -20%; right: -20%; height: 1px; top: 50%; }
.radar-axis--y { top: 0; bottom: 0; width: 1px; left: 50%; opacity: 0.25; }

.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0 318deg,
    rgba(212, 175, 55, 0.02) 330deg,
    rgba(212, 175, 55, 0.23) 358deg,
    rgba(212, 175, 55, 0.36)
  );
  animation: radar-rotate 8s linear infinite;
  filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.12));
}
.radar-origin {
  position: absolute;
  left: 50%; top: 50%;
  width: 9px; height: 9px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
/* Contacts light up as the sweep passes, then decay. Green rather than the
   prototype's red: on this site red reads as an error state.

   TIMING. The sweep's bright leading edge sits at conic angle 360deg — that
   is, straight up — and the element rotates clockwise over 8s. So at time t
   the edge points at bearing (t/8) x 360, measured clockwise from 12 o'clock,
   and a contact at bearing B must fire at:

       delay = B / 360 x 8

   The prototype's delays put every contact roughly 180deg out, so each one lit
   while the sweep was on the far side. Positions below are polar-derived and
   centred with translate(-50%,-50%), so the bearing is exact regardless of how
   large the field renders:

       x% = 50 + r x sin(B)      y% = 50 - r x cos(B)
   -------------------------------------------------------------------------- */
.radar-contact {
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #1d3a2a;
  opacity: 0.25;
  transform: translate(-50%, -50%);
}
/* B = 310deg, r = 34  ->  delay 310/360 x 8 = 6.889s */
.radar-contact.contact-a { left: 23.96%; top: 28.14%; animation: radar-ping 8s 6.889s infinite; }
/* B = 88deg,  r = 31  ->  delay  88/360 x 8 = 1.956s */
.radar-contact.contact-b { left: 80.98%; top: 48.92%; animation: radar-ping 8s 1.956s infinite; }
/* B = 143deg, r = 38  ->  delay 143/360 x 8 = 3.178s */
.radar-contact.contact-c { left: 72.87%; top: 80.35%; animation: radar-ping 8s 3.178s infinite; }

.radar-label {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.1em;
  color: var(--gold);
  opacity: 0.7;
}
.radar-label--a { left: 8%; top: 32%; }
.radar-label--b { right: 5%; bottom: 29%; }

@keyframes radar-rotate { to { transform: rotate(360deg); } }
@keyframes radar-ping {
  0%, 5% {
    opacity: 1;
    background: var(--green);
    box-shadow: 0 0 7px 2px rgba(61, 186, 107, 0.6), 0 0 0 8px rgba(61, 186, 107, 0.07);
  }
  18% { opacity: 0.42; background: #2f7a52; box-shadow: none; }
  45%, 100% { opacity: 0.16; background: #1d3a2a; box-shadow: none; }
}

@media (max-width: 1024px) {
  .radar-field { right: -30%; opacity: 0.3; }
}
@media (max-width: 768px) {
  .radar-field { display: none; }
  .intro-lockup { width: 200px; }
  .intro-lockup img { width: 112px; height: 112px; }
  .intro-lockup strong { font-size: 13px; }
}

/* --------------------------------------------------------------------------
   19. Scroll reveal
   -------------------------------------------------------------------------- */
/* Scoped to html.js so content is never hidden when scripting is unavailable.
   Distance and easing taken from the r6.1 prototype — a longer travel over a
   slower curve reads as deliberate rather than twitchy. */
.js .reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.75, 0.25, 1),
              transform 0.9s cubic-bezier(0.2, 0.75, 0.25, 1);
}
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .cursor, .dot-live, .badge--pulse::before { animation: none; }
  * { transition-duration: 0.01ms !important; }

  /* The intro is suppressed in JS as well, so it never renders at all — this
     is the belt to that braces. The radar keeps its shape but stops moving. */
  .intro { display: none; }
  .radar-sweep { display: none; }
  .radar-contact { opacity: 0.5; animation: none; }
  .intro-scan, .intro-door, .intro-lockup, .intro-kicker { animation: none; }

  /* Project marks keep their shape but hold still. */
  .acoustic-ring, .wave-bars i, .mesh-chain, .mesh-packet, .mesh-nodes circle {
    animation: none;
  }
  .mesh-chain { stroke-dashoffset: 0; opacity: 1; }
  .mesh-packet { opacity: 0; }
}

/* --------------------------------------------------------------------------
   20. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1280px) {
  :root { --gutter: 40px; }
  .cerberus-grid { grid-template-columns: 1fr 400px; gap: 48px; }
  .contact-grid, .profile-grid, .eng-split, .split-2, .split-copy { gap: 48px; }
  .case-inner { grid-template-columns: 1fr 300px; gap: 40px; }
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .card, .case-card, .quote-card, .team-card { padding: 32px; }
  .panel, .entry-card { padding: 36px; }
  .nav-links { gap: 22px; }
  .nav-links a { font-size: 12.5px; }
}

@media (max-width: 1024px) {
  .cerberus-grid, .contact-grid, .profile-grid,
  .eng-split, .split-2, .split-copy { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding: calc(var(--nav-h) + 72px) 0 72px; }
  .card-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .card-grid--2-center { width: 100%; }
  .case-inner { grid-template-columns: 1fr; gap: 40px; }
  .faq-cols { grid-template-columns: 1fr; gap: 0; }
  .section { padding: 88px 0; }
  .cta-band { padding: 88px 0; }
  .profile-side { display: grid; grid-template-columns: 200px 1fr; gap: 40px; align-items: center; }
  .profile-photo { margin-bottom: 0; }
  .nav-links { gap: 18px; }
}

@media (max-width: 768px) {
  :root { --gutter: 24px; }
  body { font-size: 14.5px; }
  /* Nav swap lives in its own 860px query above — the links run out of room
     well before this breakpoint. */
  .section, .cta-band { padding: 64px 0; }
  .section--mid, .section--tight { padding: 56px 0; }
  .page-head { padding: calc(var(--nav-h) + 64px) 0 56px; }
  .section-head { margin-bottom: 40px; }
  .card-grid--3, .card-grid--2, .card-grid--2-center,
  .case-grid, .tier-grid, .entry-grid, .values-grid,
  .form-grid, .terms-list, .profile-side { grid-template-columns: 1fr; }
  .card, .case-card, .quote-card, .team-card, .tier-card, .eng-card { padding: 28px; }
  .panel, .entry-card { padding: 28px; }
  /* Tables with a long prose column stack into labelled blocks on a phone.
     Three narrow columns turned one "Best for" cell into a 287px-tall stack
     of two-word lines, and pushed the table into horizontal scroll. The
     numeric tables (Role/Monthly, Day rates, PCB items) stay as tables —
     short label plus a figure reads fine in columns. */
  .rate-table--stack thead { display: none; }
  .rate-table--stack,
  .rate-table--stack tbody,
  .rate-table--stack tr,
  .rate-table--stack td {
    display: block;
    width: 100%;
  }
  .rate-table--stack tr {
    padding: 20px 0;
    border-bottom: 1px solid var(--slate);
  }
  .rate-table--stack tr:first-child { padding-top: 4px; }
  .rate-table--stack tbody tr:last-child { border-bottom: 0; padding-bottom: 0; }
  .rate-table--stack td {
    border: 0;
    padding: 0 0 14px;
  }
  .rate-table--stack td:last-child { padding-bottom: 0; }

  /* The label that was the column header. */
  .rate-table--stack td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--gold);
    margin-bottom: 6px;
  }
  /* First cell is the row's name — it heads the block, so no label above it. */
  .rate-table--stack td:first-child::before { content: none; }
  .rate-table--stack td:first-child {
    font-family: var(--font-display);
    font-size: 13px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: var(--text);
    padding-bottom: 16px;
  }
  /* Prices left-align once they are stacked rather than in a column. */
  .rate-table--stack td.num { text-align: left; font-size: 15px; }

  /* Michroma is a wide face — roughly 1.17em per character — so its clamp()
     minimums are too large once the column is only ~260px. Case study titles
     were running to five lines (135px) and page headings to four.
     Section h2s are left alone: three stacked lines is the intended look. */
  .case-card h3 { font-size: 15px; line-height: 1.5; }
  .page-head h1 { font-size: 26px; line-height: 1.25; }

  .stat-row { flex-direction: column; }
  .footer .container { flex-direction: column; align-items: flex-start; text-align: left; }
  .footer-links { gap: 18px; }
  .profile-name { font-size: 30px; }
  .terminal-body { font-size: 11px; padding: 18px 16px 22px; line-height: 1.9; }
  .btn-row { flex-direction: column; align-items: stretch; }
  /* Long button labels must wrap rather than force the row wider than the card. */
  .btn-gold, .btn-gold-filled {
    justify-content: center;
    white-space: normal;
    text-align: center;
    padding-left: 20px;
    padding-right: 20px;
  }
  .meta-panel dl { grid-template-columns: 1fr; gap: 4px 0; }
  .meta-panel dd { text-align: left; padding-bottom: 12px; }
  .scoping-block { flex-direction: column; align-items: flex-start; }
  .pull-quote { padding: 20px 24px; font-size: 15px; }

  /* Tap targets. These links sit at 17–23px tall from their line-height
     alone, under the 24px minimum. Padding rather than font-size, so nothing
     about the type changes. */
  .footer-links a { padding: 6px 0; }
  .contact-list a.v { display: inline-block; padding: 5px 0; }
  .cal-strip a { display: inline-block; padding: 5px 0; }
  .link-gold { padding: 6px 0; }
  .icon-link { padding: 6px 0; }
  .panel .lead a { display: inline-block; padding: 3px 0; }
}
