/*
 * Capability Equity book hero on the home page.
 *
 * Deliberately breaks from the dark site theme: a white, Capability Equity
 * styled band (Plus Jakarta Sans, CE navy + green) so the book stands out.
 * Everything is scoped under .ce-promo so nothing leaks into the rest of the
 * page. The whole section is one link to /capability-equity.
 */
.ce-promo {
  --ce-navy: #011738;
  --ce-green: #2b7d0a;
  --ce-muted: #5f6268;
  --ce-font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Share of the stage the book fills at rest. Must equal
     0.5 / CAMERA_DISTANCE in ce-promo-book.js so the still and the 3D match. */
  --ce-book-fill: 0.86;

  background: #fff;
  color: var(--ce-navy);
  font-family: var(--ce-font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.ce-promo__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) 16px 0;
  color: inherit;
  text-align: center;
  text-decoration: none;
}
.ce-promo__link:hover,
.ce-promo__link:focus { color: inherit; }
.ce-promo__link:focus-visible {
  outline: 3px solid var(--ce-green);
  outline-offset: -6px;
  border-radius: 12px;
}

.ce-promo__eyebrow {
  margin: 0 0 14px;
  color: var(--ce-green);
  font-size: clamp(0.95rem, 1.4vw, 1.125rem);
  font-weight: 650;
  letter-spacing: -0.005em;
}

.ce-promo__title {
  margin: 0;
  color: var(--ce-navy);
  font-size: clamp(2.75rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
}
.ce-promo__title sup {
  font-size: 0.22em;
  font-weight: 600;
  letter-spacing: 0;
  vertical-align: top;
  position: relative;
  top: 0.4em;
  margin-left: 0.04em;
}

.ce-promo__tagline {
  margin: 0.5em 0 0;
  color: var(--ce-muted);
  font-size: clamp(1.25rem, 2.4vw, 1.875rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.ce-promo__lead {
  margin: 0.9em 0 0;
  max-width: 26em;
  color: var(--ce-navy);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.005em;
}

.ce-promo__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  margin-top: 22px;
  color: var(--ce-green);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 600;
}
.ce-promo__cta svg { transition: transform 0.25s ease; }
.ce-promo__link:hover .ce-promo__cta-text { text-decoration: underline; text-underline-offset: 0.18em; }
.ce-promo__link:hover .ce-promo__cta svg { transform: translateX(3px); }

/* ---- The book ---- */
.ce-promo__stage {
  position: relative;
  width: min(66.667%, 373px, 34.667vh);  /* 2/3 of the original min(100%, 560px, 52vh) */
  aspect-ratio: 3 / 4;
  margin-top: clamp(8px, 2vw, 24px);
  filter: drop-shadow(0 30px 36px rgb(1 23 56 / 0.16)) drop-shadow(0 6px 10px rgb(1 23 56 / 0.08));
}

.ce-promo__poster,
.ce-promo__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* The still is rendered edge to edge; shrink it to the size the 3D book
   settles at so the two line up. */
.ce-promo__poster {
  inset: calc((1 - var(--ce-book-fill)) * 50%);
  width: auto;
  height: auto;
  max-width: none;
}
.ce-promo__canvas {
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* html.ce-promo-3d is set in <head> when the 3D book will be tried, so the
   still never flashes before the animation. ce-promo.js removes it if the
   3D book fails or is slow, and the still fades in instead. */
.ce-promo-3d .ce-promo__poster { opacity: 0; }
.ce-promo__poster { transition: opacity 0.6s ease; }
.ce-promo__stage.is-3d .ce-promo__canvas { opacity: 1; }
.ce-promo__stage.is-3d .ce-promo__poster { opacity: 0; }

/* ---- Wide screens: words left, the book large on the right ---- */
@media (min-width: 900px) {
  .ce-promo__link {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-areas:
      "eyebrow stage"
      "title   stage"
      "tagline stage"
      "lead    stage"
      "cta     stage";
    grid-template-rows: 1fr auto auto auto 1fr;
    align-items: start;
    justify-items: start;
    column-gap: clamp(24px, 4vw, 64px);
    max-width: 1160px;
    /* Halfway between the old band height, min(860px, 100svh - 140px), and the
       book's height (see .ce-promo__stage below), so the white above and below
       the book is half what it was. */
    min-height: calc((min(860px, 100svh - 140px) + max(320px, min(520px, (100svh - 180px) * 2 / 3))) / 2);
    padding: clamp(32px, 4vh, 56px) clamp(24px, 4vw, 48px);
    text-align: left;
  }
  .ce-promo__eyebrow { grid-area: eyebrow; align-self: end; }
  .ce-promo__title   { grid-area: title; }
  .ce-promo__tagline { grid-area: tagline; max-width: 16em; }
  .ce-promo__lead    { grid-area: lead; max-width: 22em; }
  .ce-promo__cta     { grid-area: cta; }
  .ce-promo__title   { font-size: clamp(3rem, 6.2vw, 5.75rem); }
  .ce-promo__stage {
    grid-area: stage;
    align-self: center;
    justify-self: center;
    width: auto;
    height: min(520px, calc((100svh - 180px) * 2 / 3));  /* 2/3 of the original */
    min-height: 320px;
    margin: 0;
  }
}

/* ---- Entrance ---- */
@keyframes ce-promo-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.ce-promo__eyebrow,
.ce-promo__title,
.ce-promo__tagline,
.ce-promo__lead,
.ce-promo__cta { animation: ce-promo-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.ce-promo__title   { animation-delay: 0.08s; }
.ce-promo__tagline { animation-delay: 0.18s; }
.ce-promo__lead    { animation-delay: 0.23s; }
.ce-promo__cta     { animation-delay: 0.28s; }

@media (prefers-reduced-motion: reduce) {
  .ce-promo__eyebrow,
  .ce-promo__title,
  .ce-promo__tagline,
  .ce-promo__lead,
  .ce-promo__cta { animation: none; }
  .ce-promo__cta svg { transition: none; }
}
