.page-home {
  /* Still fixed: --home-deep is the ink color for fixed-white floating
     controls only now (hero-toy-badge-copy, mobile carousel arrow/dots) —
     those sit on their own permanent white pill/frame regardless of theme,
     same as the carousel arrows on the service pages. --home-purple also
     colors the impact-icon squares, which sit on the always-dark impact
     section, so it stays a solid brand accent in both themes too, same as
     contact's icon squares. --home-paper now follows --theme-bg (see below)
     so the offer/quote sections go dark instead of staying stranded light. */
  --home-deep: #1c1040;
  --home-purple: #3d1b7a;
  --home-coral: #e42300;
  --home-pink: #e5194f;
  --home-yellow: #ffd166;
  --home-paper: var(--theme-bg);
  --home-accent-purple: #6b3fa0;
  --home-muted: var(--theme-hero-muted);
  --home-content-size: clamp(15px, 0.32vw + 13px, 18px);
  --home-content-line-height: 1.7;
  --hero-dot-opacity: 0.045;
  --hero-pad-top: clamp(76px, 8vw, 112px);
  --hero-pad-bottom: clamp(82px, 9vw, 122px);
  --stats-bg: var(--theme-hero-2);
  --endcap-coral: var(--home-coral);
  --endcap-pink: var(--home-pink);
  --endcap-gold: var(--home-yellow);
  background: var(--theme-hero-1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .page-home {
    --home-accent-purple: #b18ce0;
  }
}

:root[data-theme="dark"] .page-home {
  --home-accent-purple: #b18ce0;
}

.page-home .container {
  width: min(1160px, calc(100% - 48px));
}

.page-home .wave {
  display: none;
}

.page-home .btn {
  min-height: 46px;
  padding: 13px 22px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--home-coral), var(--home-pink));
  box-shadow: 0 12px 26px rgba(232, 48, 96, 0.2);
  font-size: 14px;
  font-weight: 800;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.page-home .btn:hover,
.page-home .btn:focus-visible {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(232, 48, 96, 0.3);
}

/* Reference-style hero: layered indigo, dot texture and image mosaic. */
.page-home .home-hero {
  min-height: 720px;
  padding-bottom: 110px;
  isolation: isolate;
}

.page-home .home-hero::after {
  position: absolute;
  z-index: -1;
  top: -240px;
  right: -190px;
  width: 660px;
  height: 660px;
  border-radius: 50%;
  background: rgba(122, 87, 190, 0.25);
  content: "";
  filter: blur(10px);
}

.page-home .hero-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(440px, 1.1fr);
  gap: clamp(48px, 6vw, 86px);
  align-items: center;
}

.page-home .hero-copy {
  position: relative;
  padding: 58px 0 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.page-home .hero-status-badge {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.page-home .hero-status-icon {
  position: relative;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.page-home .hero-status-star {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 13px;
  height: 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon fill='%23ffd166' points='50,0 61,35 98,35 68,57 79,91 50,70 21,91 32,57 2,35 39,35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 0 5px rgba(255, 209, 102, 0.55));
  transform-origin: 50% 50%;
  animation: hero-status-star-spin 3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page-home .hero-status-comets {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(255, 209, 102, 0.75) 15deg,
    #fff6dd 22deg,
    rgba(255, 209, 102, 0.75) 30deg,
    transparent 65deg,
    transparent 180deg,
    rgba(255, 209, 102, 0.75) 195deg,
    #fff6dd 202deg,
    rgba(255, 209, 102, 0.75) 210deg,
    transparent 245deg,
    transparent 360deg
  );
  -webkit-mask-image: radial-gradient(
    circle,
    transparent 56%,
    black 64%,
    black 100%
  );
  mask-image: radial-gradient(circle, transparent 56%, black 64%, black 100%);
  filter: drop-shadow(0 0 3px rgba(255, 209, 102, 0.55));
  animation: hero-status-comet-spin 5s cubic-bezier(0.1, 0.6, 0.16, 1) both;
}

@keyframes hero-status-star-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(1080deg);
  }
}

@keyframes hero-status-comet-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(2160deg);
  }
}

.page-home .hero-title {
  max-width: 660px;
  margin: 0 0 28px;
  color: #fff;
  font-size: clamp(58px, 6.1vw, 84px);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.page-home .hero-title .accent {
  color: var(--home-yellow);
}

.page-home .hero-copy p,
.page-home .split-copy h3,
.page-home .split-copy p {
  font-size: var(--home-content-size);
  line-height: var(--home-content-line-height);
}

.page-home .hero-copy p {
  max-width: 555px;
  margin: 0 0 15px;
  color: var(--home-muted);
}

.page-home .hero-copy .link-red {
  color: rgba(255, 255, 255, 0.9);
  text-decoration-color: rgba(255, 209, 102, 0.55);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.page-home .hero-copy .btn {
  margin-top: 15px;
}

.page-home .carousel {
  position: relative;
  overflow: visible;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.page-home .carousel-stage {
  height: clamp(600px, 58vw, 720px);
  overflow: visible;
}

.page-home .carousel-track {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: 1.25fr 1fr 1fr;
  gap: 14px;
  height: 100%;
  transform: none !important;
  transition: none !important;
}

.page-home .carousel-slide {
  display: none;
  min-width: 0;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 24px 54px rgba(8, 3, 28, 0.32);
}

.page-home .carousel-slide:nth-child(1),
.page-home .carousel-slide:nth-child(2),
.page-home .carousel-slide:nth-child(3),
.page-home .carousel-slide:nth-child(4) {
  display: block;
}

.page-home .carousel-slide:nth-child(1) {
  grid-column: 1 / -1;
}

.page-home .carousel-slide:nth-child(2) {
  transform: translateY(8px);
}

.page-home .carousel-slide:nth-child(4) {
  grid-column: 1;
  transform: translateY(16px);
}

.page-home .carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 8s ease-in-out;
}

.page-home .carousel-slide:nth-child(1) img,
.page-home .carousel-slide:nth-child(2) img,
.page-home .carousel-slide:nth-child(3) img,
.page-home .carousel-slide:nth-child(4) img {
  animation: home-ken-burns 12s ease-in-out infinite alternate;
}

.page-home .carousel-slide:nth-child(2) img {
  animation-delay: -3s;
}

.page-home .carousel-slide:nth-child(3) img {
  animation-delay: -6s;
}

.page-home .carousel-slide:nth-child(4) img {
  animation-delay: -9s;
}

.page-home .carousel-arrow,
.page-home .carousel-dots {
  display: none;
}

.page-home .hero-toy-badge {
  position: absolute;
  z-index: 3;
  bottom: -75px;
  left: 250px;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 250px;
  padding: 18px 28px 18px 20px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 22px 48px rgba(8, 3, 28, 0.2);
}

.page-home .hero-toy-badge-icon {
  display: grid;
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  border-radius: 20px;
  background: #fff0cc;
  font-size: 28px;
  place-items: center;
}

.page-home .hero-toy-badge-copy {
  display: grid;
  color: #72788b;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
}

.page-home .hero-toy-badge-copy strong {
  margin-top: 4px;
  color: var(--home-deep);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

@keyframes home-ken-burns {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.09) translate(-1%, -1%);
  }
}

/* Quick stats strip base styles are shared in sections/rebrand-patterns.css. */

.page-home .home-stats {
  padding: 0;
}

.page-home .home-stats-item strong {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.page-home .home-stats-item span {
  margin-top: 6px;
  color: var(--theme-hero-muted);
  font-size: 14px;
}

/* Soft play retains its original card styling. */
.page-home .home-soft-play {
  padding: 78px 0;
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--theme-hero-1) 0%,
    var(--theme-hero-2) 60%,
    var(--theme-hero-3) 100%
  ) !important;
}

.page-home .home-soft-play-grid {
  display: grid;
  align-items: stretch;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  overflow: hidden;
  border-radius: 22px;
  background: var(--theme-hero-1);
  box-shadow: 0 22px 42px rgba(28, 16, 64, 0.28);
}

.page-home .home-soft-play-image {
  position: relative;
  min-height: 360px;
}

.page-home .home-soft-play-image::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(28, 16, 64, 0.74));
  content: "";
}

.page-home .home-soft-play-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-home .home-soft-play-image-note {
  position: absolute;
  z-index: 1;
  bottom: 20px;
  left: 20px;
  padding: 8px 11px;
  border-radius: 999px;
  color: #fff;
  background: rgba(28, 16, 64, 0.78);
  font-size: 13px;
  font-weight: 800;
}

.page-home .home-soft-play-copy {
  align-self: center;
  padding: clamp(30px, 5vw, 66px);
}

.page-home .home-soft-play-kicker {
  margin: 0 0 12px;
  color: #ffd166;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-home .home-soft-play-copy h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 3vw, 54px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.page-home .home-soft-play-copy > p:not(.home-soft-play-kicker) {
  max-width: 530px;
  margin: 18px 0 22px;
  color: rgba(255, 255, 255, 0.76);
}

.page-home .home-soft-play-options {
  display: grid;
  gap: 9px;
  margin-bottom: 26px;
}

.page-home .home-soft-play-options span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
}

.page-home .home-soft-play-options strong {
  display: inline-block;
  min-width: 42px;
  color: #ff8069;
  font-size: 20px;
}

.page-home .home-soft-play .btn {
  min-height: 0;
  padding: 10px 22px;
  border-radius: 10px;
  background: #ff5a3c;
  box-shadow: none;
  font-size: 14px;
}

.page-home .home-soft-play .btn:hover,
.page-home .home-soft-play .btn:focus-visible {
  opacity: 0.9;
  transform: none;
  box-shadow: none;
}

/* Services */
.page-home .offer-section {
  padding: 94px 0 102px;
  background: var(--home-paper) !important;
}

.page-home .offer-header {
  margin-bottom: 42px;
}
.page-home .offer-kicker {
  color: var(--home-accent-purple);
  font-size: 12px;
}

.page-home .offer-title {
  color: var(--theme-text);
  font-size: clamp(44px, 4.4vw, 62px);
  letter-spacing: -0.055em;
}

.page-home .offer-link {
  color: var(--home-accent-purple);
  font-size: 14px;
}
.page-home .offer-grid {
  gap: 18px;
}

.page-home .offer-card {
  border-radius: 22px;
  box-shadow: 0 18px 38px rgba(36, 19, 94, 0.13);
}

.page-home .offer-card-body,
.page-home .offer-card-cta {
  font-size: 13px;
  line-height: 1.55;
}

/* Group membership becomes the bold full-width split from the reference. */
.page-home .home-groups {
  padding: 0;
  background: var(--theme-hero-1) !important;
}
.page-home .home-groups > .container {
  width: 100%;
  max-width: none;
}

.page-home .home-groups .split-card {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 520px;
  border-radius: 0;
  background: var(--theme-hero-1);
  box-shadow: none;
}

.page-home .home-groups .split-card img {
  min-height: 520px;
}

.page-home .home-groups .split-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(52px, 7vw, 108px);
  background: var(--theme-hero-2);
}

.page-home .home-groups .split-copy h2 {
  margin-bottom: 18px;
  color: var(--home-yellow);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-home .home-groups .split-copy h3 {
  max-width: 540px;
  margin: 0 0 22px;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(39px, 4vw, 58px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.04;
}

.page-home .home-groups .split-copy p {
  max-width: 560px;
  color: var(--home-muted);
}

.page-home .home-groups .btn {
  align-self: flex-start;
  margin-top: 10px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  box-shadow: none;
}

/* Impact stats grid beneath the group membership section. */
.page-home .home-impact {
  padding: 96px 0;
  background: var(--theme-hero-1) !important;
}

.page-home .home-impact-header {
  margin-bottom: 64px;
  text-align: center;
}

.page-home .home-impact-kicker {
  margin: 0 0 12px;
  color: var(--home-yellow);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-home .home-impact-header h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 3vw, 40px);
  letter-spacing: -0.04em;
}

.page-home .home-impact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.page-home .home-impact-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.page-home .home-impact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--home-purple);
  color: rgba(255, 255, 255, 0.8);
}

.page-home .home-impact-icon svg {
  width: 20px;
  height: 20px;
}

.page-home .home-impact-card strong {
  color: #fff;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.page-home .home-impact-label {
  margin: -6px 0 0;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.page-home .home-impact-desc {
  margin: -8px 0 0;
  color: var(--theme-hero-muted);
  font-size: 13px;
  line-height: 1.55;
}

.page-home .quote-section {
  padding: 86px 0 92px;
  background: var(--home-paper);
}
.page-home .quote-kicker {
  color: var(--home-accent-purple);
  font-size: 12px;
}

.page-home .quote-slide blockquote {
  color: var(--theme-text);
  font-family: var(--font-display);
  font-size: clamp(22px, 2.3vw, 30px);
  font-weight: 600;
  line-height: 1.45;
}

.page-home .quote-slide cite,
.page-home .quote-arrow {
  color: var(--home-accent-purple);
}
.page-home .quote-arrow {
  width: 44px;
  height: 44px;
  border-color: var(--home-accent-purple);
}
.page-home .quote-dot.active {
  background: var(--home-accent-purple);
}

/* Visit, CTA, footer, and admin shortcut are shared in sections/endcap.css. */

@media (max-width: 1100px) {
  .page-home .hero-grid {
    grid-template-columns: 1fr;
  }
  .page-home .home-hero {
    padding-top: 76px;
  }
  .page-home .hero-copy {
    max-width: 760px;
  }
  .page-home .carousel-stage {
    height: min(84vw, 720px);
  }
  .page-home .home-groups .split-card {
    grid-template-columns: 1fr;
  }

  .page-home .home-groups .split-card img {
    min-height: 390px;
    max-height: 520px;
  }

  .page-home .home-impact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-home .visit-grid {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .page-home .visit-map {
    height: 360px;
  }
}

@media (max-width: 760px) {
  .page-home .container {
    width: min(100% - 32px, 620px);
  }
  .page-home .home-hero {
    min-height: 0;
    padding: 64px 0 74px;
  }
  .page-home .hero-copy {
    padding-top: 54px;
  }
  .page-home .hero-title {
    font-size: clamp(50px, 15vw, 68px);
  }

  /* Mobile shows a real single-image carousel under the hero copy,
     instead of the desktop's static photo mosaic. */
  .page-home .carousel {
    display: block;
    margin-top: 28px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 20px 44px rgba(8, 3, 28, 0.28);
    overflow: hidden;
  }

  .page-home .carousel-stage {
    height: min(70vw, 320px);
    overflow: hidden;
  }

  .page-home .carousel-track {
    display: block;
    position: relative;
  }

  .page-home .carousel-slide,
  .page-home .carousel-slide:nth-child(1),
  .page-home .carousel-slide:nth-child(2),
  .page-home .carousel-slide:nth-child(3),
  .page-home .carousel-slide:nth-child(4),
  .page-home .carousel-slide:nth-child(5),
  .page-home .carousel-slide:nth-child(6),
  .page-home .carousel-slide:nth-child(7) {
    display: none;
    grid-column: auto;
    transform: none;
    position: absolute;
    inset: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .page-home .carousel-slide.is-active {
    display: block !important;
  }

  .page-home .hero-toy-badge {
    display: none;
  }

  .page-home .carousel-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--home-deep);
    font-size: 20px;
    line-height: 1;
    box-shadow: 0 8px 20px rgba(8, 3, 28, 0.25);
  }

  .page-home .carousel-arrow.left {
    left: 14px;
  }

  .page-home .carousel-arrow.right {
    right: 14px;
  }

  .page-home .carousel-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 0;
  }

  .page-home .carousel-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #d9d7e2;
    transition:
      width 200ms ease,
      background-color 200ms ease;
  }

  .page-home .carousel-dots button.is-active {
    width: 22px;
    border-radius: 6px;
    background: var(--home-deep);
  }
  .page-home .home-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-home .home-stats-item {
    padding: 24px 16px;
  }
  .page-home .home-stats-item:nth-child(2n) {
    border-right: 0;
  }
  .page-home .home-stats-item:nth-child(1),
  .page-home .home-stats-item:nth-child(2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .page-home .home-soft-play {
    padding-bottom: 50px;
  }
  .page-home .home-soft-play-grid {
    grid-template-columns: 1fr;
  }
  .page-home .home-soft-play-image {
    min-height: 250px;
  }

  .page-home .offer-section {
    padding: 68px 0 74px;
  }

  .page-home .offer-grid {
    grid-template-columns: 1fr;
  }
  .page-home .offer-card {
    min-height: 430px;
  }
  .page-home .home-groups .split-card img {
    min-height: 300px;
  }
  .page-home .home-groups .split-copy {
    padding: 54px 24px 62px;
  }
  .page-home .home-impact {
    padding: 64px 0;
  }
  .page-home .home-impact-header {
    margin-bottom: 40px;
  }
  .page-home .home-impact-grid {
    grid-template-columns: 1fr;
  }
  .page-home .quote-stage {
    padding-inline: 10px;
  }
}

@media (max-width: 480px) {
  .page-home .hero-status-badge {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .carousel-slide:nth-child(1) img,
  .page-home .carousel-slide:nth-child(2) img,
  .page-home .carousel-slide:nth-child(3) img,
  .page-home .carousel-slide:nth-child(4) img {
    animation: none;
  }
  .page-home .hero-status-star,
  .page-home .hero-status-comets {
    animation: none;
  }
}
