/* ============================================================
   CFB page layout system
   Ported from impact-checking + debit-card-styles references
   and the 20260804 components document.
   Load AFTER cfb-brand.css.
   ============================================================ */

.cfb-shell {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  .cfb-shell {
    padding-inline: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .cfb-shell {
    padding-inline: 2rem;
  }
}

.cfb-section {
  padding-block: 3rem;
}

@media (min-width: 1024px) {
  .cfb-section {
    padding-block: 4rem;
  }
}

.cfb-section--dark {
  background-color: var(--cfb-shadow);
  color: var(--cfb-light);
}

.cfb-section--dark h1,
.cfb-section--dark h2,
.cfb-section--dark .new-h1,
.cfb-section--dark .new-h2 {
  color: var(--cfb-sky) !important;
  font-family: "Spectral", Georgia, serif !important;
  letter-spacing: -0.05em;
  text-transform: none;
}

.cfb-section--dark p,
.cfb-section--dark .new-body,
.cfb-section--dark li {
  color: var(--cfb-light) !important;
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.cfb-section--dark li::marker {
  color: var(--cfb-light);
}

.cfb-section-title {
  font-family: "Spectral", Georgia, serif !important;
  font-size: clamp(1.75rem, 4vw, 2.5rem) !important;
  font-weight: 400 !important;
  letter-spacing: -0.05em !important;
  text-transform: none !important;
  color: var(--cfb-shadow) !important;
  text-align: left;
  margin: 0 0 2rem;
}

.cfb-section-title.cfb-accent-bar--center::after {
  margin-inline: 0;
}

/* Left-aligned text variants for product pages */
.cfb-section-title--left {
  text-align: left !important;
}

.cfb-biz-purpose__lead--left {
  text-align: left !important;
}

/* Simple bullet list (no tabs) for product pages */
.cfb-simple-list {
  margin: 1.5rem 0 2rem;
  padding-left: 1.5rem;
  list-style-type: disc;
  color: var(--cfb-shadow);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

.cfb-simple-list li {
  margin-bottom: 0.5rem;
}

.cfb-simple-list li::marker {
  color: var(--cfb-teal);
}

/* Hero rate and body text */
.cfb-hero-rate {
  margin: 0.5rem 0 0;
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-size: 1.25rem !important;
  font-weight: 500;
  color: var(--cfb-shadow);
}

.cfb-hero-rate strong {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cfb-teal);
}

.cfb-hero-body {
  margin: 1rem 0 0;
  max-width: 36rem;
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-size: 1.125rem !important;
  line-height: 1.5;
  color: var(--cfb-shadow);
}

/* Skyglow and flux heroes are light (orange / pale) surfaces, so hero copy stays
   Shadow. Light or Sky type on them falls below the 4.5:1 WCAG AA threshold. */
.cfb-hero--skyglow .cfb-hero-rate,
.cfb-hero--skyglow .cfb-hero-body,
.cfb-hero--flux .cfb-hero-rate,
.cfb-hero--flux .cfb-hero-body,
.cfb-hero--skyglow .cfb-hero-rate strong,
.cfb-hero--flux .cfb-hero-rate strong {
  color: var(--cfb-shadow) !important;
}

/* Product hero rate emphasis (for example "4.01% APY") reads as bold Shadow
   rather than inheriting an accent colour that the hero surface cannot support. */
.cfb-page-redesign :is(.cfb-hero--daylight, .cfb-hero--flux, .cfb-hero--sunrise, .cfb-hero--skyglow) :is(h1, h2, p) strong {
  font-weight: 700;
  color: var(--cfb-shadow) !important;
}

/* ============================================================
   Rate-product landing pages
   Colour lives on the full-bleed <section>; copy is constrained by
   the inner .cfb-shell, matching the business / personal hub bands.
   ============================================================ */
.cfb-product-landing .cfb-productlp-detail__lead {
  margin: 0 0 2rem;
  max-width: 62ch;
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-size: 1.125rem !important;
  line-height: 1.55;
  color: var(--cfb-shadow) !important;
}

/* Legacy .btn-light--lg is full-width by default, which stretches a lone CTA
   across the whole band; these bands want it sized to its label. */
.cfb-product-landing :is(.cfb-biz-hero, .cfb-productlp-detail) .btn-light--lg {
  width: auto;
  max-width: 100%;
}

.cfb-product-landing .cfb-biz-hero .cfb-hero-rate {
  margin: 1rem 0 2rem;
  font-size: 1.375rem !important;
}

.cfb-product-landing .cfb-biz-hero .cfb-hero-rate strong {
  font-size: 1.75rem;
}

.cfb-product-landing .cfb-productlp-detail .cfb-section-title {
  margin-bottom: 1.25rem;
}

.cfb-product-landing .cfb-productlp-detail .cfb-features-list {
  margin-bottom: 2.5rem;
}

/* Alternating band tint so the detail section reads as its own surface
   between the orange hero and the dark disclosure band. */
.cfb-product-landing .cfb-productlp-detail {
  background-color: var(--cfb-light);
}

.cfb-product-grid--2 {
  max-width: 56rem;
}

@media (min-width: 768px) {
  .cfb-product-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }
}

.cfb-product-page {
  background-color: var(--cfb-light) !important;
}

.cfb-product-page .new-light-blue-background,
.cfb-product-page .white-background {
  background-color: var(--cfb-light) !important;
  background-image: none !important;
}

/* ---------- Features grid (Sample 1 / impact-checking) ---------- */
.cfb-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  justify-items: center;
}

@media (min-width: 640px) {
  .cfb-features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  .cfb-features-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.cfb-features-grid.cfb-features-grid--3 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .cfb-features-grid.cfb-features-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .cfb-features-grid.cfb-features-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cfb-feature {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  width: 100%;
}

.cfb-feature > * {
  max-width: 16rem;
}

.cfb-feature img,
.cfb-feature .cfb-feature-icon {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
}

@media (min-width: 640px) {
  .cfb-feature img,
  .cfb-feature .cfb-feature-icon {
    width: 5rem;
    height: 5rem;
  }
}

.cfb-feature h3,
.cfb-feature .cfb-feature-title {
  margin: 1rem 0 0;
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-size: 0.875rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--cfb-shadow) !important;
  line-height: 1.3;
}

@media (min-width: 640px) {
  .cfb-feature h3,
  .cfb-feature .cfb-feature-title {
    font-size: 1rem !important;
  }
}

.cfb-feature p,
.cfb-feature .cfb-feature-subtitle {
  margin: 0.375rem 0 0;
  max-width: 13rem;
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  line-height: 1.625 !important;
  color: rgba(1, 36, 39, 0.75) !important;
}

/* ---------- Feature separators ----------
   Each feature is divided from the next by a hairline rule in Shadow,
   squared, matching the brand's flat, borderless treatment. The rules sit in the
   middle of the grid gutters, so they follow the 1 / 2 / 4 column cadence. */
.cfb-features-grid > .cfb-feature::before,
.cfb-features-grid > .cfb-feature::after {
  content: "";
  position: absolute;
  background-color: var(--cfb-features-divider, rgba(1, 36, 39, 0.32));
}

/* 1 column: horizontal rule above every feature but the first */
.cfb-features-grid > .cfb-feature::before {
  top: -1.25rem;
  left: 12%;
  right: 12%;
  height: 1px;
}

.cfb-features-grid > .cfb-feature::after {
  content: none;
}

.cfb-features-grid > .cfb-feature:first-child::before {
  content: none;
}

@media (min-width: 640px) {
  /* 2 columns: vertical rule in the gutter, horizontal rule between rows */
  .cfb-features-grid > .cfb-feature::before {
    top: 0;
    bottom: 0;
    left: -1rem;
    right: auto;
    width: 1px;
    height: auto;
  }

  .cfb-features-grid > .cfb-feature:nth-child(2n + 1)::before {
    content: none;
  }

  .cfb-features-grid > .cfb-feature:nth-child(n + 3)::after {
    content: "";
    top: -1rem;
    left: 0;
    right: 0;
    height: 1px;
  }
}

@media (min-width: 1024px) {
  .cfb-features-grid > .cfb-feature:nth-child(2n + 1)::before {
    content: "";
  }

  .cfb-features-grid > .cfb-feature:nth-child(4n + 1)::before {
    content: none;
  }

  .cfb-features-grid > .cfb-feature:nth-child(n + 3)::after {
    content: none;
  }

  .cfb-features-grid > .cfb-feature:nth-child(n + 5)::after {
    content: "";
  }

  /* 3-up variant keeps the same rhythm on a 3 column track */
  .cfb-features-grid--3 > .cfb-feature:nth-child(2n + 1)::before {
    content: "";
  }

  .cfb-features-grid--3 > .cfb-feature:nth-child(4n + 1)::before {
    content: "";
  }

  .cfb-features-grid--3 > .cfb-feature:nth-child(3n + 1)::before {
    content: none;
  }

  .cfb-features-grid--3 > .cfb-feature:nth-child(n + 4)::after {
    content: "";
  }

  .cfb-features-grid--3 > .cfb-feature:nth-child(-n + 3)::after {
    content: none;
  }
}

/* 5-item centered layout: 3 on top, 2 centered below */
@media (min-width: 1024px) {
  .cfb-features-grid--3.cfb-features-grid--5 {
    grid-template-columns: repeat(6, 1fr);
  }

  .cfb-features-grid--3.cfb-features-grid--5 > .cfb-feature:nth-child(-n + 3) {
    grid-column: span 2;
  }

  .cfb-features-grid--3.cfb-features-grid--5 > .cfb-feature:nth-child(4) {
    grid-column: 2 / 4;
  }

  .cfb-features-grid--3.cfb-features-grid--5 > .cfb-feature:nth-child(5) {
    grid-column: 4 / 6;
  }

  /* No divider on the left edge of the first bottom-row item */
  .cfb-features-grid--3.cfb-features-grid--5 > .cfb-feature:nth-child(4)::before {
    content: none;
  }

  /* Vertical divider between E-Statements and Alerts.
     nth-child(4n + 1) hides this item's rule in the base 3-up layout. */
  .cfb-features-grid--3.cfb-features-grid--5 > .cfb-feature:nth-child(5)::before {
    content: "" !important;
    top: 0;
    bottom: 0;
    left: calc(-1 * (2rem / 2));
    right: auto;
    width: 1px;
    height: auto;
  }

  /* Show horizontal divider above bottom row */
  .cfb-features-grid--3.cfb-features-grid--5 > .cfb-feature:nth-child(4)::after,
  .cfb-features-grid--3.cfb-features-grid--5 > .cfb-feature:nth-child(5)::after {
    content: "";
    top: -1rem;
    left: 0;
    right: 0;
    height: 1px;
  }
}

/* ---------- Product grid (Sample 2 / debit-card-styles) ---------- */
.cfb-product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: stretch;
}

@media (min-width: 640px) {
  .cfb-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .cfb-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
}

.cfb-product {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 0;
  background-color: var(--cfb-light);
  color: var(--cfb-shadow);
  border: 2px solid var(--cfb-shadow);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

/* Shadow call-out band: large number, or a direction in eyebrow treatment. */
.cfb-product__stat-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 2rem 1.5rem;
  background-color: var(--cfb-shadow);
  text-align: center;
  min-height: 7rem;
}

.cfb-product__stat {
  margin: 0;
  font-family: "Spectral", Georgia, serif !important;
  font-size: clamp(2.75rem, 5vw, 3.5rem) !important;
  font-weight: 400 !important;
  /* Brand guideline: -10 tracking on numbers */
  letter-spacing: -0.01em !important;
  color: var(--cfb-sky) !important;
  line-height: 1.05;
  text-transform: none !important;
}

/* Brand guideline: "%" matches the number height */
.cfb-product__stat .cfb-stat-unit {
  font-size: 1em;
}

.cfb-product__stat .cfb-stat-term {
  margin-left: 0.35rem;
  font-size: 0.55em;
  letter-spacing: 0.02em;
}

.cfb-product__stat sup {
  font-size: 0.35em;
  vertical-align: super;
  line-height: 0;
}

.cfb-product__stat-cta {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-size: 0.875rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--cfb-sky) !important;
  line-height: 1.4;
}

/* Light panel: title, descriptor, feature list, center-bottom button */
.cfb-product__panel {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 2rem 1.75rem 2rem;
  text-align: left;
}

.cfb-product__eyebrow,
.cfb-product h3 {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-size: 1.125rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: var(--cfb-shadow) !important;
  text-decoration: none !important;
  line-height: 1.3;
}

/* Scoped to the Light panel: the Shadow stat band above it keeps Sky type. */
.cfb-product__body,
.cfb-product__panel p,
.cfb-product__panel li {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em !important;
  color: rgba(1, 36, 39, 0.8) !important;
  line-height: 1.45;
  text-transform: none !important;
  list-style: none;
}

.cfb-product ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
}

.cfb-product ul.cfb-featurelist {
  margin: 1rem 0 0;
  gap: 1rem;
}

.cfb-product__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.5rem;
  width: 100%;
}

.cfb-product .w-button,
.cfb-product .btn-blue-light,
.cfb-product .btn-ol,
.cfb-product .btn-light--lg {
  align-self: flex-start;
}

/* ---------- Feature list (CD doc pattern) ---------- */
.cfb-featurelist {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
  width: 100%;
}

.cfb-featurelist li {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.75rem;
  align-items: start;
}

.cfb-featurelist__mark {
  width: 0.55rem;
  height: 0.55rem;
  margin: 0.3rem 0 0 0.15rem;
  border-right: 2px solid var(--cfb-sky);
  border-bottom: 2px solid var(--cfb-sky);
  transform: rotate(45deg);
}

.cfb-featurelist__title {
  display: block;
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-size: 0.75rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--cfb-shadow) !important;
  margin-bottom: 0.25rem;
}

.cfb-section--dark .cfb-featurelist__title {
  color: var(--cfb-light) !important;
}

.cfb-featurelist__body {
  display: block;
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-size: 0.9375rem !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em !important;
  color: rgba(1, 36, 39, 0.75) !important;
  line-height: 1.55;
  text-transform: none !important;
}

.cfb-section--dark .cfb-featurelist__body {
  color: rgba(255, 251, 247, 0.85) !important;
}

/* ---------- Offering / tab panels (business homepage) ---------- */
.cfb-panel {
  display: none;
  gap: 2rem;
  align-items: stretch;
}

.cfb-panel.is-active {
  display: grid;
}

@media (min-width: 768px) {
  .cfb-panel.is-active {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }
}

.cfb-panel__media {
  width: 100%;
  overflow: hidden;
}

.cfb-panel__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 22rem;
  object-fit: cover;
  border-radius: 0;
}

.cfb-panel__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem 0;
  background: transparent;
  position: static;
  height: auto;
}

.cfb-panel__body h3 {
  margin: 0;
  font-family: "Spectral", Georgia, serif !important;
  font-weight: 400 !important;
  letter-spacing: -0.05em !important;
  text-transform: none !important;
  color: var(--cfb-shadow) !important;
  font-size: clamp(1.5rem, 2.5vw, 2rem) !important;
}

.cfb-panel__body p,
.cfb-panel__body li {
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em !important;
  color: var(--cfb-shadow) !important;
  line-height: 1.5;
}

.cfb-panel__body ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.cfb-panel__actions {
  margin-top: 1rem;
}

/* Reset legacy absolute offering skeleton wherever panels reuse those classes */
.cfb-page-redesign .cfb-panel .new-offering-container,
.cfb-page-redesign .cfb-panel .new-offering-content,
.cfb-page-redesign .new-offering-container,
.cfb-page-redesign .new-offering-content,
.cfb-page-redesign .new-offering-description-features {
  position: static !important;
  inset: auto !important;
  height: auto !important;
  max-height: none !important;
  width: 100% !important;
  overflow: visible !important;
}

.cfb-page-redesign .new-offering-container {
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 1.5rem !important;
}

/* ---------- Destination button row ---------- */
.cfb-btn-row--dest {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 640px) {
  .cfb-btn-row--dest {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .cfb-btn-row--dest {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.btn-light--lg,
.cfb-page-redesign .btn-light--lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1.125rem 2rem !important;
  font-size: 0.875rem !important;
  border: 2px solid var(--cfb-shadow) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--cfb-shadow) !important;
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-weight: 900 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-light--lg::after {
  content: "\2192";
  font-weight: 400;
  letter-spacing: 0;
}

.btn-light--lg:hover,
.cfb-page-redesign .btn-light--lg:hover {
  background: var(--cfb-shadow) !important;
  color: var(--cfb-light) !important;
}

/* ---------- Logo / icon frames stay inert ---------- */
.cfb-img-frame:has(img[src*="logo"]),
.cfb-img-frame:has(img[src*="Logo"]),
.cfb-img-frame:has(img[src*="Apple"]),
.cfb-img-frame:has(img[src*="google-play"]),
.icon-and-app-link .cfb-img-frame {
  position: static;
}

.cfb-img-frame:has(img[src*="logo"])::before,
.cfb-img-frame:has(img[src*="logo"])::after,
.cfb-img-frame:has(img[src*="Logo"])::before,
.cfb-img-frame:has(img[src*="Logo"])::after,
.cfb-img-frame:has(img[src*="Apple"])::before,
.cfb-img-frame:has(img[src*="Apple"])::after,
.cfb-img-frame:has(img[src*="google-play"])::before,
.cfb-img-frame:has(img[src*="google-play"])::after,
.icon-and-app-link .cfb-img-frame::before,
.icon-and-app-link .cfb-img-frame::after {
  display: none !important;
}

.icon-and-app-link .cfb-img-frame img,
.cfb-img-frame:has(img[src*="Apple"]) img,
.cfb-img-frame:has(img[src*="google-play"]) img {
  width: auto !important;
  height: auto !important;
  max-width: 2rem;
  object-fit: contain !important;
}
