/* ==========================================================================
   COMPONENT / home-wp — the WordPress layer of the home page (ACF home builder)
   Loaded after pages/_home.css (inc/helpers/pages.php → 'home'). Only what the
   static HTML didn't have: background video + floral layers in the hero, the
   typewriter, the bubble physics layout, the Venn hover text, testimonial roles /
   frames, lists reset, and the admin-only empty-state notes.
   ========================================================================== */

/* --- Hero: round crop (clip-path) + floral layers (z-index) + background video --- */
.home-hero--wp .home-hero-media {
  isolation: isolate;
}

.home-hero--wp .home-hero-media-circle {
  position: relative;
  z-index: 1;
  /* The editor uploads a plain square image — the circle is CSS only. */
  clip-path: circle(50% at 50% 50%);
}

.home-hero--wp .home-hero-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-hero-flower {
  position: absolute;
  pointer-events: none;
  user-select: none;
  height: auto;
}

.home-hero-flower--back {
  z-index: 0;
  width: 46%;
  top: -10%;
  inset-inline-end: -14%;
  opacity: 0.9;
}

.home-hero-flower--front {
  z-index: 2;
  width: 34%;
  bottom: -6%;
  inset-inline-start: -10%;
}

.home-hero--wp .home-hero-media-play {
  z-index: 3;
}

.home-hero-video-toggle__play { display: none; }
.home-hero-video-toggle.is-paused .home-hero-video-toggle__play { display: block; }
.home-hero-video-toggle.is-paused .home-hero-video-toggle__pause { display: none; }

.home-hero-video-toggle:focus-visible {
  outline: 3px solid var(--color-primary-navy);
  outline-offset: 3px;
}

/* Links styled as the design's <button>s. */
a.home-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* --- Intro (PIVOT) --- */
.home-intro__title {
  margin: 0 0 16px;
  letter-spacing: 0.34em;
  padding-inline-start: 0.34em; /* optically centre the letter-spaced word */
}

.home-intro__text strong,
.home-intro__text b {
  color: #CB6DA7;
  font-weight: 500;
}

/* Typewriter: the original keeps the height and stays readable for screen
   readers (opacity 0, not hidden); the aria-hidden copy is typed on top. */
.typewriter {
  position: relative;
}

.is-typewriter-pending,
.is-typewriter-source {
  opacity: 0;
}

.typewriter-live {
  position: absolute;
  inset: 0;
  margin: 0 auto;
}

.typewriter-live::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 0.9em;
  margin-inline-start: 3px;
  vertical-align: -0.08em;
  background: currentColor;
  animation: pivot-caret 0.8s steps(1) infinite;
}

@keyframes pivot-caret {
  50% { opacity: 0; }
}

/* --- Topic bubbles ---
   Default (mobile / no JS): a centred wrap, sizes still relative (--size × scale).
   From 1024px components/home-bubbles.js adds .is-physics and positions every bubble. */
.home-bubbles .home-bubble-cloud {
  display: block;
  position: relative;
  grid-template-columns: none;
  grid-template-rows: none;
}

.home-bubbles .home-bubble-prompt {
  margin: 0 auto 24px;
}

.home-bubbles__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 18px;
}

.home-bubbles__item {
  display: contents;
}

.home-bubbles .home-bubble {
  --bubble-scale: 0.72;
  --s: 1;
  --d: max(78px, calc(var(--size, 85px) * var(--bubble-scale)));
  width: var(--d);
  height: var(--d);
  font-size: clamp(11px, calc(var(--d) * 0.12), 17px);
  padding: calc(var(--d) * 0.15); /* keeps the label inside the stitched ring */
  transform: scale(var(--s));
}

.home-bubbles .home-bubble:hover,
.home-bubbles .home-bubble:focus-visible {
  transform: scale(var(--s));
  --s: 1.06;
}

.home-bubble__label {
  position: relative; /* above the ::before stitch ring */
  overflow-wrap: normal;
  hyphens: none;
}

/* The duplicated bubbles (block option) only make sense in the scatter. */
.home-bubbles .home-bubble-cloud:not(.is-physics) [data-bubble-copy] {
  display: none;
}

@media (min-width: 1024px) {
  .home-bubbles .home-bubble-cloud.is-physics {
    height: clamp(460px, 36vw, 640px);
  }

  .is-physics .home-bubble-prompt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    z-index: 1;
    pointer-events: none;
  }

  .is-physics .home-bubbles__list {
    display: block;
  }

  .is-physics .home-bubble {
    --bubble-scale: 1;
    position: absolute;
    transform: translate(-50%, -50%) scale(var(--s));
    transition:
      left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
      top 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
      width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
      height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
      transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
      opacity 0.4s ease-out;
    z-index: 2;
  }

  .is-physics .home-bubble:hover,
  .is-physics .home-bubble:focus-visible {
    transform: translate(-50%, -50%) scale(var(--s));
    z-index: 3;
  }

  .is-physics .home-bubble.is-entering {
    --s: 0.5;
    opacity: 0;
  }

  /* Before the first layout, keep the cloud from flashing as a wrap. */
  .home-bubbles .home-bubble-cloud:not(.is-ready) .home-bubbles__list {
    visibility: hidden;
  }
}

@media (min-width: 1024px) and (scripting: none) {
  .home-bubbles .home-bubble-cloud:not(.is-ready) .home-bubbles__list { visibility: visible; }
}

@media (prefers-reduced-motion: reduce) {
  .is-physics .home-bubble { transition: none; }
  .home-bubbles .home-bubble:hover,
  .home-bubbles .home-bubble:focus-visible { --s: 1; }
}

/* --- Founder quote --- */
.home-founder-blockquote {
  margin: 0;
}

.home-founder-quote strong,
.home-founder-quote b {
  color: var(--color-pink-accent);
  font-weight: inherit;
}

.home-founder-name,
.home-founder-role {
  display: block;
}

.home-founder-signature {
  margin-top: 12px;
  font-family: var(--font-main);
  font-size: 20px;
  font-weight: 500;
  color: var(--color-primary-navy);
}

.home-founder-section--text-only .home-founder-content {
  max-width: 964px;
  margin-inline: auto;
}

/* --- Popular knowledge (badge cards, dashed frame per the spec) --- */
.home-popular__grid {
  list-style: none;
  padding: 0;
}

.home-popular .badge-card {
  border: 1.5px dashed rgba(0, 0, 128, 0.22);
}

.home-see-all-row .btn-cta--white {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* --- Impact (Venn): circles are buttons, hover / focus / tap shows the text --- */
.home-impact .home-venn-circle {
  appearance: none;
  -webkit-appearance: none;
  flex-direction: column;
  gap: 6px;
  padding: 26px;
  cursor: default;
  transition: transform 0.25s ease, opacity 0.25s ease, z-index 0s;
  font: inherit;
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 24px;
  color: var(--color-primary-navy);
}

.home-impact .home-venn-circle.has-text { cursor: pointer; }

/* Labels pushed away from the white PIVOT centre (it covers the middle of each circle). */
.home-impact .home-venn-circle > span { max-width: 62%; }
.home-impact .home-venn-circle--top-left > span  { translate: -26px -22px; }
.home-impact .home-venn-circle--top-right > span { translate: 26px -22px; }
.home-impact .home-venn-circle--bottom > span    { translate: 0 40px; }

.home-venn-circle__title {
  transition: transform 0.25s ease;
}

.home-venn-circle__text {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
  transition: max-height 0.3s ease, opacity 0.25s ease;
}

.home-impact .home-venn-circle.has-text:hover,
.home-impact .home-venn-circle.has-text:focus-visible,
.home-impact .home-venn-circle.is-open {
  z-index: 3;
  opacity: 1;
  transform: scale(1.06);
}

.home-impact .home-venn-circle:hover .home-venn-circle__text,
.home-impact .home-venn-circle:focus-visible .home-venn-circle__text,
.home-impact .home-venn-circle.is-open .home-venn-circle__text {
  max-height: 140px;
  opacity: 1;
}

.home-impact .home-venn-circle:hover .home-venn-circle__title,
.home-impact .home-venn-circle:focus-visible .home-venn-circle__title,
.home-impact .home-venn-circle.is-open .home-venn-circle__title {
  font-size: 20px;
}

.home-impact .home-venn-circle:focus-visible {
  outline: 3px solid var(--color-primary-navy);
  outline-offset: 3px;
}

/* While a circle is open, the PIVOT centre steps back so the text is readable. */
.home-venn:has(.home-venn-circle:hover, .home-venn-circle:focus-visible, .home-venn-circle.is-open) .home-venn-center {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.home-why-body .btn-cta-primary {
  text-decoration: none;
  display: inline-flex;
}

@media (prefers-reduced-motion: reduce) {
  .home-impact .home-venn-circle,
  .home-venn-circle__text { transition: none; }
}

/* --- Testimonials: colored frame, role line --- */
.home-sticky-note {
  margin: 0;
  border-width: 2px;
  border-style: solid;
}

.home-sticky-note--mint     { border-color: #A8DDB5; }
.home-sticky-note--pink     { border-color: #ECBFD8; }
.home-sticky-note--lavender { border-color: #C9C3F0; }
.home-sticky-note--peach    { border-color: #F6CFA6; }

.home-sticky-note-blockquote {
  margin: 0;
}

.home-sticky-note-person {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.home-sticky-note-role {
  font-size: 15px;
  font-weight: 400;
  opacity: 0.85;
}

/* --- Articles --- */
a.home-articles-see-all {
  text-decoration: none;
  display: inline-flex;
}

.home-articles .cat-case-item__media-inner:empty {
  background: linear-gradient(135deg, #F4D9E8 0%, #CFE7F0 60%, #DCEEE6 100%);
}
