/* ==========================================================================
   Home page
   Built on the shared type and spacing system in main.css: headings, text
   sizes, buttons and section padding come from there. This file only lays
   out the home page's own blocks. Every section uses .section (--section-y);
   .section--join drops the top padding where a white section follows
   another white section, so the gap between them is one --section-y.
   ========================================================================== */

:where(.page-home main) p:where(:not(.lead, .accent)) { max-width: var(--measure); }

/* ---------- Hero ----------
   Same layout as the Doula Support hero (eyebrow, title + round CTA, proof
   line, three short columns). No boxes: one soft white halo along the bottom
   (.hero-card--scrim-light) keeps the purple text readable over the video. */
.page-home .hero-card { min-height: min(900px, 96vh); }
.page-home .hero-card--scrim-light::after {
  background: linear-gradient(0deg, rgba(255,253,245,.9) 0%, rgba(255,253,245,.72) 28%, rgba(255,253,245,.35) 52%, rgba(255,253,245,0) 72%);
}
.home-hero__top {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-6);
}
.home-hero__eyebrow { margin-bottom: var(--gap-eyebrow); color: var(--plum); }
.home-hero__title { max-width: 17ch; }
.home-hero__cta { flex: none; }
.home-hero__proof { margin-top: var(--space-5); display: inline-flex; }
.home-hero__cols {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1.8fr); gap: var(--space-5);
  align-items: end; margin-top: var(--space-6);
  font-size: var(--fs-body); line-height: 1.5; color: var(--purple);
}
.home-hero__cols p { max-width: 40ch; }
.home-hero__based { font-weight: 500; }
.home-hero__right { justify-self: end; text-align: right; }

/* ---------- Featured on ---------- */
.featured__logos {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
}
.featured__logos li { flex: 0 1 146px; }
.featured__logos a { display: block; border-radius: var(--radius-sm); transition: transform .25s ease; }
.featured__logos a:hover { transform: translateY(-3px); }
.featured__logos img { width: 100%; aspect-ratio: 1; object-fit: contain; }

/* ---------- Intro ---------- */
.intro__lead { max-width: var(--measure-lead); margin-inline: auto; }
.intro__bio {
  display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); align-items: center;
  gap: var(--space-5) clamp(32px, 5vw, 72px);
  margin: var(--gap-head-content) auto 0; max-width: 1000px;
}
.intro__photo .photo-frame__img img { object-position: 50% 30%; }
.intro__hello { font-size: var(--fs-h3); margin-bottom: var(--gap-heading); }
.intro__text .actions { margin-top: var(--gap-actions); }

/* ---------- If birth has scared you (blob background) ---------- */
.scared { position: relative; isolation: isolate; overflow-x: clip; }
.scared__bg {
  position: absolute; z-index: -1; left: 50%; top: -120px; transform: translateX(-50%);
  width: min(1400px, 110vw); aspect-ratio: 1792 / 1557;
  background: url("/assets/img/siluete-circle-gradient.svg") center / contain no-repeat;
  pointer-events: none;
}
.scared__grid {
  display: grid; grid-template-columns: 1fr minmax(0, 1.4fr) 1fr; align-items: center; gap: var(--space-6);
}
.scared__img { border-radius: var(--radius-md); object-fit: cover; width: 100%; max-width: 280px; }
.scared__img--left { aspect-ratio: 2 / 3; justify-self: start; object-position: 50% 30%; }
.scared__img--right { aspect-ratio: 2 / 3; justify-self: end; object-position: 42% 50%; }
.scared__text { text-align: center; max-width: 34ch; margin-inline: auto; }
.scared__lead { margin: var(--gap-head-content) auto 0; text-align: center; }

/* ---------- Is this you? (lemon frame band) ---------- */
.isyou { background: linear-gradient(135deg, #fffdb5 23%, #fff 100%); padding: clamp(16px, 2vw, 28px); }
.isyou__inner { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2vw, 28px); }
.isyou__card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: var(--section-y) clamp(20px, 4vw, 56px);
}
.isyou__list { display: grid; gap: var(--space-4); margin-top: var(--gap-head-content); }
.isyou__list li {
  display: flex; align-items: center; gap: var(--space-5);
  min-height: 100px; padding: var(--space-4) var(--space-5);
  border-radius: 999px 0 0 999px;
  background: linear-gradient(90deg, #eeaeb3 0%, #f6d3b4 50%, #fffdb5 80%, rgba(255,255,255,0) 100%);
}
.isyou__list p { max-width: 40ch; }
.isyou__icon { width: 56px; height: 56px; flex: none; color: var(--purple); }
.isyou__media { border-radius: var(--radius-lg); overflow: hidden; min-height: 560px; }
.isyou__media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }
.isyou__badge {
  position: absolute; left: 43%; top: 2.5%; width: clamp(140px, 19vw, 280px); aspect-ratio: 1;
  background: var(--purple);
  -webkit-mask: url("/assets/svg/curved-text-butterfly.svg") center / contain no-repeat;
          mask: url("/assets/svg/curved-text-butterfly.svg") center / contain no-repeat;
  animation: cbm-spin 40s linear infinite;
  pointer-events: none;
}
@keyframes cbm-spin { to { transform: rotate(360deg); } }

/* ---------- Services tag cloud ---------- */
.cloud__title { max-width: 26ch; }
.cloud__rows { display: grid; gap: var(--space-4); }
.cloud__row { display: flex; justify-content: center; align-items: center; gap: var(--space-4); }
.cloud__pill {
  display: inline-flex; align-items: center;
  min-height: 96px; padding: var(--space-4) var(--space-6);
  border: 1.5px solid #6d86d6; border-radius: var(--radius-md); background: var(--white);
  font-family: var(--font-display); font-weight: var(--fw-display); font-variation-settings: var(--display-axes); letter-spacing: var(--ls-display);
  font-size: var(--fs-h3); line-height: 1.2;
  color: var(--plum); white-space: nowrap; text-decoration: none;
  transition: background-color .2s, transform .2s, border-color .2s;
}
a.cloud__pill:hover { background: var(--butter); border-color: var(--purple); transform: translateY(-2px); }
a.cloud__pill:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.cloud__pill--tall { min-height: 140px; white-space: normal; max-width: 340px; }
.cloud__pill--wide { max-width: 400px; width: 400px; }
.cloud__img { width: 250px; height: 104px; object-fit: cover; border-radius: var(--radius-sm); flex: 0 1 auto; min-width: 140px; }
.cloud__img--wide { width: 320px; }
.cloud__row:nth-child(3) .cloud__img { width: 230px; }

/* ---------- Services and rates (floral panel) ---------- */
.invest__panel {
  background:
    url("/assets/img/floral-bg.webp") center / cover no-repeat,
    linear-gradient(120deg, #e8e4ff 0%, #ffd9ea 45%, #ffe7cf 65%, #dfe9ff 100%);
}
.invest__cards {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-cards);
  max-width: var(--container); margin-inline: auto; align-items: stretch;
}
.invest__card {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-4);
  background: rgba(242, 247, 189, .94); border-radius: var(--radius-md);
  padding: var(--card-pad); text-align: center;
}
.invest__card .card__title { margin-top: var(--space-2); }
.invest__card p a { text-underline-offset: 3px; }
/* rates block pinned to the bottom so the buttons line up across the cards */
.invest__card .ask-rates {
  margin-top: auto; padding-top: var(--space-5); width: 100%;
  border-top: 1.5px solid #d9df9c; justify-items: center; text-align: center;
}
.invest__card .ask-rates__actions { flex-direction: column; align-items: stretch; width: 100%; max-width: 300px; }
.invest__card .ask-rates__actions .btn { width: 100%; }
.invest__link { margin-top: calc(-1 * var(--space-2)); }

/* ---------- Testimonials ---------- */
.doodle {
  display: block; margin-inline: auto; background: var(--purple);
  -webkit-mask: var(--doodle) center / contain no-repeat;
          mask: var(--doodle) center / contain no-repeat;
}
.doodle--peace { --doodle: url("/assets/svg/doodle-peace-hand.svg"); width: 64px; height: 94px; }
.doodle--smiley { --doodle: url("/assets/svg/doodle-smiley-flower.svg"); width: 92px; height: 94px; }
.doodle--bird { --doodle: url("/assets/svg/doodle-bird.svg"); width: 98px; height: 94px; }
.doodle--flower { --doodle: url("/assets/svg/doodle-flower-outline.svg"); }

/* ---------- FAQ ---------- */
.faq__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-6) clamp(32px, 5vw, 80px); align-items: start; }
.faq__title { max-width: 10ch; }
.doodle--flower { width: clamp(160px, 22vw, 320px); aspect-ratio: 394 / 395; margin: var(--space-7) 0 0 clamp(0px, 4vw, 64px); }
.faq__list { display: grid; gap: var(--space-6); }
.faq__item { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: var(--space-5); row-gap: var(--space-2); }
.faq__q {
  grid-row: span 2; width: 56px; height: 56px; display: grid; place-items: center;
  background: var(--butter); border-radius: var(--radius-sm);
  font-family: var(--font-display); font-weight: var(--fw-display); font-variation-settings: var(--display-axes); letter-spacing: var(--ls-display); font-style: italic; font-size: var(--fs-h4); color: var(--plum);
}
.faq__item h3 {
  font-family: var(--font-text); font-weight: 600; font-size: clamp(18px, 0.19vw + 17.3px, 20px);
  line-height: 1.35; letter-spacing: 0; color: var(--purple); padding-top: var(--space-3);
}
.faq__cta { padding: var(--space-5); border-radius: var(--radius-md); background: var(--butter); }
.faq__cta a { font-weight: 500; text-underline-offset: 3px; display: inline-block; padding-block: 10px; margin-block: -10px; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .home-hero__cols { grid-template-columns: 1fr 1fr; align-items: start; }
  .home-hero__right { grid-column: 1 / -1; justify-self: start; text-align: left; max-width: 52ch; }
  /* All six services as a compact wrapped cloud; the texture images only show above 1100px. */
  .cloud__rows { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-3) var(--space-2); }
  .cloud__row { display: contents; }
  .cloud__pill, .cloud__pill--tall, .cloud__pill--wide {
    min-height: 52px; padding: var(--space-3) var(--space-4); font-size: var(--fs-h4); width: auto; max-width: 100%;
    white-space: nowrap; text-align: center; justify-content: center; border-radius: var(--radius-sm);
  }
  .cloud__img, .cloud__img--wide, .cloud__row:nth-child(3) .cloud__img { display: none; }
  .featured__logos { display: grid; grid-template-columns: repeat(7, 1fr); }
}
@media (max-width: 900px) {
  /* proof points stack (one per line) instead of wrapping with a stray dot */
  .home-hero__proof { flex-direction: column; align-items: flex-start; gap: 4px; }
  .home-hero__proof > li + li::before { display: none; }
  .invest__cards { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
  .isyou__inner { grid-template-columns: 1fr; container-type: inline-size; }
  .isyou__media { order: -1; min-height: 0; aspect-ratio: 16 / 10; }
  /* in the card's top corner, beside the title (the photo above is 10/16 of the width) */
  .isyou__badge { left: auto; right: 16px; top: calc(62.5cqw + 16px + 12px); width: 128px; }
  .isyou__card { padding-block: var(--space-8); }
  .faq__grid { grid-template-columns: 1fr; }
  .faq__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
  .doodle--flower { width: 120px; margin: 0; flex: none; }
  .faq__title { max-width: none; }
  .intro__bio { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); }
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  /* Hero: same as Doula Support on phones; the halo reaches higher so all text sits on it */
  .page-home .hero-card { min-height: min(760px, calc(92svh - var(--sticky-h))); }
  .page-home .hero-card--scrim-light::after {
    background: linear-gradient(0deg, rgba(255,253,245,.92) 0%, rgba(255,253,245,.8) 45%, rgba(255,253,245,.4) 70%, rgba(255,253,245,0) 90%);
  }
  .home-hero { padding-top: var(--space-7); }
  .home-hero__top { flex-direction: column; align-items: stretch; gap: 0; }
  .home-hero__cta { align-self: flex-end; width: 120px; font-size: 17px; padding: var(--space-2); margin-top: var(--space-4); }
  .home-hero__proof { display: flex; }
  .home-hero__cols { grid-template-columns: 1fr; gap: var(--space-3); margin-top: var(--space-4); }
  .home-hero__mid { display: none; }

  .featured__logos { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-4) var(--space-3); }
  .featured__logos li { flex: 0 0 calc(25% - 9px); }

  .intro__bio { grid-template-columns: 1fr; }
  .intro__photo { width: min(100%, 300px); margin-inline: auto; }

  .scared__bg { top: 120px; width: 180vw; }
  .scared__grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .scared__img { max-width: none; }
  .scared__img--left { aspect-ratio: 4 / 3; }
  .scared__img--right { order: 3; aspect-ratio: 4 / 3; }

  .isyou__card { padding: var(--space-7) var(--space-5); }
  .isyou__list li { min-height: 0; padding: var(--space-4) var(--space-5); margin-right: calc(-1 * var(--space-5)); }
  .isyou__icon { display: none; }
  .isyou__btn { width: 100%; padding-block: var(--space-3); }
  .isyou__badge { width: 96px; right: 8px; top: calc(62.5cqw + 16px + 8px); }


  .invest__card .doodle { transform: scale(.75); margin-block: -12px; }
  .doodle--flower { width: 96px; }
  .faq__item { grid-template-columns: 44px minmax(0, 1fr); column-gap: var(--space-4); }
  .faq__q { width: 44px; height: 44px; }
  .faq__item h3 { padding-top: var(--space-2); }
}

@media (prefers-reduced-motion: reduce) {
  .isyou__badge { animation: none; }
}
