/* ---------- tokens ---------- */
:root {
  color-scheme: light;

  --paper: #F5F0E8;
  --paper-2: #ECE5D8;
  --card: #FBF8F1;
  --ink: #1F1B17;
  --ink-2: #5A534B;
  --ink-3: #6F665D;
  --rule: #D9D2C7;
  --accent: #8C3B2E;      /* brick: keyboard focus ring */
  --green: #2F5D46;       /* pine */
  --green-2: #244A38;     /* dark green: metric numbers */
  --link: #00701f;        /* inline link text: darker green, passes WCAG AA on paper, card and CTA band */
  --link-2: #005417;      /* link hover / active */
  --link-underline: #009b2c; /* brand-green underline (decorative, not load-bearing for contrast) */

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-text: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1120px;
  --gutter: clamp(16px, 5vw, 64px);
  --measure: 62ch;
  --section: clamp(4rem, 3rem + 4vw, 6rem);

  --s1: 4px;  --s2: 8px;   --s3: 12px;  --s4: 16px;
  --s6: 24px; --s8: 32px;  --s12: 48px; --s16: 64px;
  --s24: 96px; --s32: 128px;

  /* ---- Nirvana (Dreamland DS) gold ---- */
  --gold-deep: #55411d;
  /* gem button face: lightened from the DS matte metal, per Kit (was too dark). */
  --gem-face:   radial-gradient(140% 140% at 50% 0%, #f2dea4, #dcbc6c 52%, #b08f45);
  --gem-shadow: inset 0 1px 1px rgba(255,255,255,.7), 0 1px 2px rgba(60,45,15,.22), 0 0 0 1px #9c7d3e;

  /* ornament colours on paper. --orn (gold) = the header/footer chevron only.
     --orn-dim = the section dividers + the modular frame, kept barely-there,
     just off the background per Kit. */
  --orn: #b8973f;
  --orn-dim: #E3DBCC;
  --cta-bg: #E9E0D0;      /* the centred "as a leader" band, a touch darker than paper */

  /* modular frame (Nirvana canon): ONE corner mask flipped scaleX/Y for 4
     corners + a keystone diamond. Verbatim from theme.css. */
  --frame-corner: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='42'%20height='42'%20viewBox='0%200%2042%2042'%3E%3Cg%20fill='none'%20stroke='%23000'%20stroke-width='1.5'%3E%3Cpath%20d='M6.75%2042%20V20.25%20M6.75%2012.75%20V6.75%20H12.75%20M20.25%206.75%20H42'/%3E%3Cpath%20d='M11.25%2042%20V29.5%20M29.5%2011.25%20H42%20M6.75%2034%20L34%206.75'/%3E%3Cpath%20d='M6.75%2027.75%20L27.75%206.75'/%3E%3C/g%3E%3Cpath%20d='M6.75%203.75%20L9.75%206.75%20L6.75%209.75%20L3.75%206.75%20Z'%20fill='%23000'/%3E%3Cpath%20fill-rule='evenodd'%20fill='%23000'%20d='M6.75%2012%20L11.25%2016.5%20L6.75%2021%20L2.25%2016.5%20Z%20M6.75%2014.1%20L9.15%2016.5%20L6.75%2018.9%20L4.35%2016.5%20Z%20M16.5%202.25%20L21%206.75%20L16.5%2011.25%20L12%206.75%20Z%20M16.5%204.35%20L18.9%206.75%20L16.5%209.15%20L14.1%206.75%20Z'/%3E%3C/svg%3E");
  --frame-keystone: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%209%209'%3E%3Cpath%20d='M4.5%200%20L9%204.5%20L4.5%209%20L0%204.5%20Z'/%3E%3C/svg%3E");
  /* fluid chevron band: tiling 30x14 SVG. Verbatim from theme.css. */
  --chev-band: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2030%2014'%20fill='none'%20preserveAspectRatio='none'%3E%3Cpath%20transform='translate(-30%200)'%20id='Vector%2031'%20d='M10.7959%208.5L11.9423%207.35355C12.1376%207.15829%2012.4542%207.15829%2012.6495%207.35355L17.4423%2012.1464C17.7573%2012.4614%2017.5342%2013%2017.0888%2013H12.2959H6.2959H1.50301C1.05755%2013%200.834471%2012.4614%201.14945%2012.1464L11.9423%201.35355C12.1376%201.15829%2012.4542%201.15829%2012.6495%201.35355L23.9423%2012.6464C24.1376%2012.8417%2024.4542%2012.8417%2024.6495%2012.6464L35.4423%201.85355C35.7573%201.53857%2035.5342%201%2035.0888%201H19.503C19.0576%201%2018.8345%201.53857%2019.1495%201.85355L23.9423%206.64645C24.1376%206.84171%2024.4542%206.84171%2024.6495%206.64645L25.7959%205.5'%20stroke='%2308070C'%20stroke-width='2'%20stroke-linecap='round'/%3E%3Cpath%20id='Vector%2031'%20d='M10.7959%208.5L11.9423%207.35355C12.1376%207.15829%2012.4542%207.15829%2012.6495%207.35355L17.4423%2012.1464C17.7573%2012.4614%2017.5342%2013%2017.0888%2013H12.2959H6.2959H1.50301C1.05755%2013%200.834471%2012.4614%201.14945%2012.1464L11.9423%201.35355C12.1376%201.15829%2012.4542%201.15829%2012.6495%201.35355L23.9423%2012.6464C24.1376%2012.8417%2024.4542%2012.8417%2024.6495%2012.6464L35.4423%201.85355C35.7573%201.53857%2035.5342%201%2035.0888%201H19.503C19.0576%201%2018.8345%201.53857%2019.1495%201.85355L23.9423%206.64645C24.1376%206.84171%2024.4542%206.84171%2024.6495%206.64645L25.7959%205.5'%20stroke='%2308070C'%20stroke-width='2'%20stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-text);
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.125rem); line-height: 1.6;
  font-kerning: normal; text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
.wordmark, .display, .section-title, .cs-title, .cs-sm-title {
  font-feature-settings: "liga" 1, "dlig" 1, "kern" 1;
  font-variant-ligatures: common-ligatures discretionary-ligatures;
}
.container {
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter);
}
strong { font-weight: 700; }

/* text links: brand green, a touch bolder, thicker skip-ink underline, no underline on hover */
a {
  color: var(--link); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 2px;
  text-decoration-color: var(--link-underline); text-decoration-skip-ink: auto;
  text-underline-offset: 0.16em; transition: color 150ms ease, text-decoration-color 150ms ease;
}
a:hover { color: var(--link-2); text-decoration: none; }
a:active { color: var(--link-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 10; padding: 8px 12px;
  background: var(--ink); color: var(--paper); font-weight: 700; text-decoration: none; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- masthead ---------- */
.masthead .container {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: var(--s3) var(--s8); padding-top: var(--s6); padding-bottom: var(--s6);
}
.wordmark { font-family: var(--font-display); font-weight: 400; font-size: 1.375rem;
  line-height: 1; letter-spacing: -0.005em; color: var(--ink); text-decoration: none; }
.wordmark:hover { color: var(--ink); }
.nav ul { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s8); margin: 0; padding: 0; list-style: none; }
.nav a { display: inline-block; padding: var(--s2) 0; font-size: 0.8125rem; font-weight: 400; letter-spacing: 0.09em; text-transform: uppercase; line-height: 1.5; color: var(--ink-2); text-decoration: none; }
.nav a:hover, .nav a:focus-visible { color: var(--link); font-weight: 700; text-decoration: none; }

/* ---------- chevron band: header + footer separators only ---------- */
.band { height: 14px; width: 100%; background: var(--orn);
  -webkit-mask: var(--chev-band) repeat-x center top / 30px 14px;
          mask: var(--chev-band) repeat-x center top / 30px 14px; opacity: .32; }

/* ---------- section divider: the modular frame's top/bottom edge ----------
   double rule (matching .ds-frame__s) + a centre keystone, kept barely-there. */
.orn-rule { display: flex; align-items: center; justify-content: center; gap: var(--s6);
  max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.orn-rule::before, .orn-rule::after { content: ''; flex: 1; height: 6px;
  background: linear-gradient(to bottom, var(--orn-dim) 0 1.5px, transparent 1.5px 4.5px, var(--orn-dim) 4.5px 6px); }
.orn-rule i { flex: 0 0 auto; font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: 1.7rem; line-height: 1; color: var(--orn); }
.orn-rule i::before { content: "&"; }

/* ---------- filigree divider (Nirvana DS): two gradient hairlines + a 4-point star ---------- */
.filigree { display: flex; align-items: center; justify-content: center; gap: 16px; color: var(--orn); margin: 0 auto var(--s8); }
.filigree::before, .filigree::after { content: ''; height: 1px; width: min(200px, 24vw); }
.filigree::before { background: linear-gradient(90deg, transparent, var(--orn)); }
.filigree::after { background: linear-gradient(90deg, var(--orn), transparent); }
.filigree svg { width: 22px; height: 22px; fill: var(--orn); flex: none; }

/* ---------- hero (spread) ---------- */
.hero { padding-top: var(--section); padding-bottom: var(--section); }
.hero-top { display: flex; align-items: center; gap: clamp(24px, 4vw, 56px); }
.hero-top > * { min-width: 0; }
.display { margin: 0; max-width: 19ch; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.25rem, 1.5rem + 3.2vw, 3.5rem); line-height: 1.1; letter-spacing: -0.01em; text-wrap: balance; }
.display .opener { display: block; font-style: italic; font-weight: 400;
  font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.9rem); line-height: 1.25; color: var(--ink-2); margin-bottom: 0.15em; }
.display .line { display: block; }
.hero-photo { flex: none; }
.hero-photo img { display: block; width: clamp(120px, 15vw, 150px); height: auto; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 50%; background: var(--paper-2); filter: grayscale(0.15) contrast(1.02); }
.hero-intro { max-width: var(--measure); margin: var(--s8) 0 0;
  font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.375rem); line-height: 1.5; }
@media (max-width: 899px) {
  .hero-top { flex-direction: column; align-items: flex-start; gap: var(--s6); }
  .hero-photo img { width: 120px; }
}

/* ---------- sections ---------- */
.section { padding-top: var(--section); padding-bottom: var(--section); }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--s24); row-gap: var(--s6); }
.lead-results { max-width: var(--measure); margin: var(--s4) 0 0; font-size: 1.0625rem; line-height: 1.6; }
.split > * { min-width: 0; }
.section-title { margin: 0; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2rem); line-height: 1.2; letter-spacing: -0.005em; text-wrap: balance; }
.lede { max-width: var(--measure); margin: var(--s4) 0 0; font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.375rem); line-height: 1.5; }
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 var(--s6); }
.prose p:last-child { margin-bottom: 0; }
.crosshead { margin: var(--s12) 0 var(--s3); font-family: var(--font-text); font-weight: 700; font-size: 1.25rem; line-height: 1.3; }
.crosshead:first-child { margin-top: 0; }
@media (min-width: 900px) { .prose { padding-top: 0.3rem; } }
@media (max-width: 899px) { .split { grid-template-columns: minmax(0, 1fr); } }
.sub { border-top: 1px solid var(--rule); margin-top: var(--section); padding-top: var(--s12); }

/* centred CTA band (as a leader), on a slightly darker ground */
.cta-band { background: var(--cta-bg); padding-top: var(--section); padding-bottom: var(--section); }
.cta { max-width: 820px; margin: 0 auto; text-align: center; }
.cta p { margin: 0; font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.375rem); line-height: 1.5; }
.btn-row--center { justify-content: center; margin-top: var(--s8); }

/* ---------- gold gem button (Nirvana .btn, lightened) ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--font-text); font-weight: 700; font-size: .875rem; line-height: 1.2; letter-spacing: .01em;
  padding: .4rem .8rem; min-height: 32px; border-radius: 3px; border: 0;
  color: #241606; text-shadow: 0 1px 0 rgba(255,255,255,.35);
  background: var(--gem-face); box-shadow: var(--gem-shadow);
  text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none;
  transition: filter 160ms ease, transform 160ms ease;
}
.btn:hover, .btn:focus-visible { color: #241606; filter: brightness(1.05); transform: translateY(-1px); }
.btn:active { transform: translateY(0); filter: brightness(.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- modular frame (Nirvana canon): now on the design-approach cards ---------- */
.ds-frame { position: relative; --dl-frame: var(--orn-dim); }
.ds-frame__c { position: absolute; width: 42px; height: 42px; z-index: 2; pointer-events: none;
  background: var(--dl-frame);
  -webkit-mask: var(--frame-corner) center/contain no-repeat; mask: var(--frame-corner) center/contain no-repeat; }
.ds-frame__c.tl { top: 0; left: 0; }
.ds-frame__c.tr { top: 0; right: 0; transform: scaleX(-1); }
.ds-frame__c.bl { bottom: 0; left: 0; transform: scaleY(-1); }
.ds-frame__c.br { bottom: 0; right: 0; transform: scale(-1,-1); }
.ds-frame__s { position: absolute; z-index: 1; pointer-events: none; }
.ds-frame__s.top, .ds-frame__s.bottom { left: 34px; right: 34px; height: 6px;
  background: linear-gradient(to bottom, var(--dl-frame) 0 1.5px, transparent 1.5px 4.5px, var(--dl-frame) 4.5px 6px); }
.ds-frame__s.left, .ds-frame__s.right { top: 34px; bottom: 34px; width: 6px;
  background: linear-gradient(to right, var(--dl-frame) 0 1.5px, transparent 1.5px 4.5px, var(--dl-frame) 4.5px 6px); }
.ds-frame__s.top { top: 6px; } .ds-frame__s.bottom { bottom: 6px; }
.ds-frame__s.left { left: 6px; } .ds-frame__s.right { right: 6px; }
.ds-frame__k { position: absolute; z-index: 2; left: 50%; top: 4.5px; width: 9px; height: 9px; margin-left: -4.5px;
  pointer-events: none; background: var(--dl-frame);
  -webkit-mask: var(--frame-keystone) center/contain no-repeat; mask: var(--frame-keystone) center/contain no-repeat; }

/* three-up design-approach cards, each in a modular frame */
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); margin-top: var(--s12); }
.cols > * { min-width: 0; }
@media (max-width: 899px) { .cols { grid-template-columns: minmax(0, 1fr); } }
.appr-frame { padding: 22px; }
.appr-card { background: transparent; padding: clamp(16px, 2.2vw, 22px); height: 100%; }
.appr-card .crosshead { margin-top: 0; }
.appr-card p { margin: var(--s3) 0 0; font-size: 1rem; line-height: 1.55; }

/* ---------- case studies ---------- */
.work-head { margin-bottom: var(--s12); }
.cs-card { position: relative; transition: transform 220ms ease; }
.cs-card:hover, .cs-card:focus-within { transform: translateY(-3px); }
.cs-link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.cs-media { position: relative; overflow: hidden; background: var(--paper-2); }
.cs-media > img, .cs-media > video { display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform 500ms cubic-bezier(.2,.7,.2,1); }
.cs-card:hover .cs-media > img, .cs-card:hover .cs-media > video,
.cs-card:focus-within .cs-media > img, .cs-card:focus-within .cs-media > video { transform: scale(1.035); }
.cs-actions { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }

/* big cards: elevated */
.cs-features { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s8); margin-bottom: var(--s12); }
.cs-features > * { min-width: 0; }
@media (max-width: 749px) { .cs-features { grid-template-columns: 1fr; } }
.cs-big { display: flex; flex-direction: column; height: 100%; background: var(--card); border-radius: 8px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(31,27,23,.06), 0 8px 24px rgba(31,27,23,.09);
  transition: transform 220ms ease, box-shadow 220ms ease; }
.cs-big:hover, .cs-big:focus-within { box-shadow: 0 2px 6px rgba(31,27,23,.09), 0 16px 36px rgba(31,27,23,.13); }
.cs-big .cs-media { aspect-ratio: 16 / 9; }
.cs-body { padding: clamp(18px, 2.4vw, 28px); display: flex; flex-direction: column; flex: 1 1 auto; }
.cs-title { margin: 0; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.625rem); line-height: 1.25; text-wrap: balance; }
.cs-title a, .cs-sm-title a { color: var(--ink); font-weight: inherit; text-decoration: none; }
.cs-card:hover .cs-title a, .cs-card:hover .cs-sm-title a,
.cs-title a:focus-visible, .cs-sm-title a:focus-visible { color: var(--link-2); text-decoration-color: var(--link-2); }
.cs-desc { margin: var(--s3) 0 0; font-size: 1rem; line-height: 1.5; color: var(--ink-2); }

/* metrics: Fira-Code number first (dark green, bold), then Lato at the same size, as bullets */
.cs-metrics { margin: var(--s6) 0 0; padding: 0 0 0 1.15em; list-style: disc; }
.cs-metrics li { margin: 0 0 6px; font-family: var(--font-text); font-size: 1rem; line-height: 1.45; color: var(--ink-2); }
.cs-metrics li::marker { color: var(--green-2); }
.m-num { font-family: var(--font-mono); font-weight: 700; color: var(--green-2); font-variant-ligatures: none; }
.cs-big .cs-actions { margin-top: auto; padding-top: var(--s6); }

/* small cards: the other four */
.cs-more { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s8) var(--s6); }
@media (max-width: 899px) { .cs-more { grid-template-columns: 1fr 1fr; } }
@media (max-width: 479px) { .cs-more { grid-template-columns: 1fr; } }
.cs-sm { display: flex; flex-direction: column; height: 100%; background: var(--card); border-radius: 8px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(31,27,23,.06), 0 6px 18px rgba(31,27,23,.08); transition: transform 220ms ease, box-shadow 220ms ease; }
.cs-sm:hover, .cs-sm:focus-within { box-shadow: 0 2px 6px rgba(31,27,23,.09), 0 12px 28px rgba(31,27,23,.12); }
.cs-sm .cs-media { aspect-ratio: 3 / 2; }
.cs-sm-body { padding: clamp(14px, 1.8vw, 20px); display: flex; flex-direction: column; flex: 1 1 auto; }
.cs-sm-title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; line-height: 1.25; text-wrap: balance; }
.cs-sm-desc { margin: var(--s2) 0 0; font-size: 0.9375rem; line-height: 1.45; color: var(--ink-2); }
/* small-card metrics: same bullet approach, smaller */
.cs-metrics--sm { margin-top: var(--s3); padding-left: 1.1em; }
.cs-metrics--sm li { font-size: 0.8125rem; line-height: 1.4; margin-bottom: 0; }

/* "also check out", below all cards */
.cs-also { max-width: none; margin: var(--s12) 0 0; font-size: 1rem; line-height: 1.55; color: var(--ink-2); }

/* ---------- social row ---------- */
.social { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s6) 0 0; padding: 0; list-style: none; }
.social a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 3px; color: var(--ink-2); text-decoration: none; }
.social a:hover, .social a:focus-visible { color: var(--link-2); }
.social svg { width: 24px; height: 24px; fill: currentColor; }

/* ---------- footer (dark) ---------- */
.footer { position: relative; background: var(--ink); color: #C9BFB1; }
.footer::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 14px; pointer-events: none;
  background: var(--orn);
  -webkit-mask: var(--chev-band) repeat-x center top / 30px 14px; mask: var(--chev-band) repeat-x center top / 30px 14px; opacity: .5; }
.footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: var(--s4) var(--s8); padding-top: var(--s16); padding-bottom: var(--s12); font-size: 1rem; line-height: 1.5; }
.footer p { margin: 0; }
.footer ul { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s6); margin: 0; padding: 0; list-style: none; }
.footer a { color: #D8CFC2; font-weight: 400; font-size: 0.8125rem; letter-spacing: 0.09em; text-transform: uppercase; text-decoration: none; }
.footer a:hover, .footer a:focus-visible { color: #6FCB85; font-weight: 700; text-decoration: none; }
.footer :focus-visible { outline-color: #6FCB85; }

/* ---------- motion off ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .cs-card:hover, .cs-card:focus-within { transform: none; }
  .cs-card:hover .cs-media > img, .cs-card:hover .cs-media > video,
  .cs-card:focus-within .cs-media > img, .cs-card:focus-within .cs-media > video { transform: none; }
  .btn:hover, .btn:focus-visible { transform: none; }
}

/* ---------- AFM brand bug (ColonLoader idle, ported from afm-design) ----------
   The "a:" colon rests as a vertical pair of dots inside a green disc; every ~9s
   it winds up, snaps 90 deg into a blinking pair of eyes, and settles back.
   Colours are the AFM light scheme: disc primary-container, dots on-primary.
   Under prefers-reduced-motion the global rule freezes it to a static colon. */
.wordmark { display: inline-flex; align-items: center; }
.wordmark .brandbug { flex: none; width: 1.08em; height: 1.08em; margin-right: 0.42em; }
.brandbug svg { width: 100%; height: 100%; overflow: visible; display: block; }
.bb-disc { fill: #008729; }
.bb-eye { fill: #F7FFF1; transform-box: fill-box; transform-origin: center; }
.bb-spin { transform-box: fill-box; transform-origin: center; animation: bb-spin-idle 9s infinite; }
.bb-eye-top, .bb-eye-bot { animation: bb-blink-idle 9s infinite; }
@keyframes bb-spin-idle {
  0%, 68% { transform: rotate(0deg); animation-timing-function: cubic-bezier(0.65,0,0.35,1); }
  70% { transform: rotate(-12deg); animation-timing-function: cubic-bezier(0.5,0,0.1,1); }
  76% { transform: rotate(102deg); animation-timing-function: cubic-bezier(0.2,0.7,0.3,1); }
  79% { transform: rotate(90deg); animation-timing-function: linear; }
  84% { transform: rotate(90deg); animation-timing-function: cubic-bezier(0.5,0,0.1,1); }
  86% { transform: rotate(100deg); animation-timing-function: cubic-bezier(0.2,0.7,0.3,1); }
  93% { transform: rotate(-8deg); animation-timing-function: cubic-bezier(0.2,0.7,0.3,1); }
  96% { transform: rotate(0deg); animation-timing-function: linear; }
  100% { transform: rotate(0deg); }
}
@keyframes bb-blink-idle {
  0%, 80% { transform: scaleX(1); animation-timing-function: cubic-bezier(0.5,0,0.9,0.2); }
  82% { transform: scaleX(0.12); animation-timing-function: cubic-bezier(0.1,0.8,0.5,1); }
  84%, 100% { transform: scaleX(1); }
}

/* ---------- lightbox: click any case image to open full screen ---------- */
.case-fig img, .case-gallery img, .case-thumb img, .case-hero img,
.afm-hero img, .case-carousel img, .case-phones img { cursor: zoom-in; }
.lb { position: fixed; inset: 0; z-index: 1000; display: none; }
.lb.is-open { display: block; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(18,15,12,.94); }
.lb-stage { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: clamp(16px,4vw,56px); }
.lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: min(1400px,96vw); }
.lb-img { max-width: 100%; max-height: 82vh; width: auto; height: auto; display: block;
  border-radius: 3px; background: var(--paper-2); box-shadow: 0 12px 48px rgba(0,0,0,.5); }
.lb-cap { margin: var(--s4) 0 0; max-width: 70ch; text-align: center; color: #E9E0D0; font-size: .9375rem; line-height: 1.45; }
.lb-count { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: .75rem; letter-spacing: .04em; color: #B7AC9C; }
.lb-btn { position: absolute; z-index: 2; border: 0; background: transparent; color: #F5F0E8;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.lb-btn svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-close { top: clamp(10px,2vw,20px); right: clamp(10px,2vw,20px); width: 48px; height: 48px; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 56px; height: 56px; }
.lb-prev { left: clamp(6px,1.5vw,20px); }
.lb-next { right: clamp(6px,1.5vw,20px); }
.lb-btn:hover, .lb-btn:focus-visible { color: #6FCB85; }
.lb-btn:focus-visible { outline: 2px solid #6FCB85; outline-offset: 2px; border-radius: 3px; }
.lb-btn[hidden] { display: none; }
.afm-hero img:focus-visible { outline-offset: -4px; } /* hero sits in overflow:hidden, keep the ring inside */
@media (max-width: 599px) { .lb-nav { width: 44px; height: 44px; } .lb-btn svg { width: 26px; height: 26px; } }

/* ---------- mobile nav: hamburger ---------- */
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .masthead .container { align-items: center; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin: -8px -8px -8px 0; padding: 0;
    border: 0; background: transparent; color: var(--ink); cursor: pointer; }
  .nav-toggle svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .nav-toggle .nav-toggle-close { display: none; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-close { display: inline; }
  .nav { display: none; flex-basis: 100%; }
  .masthead.is-open .nav { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: var(--s2) 0 var(--s3); }
  .nav a { display: block; padding: var(--s3) 0; font-size: 0.9375rem; border-top: 1px solid var(--rule); }
}
