/**
 * Base — reset, type, layout, sections.
 *
 * Three reused components (card, chip, cta) are SDCs under components/ with
 * their own CSS. Everything else lives here.
 */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

::selection {
  background: var(--brand);
  color: #fff;
}

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

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js-reveal .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- Type ---------- */

h1,
h2,
h3,
h4 {
  margin: 0 0 1rem;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 5.2vw, 4.15rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.06;
}

h2 {
  font-size: clamp(1.95rem, 3.4vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.22rem;
  letter-spacing: -0.015em;
}

h4 {
  font-size: 1.02rem;
}

p {
  color: var(--ink-soft);
  margin: 0 0 1.15rem;
  max-width: 68ch;
}

.lede {
  font-size: clamp(1.08rem, 1.5vw, 1.28rem);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 62ch;
}

.lede p {
  font-size: inherit;
  line-height: inherit;
  max-width: none;
  margin: 0;
}

strong {
  color: var(--ink);
  font-weight: 650;
}

/* Gradient highlight for a key phrase in a headline. */
.grad {
  background: linear-gradient(100deg, var(--brand-bright), var(--mint) 55%, var(--brand-glow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Eyebrow — a pill, not a bare label. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.4rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--paper);
  box-shadow: var(--sh-1);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0 2rem;
}

/* ---------- Layout ---------- */

.col {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wide {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  position: relative;
  padding: var(--section-y) 0;
  scroll-margin-top: 5.5rem;
}

/* Two dark bands stacked back-to-back (Approach → Data Intelligence) merge
   visually, so their combined section padding read as a ~15rem empty void.
   Each paragraph section sits in a classless wrapper div, hence :has(). */
div:has(> .section.band) + div > .section.band {
  padding-top: calc(var(--section-y) * 0.45);
}

.section__head {
  max-width: 48rem;
  margin-bottom: 3rem;
}

.section--center .section__head {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section--center .section__head .lede {
  margin-left: auto;
  margin-right: auto;
}

/* Scroll reveal.
   The hidden state is scoped to `html.js-reveal`, a class js/reveal.js sets on
   itself. CSS alone NEVER hides content — if the JS fails, is blocked, or never
   fires, everything is simply visible. (Production's theme got this backwards:
   it hid sections in CSS and they stayed invisible to anything that didn't run
   its scroll handler, which is why its homepage screenshots blank.) */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ---------- Topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--gutter);
  /* 90% (was 78%): over the dark bands the lighter glass went muddy and nav
     text lost snap; nearly-opaque keeps the blur hint without the murk. */
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line-soft);
}

/* The mark is one white PNG (images/brand/logo-flower.png) painted via CSS mask,
   so a single asset recolours per context — teal here, cyan on the dark footer.
   Ratio 102:62; a masked span has no intrinsic size, so width/height are set. */
.brandmark .mark {
  display: block;
  height: 30px;
  width: 50px;
  flex: none;
  background-color: var(--brand);
  -webkit-mask: url("../images/brand/logo-flower.png") no-repeat center / contain;
  mask: url("../images/brand/logo-flower.png") no-repeat center / contain;
}

.site-footer .mark {
  display: block;
  height: 40px;
  width: 66px;
  margin-bottom: 1.1rem;
  background-color: var(--band-accent);
  -webkit-mask: url("../images/brand/logo-flower.png") no-repeat center / contain;
  mask: url("../images/brand/logo-flower.png") no-repeat center / contain;
}

.brandmark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  color: var(--ink);
}


.brandmark b {
  color: var(--brand);
  font-weight: 800;
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.navlinks a {
  padding: 0.5rem 0.8rem;
  border-radius: var(--r-pill);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-soft);
  transition: background 0.2s, color 0.2s;
}

.navlinks a:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.navlinks .cta {
  margin-left: 0.6rem;
}

.navlinks .cta:hover {
  background: var(--brand);
  color: #fff;
}

/* Below 900px the whole nav collapses into the drawer — leaving the About link
   and the CTA pill beside the hamburger overflowed a 320px viewport. */
@media (max-width: 900px) {
  .navlinks {
    display: none;
  }
}

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

.hero {
  position: relative;
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(3rem, 5vw, 4.5rem);
  overflow: hidden;
  text-align: center;
}

/* Gradient field — carries the hero instead of the dated stock photography. */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  pointer-events: none;
}

.hero::before {
  width: 46rem;
  height: 30rem;
  top: -14rem;
  left: 50%;
  transform: translateX(-60%);
  background: radial-gradient(closest-side, var(--brand-glow), transparent);
}

.hero::after {
  width: 34rem;
  height: 26rem;
  top: -6rem;
  right: -8rem;
  background: radial-gradient(closest-side, var(--mint), transparent);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin-bottom: 1.35rem;
}

.hero .lede {
  margin: 0 auto;
}

.hero .actions {
  display: flex;
  gap: 0.85rem;
  margin-top: 2.2rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- Stat row (hero + data intelligence) ---------- */

.statrow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 3.5rem;
}

@media (max-width: 720px) {
  .statrow {
    grid-template-columns: 1fr;
  }
}

/* ---------- Card grids ---------- */

.grid {
  display: grid;
  gap: 1.15rem;
}

/* Five platforms lay out 3 + 2 with the short row centered. Flex, not grid:
   the cards themselves are the flex items (the Views wrappers in between are
   display: contents), so a centred final row needs no nth-child surgery and
   survives the platform count changing. */
.grid--5 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.grid--5 .card {
  flex: 0 1 calc((100% - 2.3rem) / 3);
}

.grid--4 {
  grid-template-columns: repeat(2, 1fr);
}

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

@media (max-width: 900px) {
  .grid--4,
  .grid--2 {
    grid-template-columns: 1fr;
  }

  .grid--5 .card {
    flex-basis: 100%;
  }
}

/* ---------- Drupal wrapper pass-through ----------
   Views renders rows inside `views-element-container > div.js-view-dom-id-… >
   .views-row`, and that middle div carries NO `.view` class. Entity-reference
   field wrappers under `stable9` carry no classes at all (hence the |children
   filter in the paragraph templates). Without this, the wrapper becomes the grid
   item and every card stacks into column 1 — the bug that collapsed the first
   build's entire homepage. */

:is(.grid, .impact, .people, .strip, .statrow, .panels, .pipeline)
  :is(.views-element-container,
      .views-element-container > div,
      .view-content,
      .views-row) {
  display: contents;
}

/* ---------- Deployment panels ---------- */

.panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
  margin-top: 2.5rem;
}

@media (max-width: 820px) {
  .panels {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2.3rem 2.1rem;
  box-shadow: var(--sh-2);
}

.panel__stat {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--brand) 15%, transparent);
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 650;
}

.panel__title {
  font-size: 1.35rem;
  margin-bottom: 0.85rem;
}

.panel p {
  max-width: none;
}

.panel blockquote {
  margin: 1.6rem 0 0;
  padding: 1.2rem 1.3rem;
  border-radius: var(--r-sm);
  background: var(--paper-2);
  border-left: 3px solid var(--brand);
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--ink);
}

.panel cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- Pipeline ---------- */

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.9rem;
  margin-top: 2.6rem;
}

@media (max-width: 980px) {
  .pipeline {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .pipeline {
    grid-template-columns: 1fr;
  }
}

.pstep {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.5rem 1.35rem;
}

.pstep__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.9rem;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--brand-bright), var(--brand));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.pstep__title {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.pstep__body {
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0;
  max-width: none;
  color: var(--ink-soft);
}

.pstep__body p {
  margin: 0;
  max-width: none;
}

/* ---------- Impact grid ---------- */

/* Flex so any tile count (the grid holds the stats NOT already shown in the
   hero — five today) fills rows evenly and centres the remainder. */
.impact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.6rem;
}

.impact .stat {
  flex: 1 1 200px;
  max-width: 300px;
}

@media (max-width: 560px) {
  .impact .stat {
    flex-basis: 100%;
    max-width: none;
  }
}

/* ---------- Stat (shared: hero row + impact grid) ---------- */

.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.5rem 1.4rem;
  box-shadow: var(--sh-1);
}

.stat__number {
  display: block;
  font-size: clamp(1.85rem, 2.6vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, var(--brand-bright), var(--mint));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.band .stat__number {
  background: linear-gradient(120deg, var(--band-accent), #7CF3D6);
  -webkit-background-clip: text;
  background-clip: text;
}

.stat__label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.stat__source {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.74rem;
  color: var(--ink-faint);
}

/* ---------- People ---------- */

.people {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
  margin-top: 2.6rem;
}

@media (max-width: 900px) {
  .people {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .people {
    grid-template-columns: 1fr;
  }
}

.person {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.9rem 1.6rem;
  box-shadow: var(--sh-1);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s;
}

.person:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-2);
}

.person__photo {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.1rem;
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--brand);
}

.person__avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  background: linear-gradient(140deg, var(--brand-bright), var(--brand));
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
}

.person__name {
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.person__role {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--warm);
}

.person__bio,
.person__bio p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  max-width: none;
}

/* ---------- Strips (awards, partners) ---------- */

.strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

/* ---------- Evidence table ---------- */

.twrap {
  margin-top: 2.4rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--sh-1);
  overflow-x: auto;
}

.twrap:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.twrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  min-width: 620px;
}

.twrap th {
  text-align: left;
  padding: 1rem 1.4rem;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.twrap td {
  padding: 1.05rem 1.4rem;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft);
  vertical-align: top;
  line-height: 1.55;
}

.twrap tr:last-child td {
  border-bottom: none;
}

.twrap tbody tr {
  transition: background 0.15s;
}

.twrap tbody tr:hover {
  background: var(--bg-soft);
}

.twrap td.views-field-field-year {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--brand);
  white-space: nowrap;
}

.twrap td.views-field-title {
  color: var(--ink);
  font-weight: 550;
}

.twrap td.views-field-title em {
  display: block;
  margin-top: 0.2rem;
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--ink-faint);
}

.twrap td.views-field-field-maps-to {
  font-size: 0.82rem;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* Publication titles link out to the paper (DOI). Keep the row's ink colour so
   the table doesn't turn into a wall of link-blue; the arrow carries the cue. */
.twrap td.views-field-title a {
  color: inherit;
  text-decoration: none;
}

.twrap td.views-field-title a:hover {
  color: var(--brand);
}

.twrap td.views-field-title .pub-ext {
  font-size: 0.85em;
  color: var(--brand);
  opacity: 0.75;
}

/* Below 700px the 620px-min table clipped titles mid-word and hid the
   "maps to" column entirely off-screen. Collapse to stacked entries instead
   of a sideways-scrolling table. */
@media (max-width: 700px) {
  .twrap table,
  .twrap tbody,
  .twrap tr,
  .twrap td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .twrap thead {
    display: none;
  }

  .twrap tbody tr {
    padding: 1.05rem 1.2rem;
    border-bottom: 1px solid var(--line-soft);
  }

  .twrap tbody tr:last-child {
    border-bottom: none;
  }

  .twrap td {
    padding: 0;
    border-bottom: none;
  }

  .twrap td.views-field-field-year {
    margin-bottom: 0.15rem;
    font-size: 0.85rem;
  }

  .twrap td.views-field-title {
    margin-bottom: 0.35rem;
  }

  .twrap td.views-field-field-maps-to {
    white-space: normal;
  }
}

/* ---------- Platform detail page ---------- */

.backlink {
  margin-bottom: 2.2rem;
  font-size: 0.88rem;
}

.backlink a {
  color: var(--ink-soft);
  text-decoration: none;
}

.backlink a:hover {
  color: var(--brand);
}

.platform-page__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.7rem;
  margin-bottom: 1.8rem;
}

.platform-page__head h1 {
  margin-bottom: 0.6rem;
}

.platform-page__logo {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 138px;
  height: 110px;
  padding: 0.9rem 1.1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-1);
}

.platform-page__logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.platform-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.6rem;
}

/* ---------- Long-form (blog, utility pages) ---------- */

.article-meta {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-bottom: 1.8rem;
}

.prose {
  margin-top: 2rem;
}

.prose h2,
.prose h3 {
  margin-top: 2.4rem;
}

.prose img {
  margin: 1.8rem 0;
  border-radius: var(--r);
}

.prose ul,
.prose ol {
  color: var(--ink-soft);
  padding-left: 1.2rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose blockquote {
  margin: 1.8rem 0;
  padding: 1.2rem 1.4rem;
  border-radius: var(--r-sm);
  border-left: 3px solid var(--brand);
  background: var(--bg-soft);
  color: var(--ink);
}

.pager-wrap {
  margin-top: 2.5rem;
}

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

.site-footer {
  background: var(--band-bg);
  color: var(--band-ink);
  padding: 4rem var(--gutter) 2.5rem;
}

.footwrap {
  max-width: 1220px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 820px) {
  .footwrap {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footwrap h4 {
  color: var(--band-ink);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footwrap p {
  color: var(--band-ink-soft);
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: none;
}

.footwrap a {
  color: var(--band-ink-soft);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}

.footwrap a:hover {
  color: var(--band-accent);
}

.footwrap nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footwrap nav li {
  margin: 0;
}

.footwrap nav p {
  margin: 0;
}

.foot-bottom {
  max-width: 1220px;
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--band-line);
  font-size: 0.8rem;
  color: var(--band-ink-soft);
}

/* ---------- Mobile nav ---------- */

.nav-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  padding: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
}

.nav-menu-btn span {
  display: block;
  height: 2px;
  width: 16px;
  margin: 0 auto;
  border-radius: 2px;
  background: var(--ink);
}

.mobile-drawer {
  display: none;
  padding: 1rem var(--gutter) 1.5rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav-link {
  display: block;
  padding: 0.7rem 0.9rem;
  border-radius: var(--r-sm);
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-soft);
}

.mobile-nav-link:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.mobile-drawer .cta {
  margin-top: 0.9rem;
  width: 100%;
  justify-content: center;
}

@media (max-width: 900px) {
  .nav-menu-btn {
    display: flex;
  }
}

/* ---------- Odds and ends ---------- */

.di-outro {
  margin-top: 3rem;
  text-align: center;
}

.di-outro p {
  margin: 0 auto 1.6rem;
}

.partnership {
  margin-top: 2.5rem;
  text-align: center;
}

.partnership p {
  margin: 0 auto;
  font-size: 0.95rem;
}

.evidence-more {
  margin: 1.5rem 0 0;
  text-align: center;
}

.evidence-more a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

.evidence-more a:hover {
  text-decoration: underline;
}

/* Closing CTA sits on a soft brand wash. */
.closing {
  background:
    radial-gradient(60% 120% at 50% 0%, color-mix(in srgb, var(--brand-glow) 16%, transparent), transparent),
    var(--bg-soft);
}

.section--center .strip {
  justify-content: center;
}

.section--center .eyebrow {
  margin-left: auto;
  margin-right: auto;
}

/* Active section highlight (js/navigation.js scrollspy). */
.navlinks a.is-active {
  background: var(--bg-soft);
  color: var(--brand);
}

.mobile-nav-link.is-active {
  background: var(--bg-soft);
  color: var(--brand);
}

/* Hamburger → close icon. */
.nav-menu-btn.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-menu-btn.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-menu-btn.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-menu-btn span {
  transition: transform 0.25s, opacity 0.2s;
}

/* ---------- Contact form (webform: talk_to_us) ---------- */

.contact-form {
  max-width: 620px;
  margin: 0 auto;
  padding: 2.2rem 2rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  text-align: left;
}

.contact-form .form-item {
  margin: 0 0 1.15rem;
}

.contact-form label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}

.contact-form .form-required::after {
  content: " *";
  color: var(--warm);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form textarea {
  resize: vertical;
  min-height: 8rem;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}

.contact-form .description {
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.contact-form .form-actions {
  margin-top: 1.6rem;
}

.contact-form .button,
.contact-form input[type="submit"] {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.6rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-bright), var(--brand));
  border: none;
  border-radius: var(--r-pill);
  box-shadow: var(--sh-brand);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.25s;
}

.contact-form .button:hover,
.contact-form input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -8px rgba(14, 116, 144, 0.5);
}

.contact-form .messages {
  margin-bottom: 1.2rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--r-sm);
}

/* ---------- Contact form: reCAPTCHA ----------
   The captcha module wraps Google's widget in a <fieldset> with a "CAPTCHA"
   legend and a boilerplate "this question is for testing whether or not you
   are a human visitor" description. Both are kept in the DOM for assistive
   tech (the legend is the fieldset's accessible name) but hidden visually:
   the reCAPTCHA checkbox is self-describing, and the legend was also matching
   `.contact-form .form-required::after`, printing a red asterisk next to the
   word CAPTCHA.

   Google's widget is a fixed 304x78px iframe that cannot be made fluid, and it
   does not fit the card on ANY phone width (a 390px viewport leaves only
   ~284px of content: viewport - 40px gutter - 64px card padding - 2px border).
   Two rules handle that, and the order of reasoning matters:

   1. `min-inline-size: 0` — a <fieldset> defaults to `min-inline-size:
      min-content` in the UA stylesheet, so it REFUSES to shrink below the
      304px iframe and pushes the page into horizontal scroll. `overflow`
      alone does not fix this; without this line the whole page scrolls
      sideways on mobile.
   2. `overflow-x: auto` — the widget then scrolls inside its own container,
      which is the same pattern the evidence table uses. Deliberately chosen
      over `transform: scale()`: scaling small enough to fit 320px would shrink
      the checkbox to ~18px and fail WCAG 2.5.8 target size. The checkbox is
      the leftmost part of the widget, so it is always visible and tappable at
      full size without scrolling. */

.contact-form .captcha {
  margin: 0 0 1.15rem;
  padding: 0;
  border: 0;
  min-inline-size: 0;
  overflow-x: auto;
}

.contact-form .captcha__title,
.contact-form .captcha__description {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 30rem) {
  /* <=480px: reclaim horizontal room from the card so the widget (and every
     input in the form) gets closer to full width before scrolling starts. */
  .contact-form {
    padding: 1.8rem 1.1rem;
  }
}

/* ---------- Data Intelligence: case-study browser ----------
   Panels are visible by default. `.is-enhanced` is added by js/cases.js, and
   ONLY it hides the inactive panels — so with no JS this reads as a plain stack
   of case studies rather than an empty section. */

.cases {
  margin-top: 3rem;
}

.cases__tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.6rem;
}

.cases__tab {
  padding: 0.65rem 1.25rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}

.cases__tab:hover {
  color: var(--ink);
  transform: translateY(-2px);
}

.cases__tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-bright), var(--brand));
  border-color: transparent;
  box-shadow: var(--sh-brand);
}

.case {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2.4rem 2.2rem;
  box-shadow: var(--sh-2);
  text-align: left;
  margin-bottom: 1.15rem;
}

/* Stacked (no JS): each panel keeps its own heading and spacing. */
.cases.is-enhanced .case {
  display: none;
  margin-bottom: 0;
  animation: case-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.cases.is-enhanced .case.is-active {
  display: block;
}

@keyframes case-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cases.is-enhanced .case {
    animation: none;
  }
}

.case__tag {
  display: inline-block;
  margin-bottom: 0.7rem;
  padding: 0.28rem 0.7rem;
  border-radius: var(--r-pill);
  background: var(--warm-soft);
  color: var(--warm);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.case__title {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.case__summary {
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 1.2rem;
}

.case__summary p,
.case__detail p {
  max-width: none;
}

.case__detail {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

.case__link a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}
