/* Brand restyle for the WP-ported /investment-calculators/ body.
 *
 * The page body is verbatim WordPress markup rendered through
 * <Fragment set:html>, themed by investment-calculators.css (77KB of the old
 * WP theme). Figma frame 1034:1142 redesigns this page outright — different
 * sections, different copy, plus category filters. That is a rebuild, not a
 * restyle, so per the agreed scope this sheet changes ONLY look and feel:
 * the DOM and every word of copy stay exactly as ported.
 *
 * SPECIFICITY: the WP theme scopes nearly everything as
 *   .wp-investment-calculators .investment-calculator-container[.bridge-page] .x
 * which is (0,3,0)–(0,4,0). Overrides therefore carry the same prefix and win
 * on source order, since this sheet loads after the theme. !important is used
 * only where the theme itself uses it (box-shadow) or where it sets the
 * property via a shorthand we cannot otherwise outrank.
 *
 * Tokens match the calculator sub-pages, which already follow the design
 * system: navy #181c33 / #182f50, cream #f2f3ed, gold #c69e32 (hover
 * #b68f26), Ivy Journal for display type, Work Sans for body.
 */

.wp-investment-calculators {
  --r1-navy: #181c33;
  --r1-navy-deep: #182f50;
  --r1-cream: #f2f3ed;
  --r1-gold: #c69e32;
  --r1-gold-hover: #b68f26;
  --r1-serif: 'Ivy Journal', Georgia, 'Times New Roman', serif;
  --r1-sans: 'Work Sans', ui-sans-serif, system-ui, sans-serif;
}

.wp-investment-calculators .investment-calculator-container.bridge-page {
  font-family: var(--r1-sans);
  color: var(--r1-navy);
}

/* ---------- Hero band ---------------------------------------------------
   Was an 800-weight Open Sans headline, gold with a white first line. The
   design system sets page titles in Ivy Journal, all white, on the navy band
   (see every calculator sub-page). The two text nodes stay as-is; only the
   colour and face change so the line break still reads naturally. */
.wp-investment-calculators .investment-calculator-container.bridge-page .banner-headline,
.wp-investment-calculators .investment-calculator-container.bridge-page .banner-headline--white {
  font-family: var(--r1-serif) !important;
  font-weight: 400;
  font-size: clamp(30px, 4.4vw, 50px);
  line-height: 1.14;
  letter-spacing: 0;
  color: #f2f3ed !important;
  max-width: 900px;
  text-transform: none;
}

/* ---------- Section headings -------------------------------------------
   WP renders a two-tone pair: a light Open Sans line ("What is an") then a
   bold navy line ("Investment Calculator?"). The design system uses a single
   serif navy heading; both text nodes remain, styled as one. */
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-bottom__heading,
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-bottom__heading--blue {
  font-family: var(--r1-serif) !important;
  font-weight: 400;
  font-size: clamp(26px, 2.9vw, 40px);
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--r1-navy);
  text-transform: none;
}
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-bottom__heading {
  margin-bottom: 4px;
}

.wp-investment-calculators .investment-calculator-container.bridge-page .calc-bottom__sub-heading,
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-bottom__text-heading {
  font-family: var(--r1-sans) !important;
  font-weight: 400;
  color: var(--r1-navy);
}
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-bottom__text,
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-bottom__list-item {
  font-family: var(--r1-sans);
  color: var(--r1-navy);
  line-height: 1.6;
}

/* ---------- Links -------------------------------------------------------
   The theme's link colour (#036 / bright blue) appears nowhere else on the
   site. Card anchors are excluded — they wrap whole cards, and colouring
   them would tint the card headings. */
/* NB: these "links" are <span class="text-blue jump-link"> with a JS click
   handler, not anchors — selecting a.text-blue matches nothing. */
.wp-investment-calculators .investment-calculator-container.bridge-page .text-blue,
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-bottom__text a,
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-bottom__list-item a {
  color: var(--r1-gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.wp-investment-calculators .investment-calculator-container.bridge-page .text-blue:hover,
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-bottom__text a:hover {
  color: var(--r1-gold-hover);
}
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-block > a {
  color: var(--r1-navy);
  text-decoration: none;
}

/* ---------- Calculator card grid ---------------------------------------
   Was white boxes with 1px grey borders, blue headings inherited from the
   wrapping <a>, and a fixed-height description block. Becomes the design
   system's cream panel: generous radius, navy type, gold pill pinned to the
   bottom so CTAs line up across a row regardless of description length. */
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-block-cont {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  max-width: 1240px;
  margin: 0 auto;
  float: none;
}
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-block-cont::before,
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-block-cont::after {
  content: none;
}

.wp-investment-calculators .investment-calculator-container.bridge-page .calc-block {
  background: var(--r1-cream);
  border: 0;
  border-radius: 24px;
  padding: 0;
  width: auto;
  margin: 0;
  float: none;
  box-shadow: none !important;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-block:hover {
  box-shadow: 0 10px 28px rgba(24, 28, 51, 0.1) !important;
  transform: translateY(-2px);
}
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-block > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 28px 20px 26px;
}

.wp-investment-calculators .investment-calculator-container.bridge-page .calc-block-cont .calc-img-cont {
  margin-bottom: 16px;
}
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-block-cont .calc-block img {
  width: 76px;
  height: 76px;
  max-width: 76px;
  max-height: 76px;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

/* headings inherit the anchor colour in the theme — set explicitly */
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-block-cont .calc-headline-cont {
  height: auto;
  padding: 0;
}
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-block .calc-headline-cont h2 {
  font-family: var(--r1-serif) !important;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
  color: var(--r1-navy);
  margin: 0 0 6px;
  text-align: center;
  letter-spacing: 0;
}
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-block .calc-headline-cont h3 {
  font-family: var(--r1-sans) !important;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.35;
  color: var(--r1-navy-deep);
  margin: 0;
  text-align: center;
  letter-spacing: 0;
}

/* the theme locks this to height:175px / min-height:110px, which is what
   makes the CTAs sit at different heights across a row */
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-block-cont .calc-desc-cont {
  height: auto;
  min-height: 0;
  margin: 12px 0 18px;
}
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-block-cont .calc-desc-cont p {
  font-family: var(--r1-sans);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  color: rgba(24, 28, 51, 0.82);
  text-align: center;
  padding: 0;
  margin: 0;
}

/* ---------- Buttons -----------------------------------------------------
   Rounded-rect WP buttons become the site's gold pill with navy label. */
.wp-investment-calculators .investment-calculator-container.bridge-page .button-orange {
  display: inline-block;
  width: auto;
  background-color: var(--r1-gold);
  color: var(--r1-navy);
  font-family: var(--r1-sans);
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0;
  padding: 13px 26px;
  border: 0;
  border-radius: 9999px;
  box-shadow: none !important;
  text-transform: none;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.wp-investment-calculators .investment-calculator-container.bridge-page .button-orange:hover {
  background-color: var(--r1-gold-hover);
  color: var(--r1-navy);
}
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-block-cont .button-orange {
  margin: auto auto 0;
  max-width: none;
  align-self: center;
}
.wp-investment-calculators .investment-calculator-container.bridge-page .banner-inner__btn {
  display: block;
  width: fit-content;
  margin: 24px auto 0;
  padding: 15px 34px;
  font-size: 16px;
  max-width: none;
}

/* ---------- Media + rules ----------------------------------------------- */
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-bottom__img,
.wp-investment-calculators .investment-calculator-container.bridge-page .video-wrapper {
  border-radius: 16px;
  overflow: hidden;
}
.wp-investment-calculators .investment-calculator-container.bridge-page .calc-bottom__inner {
  border-color: rgba(24, 28, 51, 0.12);
}

@media (max-width: 1100px) {
  .wp-investment-calculators .investment-calculator-container.bridge-page .calc-block-cont {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .wp-investment-calculators .investment-calculator-container.bridge-page .calc-block-cont {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .wp-investment-calculators .investment-calculator-container.bridge-page .calc-block > a {
    padding: 24px 20px;
  }
}
