.foundation-page {
  --fn-ink: #0F1720;
  --fn-line: #D7DEDB;
  --fn-line-soft: #E7EBE9;
  --fn-canvas: #FBFAF6;
  --fn-green: #2F7D4F;
  --fn-teal-text: #16706B;
  --fn-brass-text: #8A6A2E;
}

/* SECTION 1: HERO (unique to this page)                    */
/* Light, full-width image hero: recolored block render,    */
/* content left in ink, a same-color fade from the image's   */
/* own pale field for legibility, brass rule at the base.    */

.fn-hero {
  --fn-hero-field: #C9CFCF;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: clamp(560px, 44vw, 720px);
  padding: var(--space-16) 0;
  background: var(--fn-hero-field);
  border-bottom: 2px solid var(--color-brass);
}

.fn-hero__media {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 36%;
}

.fn-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% 45%;
  display: block;
}

.fn-hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--fn-hero-field) 0%, rgba(201, 207, 207, 0) 26%);
}

.fn-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.fn-hero__content {
  max-width: 560px;
}

.fn-hero__lockup {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.fn-hero__lockup img {
  width: 72px;
  height: 72px;
}

.fn-hero__wordmark {
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--color-obsidian);
  line-height: 1;
}

.fn-hero__wordmark em {
  font-style: normal;
  color: var(--color-teal);
}

.fn-hero__headline {
  font-size: clamp(2.5rem, 4.8vw, 4rem);
  font-weight: var(--weight-bold);
  line-height: 1.05;
  letter-spacing: var(--tracking-tight);
  color: var(--color-obsidian);
  margin: 0 0 var(--space-5);
}

.fn-hero__sub {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: var(--leading-body);
  color: #26343E;
  max-width: 520px;
  margin: 0 0 var(--space-8);
}

@media (max-width: 900px) {
  .fn-hero {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding: var(--space-10) 0 0;
  }
  .fn-hero__inner { order: 1; }
  .fn-hero__media {
    order: 2;
    position: relative;
    left: auto;
    height: 260px;
    margin-top: var(--space-10);
  }
  .fn-hero__media img { object-position: 88% 40%; }
  .fn-hero__media::after { display: none; }
}

@media (max-width: 560px) {
  .fn-hero { padding-top: 24px; }
  .fn-hero__lockup { margin-bottom: 16px; }
  .fn-hero__lockup img { width: 52px; height: 52px; }
  .fn-hero__headline { font-size: 36px; }
  .fn-hero__sub { margin-bottom: 24px; }
  .fn-hero__media { height: clamp(72px, 14svh, 120px); margin-top: 24px; }
}

@media (max-width: 560px) and (max-height: 600px) {
  .fn-hero__media { display: none; }
  .fn-hero { padding-bottom: 24px; }
}

/* SECTION 2: OVERVIEW + PITCH (home ENGAGE grammar)         */

.fn-overview__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-12);
  align-items: start;
  margin-bottom: var(--space-16);
}

.fn-overview .bl-overview__headline {
  max-width: 16ch;
  margin-bottom: 0;
  grid-column: 2;
  grid-row: 1;
}

.fn-overview__intro {
  grid-column: 1;
  grid-row: 1;
}

.fn-overview__intro {
  margin-bottom: 0;
}

.fn-overview__intro p + p {
  margin-top: var(--space-4);
}

/* Inline article link with a preview card on hover or focus. */
.fn-richlink {
  position: relative;
  color: var(--color-teal);
  font-weight: var(--weight-semibold);
  text-decoration: underline;
  text-decoration-color: rgba(28, 127, 122, 0.4);
  text-underline-offset: 0.2em;
}

.fn-richlink:hover,
.fn-richlink:focus-visible {
  text-decoration-color: currentColor;
}

.fn-richlink__card {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 5;
  width: 280px;
  padding-top: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
}

.fn-richlink:hover .fn-richlink__card,
.fn-richlink:focus-visible .fn-richlink__card {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.fn-richlink__inner {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #FFFFFF;
  border: 1px solid var(--color-gold);
  border-radius: 16px 16px 0 16px;
  box-shadow: 0 16px 36px rgba(15, 23, 32, 0.16);
}

.fn-richlink__inner img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  background: var(--color-surface);
}

.fn-richlink__meta {
  padding: 12px 16px 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--weight-regular);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fn-brass-text);
}

.fn-richlink__title {
  padding: 0 16px 14px;
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  line-height: 1.3;
  color: var(--color-obsidian);
}

@media (hover: none) {
  .fn-richlink__card { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fn-richlink__card { transition: none; }
}

.fn-rail-row {
  display: grid;
  grid-template-columns: 0.85fr 1.3fr;
  gap: var(--space-12);
  align-items: center;
}

/* Clipped top-right and bottom-left corners, as on the home page. */
.fn-rail-photo {
  border-radius: 16px;
  clip-path: polygon(0 0, 88% 0, 100% 15%, 100% 100%, 12% 100%, 0 85%);
  overflow: hidden;
  aspect-ratio: 14 / 15;
  box-shadow: 0 24px 48px rgba(15, 23, 32, 0.18);
}

.fn-rail-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.65);
}

.fn-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  padding: var(--space-2) var(--space-6) var(--space-2) var(--space-12);
}

html.js .fn-rail[data-reveal] {
  opacity: 1;
  transform: none;
}

.fn-rail__line {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.fn-rail__seg {
  position: absolute;
  left: 6px;
  top: 4%;
  width: 2px;
  height: 92%;
  background: var(--color-brass);
  transform-origin: top;
}

.fn-rail__dot {
  position: absolute;
  left: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-brass);
  transform: translate(-50%, -50%);
}

.fn-rail__dot--top    { top: 4%; }
.fn-rail__dot--bottom { top: 96%; }

html.js .fn-rail .fn-rail__seg { transform: scaleY(0); }
html.js .fn-rail .fn-rail__dot { transform: translate(-50%, -50%) scale(0); }
html.js .fn-rail.is-visible .fn-rail__dot--top    { transform: translate(-50%, -50%) scale(1); transition: transform 0.3s ease; }
html.js .fn-rail.is-visible .fn-rail__seg         { transform: scaleY(1); transition: transform 0.8s ease 0.25s; }
html.js .fn-rail.is-visible .fn-rail__dot--bottom { transform: translate(-50%, -50%) scale(1); transition: transform 0.3s ease 1s; }

@media (prefers-reduced-motion: reduce) {
  html.js .fn-rail .fn-rail__seg { transform: none; }
  html.js .fn-rail .fn-rail__dot { transform: translate(-50%, -50%); }
}

.fn-rail__item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.fn-rail__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-teal);
}

.fn-rail__label {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-obsidian);
  margin: 0 0 var(--space-2);
}

.fn-rail__item p {
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--color-body-steel);
  max-width: 46ch;
  margin: 0;
}

@media (max-width: 900px) {
  .fn-overview__head,
  .fn-rail-row {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .fn-overview__head { margin-bottom: var(--space-10); }
  .fn-overview .bl-overview__headline,
  .fn-overview__intro { grid-column: 1; grid-row: auto; }
  .fn-rail-photo { display: none; }
  .fn-rail { padding-left: var(--space-8); padding-right: 0; }
}

/* SECTION 3: PILLARS (bl-card open gold cards, widened)     */

.fn-pillars {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
}

.fn-pillar__list {
  list-style: none;
  margin: var(--space-4) 0 var(--space-4);
  padding: 0;
}

.fn-pillar__list li {
  position: relative;
  padding-left: var(--space-5);
  margin: 0 0 var(--space-2);
  color: rgba(255, 255, 255, 0.84);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.fn-pillar__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
}

.fn-pillar__link {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: #7AC7C2;
  text-decoration: none;
}

.fn-pillar__link:hover {
  color: #B3E3DF;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

@media (min-width: 1200px) {
  .fn-pillars .bl-steps {
    justify-content: space-between;
    padding-top: 32px;
  }
  .fn-pillars .bl-step {
    width: 344px;
    text-align: left;
  }
  .fn-pillars .bl-step:not(:first-of-type) {
    margin-left: 0;
  }
  .fn-pillars .bl-card,
  .fn-pillars .bl-card__outline {
    width: 344px;
    height: 176px;
  }
  .fn-pillars .bl-card__outline {
    border-radius: 0 88px 88px 0;
  }
  .fn-pillars .bl-card__body {
    max-width: 244px;
    padding: 34px 0 0 22px;
  }
  .fn-pillars .bl-step__content .bl-card__title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
  }
  .fn-pillars .bl-step__content .bl-card__text {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
  }
  .fn-pillar__list,
  .fn-pillar__link {
    margin-left: 22px;
  }
  .fn-pillar__link {
    display: inline-block;
  }
}

/* SECTION 4: OWNERSHIP (bl-case, reused)                    */

.fn-own .bl-case__solutions strong {
  color: var(--color-obsidian);
}

/* SECTION 5: LICENSING + TIERS (light comparison grid)      */

.fn-license {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
}

.fn-license__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-12);
  align-items: start;
  margin-bottom: var(--space-12);
}

.fn-license__intro .section-title {
  margin-bottom: 0;
  max-width: 14ch;
}

.fn-license__intro p {
  font-size: var(--text-md);
  line-height: var(--leading-body);
  color: var(--color-body-steel);
  margin: 0 0 var(--space-4);
}

.fn-textlink {
  font-weight: var(--weight-semibold);
  color: var(--color-teal);
  text-decoration: underline;
  text-decoration-color: rgba(28, 127, 122, 0.35);
  text-underline-offset: 0.2em;
}

.fn-textlink:hover { text-decoration-color: currentColor; }

.fn-grid {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: var(--text-sm);
}

.fn-grid__corner {
  width: 28%;
}

.fn-grid thead th {
  padding: 0 var(--space-5) var(--space-4);
  border-bottom: 2px solid var(--color-obsidian);
  text-align: left;
  vertical-align: bottom;
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-obsidian);
}

.fn-grid thead td {
  border-bottom: 2px solid var(--color-obsidian);
}


.fn-grid tbody th[scope="row"] {
  padding: var(--space-4) var(--space-4) var(--space-4) 0;
  border-bottom: 1px solid #EEF0EF;
  text-align: left;
  vertical-align: top;
  font-weight: var(--weight-semibold);
  color: var(--color-obsidian);
}

.fn-grid tbody td {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid #EEF0EF;
  vertical-align: top;
  line-height: var(--leading-normal);
  color: var(--color-body-steel);
}

.fn-grid thead th:nth-child(2),
.fn-grid tbody td:nth-child(2) {
  background: #F8F9F8;
}

.fn-grid thead th:nth-child(3),
.fn-grid tbody td:nth-child(3) {
  background: #F1F3F2;
}

.fn-grid thead th:nth-child(4),
.fn-grid tbody td:nth-child(4) {
  background: #E8EBEA;
}

.fn-grid thead th {
  padding-top: var(--space-5);
}

.fn-grid tbody td {
  border-bottom-color: rgba(15, 23, 32, 0.06);
}

.fn-grid td.is-yes {
  color: var(--color-obsidian);
}

.fn-grid__check {
  width: 14px;
  height: 14px;
  margin-right: var(--space-2);
  vertical-align: -2px;
  color: var(--color-teal);
}

.fn-grid td.is-out {
  color: #9AA4A9;
}

.fn-license__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
  margin-top: var(--space-8);
}

.fn-license__foot p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-muted);
}

@media (max-width: 900px) {
  .fn-license__intro { grid-template-columns: 1fr; gap: var(--space-6); }
}

/* Mobile: each row becomes a labelled block so nothing scrolls sideways. */
@media (max-width: 760px) {
  .fn-grid,
  .fn-grid tbody,
  .fn-grid tr,
  .fn-grid th,
  .fn-grid td {
    display: block;
    width: 100%;
  }
  .fn-grid thead { display: none; }
  .fn-grid tbody tr {
    padding: var(--space-4) 0;
    border-bottom: 1px solid #EEF0EF;
  }
  .fn-grid tbody th[scope="row"] {
    padding: 0 0 var(--space-2);
    border: 0;
  }
  .fn-grid tbody td,
  .fn-grid tbody td:nth-child(n) {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: var(--space-3);
    padding: var(--space-1) 0;
    border: 0;
    background: none;
  }
  .fn-grid tbody td::before {
    content: attr(data-tier);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-muted);
    padding-top: 0.2em;
  }
  .fn-grid__check { display: none; }
}

/* SECTION 6: WHERE IT RUNS (home carousel cards)            */

.fn-where__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-12);
  align-items: end;
  margin-bottom: var(--space-10);
}

.fn-where__head .section-title {
  margin-bottom: 0;
}

.fn-where__head p {
  margin: 0;
  font-size: var(--text-md);
  line-height: var(--leading-body);
  color: var(--color-body-steel);
}

.fn-where__head p a {
  font-weight: var(--weight-semibold);
  color: var(--color-teal);
  text-underline-offset: 0.2em;
}

.fn-where__cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6);
}

.fn-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 28px 28px 0 28px;
  border: 1px solid var(--color-gold);
  background: #FFFFFF;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(15, 23, 32, 0.10);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.fn-card:hover {
  box-shadow: 0 18px 38px rgba(15, 23, 32, 0.16);
  transform: translateY(-4px);
}

.fn-card__media {
  display: block;
  height: 170px;
}

.fn-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fn-card__media--screen {
  background: #E5EAF0;
  border-bottom: 1px solid #DCE3E5;
}

.fn-card__media--screen img {
  object-position: left top;
}

.fn-card__media--marks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  place-items: center;
  padding: 18px 24px;
  background: var(--color-obsidian);
}

.fn-card__media--marks img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.fn-card__body {
  display: flex;
  flex-direction: column;
  padding: 20px 22px 24px;
}

.fn-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-obsidian);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.fn-card__icon img,
.fn-card__icon svg {
  width: 30px;
  height: 30px;
  display: block;
}

.fn-card__icon svg {
  width: 24px;
  height: 24px;
}

.fn-card__title {
  font-size: 20px;
  font-weight: var(--weight-medium);
  line-height: 1.25;
  color: var(--color-obsidian);
  margin-bottom: 8px;
}

.fn-card:hover .fn-card__title {
  color: var(--color-teal);
}

.fn-card__desc {
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-body-steel);
}

@media (max-width: 1100px) {
  .fn-where__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .fn-where__head { grid-template-columns: 1fr; gap: var(--space-5); }
}

@media (max-width: 560px) {
  .fn-where__cards { grid-template-columns: 1fr; }
  .fn-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fn-card { transition: none; }
  .fn-card:hover { transform: none; }
}
