/*
 * The Dr. Robert Chapman Charitable Service Fund sub-page.
 * The existing CMS provides the shared header, footer and accessibility tools.
 */
.chapman-fund-page,
.chapman-fund-page * {
  box-sizing: border-box;
}

.chapman-fund-page {
  --chapman-navy: #17144c;
  --chapman-teal: #0f7069;
  --chapman-teal-dark: #0b5954;
  --chapman-red: #d71920;
  --chapman-ink: #363432;
  --chapman-cream: #f7f3eb;
  margin: 0;
  overflow: hidden;
  background: #ffffff;
  color: var(--chapman-ink);
  font-family: Lato, Arial, "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

.chapman-fund-page--zh-hans {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Source Han Sans SC", Arial, sans-serif;
}

.chapman-fund-page h1,
.chapman-fund-page h2,
.chapman-fund-page h3,
.chapman-fund-page p,
.chapman-fund-page span,
.chapman-fund-page figcaption {
  color: inherit;
}

.chapman-fund-page a {
  color: inherit;
  text-decoration: none;
}

.chapman-fund-page img {
  display: block;
  max-width: 100%;
}

/* Keep the shared desktop header and its dropdowns above this page. The CMS
   header is absolutely positioned, while #content starts a separate painted
   layer; without an explicit parent stacking order the page can cover the
   lower part of an otherwise high-z-index submenu. */
@media (min-width: 1200px) {
  body > header {
    z-index: 10000 !important;
    overflow: visible !important;
  }

  body > header .header-wrapper,
  body > header .header-container,
  body > header nav.menu,
  body > header nav.menu > ul,
  body > header nav.menu > ul > li {
    overflow: visible !important;
  }

  body > header nav.menu > ul > li:hover,
  body > header nav.menu > ul > li.show,
  body > header nav.menu > ul > li:focus-within {
    z-index: 10001 !important;
  }

  body > header nav.menu .submenu,
  body > header nav.menu .submenu2 {
    z-index: 10002 !important;
    pointer-events: auto;
  }

  #content {
    position: relative;
    z-index: 1;
  }
}

.chapman-container {
  width: min(1240px, calc(100% - 64px));
  margin-inline: auto;
}

.chapman-breadcrumb-shell {
  background: #ffffff;
  border-bottom: 1px solid #e7e4df;
}

.chapman-breadcrumb {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #595754;
  font-size: 14px;
  line-height: 1.45;
}

.chapman-breadcrumb a {
  color: var(--chapman-teal-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.chapman-breadcrumb [aria-current="page"] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapman-hero {
  position: relative;
  isolation: isolate;
  padding: clamp(58px, 6.8vw, 102px) 0;
  background:
    radial-gradient(circle at 10% 8%, rgba(15,112,105,.1), transparent 31%),
    linear-gradient(125deg, #ffffff 0%, #fbfaf7 54%, #f2ede3 100%);
}

.chapman-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -80px;
  bottom: -180px;
  width: 430px;
  height: 430px;
  border: 76px solid rgba(15,112,105,.055);
  border-radius: 50%;
}

.chapman-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(420px, .94fr);
  align-items: center;
  gap: clamp(48px, 7vw, 94px);
}

.chapman-eyebrow {
  margin: 0 0 15px;
  color: var(--chapman-teal-dark);
  font-size: clamp(15px, 1.3vw, 19px);
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.chapman-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--chapman-navy);
  font-family: inherit;
  font-size: clamp(48px, 5.1vw, 72px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.chapman-fund-page--en .chapman-hero h1 {
  font-size: clamp(43px, 4.2vw, 62px);
  line-height: 1.07;
}

/* Keep the shorter TC/SC service title on one line on desktop. */
@media (min-width: 980px) {
  .chapman-fund-page--zh-hant .chapman-hero h1,
  .chapman-fund-page--zh-hans .chapman-hero h1 {
    max-width: none;
    font-size: clamp(52px, 3.45vw, 64px);
    letter-spacing: -.055em;
    white-space: nowrap;
  }
}

.chapman-hero__lead {
  max-width: 710px;
  margin: 28px 0 0;
  color: #45413e;
  font-size: clamp(18px, 1.55vw, 22px);
  line-height: 1.85;
}

.chapman-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 34px;
}

.chapman-button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: 4px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.chapman-button svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  transition: transform .2s ease;
}

.chapman-button:hover {
  transform: translateY(-2px);
}

.chapman-button:hover svg {
  transform: translateX(3px);
}

.chapman-button--secondary:hover svg {
  transform: translateX(-3px);
}

.chapman-button--primary {
  background: var(--chapman-red);
  color: #ffffff !important;
  box-shadow: 0 9px 24px rgba(215,25,32,.18);
}

.chapman-button--primary span,
.chapman-button--primary svg,
.chapman-button--light span,
.chapman-button--light svg {
  color: #ffffff !important;
}

.chapman-button--primary:hover {
  background: #b81017;
}

.chapman-button--secondary {
  border-color: var(--chapman-teal-dark);
  background: #ffffff;
  color: var(--chapman-teal-dark) !important;
}

.chapman-button--secondary span,
.chapman-button--secondary svg {
  color: var(--chapman-teal-dark) !important;
}

.chapman-button--secondary:hover {
  background: #edf6f4;
}

.chapman-portrait {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #eee7da;
  box-shadow: 0 24px 60px rgba(23,20,76,.16);
  align-self: center;
}

.chapman-portrait::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  border: 1px solid rgba(23,20,76,.12);
  pointer-events: none;
}

.chapman-portrait img {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center !important;
}

.chapman-portrait figcaption {
  padding: 13px 18px;
  background: var(--chapman-navy);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .03em;
}

.chapman-section {
  padding: clamp(76px, 8vw, 118px) 0;
}

.chapman-section-heading {
  position: relative;
  padding-top: 17px;
}

.chapman-section-heading > span {
  position: absolute;
  top: 0;
  left: 0;
  width: 64px;
  height: 4px;
  background: var(--chapman-teal);
}

.chapman-section-heading h2 {
  margin: 0;
  color: var(--chapman-navy);
  font-family: inherit;
  font-size: clamp(38px, 4vw, 54px);
  font-weight: 650;
  line-height: 1.2;
}

.chapman-section-heading--center {
  text-align: center;
}

.chapman-section-heading--center > span {
  left: 50%;
  transform: translateX(-50%);
}

.chapman-about {
  background: #ffffff;
}

.chapman-about__grid {
  display: grid;
  grid-template-columns: minmax(300px, .72fr) minmax(0, 1.28fr);
  align-items: start;
  gap: clamp(48px, 7vw, 96px);
}

.chapman-about__copy {
  margin: 0;
  color: #45413e;
  font-size: clamp(19px, 1.6vw, 23px);
  line-height: 2;
}

.chapman-disclaimer {
  padding-top: 0;
  background: #ffffff;
}

.chapman-disclaimer__panel {
  padding: clamp(28px, 3.5vw, 44px);
  background: var(--chapman-cream);
  border-left: 4px solid var(--chapman-teal);
}

.chapman-disclaimer h2 {
  margin: 0;
  color: var(--chapman-navy);
  font-family: inherit;
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 650;
  line-height: 1.3;
}

.chapman-disclaimer p {
  max-width: 1120px;
  margin: 18px 0 0;
  color: #363432;
  font-size: 16px;
  line-height: 1.85;
}

.chapman-impact {
  background: var(--chapman-cream);
}

.chapman-impact__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 46px;
}

.chapman-impact-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border-top: 4px solid var(--chapman-teal);
  box-shadow: 0 12px 34px rgba(23,20,76,.07);
}

.chapman-impact-card__media {
  width: 100%;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #e7eeec;
}

.chapman-impact-card__media img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

.chapman-impact-card__body {
  flex: 1 1 auto;
  padding: clamp(26px, 2.6vw, 38px);
}

.chapman-impact-card h3 {
  margin: 0 0 13px;
  color: var(--chapman-navy);
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.35;
}

.chapman-impact-card p {
  margin: 0;
  color: #4e4a47;
  font-size: 17px;
  line-height: 1.85;
}

.chapman-legacy {
  background: #ffffff;
}

.chapman-legacy__panel {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: clamp(22px, 3vw, 40px);
  padding: clamp(34px, 5vw, 70px);
  overflow: hidden;
  background: linear-gradient(120deg, #17144c 0%, #234e68 58%, #0f7069 100%);
  color: #ffffff;
}

.chapman-legacy__panel::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -180px;
  width: 390px;
  height: 390px;
  border: 60px solid rgba(255,255,255,.07);
  border-radius: 50%;
}

.chapman-legacy__mark {
  color: #ffffff;
  font-family: Georgia, serif;
  font-size: clamp(62px, 7vw, 96px);
  line-height: .75;
  opacity: .72;
}

.chapman-legacy h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  color: #ffffff;
  font-family: inherit;
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.24;
}

.chapman-legacy p {
  position: relative;
  z-index: 1;
  max-width: 970px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(19px, 1.7vw, 24px);
  line-height: 1.9;
}

.chapman-cta {
  background: linear-gradient(110deg, #eef6f4, #f7f3eb);
}

.chapman-cta__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 48px;
}

.chapman-cta h2 {
  margin: 0;
  color: var(--chapman-navy);
  font-family: inherit;
  font-size: clamp(34px, 3.6vw, 50px);
  line-height: 1.25;
}

.chapman-cta p {
  max-width: 850px;
  margin: 18px 0 0;
  color: #494542;
  font-size: 18px;
  line-height: 1.8;
}

.chapman-button--light {
  min-width: 190px;
  background: var(--chapman-navy);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(23,20,76,.16);
}

.chapman-button--light:hover {
  background: #0d0b3c;
}

.chapman-fund-page a:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--chapman-teal-dark);
}

/* Match the absolute-positioned CMS desktop/tablet header clearance. */
#content .chapman-fund-page {
  padding-top: 145px;
}

#content.tablet .chapman-fund-page {
  padding-top: 141px;
}

#content.mobile .chapman-fund-page {
  padding-top: 0;
}

@media (max-width: 1060px) {
  .chapman-container {
    width: min(100% - 44px, 980px);
  }

  .chapman-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, .84fr);
    gap: 44px;
  }

  .chapman-impact-card__body {
    padding: 30px 26px;
  }
}

@media (max-width: 860px) {
  .chapman-container {
    width: min(100% - 36px, 760px);
  }

  .chapman-hero__grid,
  .chapman-about__grid,
  .chapman-cta__inner {
    grid-template-columns: 1fr;
  }

  .chapman-hero__grid {
    gap: 46px;
  }

  .chapman-hero__copy {
    order: 2;
  }

  .chapman-portrait {
    order: 1;
    width: min(100%, 660px);
  }

  .chapman-impact__grid {
    grid-template-columns: 1fr;
  }

  .chapman-cta__inner {
    gap: 30px;
  }

  .chapman-cta .chapman-button {
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .chapman-container {
    width: min(100% - 28px, 520px);
  }

  .chapman-breadcrumb {
    min-height: 54px;
    font-size: 13px;
  }

  .chapman-hero {
    padding: 34px 0 62px;
  }

  .chapman-hero h1,
  .chapman-fund-page--en .chapman-hero h1 {
    font-size: clamp(38px, 11vw, 52px);
    line-height: 1.1;
  }

  .chapman-hero__lead {
    margin-top: 22px;
    font-size: 17px;
    line-height: 1.75;
  }

  .chapman-actions {
    display: grid;
    margin-top: 28px;
  }

  .chapman-button {
    width: 100%;
  }

  .chapman-section {
    padding: 64px 0;
  }

  .chapman-section-heading h2 {
    font-size: 36px;
  }

  .chapman-about__copy {
    font-size: 17px;
    line-height: 1.88;
  }

  .chapman-disclaimer__panel {
    padding: 24px 22px;
  }

  .chapman-disclaimer h2 {
    font-size: 26px;
  }

  .chapman-disclaimer p {
    font-size: 15px;
    line-height: 1.8;
  }

  .chapman-impact__grid {
    margin-top: 34px;
  }

  .chapman-legacy__panel {
    grid-template-columns: 1fr;
  }

  .chapman-legacy__mark {
    height: 36px;
  }

  .chapman-legacy p {
    font-size: 18px;
    line-height: 1.75;
  }

  .chapman-cta .chapman-button {
    justify-self: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chapman-fund-page *,
  .chapman-fund-page *::before,
  .chapman-fund-page *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
