/* ============================================================
   Fertility Consultants International - styles.css
   Palette drawn from dark-field microscopy: deep petrol field,
   warm specimen gold, clinical teal, paper white.
   Signature device: micrometer / eyepiece-graticule tick scales.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --paper: #FAFBFC;
  --paper-2: #F0F4F8;
  --ink: #121212;
  --ink-soft: #3B4E63;
  --ink-faint: #627B94;
  --teal: #121212;
  --teal-deep: #1A365D;
  --teal-tint: #EBF8FF;
  --gold: #3182CE;
  --gold-soft: #63B3ED;
  --gold-faint: rgba(49, 130, 206, 0.25);
  --field: #121212;
  --field-deep: #060E1A;
  --field-line: rgba(99, 179, 237, 0.15);
  --field-text: #E2E8F0;
  --mist: #CBD5E0;
  --line: #E2E8F0;

  --font-display: "Zodiak", Georgia, "Times New Roman", serif;
  --font-body: "Switzer", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 4px;
  --shadow-soft: 0 20px 60px -30px rgba(11, 34, 40, .35);
  --ease: cubic-bezier(.22, .7, .3, 1);
  --nav-h: 76px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

.hello {
  font-size: 30px !important;
  padding-bottom: 15px;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

.btnimran {
  color: white !important;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--teal-deep);
}

::selection {
  background: #E9F1F8;
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  z-index: 200;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Layout primitives ---------- */
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap-narrow {
  max-width: 860px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main {
  display: block;
}

section {
  position: relative;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.015em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.35rem);
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  line-height: 1.2;
}

h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
}

.lede {
  font-size: clamp(1.125rem, 1.7vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 46ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--teal);
}



.on-dark .eyebrow {
  color: #fff;
}

.eyebrow.gold {
  color: var(--gold-soft);
}

p+p {
  margin-top: 1em;
}

/* ---------- Signature: graticule tick scale ---------- */
.ticks {
  height: 16px;
  position: relative;
  pointer-events: none;
}

.ticks::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 4px;
  bottom: 4px;
  background: repeating-linear-gradient(90deg, var(--mist) 0 1px, transparent 1px 9px);
}

.ticks::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, #C4CDC7 0 1px, transparent 1px 55px);
}

.on-dark .ticks::before,
.ticks.dark::before {
  background: repeating-linear-gradient(90deg, rgba(222, 186, 122, .24) 0 1px, transparent 1px 9px);
}

.on-dark .ticks::after,
.ticks.dark::after {
  background: repeating-linear-gradient(90deg, rgba(222, 186, 122, .5) 0 1px, transparent 1px 55px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  background: var(--teal);
  color: #fff;
  font-weight: 500;
  font-size: .98rem;
  letter-spacing: .01em;
  text-decoration: none;
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}

.btn:hover {
  background: var(--teal-deep);
  border-color: var(--teal-deep);
  color: #fff;
  transform: translateY(-1px);
}

.btn .arr {
  transition: transform .25s var(--ease);
}

.btn:hover .arr {
  transform: translateX(4px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(16, 38, 46, .28);
}

.btn-ghost:hover {
  background: rgba(16, 38, 46, .05);
  color: var(--ink);
  border-color: var(--ink);
}

.on-dark .btn-ghost {
  color: var(--field-text);
  border-color: rgba(215, 226, 224, .35);
}

.on-dark .btn-ghost:hover {
  background: rgba(215, 226, 224, .08);
  color: #fff;
  border-color: rgba(215, 226, 224, .7);
}

.btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--field-deep);
}

.btn-gold:hover {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
  color: var(--field-deep);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  text-decoration: none;
  color: var(--teal);
  position: relative;
}

.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(.35);
  transform-origin: left;
  transition: transform .3s var(--ease);
}

.text-link:hover::after {
  transform: scaleX(1);
}

/* Mobile: let long text-links wrap naturally, arrow stays with last word */
@media (max-width: 640px) {
  .text-link {
    display: inline;
  }
  .text-link span {
    white-space: nowrap;
  }
  .text-link::after {
    display: none;
  }
}

.on-dark .text-link {
  color: var(--gold-soft);
}

/* ---------- Progress bar (instant nav) ---------- */
#nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--gold);
  z-index: 300;
  opacity: 0;
  transition: width .3s ease, opacity .3s ease;
}

#nav-progress.active {
  opacity: 1;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 247, .86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  /* GPU layer promotion — eliminates backdrop-filter repaint flicker on scroll */
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.nav-bar {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  /* Contain layout so child changes don't trigger full-page reflow */
  contain: layout style;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: var(--ink);
}

.brand-logo {
  height: 38px;
  width: auto;
  display: block;
}

.site-footer .brand-logo {
  filter: brightness(0) invert(1);
}

@media (min-width: 1021px) {
  .nav-bar .brand {
    flex: 1 0 0;
  }

  .nav-bar nav {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
  }

  .nav-bar .header-cta {
    flex: 1 0 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
  }
}

.header-phone-link,
.header-text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 6px;
  transition: background .2s var(--ease), color .2s var(--ease);
}

.header-phone-link svg,
.header-text-link svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2px;
  color: var(--ink-faint);
  transition: color .2s ease;
}

.header-phone-link:hover,
.header-text-link:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.header-phone-link:hover svg,
.header-text-link:hover svg {
  color: var(--gold);
}

.header-phone-link.icon-only,
.header-text-link.icon-only {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  flex: none;
}

.header-phone-link.icon-only svg,
.header-text-link.icon-only svg {
  width: 18px;
  height: 18px;
}

.header-phone-link.icon-only:hover,
.header-text-link.icon-only:hover {
  background: var(--ink);
  color: #fff;
}

.header-phone-link.icon-only:hover svg,
.header-text-link.icon-only:hover svg {
  color: var(--gold-soft);
}

.nav-cta {
  white-space: nowrap;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}

.desktop-cta-only {
  display: block;
}

.mobile-cta-only {
  display: none !important;
}

.brand-mark {
  flex: none;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.22rem;
  line-height: 1.1;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.brand-name small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 7px;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 4px;
}

/* Footer inverted logo branding */
.site-footer .brand {
  text-decoration: none;
}

.site-footer .brand-name {
  color: #fff;
}

.site-footer .brand-name small {
  color: var(--gold-soft);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
}

.nav-links>li {
  position: relative;
}

.nav-links a,
.nav-links button.nav-drop-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: .95rem;
  font-weight: 500;
  background: none;
  border: 0;
  cursor: pointer;
  border-radius: var(--radius);
  transition: color .2s ease, background .2s ease;
}

.nav-links a:hover,
.nav-links button.nav-drop-btn:hover {
  color: var(--ink);
  background: rgba(16, 38, 46, .045);
}

.nav-links a[aria-current="page"] {
  color: var(--teal);
}

.nav-links .caret {
  transition: transform .2s ease;
}

.nav-drop {
  position: relative;
}

.nav-drop-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 380px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  padding: 12px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}

.nav-drop.open>.nav-drop-menu,
.nav-drop:focus-within>.nav-drop-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-drop.open .caret {
  transform: rotate(180deg);
}

.nav-drop-menu li {
  margin-bottom: 2px;
}

.nav-drop-menu li:last-child {
  margin-bottom: 0;
}

.nav-drop-menu a {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink-soft);
  transition: background .2s var(--ease), color .2s var(--ease);
}

.nav-drop-menu a:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.nav-drop-menu svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--ink-faint);
  transition: color .2s ease;
}

.nav-drop-menu a:hover svg {
  color: var(--gold);
}

.nav-drop-menu div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.nav-drop-menu strong {
  display: block;
  font-family: var(--font-body);
  font-size: .94rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.nav-drop-menu span {
  display: block;
  font-size: .78rem;
  color: var(--ink-faint);
  line-height: 1.45;
  margin-top: 3px;
}

.nav-drop-menu .menu-label {
  padding: 10px 14px 6px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: left;
}

.nav-cta {
  margin-left: 8px;
  padding: 11px 20px;
  font-size: .92rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(32px, 5vw, 64px) 0 0;
  overflow: hidden;
  position: relative;
  background-color: var(--paper);
  z-index: 1;
}

.hero .divider {
  padding-top: clamp(48px, 6vw, 88px);
  position: relative;
  z-index: 2;
}

.progressive-blur-bottom {
  pointer-events: none;
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 220px;
  z-index: 1;
  background: linear-gradient(to bottom, transparent, var(--paper));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  mask-image: linear-gradient(to top, black 35%, transparent);
  -webkit-mask-image: linear-gradient(to top, black 35%, transparent);
  user-select: none;
  -webkit-user-select: none;
  /* GPU layer promotion — prevents backdrop-filter repaint on scroll */
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Animated radial glow */
.hero::before {
  content: "";
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  z-index: -2;
  background: radial-gradient(circle at 50% 30%, rgba(56, 189, 248, 0.30) 0%, rgba(147, 197, 253, 0.08) 15%, transparent 33%);
  filter: blur(30px);
  animation: glow-move 22s ease-in-out infinite alternate;
  pointer-events: none;
  /* GPU layer — keeps expensive blur+animation off main thread */
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Grainy noise overlay */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.055'/%3E%3C/svg%3E");
  pointer-events: none;
  /* GPU layer — avoids repainting noise texture during scroll */
  will-change: transform;
  transform: translateZ(0);
}

@keyframes glow-move {
  0% {
    transform: translate(-3%, -3%) scale(0.95);
  }

  50% {
    transform: translate(3%, 3%) scale(1.08);
  }

  100% {
    transform: translate(-2%, 2%) scale(0.98);
  }
}


.hero-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 1080px;
  margin-inline: auto;
}

.hero .eyebrow {
  justify-content: center;
}



.hero h1 {
  max-width: 32ch;
  margin-inline: auto;
}

.hero h1 em {
  font-style: italic;
}

.hero .lede {
  margin-top: 24px;
  margin-inline: auto;
  max-width: 72ch;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
}

.hero-note {
  margin-top: 30px;
  font-size: .85rem;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.hero-note::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.scope-figure {
  position: relative;
  margin-inline: auto;
  max-width: 480px;
  width: 100%;
}

.scope-figure svg {
  width: 100%;
  height: auto;
}

.scope-caption {
  margin-top: 14px;
  text-align: center;
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- Stat band (dark field) ---------- */
.on-dark {
  background:
    radial-gradient(1200px 480px at 74% 10%, rgba(199, 154, 75, .13), transparent 62%),
    linear-gradient(180deg, var(--field), var(--field-deep));
  color: var(--field-text);
}

.on-dark h1,
.on-dark h2,
.on-dark h3 {
  color: #F3F1EA;
}

.on-dark .lede,
.on-dark p {
  color: var(--field-text);
}

.on-dark a {
  color: var(--gold-soft);
}

.on-dark .prose p {
  color: var(--field-text);
}

.on-dark .prose strong {
  color: #ffffff;
}

.on-dark .btn {
  color: #ffffff;
}

.on-dark .btn-gold {
  color: var(--field-deep);
}

.on-dark .btn-gold:hover {
  color: var(--field-deep);
}

.stats {
  padding: clamp(56px, 7vw, 96px) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(24px, 3vw, 48px);
  margin-top: 42px;
}

.stat {
  border-left: 1px solid var(--field-line);
  padding-left: 22px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  line-height: 1;
  color: var(--gold-soft);
}

.stat-num sup {
  font-size: .45em;
  top: -.9em;
}

.stat-label {
  margin-top: 10px;
  font-size: .92rem;
  color: var(--field-text);
  max-width: 22ch;
}

/* ---------- Stats Cards (Separate Cards inside Hero, Highlighted Last) ---------- */
.hero-stats {
  position: relative;
  z-index: 2;
}

.hero-stats .stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.hero-stats .stat {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: 0 4px 18px rgba(10, 25, 47, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 220px;
  height: 100%;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  border-left: 1px solid var(--line);
}

.hero-stats .stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(10, 25, 47, 0.06);
}

.hero-stats .stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.5vw, 3.2rem);
  line-height: 1;
  color: var(--gold);
  font-weight: 700;
}

.hero-stats .stat-label {
  margin-top: 16px;
  font-size: .94rem;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 100%;
}

.hero-stats .stat-label a {
  color: var(--gold);
  text-decoration: underline;
}

.hero-stats .stat-label a:hover {
  color: var(--ink);
}

@media (max-width: 1020px) {
  .hero-stats .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .hero-stats .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .hero-stats .stat {
    min-height: auto;
    padding: 18px 12px;
  }
}

@media (max-width: 480px) {
  .hero-stats .stats-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .hero-stats .stat {
    padding: 24px 20px;
  }
}

/* ---------- Section scaffolding ---------- */
.section {
  padding: clamp(64px, 9vw, 120px) 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.section-head h2 {
  margin-top: 16px;
}

.section-head .lede {
  margin-top: 18px;
}

.section-tight {
  padding: clamp(48px, 6vw, 88px) 0;
}

.divider {
  padding: clamp(24px, 4vw, 48px) 0;
}

.divider .ticks {
  margin-inline: var(--gutter);
}

/* ---------- Two-column prose ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.split.reverse {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.split-sticky {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
}

.split-sticky img {
  border-radius: 6px;
  margin-top: 18px;
  max-width: min(100%, 440px);
}

#who-we-are .prose p {
  font-size: .95rem;
  line-height: 1.6;
}

#who-we-are h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
}

.prose p {
  margin-bottom: 1.1em;
  color: var(--ink-soft);
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose ul {
  padding-left: 20px;
  color: var(--ink-soft);
}

.prose li {
  margin-bottom: .5em;
}

.prose li::marker {
  color: var(--gold);
}

/* ---------- Numbered diagnostic list ---------- */
.qlist {
  list-style: none;
  padding: 0;
  counter-reset: q;
  max-width: 780px;
}

.qlist li {
  counter-increment: q;
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-family: var(--font-display);
  line-height: 1.35;
}

.qlist li:first-child {
  border-top: 1px solid var(--line);
}

.qlist li::before {
  content: "0" counter(q);
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--gold);
  padding-top: 6px;
}

/* ---------- Service cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  background: var(--paper);
  padding: clamp(26px, 3vw, 38px);
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 240px;
  position: relative;
  transition: background .3s var(--ease);
}

.card:hover {
  background: #fff;
  color: var(--ink);
}

.card::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}

.card:hover::after {
  transform: scaleX(1);
}

.card-kicker {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--teal);
}

.card h3 {
  font-size: 1.35rem;
}

.card p {
  color: var(--ink-soft);
  font-size: .96rem;
  flex-grow: 1;
}

.dummy-card {
  background: #F0F4F8;
  position: relative;
  z-index: 1;
  margin: 0 -1px -1px 0;
}

.card .text-link {
  font-size: .92rem;
}

/* ---------- Media / photo blocks ---------- */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-2);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-tag {
  display: none;
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: rgba(7, 27, 32, .78);
  color: var(--field-text);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 3px;
  border: 1px solid rgba(222, 186, 122, .25);
}

.media-frame {
  border: 1px solid var(--line);
  padding: 10px;
  background: #fff;
  border-radius: 6px;
  box-shadow: var(--shadow-soft);
}

.media-frame .media {
  border-radius: 3px;
}

/* ---------- Case study feature (dark) ---------- */
.case-feature {
  padding: clamp(72px, 9vw, 128px) 0;
  overflow: hidden;
}

.case-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
}

.case-points {
  list-style: none;
  padding: 0;
  margin-top: 28px;
}

.case-points li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid rgba(222, 186, 122, .14);
  font-size: .98rem;
  color: var(--field-text);
}

.case-points li::before {
  content: "";
  flex: none;
  width: 14px;
  height: 1px;
  background: var(--gold);
  transform: translateY(-4px);
}

.case-media-stack {
  display: grid;
  gap: 16px;
}

.case-media-stack .media {
  aspect-ratio: 16 / 10;
}

.case-media-stack .media:nth-child(2) {
  margin-left: 12%;
  margin-top: -9%;
  box-shadow: var(--shadow-soft);
}

/* ---------- Founder band ---------- */
.founder {
  background: #FAFBFC;
  padding-bottom: clamp(16px, 3vw, 32px);
}

.founder+.cta-panel {
  padding-top: clamp(16px, 3vw, 32px);
  padding-top: 100px !important;
}

.founder-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.founder .media {
  aspect-ratio: 4 / 5;
  max-width: 420px;
}

.founder-creds {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.chip {
  font-size: .8rem;
  font-weight: 500;
  color: var(--teal-deep);
  background: var(--teal-tint);
  border: 1px solid #D6E1DD;
  padding: 7px 14px;
  border-radius: 100px;
}

/* ---------- Engagement principles ---------- */
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}

.principle {
  border-top: 2px solid var(--gold);
  padding-top: 22px;
}

.principle h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.principle p {
  color: var(--ink-soft);
  font-size: .97rem;
}

/* ---------- CTA panel ---------- */
.cta-panel {
  text-align: center;
  padding: clamp(80px, 11vw, 150px) 0;
}

.cta-panel h2 {

  max-width: 24ch;
  margin-inline: auto;
}

.cta-panel .lede {
  margin: 20px auto 0;
}

.cta-panel .hero-ctas {
  justify-content: center;
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: clamp(56px, 8vw, 100px) 0 clamp(36px, 5vw, 64px);
}

.page-hero .lede {
  margin-top: 22px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: .82rem;
  color: var(--ink-faint);
  margin-bottom: 26px;
  list-style: none;
  padding: 0;
}

.breadcrumbs a {
  color: var(--ink-faint);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--teal);
}

.breadcrumbs li+li::before {
  content: "/";
  margin-right: 8px;
  color: var(--mist);
}

/* ---------- Article / detail layout ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(36px, 6vw, 90px);
  align-items: start;
}

.aside-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 26px;
  position: sticky;
  top: calc(var(--nav-h) + 28px);
}

.aside-card h3 {
  font-size: 1.1rem;
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 8px;
}

.aside-card p {
  font-size: .92rem;
  color: var(--ink-soft);
}

.aside-card .btn {
  width: 100%;
  justify-content: center;
  margin-top: 18px;
}

.aside-links {
  list-style: none;
  padding: 0;
  margin-top: 6px;
}

.aside-links li {
  border-bottom: 1px solid var(--line);
}

.aside-links li:last-child {
  border-bottom: 0;
}

.aside-links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 2px;
  text-decoration: none;
  font-size: .93rem;
  color: var(--ink-soft);
}

.aside-links a:hover {
  color: var(--teal);
}

.aside-links a[aria-current="page"] {
  color: var(--teal);
  font-weight: 500;
}

/* ---------- Case study page ---------- */
.case-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
  margin-top: clamp(32px, 5vw, 56px);
}

.case-meta>div {
  background: var(--paper);
  padding: 20px 22px;
}

.case-meta dt {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.case-meta dd {
  margin: 6px 0 0;
  font-size: 1rem;
  font-weight: 500;
}

.workstreams {
  list-style: none;
  padding: 0;
  counter-reset: w;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.workstreams li {
  counter-increment: w;
  background: var(--paper);
  padding: 24px 26px;
}

.workstreams li::before {
  content: "0" counter(w);
  display: block;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .15em;
  color: var(--gold);
  margin-bottom: 10px;
}

.workstreams h4 {
  margin-bottom: 6px;
}

.workstreams p {
  font-size: .93rem;
  color: var(--ink-soft);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery .media {
  aspect-ratio: 4 / 3;
}

/* ---------- Carousel (MFI gallery) ---------- */
.carousel {
  position: relative;
  max-width: 980px;
  margin-inline: auto;
}

.carousel-viewport {
  position: relative;
  border: 1px solid var(--line);
  padding: 10px;
  background: #fff;
  border-radius: 6px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border-radius: 3px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.carousel-slide img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 3px;
  background: var(--paper-2);
}

.carousel-tag {
  pointer-events: none;
  left: 24px;
  bottom: 24px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(10, 25, 47, .12);
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}

.carousel.is-ready .carousel-btn {
  display: inline-flex;
}

.carousel-btn:hover {
  background: var(--ink);
  color: #fff;
}

.carousel-prev {
  left: -12px;
}

.carousel-next {
  right: -12px;
}

.carousel-btn:active {
  transform: translateY(-50%) scale(.94);
}

.carousel-footer {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 18px;
}

.carousel.is-ready .carousel-footer {
  display: flex;
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 100px;
  background: var(--mist);
  cursor: pointer;
  transition: background .25s var(--ease), width .25s var(--ease);
}

.carousel-dot[aria-selected="true"] {
  width: 24px;
  background: var(--gold);
}

.carousel-count {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .carousel-btn {
    width: 38px;
    height: 38px;
  }

  .carousel-prev {
    left: 8px;
  }

  .carousel-next {
    right: 8px;
  }

  .carousel-tag {
    left: 18px;
    bottom: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track {
    scroll-behavior: auto;
  }
}

.pull-result {
  border-left: 2px solid var(--gold);
  padding-left: clamp(20px, 3vw, 36px);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.3;
  max-width: 26ch;
}

.pull-result .attribution {
  display: block;
  margin-top: 16px;
  font-family: var(--font-body);
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- Reference lists (publications, presentations, abstracts) ---------- */
.ref-list {
  list-style: none;
  padding: 0;
  counter-reset: ref;
}

.ref-list li {
  counter-increment: ref;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.ref-list li::before {
  content: counter(ref, decimal-leading-zero);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--gold);
  padding-top: 5px;
}

.ref-title {
  font-weight: 500;
}

.ref-title a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-faint);
  transition: border-color .2s, color .2s;
}

.ref-title a:hover {
  color: var(--teal);
  border-color: var(--teal);
}

.ref-src {
  display: block;
  margin-top: 5px;
  font-size: .88rem;
  color: var(--ink-faint);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: start;
}

.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(26px, 4vw, 44px);
  box-shadow: var(--shadow-soft);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: .86rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.field label .opt {
  font-weight: 400;
  color: var(--ink-faint);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  background: var(--paper);
  border: 1px solid #D8DED9;
  border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(19, 94, 102, .14);
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.field .error-msg {
  display: none;
  margin-top: 6px;
  font-size: .82rem;
  color: #A33B2E;
}

.field.invalid input,
.field.invalid textarea {
  border-color: #C0563F;
}

.field.invalid .error-msg {
  display: block;
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  height: 0;
  overflow: hidden;
}

.form-status {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: .94rem;
}

.form-status.ok {
  display: block;
  background: #EAF3EC;
  border: 1px solid #BBD8C2;
  color: #1F5B33;
}

.form-status.err {
  display: block;
  background: #F8ECE8;
  border: 1px solid #E4C0B5;
  color: #8C3A28;
}

.form-consent {
  font-size: .82rem;
  color: var(--ink-faint);
  margin-top: 14px;
}

.office {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.office:first-of-type {
  border-top: 1px solid var(--line);
}

.office h3 {
  font-size: 1.06rem;
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 8px;
}

.office p {
  color: var(--ink-soft);
  font-size: .96rem;
}

.office a {
  text-decoration: none;
}

.contact-direct {
  margin-top: 28px;
}

.contact-direct a {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-faint);
}

/* ---------- Founder Section ---------- */
.founder {
  background: #FAFBFC;
  max-width: var(--wrap);
  width: calc(100% - (var(--gutter) * 2));
  margin-inline: auto;
  margin-top: clamp(24px, 3vw, 48px);
  border-radius: 32px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #121212;
  color: var(--field-text);
  border-radius: 32px;

  margin-left: clamp(16px, 4vw, 40px);
  margin-right: clamp(16px, 4vw, 40px);
  margin-bottom: clamp(16px, 4vw, 40px);
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2.4fr));
  gap: clamp(28px, 4vw, 56px);
  padding: clamp(56px, 7vw, 88px) 0 48px;
}

.footer-brand .brand-name {
  color: #F3F1EA;
}

.footer-brand .brand-name small {
  color: #fff;
}

.footer-blurb {
  margin-top: 18px;
  font-size: .93rem;
  color: #9FB3B1;
  max-width: 34ch;
}

.footer-col h4 {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 9px;
}

.footer-col a {
  color: #B9C9C7;
  text-decoration: none;
  font-size: .93rem;
  transition: color .2s;
}

.footer-col a:hover {
  color: #fff;
}

.footer-col address {
  font-style: normal;
  font-size: .9rem;
  color: #9FB3B1;
  line-height: 1.7;
  white-space: nowrap;
}

.footer-bottom {
  border-top: 1px solid rgba(222, 186, 122, .14);
  padding: 22px 0 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: .82rem;
  color: #7E9694;
}

.footer-bottom a {
  color: #9FB3B1;
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal-d1 {
  transition-delay: .08s;
}

.reveal-d2 {
  transition-delay: .16s;
}

.reveal-d3 {
  transition-delay: .24s;
}

/* Page transition fallback (when View Transitions unsupported) */
main.page-leave {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
}

main.page-enter {
  opacity: 0;
  transform: translateY(6px);
}

main.page-enter-active {
  opacity: 1;
  transform: none;
  transition: opacity .28s var(--ease), transform .28s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal.in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  main.page-leave,
  main.page-enter,
  main.page-enter-active {
    transition: none;
    transform: none;
    opacity: 1;
  }

  .scope-rotor {
    animation: none !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- Scope illustration ---------- */
.scope-rotor {
  transform-origin: 260px 260px;
  animation: scope-spin 90s linear infinite;
}

@keyframes scope-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- 404 ---------- */
.page-404 {
  text-align: center;
  padding: clamp(90px, 14vw, 180px) 0;
}

.page-404 h1 {
  font-size: clamp(4rem, 12vw, 8rem);
  color: var(--teal);
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {

  .desktop-btn-only {
    display: none !important;
  }

  .nav-bar {
    gap: 10px;
    align-items: center;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .header-cta {
    flex: none;
    gap: 8px;
  }

  .mobile-cta-only {
    display: block !important;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .site-header.menu-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 14px var(--gutter) 26px;
    max-height: calc(100dvh - var(--nav-h));
    overflow: auto;
  }

  .site-header.menu-open .nav-links>li>a,
  .site-header.menu-open .nav-links>li>button.nav-drop-btn {
    width: 100%;
    justify-content: space-between;
    padding: 13px 10px;
    font-size: 1.02rem;
  }

  .nav-drop-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    display: none;
    margin: 4px 10px 0;
    padding: 8px 0 6px;
  }

  .nav-drop-menu a {
    width: 100%;
    justify-content: flex-start;
    padding: 10px 12px;
    gap: 10px;
    border-radius: 10px;
  }

  .nav-drop-menu .menu-label {
    padding: 10px 12px 6px;
  }

  .nav-drop.open>.nav-drop-btn {
    background: rgba(16, 38, 46, .045);
    color: var(--ink);
  }

  .nav-drop.open>.nav-drop-menu {
    display: block;
    transform: none;
  }

  .mobile-nav-booking {
    margin-top: 18px;
    padding: 0 10px;
  }

  .mobile-nav-booking .nav-cta {
    background: #121212 !important;
    color: #fff !important;
    border: 1px solid #121212 !important;
    border-radius: var(--radius);
    padding: 14px 20px;
    font-weight: 500;
    justify-content: center;
    align-items: center;
    display: flex;
    width: 100%;
    margin: 0;
    transition: background .2s var(--ease);
  }

  .mobile-nav-booking .nav-cta:hover {
    background: #232323 !important;
    border-color: #232323 !important;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-grid,
  .case-grid,
  .founder-grid,
  .contact-grid,
  .detail-grid,
  .split,
  .split.reverse {
    grid-template-columns: 1fr;
  }

  .scope-figure {
    max-width: 380px;
    margin-top: 8px;
  }

  .aside-card,
  .split-sticky {
    position: static;
  }

  .case-media-stack .media:nth-child(2) {
    margin-left: 8%;
    margin-top: -6%;
  }

  .case-meta {
    grid-template-columns: repeat(2, 1fr);
  }

  .founder-grid .media-frame {
    max-width: 440px;
    margin-inline: auto;
  }

  .founder .media {
    margin-inline: auto;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --nav-h: 66px;
  }

  .brand-name {
    font-size: .96rem;
  }

  .header-cta {
    gap: 6px;
  }

  .header-phone-link.icon-only,
  .header-text-link.icon-only,
  .nav-toggle {
    width: 40px;
    height: 40px;
  }

  body.home .hero {
    padding-top: 24px;
  }

  body.home .hero h1 {
    font-size: clamp(2.15rem, 10.5vw, 3rem);
  }

  body.home .hero .lede {
    margin-top: 18px;
    font-size: 1.02rem;
    line-height: 1.5;
  }

  body.home .hero-ctas {
    gap: 10px;
    margin-top: 28px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
  }

  .card-grid,
  .workstreams,
  .gallery {
    grid-template-columns: 1fr;
  }

  .dummy-card {
    display: none;
  }

  .case-meta {
    grid-template-columns: 1fr 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .qlist li {
    grid-template-columns: 46px 1fr;
    gap: 12px;
  }

  .ref-list li {
    grid-template-columns: 40px 1fr;
    gap: 12px;
  }

  .footer-main {
    grid-template-columns: 1fr;
  }

  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: .95rem;
  }

  body.home .hero-note {
    margin-top: 24px;
    font-size: .8rem;
  }

  body.home .hero-note::before {
    display: none;
  }

  /* Centered footer on phones */
  .site-footer {
    text-align: center;
    margin-left: 12px;
    margin-right: 12px;
  }

  .site-footer .footer-brand .brand {
    justify-content: center;
  }

  .footer-blurb {
    margin-inline: auto;
  }

  .footer-main {
    gap: 36px;
    padding-bottom: 40px;
  }

  .footer-col a {
    justify-content: center;
  }

  .footer-col address {
    font-size: .82rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .brand-name small {
    letter-spacing: 5px;
  }
}

@media (max-width: 380px) {
  .brand-name {
    font-size: .95rem;
  }

  .brand-name small {
    letter-spacing: 4px;
  }
}

/* ---------- Home page: fully centered layout on phones only ---------- */
@media (max-width: 640px) {

  body.home .section-head,
  body.home .split,
  body.home .split-sticky,
  body.home .prose,
  body.home .founder-grid,
  body.home .hero-stats .stat,
  body.home .card {
    text-align: center;
  }

  body.home .section-head {
    margin-inline: auto;
  }

  body.home .lede {
    margin-inline: auto;
  }

  body.home .card {
    align-items: center;
  }

  body.home .card .text-link,
  body.home .text-link {
    justify-content: center;
  }

  body.home .founder-creds {
    justify-content: center;
  }

  body.home .split-sticky img {
    margin-inline: auto;
  }

  body.home .founder-grid .media-frame {
    margin-inline: auto;
  }

  body.home .hero-stats .stat-label {
    margin-inline: auto;
    max-width: 30ch;
  }
}

/* ---------- Site Bottom Progressive Blur ---------- */
.site-progressive-blur-bottom {
  pointer-events: none;
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 120px;
  z-index: 9999;
  user-select: none;
  -webkit-user-select: none;
  background: linear-gradient(to bottom, transparent, var(--paper));

  /* Modern CSS progressive/gradient blur */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);

  /* Mask limits the backdrop blur and background gradient to fade out smoothly */
  -webkit-mask-image: linear-gradient(to top, black 30%, transparent);
  mask-image: linear-gradient(to top, black 30%, transparent);

  /* Smooth opacity transition for IntersectionObserver hide/show */
  opacity: 1;
  transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  /* GPU layer promotion — prevents backdrop-filter repaint on scroll */
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.site-progressive-blur-bottom.hide-blur {
  opacity: 0;
}

/* ---------- Print ---------- */
@media print {

  .site-header,
  .site-footer,
  .site-progressive-blur-bottom,
  .hero-ctas,
  .btn,
  #nav-progress {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}

/* ============================================================
   v7 - Research filter component + responsive polish (additive)
   ============================================================ */

/* ---------- Accessibility helper ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Reference list filter ---------- */
.ref-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.ref-filter-input {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 480px;
  min-width: 0;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  transition: border-color .2s, box-shadow .2s;
}

.ref-filter-input:focus-within {
  border-color: var(--teal, #0B2228);
  box-shadow: 0 0 0 3px rgba(16, 38, 46, .07);
}

.ref-filter-input svg {
  flex: none;
  color: var(--ink-faint);
}

.ref-filter-input input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .95rem;
}

.ref-count {
  font-size: .88rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.ref-list li[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .ref-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .ref-count {
    text-align: right;
  }
}

/* ---------- MFI Case Study Notification ---------- */
.mfi-notification {
  position: fixed;
  bottom: clamp(16px, 4vw, 32px);
  right: clamp(16px, 4vw, 32px);
  z-index: 10000;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #121212;
  border: 1px solid rgba(16, 38, 46, 0.08);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(10, 25, 47, 0.07);
  width: min(320px, calc(100vw - 32px));
  padding: 10px 12px;
  display: flex;
  align-items: center;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
  transform: translateY(20px);
  opacity: 0;
}

.mfi-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.mfi-notification.hide {
  display: none !important;
}

.mfi-notification-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: 0;
  font-size: 1rem;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color .2s var(--ease);
}

.mfi-notification-close:hover {
  color: var(--ink);
}

.mfi-notification-content {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.mfi-notification-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 6px;
  background: #f7f9fa;
  border: 1px solid rgba(0, 0, 0, 0.05);
  flex: none;
}

.mfi-notification-text {
  flex: 1;
  min-width: 0;
}

.mfi-notification-text h4 {
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 700;
  margin: 0 0 1px;
  color: var(--ink);
  padding-right: 12px;
}

.mfi-notification-text p {
  font-size: .74rem;
  line-height: 1.3;
  color: var(--ink-soft);
  margin: 0;
}

.mfi-notification-text p a {
  color: #3182CE;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  margin-top: 2px;
}

.mfi-notification-text p a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .mfi-notification {
    left: 16px;
    right: 16px;
    bottom: 24px;
    width: auto;
  }
}

/* ---------- Footer Developer Branding ---------- */
.footer-dev {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--field-text-soft, #a0aec0);
}

.footer-dev .dev-logo {
  height: 19px;
  width: auto;
  object-fit: contain;
}

.footer-dev.desktop-only {
  display: flex;
  margin-top: 20px;
}

.footer-dev.mobile-only {
  display: none;
}

@media (max-width: 640px) {
  .footer-dev.desktop-only {
    display: none !important;
  }

  .footer-dev.mobile-only {
    display: flex !important;
    justify-content: center;
    margin-bottom: 16px;
    width: 100%;
  }
}

/* ---------- ref-empty (restored) ---------- */
.ref-empty {
  padding: 26px 0;
  color: var(--ink-faint);
}

.ref-list li[hidden] { display: none; }

.ref-title,
.ref-src { overflow-wrap: anywhere; }

/* ---------- FAQ (what-we-do) restored ---------- */
.faq-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  max-width: 900px;
}

.faq-item { border-bottom: 1px solid var(--line); }

.faq-item summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  list-style: none;
  cursor: pointer;
  padding: 22px 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.35;
  color: var(--ink);
  transition: color .2s;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 8px;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(45deg);
  transition: transform .25s ease;
}

.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item summary:hover { color: var(--teal, #0B2228); }

.faq-item summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.faq-answer { padding: 0 0 24px; max-width: 72ch; }
.faq-answer p { margin: 0; color: var(--ink-soft); line-height: 1.65; }

@media (max-width: 640px) {
  .faq-item summary { gap: 16px; padding: 18px 0; }
}

/* ============================================================
   v8 - post-recovery hardening (nav, dropdowns, share image)
   ============================================================ */

/* Mobile dropdown submenu: guarantee text never clips or overflows */
@media (max-width: 1020px) {
  .nav-drop-menu a {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .nav-drop-menu a > div {
    min-width: 0;
  }
  .nav-drop-menu strong,
  .nav-drop-menu span {
    white-space: normal;
  }
  /* Open mobile menu must be able to scroll if it exceeds the viewport */
  .site-header.menu-open .nav-links {
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Case-study gallery: clean responsive grid on every width */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2vw, 20px);
}
@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; }
}