/* The Foundation's public marketing surface: the home page and the three
 * audience pages beneath it.
 *
 * Everything here draws its colour from the `--nav-*` tokens, so both colour
 * schemes are handled by `tokens.css` rather than by a second set of rules
 * here. The one exception is the tinted band and card fills, which need a wash
 * of the brand at a low alpha; those use `color-mix` against the surface so
 * they follow the scheme too.
 *
 * The type scale is deliberately larger than the app surface's. These are the
 * only pages a stranger reads before deciding whether to write to us. */

.fm-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---- Shared band scaffolding -------------------------------------------- */

.fm-band {
  padding-block: clamp(3rem, 7vw, 5.5rem);
  padding-inline: 1.5rem;
}

.fm-band__inner {
  max-width: 72rem;
  margin-inline: auto;
}

.fm-band__heading {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  text-align: center;
  margin-block-end: clamp(2rem, 4vw, 3rem);
}

.fm-overline {
  margin: 0;
  color: var(--nav-color-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.fm-band__title {
  margin: 0;
  font-family: var(--nav-font-family);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 600;
  line-height: 1.1;
  text-wrap: balance;
}

.fm-band__description {
  margin: 0;
  max-width: 46rem;
  color: var(--nav-color-text-muted);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-wrap: pretty;
}

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

.fm-hero {
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(2rem, 5vw, 3.5rem);
  padding-inline: 1.5rem;
  /* A soft brand wash behind the opening screen, fading into the page. */
  background:
    radial-gradient(
      70rem 28rem at 50% -6rem,
      color-mix(in srgb, var(--nav-color-primary) 14%, transparent),
      transparent 70%
    );
}

.fm-hero__inner {
  max-width: 58rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.fm-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.375rem 0.875rem;
  border: 1px solid color-mix(in srgb, var(--nav-color-primary) 40%, transparent);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.fm-badge__dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--nav-color-primary);
}

.fm-hero__title {
  margin: 0;
  font-family: var(--nav-font-family);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 600;
  line-height: 1.05;
  text-wrap: balance;
}

.fm-hero__tagline {
  margin: 0;
  max-width: 52rem;
  color: var(--nav-color-primary);
  font-family: var(--nav-font-family);
  font-size: clamp(1.25rem, 2.8vw, 1.75rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.25;
  text-wrap: balance;
}

.fm-hero__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 44rem;
}

.fm-hero__body p {
  margin: 0;
  color: var(--nav-color-text-muted);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.fm-hero__body strong {
  color: var(--nav-color-text);
  font-weight: 600;
}

.fm-hero__pullquote {
  max-width: 40rem;
  margin: 0;
  padding-block-start: 1.25rem;
  border-block-start: 1px solid
    color-mix(in srgb, var(--nav-color-primary) 25%, transparent);
  font-family: var(--nav-font-family);
  font-size: 1.125rem;
  font-style: italic;
  line-height: 1.5;
  text-wrap: balance;
}

/* An audience page opens smaller: it is an argument, not an identity. */
.fm-hero--page .fm-hero__title {
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
}

/* ---- Statement ----------------------------------------------------------- */

.fm-band--statement .fm-band__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.fm-statement__lead {
  max-width: 55rem;
  margin: 0;
  font-family: var(--nav-font-family);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 500;
  line-height: 1.2;
  text-wrap: balance;
}

.fm-statement__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 46rem;
}

.fm-statement__body p {
  margin: 0;
  color: var(--nav-color-text-muted);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.fm-statement__body strong {
  color: var(--nav-color-text);
  font-weight: 600;
}

/* ---- Cards --------------------------------------------------------------- */

.fm-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 60rem) {
  .fm-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.fm-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 1px solid color-mix(in srgb, var(--nav-color-primary) 20%, transparent);
  border-radius: var(--nav-radius-lg);
  background: var(--nav-color-surface);
}

.fm-card__title {
  margin: 0;
  font-family: var(--nav-font-family);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
}

.fm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fm-chip {
  padding: 0.3125rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--nav-color-primary) 30%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--nav-color-primary) 6%, transparent);
  font-size: 0.8125rem;
  line-height: 1.3;
}

.fm-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fm-card__body p {
  margin: 0;
  color: var(--nav-color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.fm-card__body strong {
  color: var(--nav-color-text);
  font-weight: 600;
}

.fm-card__link {
  margin-block-start: auto;
  font-size: 0.9375rem;
  font-weight: 600;
}

/* ---- Steps --------------------------------------------------------------- */

.fm-band--steps {
  background: color-mix(in srgb, var(--nav-color-primary) 5%, transparent);
}

.fm-steps {
  counter-reset: fm-step;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 52rem;
  margin-inline: auto;
}

.fm-step {
  counter-increment: fm-step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.25rem;
  padding: 1.5rem;
  border: 1px solid var(--nav-color-border);
  border-radius: var(--nav-radius-lg);
  background: var(--nav-color-surface);
}

.fm-step::before {
  content: counter(fm-step);
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--nav-color-primary);
  color: var(--nav-color-on-primary);
  font-family: var(--nav-font-family);
  font-size: 1rem;
  font-weight: 600;
}

.fm-step__title {
  margin: 0;
  align-self: center;
  font-family: var(--nav-font-family);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
}

.fm-step__body {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.fm-step__body p {
  margin: 0;
  color: var(--nav-color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.fm-step__body strong {
  color: var(--nav-color-text);
  font-weight: 600;
}

/* ---- Call to action ------------------------------------------------------ */

.fm-band--cta .fm-band__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.fm-cta__heading {
  margin: 0;
  font-family: var(--nav-font-family);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
}

.fm-cta__body {
  margin: 0;
  max-width: 42rem;
  color: var(--nav-color-text-muted);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-wrap: pretty;
}

/* ---- The one action ------------------------------------------------------ */

.fm-action {
  margin: 0;
}

/* Qualified with `.nav-theme a` rather than left as a bare class.
 *
 * `theme.css` carries `.nav-theme a { color: var(--nav-color-link) }`, which at
 * specificity (0,1,1) outranks a lone `.fm-action__link` at (0,1,0) — so this
 * filled button took the link colour instead of its own ink. That was survivable
 * while link and primary were different hues. They are not: the palette uses one
 * ramp per brand, so `--nav-color-link` and `--nav-color-primary` resolve to the
 * same value and the button rendered its text in its own background colour —
 * a 1:1 contrast ratio, and the page's only call to action invisible.
 *
 * Both brands were affected, because both set link and primary from one hue.
 * Matching `.nav-theme a.fm-action__link` (0,2,1) settles it on specificity
 * rather than on which stylesheet happens to load last. */
.nav-theme a.fm-action__link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--nav-radius);
  background: var(--nav-color-primary);
  color: var(--nav-color-on-primary);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-theme a.fm-action__link:hover,
.nav-theme a.fm-action__link:focus-visible {
  background: var(--nav-color-primary-hover);
  color: var(--nav-color-on-primary);
}
