/* CHF Savings (chf_savings / chf_sparen) — see GUIDELINES.md */

.urble-section-zchf-1,
.urble-section-zchf-2,
.urble-section-zchf-3,
.urble-section-zchf-4,
.urble-section-zchf-5,
.urble-section-zchf-6,
.urble-section-zchf-7,
.urble-section-zchf-8,
.urble-section-zchf-9 {
  display: flex;

  .urble-section-blocks {
    width: 1080px;
    max-width: 100%;
    position: relative;
    margin: auto;
    display: flex;
  }

  h2 {
    font-size: 48px;
    line-height: 1.05;
    font-weight: 700;
  }

  /* Card display sub-head — see the type scale in GUIDELINES.md */
  .urble-card h3 {
    font-family: Quicksand;
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    color: var(--_Prim-Color-dark-100-Brand);
  }
}

/* Shared building blocks */

.urble-zchf-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 720px;
  max-width: 100%;
}

.urble-zchf-note {
  font-size: 16px;
  line-height: 22.4px;
  color: var(--_Prim-Color-dark-300);
}

.urble-zchf-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--_Prim-Color-green-50);
  color: var(--_Prim-Color-dark-300);
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;

  .urble-zchf-badge-dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--urble-color-ab);
  }

  .urble-zchf-badge-logo {
    height: 16px;
    width: auto;
  }
}

/* Gradient bubbles — the decorative discs the rest of the site floats over its dark bands
   (about.css §5, community.css §6, urble_couple.css §11). The 114 / 66 / 49 trio is the
   established set of sizes. Each section anchors them to whichever box owns the free space:
   .urble-section-blocks (already `position: relative`) for the dark bands in §6 and §9, the
   card grid itself for §5. They paint on top of the surface they decorate. */
.urble-section-zchf-2,
.urble-section-zchf-4,
.urble-section-zchf-6,
.urble-section-zchf-9 {
  .urble-circle-1,
  .urble-circle-2,
  .urble-circle-3 {
    position: absolute;
    border-radius: 600px;
    background: var(--urble-linear-gradient);
  }

  .urble-circle-1 {
    width: 114px;
    height: 114px;
  }

  .urble-circle-2 {
    width: 66px;
    height: 66px;
  }

  .urble-circle-3 {
    width: 49px;
    height: 49px;
  }
}

/* §2 uses the free column beside its 720px head, with its largest disc sitting slightly
   above the content to avoid a repeated, centered cluster. */
.urble-section-zchf-2 {
  .urble-circle-1 {
    top: -24px;
    right: 32px;
  }

  .urble-circle-2 {
    top: 72px;
    right: 160px;
  }

  .urble-circle-3 {
    top: 24px;
    right: 240px;
  }
}

/* §4 uses the same structurally free column but a looser, right-edge cluster. The large
   disc overhangs the content container so the comparison section does not repeat §2. */
.urble-section-zchf-4 {
  .urble-circle-1 {
    top: 48px;
    right: -24px;
  }

  .urble-circle-2 {
    top: 24px;
    right: 120px;
  }

  .urble-circle-3 {
    top: 136px;
    right: 176px;
  }
}

.urble-zchf-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;

  .urble-card {
    width: auto;
    max-width: none;
    height: auto;
    gap: 16px;
    box-shadow: var(--urble-box-shadow-light);
  }
}

.urble-zchf-cards,
.urble-zchf-cards-2 {
  .urble-card {
    &.urble-zchf-card__gradient {
      background: var(--urble-linear-gradient);
    }

    &.urble-zchf-card__dark {
      background: var(--_Prim-Color-dark-100-Brand);

      h3 {
        color: var(--_Prim-Color-light-000-White);
      }

      .urble-card-text {
        color: var(--_Prim-Color-light-100);
      }
    }
  }
}

/* 1 — Hero */

.urble-section-zchf-1 {
  /* No top padding: the hero sits flush under the header so its gradient starts there
     instead of leaving a white band above the first section. */
  width: 1144px;
  max-width: 100%;
  margin: auto;
  box-sizing: border-box;
  padding: 0 32px 96px;
  background: var(--urble-linear-gradient-greenish);

  .urble-section-blocks {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 64px;
  }

  .urble-section-content {
    flex-direction: column;
    gap: 32px;
    width: 616px;
    max-width: 100%;
  }

  .urble-section-content-text {
    width: 528px;
    max-width: 100%;
    font-size: 18px;
    line-height: 1.5;
    color: var(--_Prim-Color-dark-300);
  }

  .urble-zchf-hero-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }

  .urble-section-image {
    display: flex;
    flex: 0 0 auto;
    justify-content: center;
    /* Room for the corners the tilt pushes past the image box. */
    padding: 32px 0;

    img {
      width: 320px;
      max-width: 100%;
      height: auto;
      transform: rotate(10deg);
      filter: drop-shadow(var(--urble-drop-shadow-device));
    }
  }
}

/* 2 — Simply put */

.urble-section-zchf-2 {
  padding: 64px 0;

  .urble-section-blocks {
    flex-direction: column;
    gap: 32px;
  }
}

/* 3 — How it works */

.urble-section-zchf-3 {
  padding: 64px 0;

  .urble-section-blocks {
    flex-direction: row;
    justify-content: space-between;
    /* Keep the two desktop columns aligned; the illustration itself follows the flow above it. */
    align-items: stretch;
    gap: 64px;
  }

  .urble-zchf-head {
    flex: 0 0 auto;
    width: 456px;
  }

  /* Keep the supporting art close to its flow, rather than pinning it to the bottom of the
     much taller five-step column. Its landscape ratio makes useful use of the left column. */
  .urble-zchf-head-illustration {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 240px;
    margin-top: 32px;
    align-self: center;
  }

  .urble-zchf-flow {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
  }

  .urble-zchf-flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    border-radius: 16px;
    background: var(--_Prim-Color-light-000-White);
    box-shadow: var(--urble-box-shadow-light);
    text-align: center;

    strong {
      font-family: Quicksand;
      font-size: 16px;
      font-weight: 700;
      line-height: 22.4px;
      color: var(--_Prim-Color-dark-100-Brand);
    }

    span {
      font-size: 14px;
      line-height: 20px;
      color: var(--_Prim-Color-dark-300);
    }
  }

  .urble-zchf-flow-arrow {
    flex: 0 0 auto;
    color: var(--urble-color-text-primary-disabled);
  }

  .urble-zchf-steps {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
  }

  .urble-card {
    flex-direction: row;
    align-items: flex-start;
    width: auto;
    max-width: none;
    height: auto;
    gap: 16px;
    background: var(--urble-color-surface-primary-low-emphasis);

    h3 {
      margin-bottom: 8px;
    }
  }

  .urble-zchf-step-number {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 16px;
    background: var(--urble-linear-gradient);
    font-family: Quicksand;
    font-size: 16px;
    font-weight: 700;
    color: var(--_Prim-Color-dark-100-Brand);
  }
}

/* 4 — Compare */

.urble-section-zchf-4 {
  padding: 64px 0;

  .urble-section-blocks {
    flex-direction: column;
    gap: 32px;
  }

  .urble-zchf-compare {
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    background: var(--_Prim-Color-light-000-White);
    box-shadow: var(--urble-box-shadow-light);

    table {
      width: 100%;
      border-collapse: collapse;
      table-layout: fixed;
    }

    th {
      padding: 24px;
      text-align: start;
      background: var(--_Prim-Color-green-50);
      font-family: Quicksand;
      font-size: 16px;
      font-weight: 700;
      line-height: 22.4px;
      color: var(--_Prim-Color-dark-000-Black);
    }

    td {
      padding: 24px;
      vertical-align: top;
      border-top: 1px solid var(--_Prim-Color-light-100);
      font-size: 16px;
      line-height: 22.4px;
      color: var(--_Prim-Color-dark-300);
    }

    td strong {
      color: var(--_Prim-Color-dark-100-Brand);
    }
  }
}

/* 5 — Know the risks */

.urble-section-zchf-5 {
  padding: 64px 0;

  .urble-section-blocks {
    flex-direction: column;
    gap: 32px;
  }

  .urble-figure {
    width: 360px;
    height: 360px;
    bottom: -128px;
    left: -320px;
    right: auto;
    z-index: 0;
    pointer-events: none;
    rotate: 90deg;
  }

  .urble-zchf-head,
  .urble-zchf-cards-2,
  .urble-zchf-note {
    position: relative;
    z-index: 1;
  }

  .urble-zchf-cards-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
    gap: 32px;

    .urble-card {
      width: auto;
      max-width: none;
      height: auto;
      gap: 16px;
      background: var(--urble-color-surface-primary-low-emphasis);
    }
  }
}

/* 6 — Availability */

.urble-section-zchf-6 {
  padding: 64px 0;

  .urble-section-blocks {
    flex-direction: column;
  }

  .urble-card {
    width: auto;
    max-width: none;
    height: auto;
    gap: 16px;
    padding: 64px;
    background: var(--_Prim-Color-dark-100-Brand);

    h2 {
      /* Keeps the copy clear of the bubbles in the band's right-hand column. */
      width: 720px;
      max-width: 100%;
      color: var(--_Prim-Color-light-000-White);
    }

    .urble-card-text {
      width: 720px;
      max-width: 100%;
      color: var(--_Prim-Color-light-100);
    }
  }

  .urble-circle-1 {
    bottom: -32px;
    right: 24px;
  }

  .urble-circle-2 {
    top: 56px;
    right: 152px;
  }

  .urble-circle-3 {
    top: 152px;
    right: -16px;
  }

}

/* 7 — Fees */

.urble-section-zchf-7 {
  padding: 64px 0;

  .urble-section-blocks {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 64px;
  }

  .urble-zchf-head {
    flex: 0 0 auto;
    width: 456px;
  }

  .urble-card {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    height: auto;
    min-width: 0;
    gap: 16px;
    box-shadow: var(--urble-box-shadow-light);

    ul {
      display: flex;
      flex-direction: column;
      gap: 16px;
      margin-left: 16px;
      list-style: none;
    }

    li {
      position: relative;
      font-size: 16px;
      line-height: 22.4px;
      color: var(--_Prim-Color-dark-300);
    }

    /* Gradient dot marker — same idiom as the About list (about.css) */
    li::before {
      content: '';
      position: absolute;
      left: -16px;
      width: 5px;
      height: 5px;
      /* optical centering of the dot against a 22.4px line */
      margin-top: 9px;
      border-radius: 999px;
      background: var(--urble-linear-gradient);
    }
  }
}

/* 8 — FAQ */

.urble-section-zchf-8 {
  padding: 64px 0;

  .urble-section-blocks {
    flex-direction: column;
    gap: 32px;
  }

  .urble-accordion-sections {
    width: 100%;
  }
}

/* 9 — Final CTA */

.urble-section-zchf-9 {
  padding: 64px 0 128px;

  .urble-section-blocks {
    flex-direction: column;
  }

  .urble-card {
    width: auto;
    max-width: none;
    height: auto;
    align-items: center;
    gap: 24px;
    padding: 64px;
    text-align: center;
    background: var(--_Prim-Color-dark-100-Brand);

    h2 {
      width: 720px;
      max-width: 100%;
      color: var(--_Prim-Color-light-000-White);
    }

    .urble-card-text {
      width: 640px;
      max-width: 100%;
      color: var(--_Prim-Color-light-100);
    }
  }

  .urble-zchf-badge {
    background: var(--urble-color-surface-inverse-low-emphasis);
    color: var(--_Prim-Color-light-000-White);
  }

  .urble-download {
    margin-inline: auto;
    color: var(--_Prim-Color-light-000-White);
  }

  /* The final band balances §6 on the left, with its lower disc extending past the card edge. */
  .urble-circle-1 {
    bottom: -32px;
    left: -24px;
  }

  .urble-circle-2 {
    top: 40px;
    left: 72px;
  }

  .urble-circle-3 {
    bottom: 88px;
    left: 56px;
  }
}

/* TABLET */
@media (max-width: 1120px) {
  .urble-section-zchf-1,
  .urble-section-zchf-2,
  .urble-section-zchf-3,
  .urble-section-zchf-4,
  .urble-section-zchf-5,
  .urble-section-zchf-6,
  .urble-section-zchf-7,
  .urble-section-zchf-8,
  .urble-section-zchf-9 {
    h2 {
      font-size: 26px;
      line-height: 26px;
    }

    .urble-section-blocks {
      flex-direction: column;
      align-items: center;
      gap: 32px;
    }
  }

  .urble-zchf-head {
    width: 100%;
    align-items: center;
    text-align: center;
  }

  .urble-zchf-note {
    text-align: center;
  }

  .urble-zchf-cards {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .urble-section-zchf-1 {
    padding: 0 0 64px;

    .urble-section-content {
      width: 100%;
      padding-top: 32px;
    }

    .urble-section-content-text {
      width: 100%;
    }

    .urble-zchf-hero-actions {
      justify-content: center;
    }

    .urble-zchf-badge {
      margin: auto;
    }
  }

  .urble-section-zchf-3 {
    .urble-zchf-head {
      width: 100%;
    }

    /* Stacked layout — no empty column left to fill, so it just centers under the flow. */
    .urble-zchf-head-illustration {
      margin: 16px auto 0;
      align-self: center;
    }

    .urble-zchf-flow {
      justify-content: center;
      flex-wrap: wrap;
    }

    .urble-zchf-steps {
      width: 100%;
    }

    .urble-card h3 {
      text-align: start;
    }
  }

  .urble-section-zchf-5 .urble-zchf-cards-2 {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .urble-section-zchf-6 .urble-card,
  .urble-section-zchf-9 .urble-card {
    padding: 32px;
  }

  /* The sections lose their free side column once the copy is centered and full width,
     so the bubbles come off — same as the circles on About / Community. */
  .urble-section-zchf-2,
  .urble-section-zchf-4,
  .urble-section-zchf-6,
  .urble-section-zchf-9 {
    .urble-circle-1,
    .urble-circle-2,
    .urble-circle-3 {
      display: none;
    }
  }

  .urble-section-zchf-5 .urble-figure {
    display: none;
  }

  .urble-section-zchf-6 .urble-card {
    align-items: center;
    text-align: center;
  }

  .urble-section-zchf-6 .urble-card h2,
  .urble-section-zchf-9 .urble-card h2 {
    text-align: center;
  }

  .urble-section-zchf-7 {
    .urble-zchf-head {
      width: 100%;
    }

    .urble-card {
      width: 100%;
    }
  }

  .urble-section-zchf-9 {
    padding: 64px 0;
  }
}

/* MOBILE */
@media (max-width: 900px) {
  .urble-section-zchf-4 .urble-zchf-compare {
    thead {
      display: none;
    }

    tr {
      display: flex;
      flex-direction: column;
    }

    tbody tr + tr {
      border-top: 1px solid var(--_Prim-Color-light-100);
    }

    td {
      display: block;
      width: 100%;
      padding: 16px 24px;
      border-top: none;
    }

    td::before {
      content: attr(data-label);
      display: block;
      margin-bottom: 8px;
      font-family: Quicksand;
      font-weight: 700;
      color: var(--_Prim-Color-dark-100-Brand);
    }
  }
}

