/* ==========================================================================
   Fit For Banking — Base / reset / shared primitives
   ========================================================================== */

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

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 140px;
  -webkit-text-size-adjust: 100%;
}

/* Flex column so the footer can be pushed to the bottom of the viewport on
   short pages (legal, imprint, the blank template) rather than floating
   halfway up. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--ffb-page-bg);
  color: var(--ffb-text);
  font-family: var(--ffb-body);
  font-size: var(--ffb-body-size);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--ffb-page-top);
}

/* Pages whose first section is a full-bleed hero the fixed header floats over
   ($ffb_flush_top). The hero carries the header's height as padding instead. */
body.ffb-body--flush {
  padding-top: 0;
}

main {
  flex: 1 0 auto;
}

@media (max-width: 420px) {
  body {
    padding-top: var(--ffb-page-top-tiny);
  }
}

h1,
h2,
h3,
h4 {
  font-family: var(--ffb-serif);
  font-weight: 700;
  color: var(--ffb-navy-deep);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--ffb-link);
  text-decoration: none;
  transition: color var(--ffb-t-fast) ease;
}

a:hover {
  color: var(--ffb-link-hover);
}

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

button {
  font: inherit;
  cursor: pointer;
}

/* The `hidden` attribute is how every toggle in js/ tracks open and closed —
   the search overlay, the profile menu, the burger panel, the idle dialog. Only
   the browser's own `[hidden] { display: none }` enforces it, and an author rule
   outranks the UA stylesheet whatever its specificity, so any element that also
   carries a `display` of its own ignores the attribute entirely. That is what
   left the secure header's search form painted open on every page load.

   `!important` rather than specificity: `[hidden]` and a single class score the
   same, and this file loads before the component sheets, so source order would
   otherwise decide against it. */
[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--ffb-focus);
  outline-offset: 2px;
}

/* Dark surfaces: the navy ring would vanish, so it goes green inside them.
   Page sheets add their own dark surfaces the same way (.dash-car,
   .cat-fresh__card, …). */
.ffb-footer,
.ffb-cta__panel,
.ffb-header.home {
  --ffb-focus: var(--ffb-focus-on-dark);
}

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

/* Content container. Padding drops to 0 at/above the 1440 cap so content and
   footer align edge-to-edge — per the handoff spacing rules. */
.ffb-container {
  width: min(var(--ffb-container), 100%);
  margin-inline: auto;
  padding-inline: var(--ffb-gutter);
}

@media (min-width: 1440px) {
  .ffb-container {
    padding-inline: 0;
  }
}

.ffb-section {
  margin-top: var(--ffb-section-gap);
}

/* Screen-reader-only, for skip links and icon-button labels. */
.ffb-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ffb-skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: var(--ffb-r-btn);
  background: var(--ffb-navy-deep);
  color: #ffffff;
  font-family: var(--ffb-jakarta);
  font-weight: 700;
  transition: top var(--ffb-t-fast) ease;
}

.ffb-skip-link:focus {
  top: 16px;
  color: #ffffff;
}

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

.ffb-eyebrow {
  font-family: var(--ffb-body);
  font-weight: 500;
  font-size: var(--ffb-eyebrow);
  letter-spacing: var(--ffb-track-eyebrow);
  text-transform: uppercase;
  color: var(--ffb-blue);
}

.ffb-eyebrow--dark {
  color: var(--ffb-text-muted-soft);
}

.ffb-h1 {
  font-size: var(--ffb-h1);
  line-height: 1.14;
  letter-spacing: var(--ffb-track-tight);
}

.ffb-h2 {
  font-size: var(--ffb-h2-section);
  letter-spacing: 0.01em;
}

.ffb-lead {
  font-family: var(--ffb-body);
  font-weight: 400;
  font-size: var(--ffb-lead);
  line-height: 1.6;
  color: var(--ffb-text-body);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.ffb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  font-family: var(--ffb-jakarta);
  font-weight: 700;
  font-size: var(--ffb-nav-size);
  white-space: nowrap;
  text-align: center;
  transition: background var(--ffb-t-ui) ease, border-color var(--ffb-t-ui) ease,
    box-shadow var(--ffb-t-ui) ease, transform var(--ffb-t-ui) ease;
}

.ffb-btn--green {
  padding: 12px 28px 14px;
  border-radius: var(--ffb-r-btn);
  background: var(--ffb-green);
  color: var(--ffb-green-ink);
}

.ffb-btn--green:hover {
  background: var(--ffb-green-hover);
  box-shadow: var(--ffb-glow-green);
  color: var(--ffb-green-ink);
}

.ffb-btn--navy {
  padding: 11px 26px 13px;
  border: 1.5px solid var(--ffb-blue);
  border-radius: var(--ffb-r-btn);
  background: var(--ffb-blue);
  color: #ffffff;
}

.ffb-btn--navy:hover {
  background: var(--ffb-blue-hover);
  border-color: var(--ffb-blue-hover);
  box-shadow: var(--ffb-glow-blue);
  color: #ffffff;
}

/* Secondary beside --green on a light ground (How to get started). */
.ffb-btn--outline {
  padding: 11px 26px 13px;
  border: 1.5px solid var(--ffb-outline-border);
  border-radius: var(--ffb-r-btn);
  background: transparent;
  color: var(--ffb-navy-brand);
}

.ffb-btn--outline:hover {
  border-color: var(--ffb-blue);
  background: var(--ffb-surface-soft);
  color: var(--ffb-navy-brand);
}

/* "← All courses" back link, in eyebrow type — one look on every page that
   has one (Keith, 2026-10-21, after Categories' area view). align-self keeps
   it to its own width inside a flex column (News). */
.ffb-back {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  font-family: var(--ffb-body);
  font-weight: 500;
  font-size: var(--ffb-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ffb-blue);
}

.ffb-back:hover {
  color: var(--ffb-blue-hover);
}

.ffb-back .ffb-icon {
  flex: none;
  width: 16px;
  height: 16px;
}

/* Pill CTA — Poppins, fully rounded. */
.ffb-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border: 0;
  border-radius: var(--ffb-r-pill);
  background: var(--ffb-green);
  font-family: var(--ffb-poppins);
  font-weight: 600;
  font-size: var(--ffb-pill-size);
  color: var(--ffb-green-ink);
  white-space: nowrap;
  transition: background var(--ffb-t-ui) ease, box-shadow var(--ffb-t-ui) ease,
    transform var(--ffb-t-ui) ease;
}

.ffb-pill:hover {
  background: var(--ffb-green-hover);
  box-shadow: var(--ffb-glow-cta);
  color: var(--ffb-green-ink);
}

.ffb-pill--outline {
  background: transparent;
  border: 1.5px solid var(--ffb-outline-border);
  color: var(--ffb-navy-brand);
}

.ffb-pill--outline:hover {
  background: #ffffff;
  border-color: var(--ffb-outline-hover);
  box-shadow: none;
  color: var(--ffb-navy-brand);
}

.ffb-pill--navy {
  background: var(--ffb-navy-deep);
  color: #ffffff;
}

.ffb-pill--navy:hover {
  background: var(--ffb-blue);
  box-shadow: none;
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Motion — every continuous animation is disabled under reduced-motion.
   -------------------------------------------------------------------------- */

@keyframes ffb-rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.ffb-rise {
  animation: ffb-rise-in 0.7s ease both;
}

/* Low-motion mode, set by js/motion.js on machines that cannot animate
   smoothly — bank desktops on Citrix/VDI with no GPU. Same effect as the
   reduced-motion preference below: everything snaps. */
html[data-low-motion] {
  scroll-behavior: auto;
}

html[data-low-motion] *,
html[data-low-motion] *::before,
html[data-low-motion] *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

@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;
    scroll-behavior: auto !important;
  }
}
