/* Home final content + spacing pass
   Melody is intentionally untouched in this file. */

#how,
#stories,
#included,
#packages,
#story,
#method,
#faq {
  scroll-margin-top: 82px;
}

/* More continuous vertical rhythm across the long-form Home. */
.section {
  padding-block: clamp(30px, 3.2vw, 42px);
}

.section-heading {
  margin-bottom: clamp(20px, 2.6vw, 30px);
}

.section.how-it-works {
  padding-block: clamp(26px, 2.6vw, 34px);
}

.section.name-demo.parent-story-section {
  padding-block: clamp(32px, 3.5vw, 46px);
}

.section.product-arrival {
  padding-block: clamp(32px, 3.6vw, 46px);
}

.product-arrival .arrival-heading {
  margin-bottom: clamp(24px, 3vw, 34px);
}

.section.packages {
  padding-block: clamp(28px, 3vw, 38px);
}

.section.method {
  padding-block: clamp(30px, 3.2vw, 42px);
}

.section.faq {
  padding-block: clamp(30px, 3.2vw, 42px);
}

.final-cta {
  padding-block: clamp(32px, 3.6vw, 44px);
}

/* Founder Story: preserve the emotional origin, remove the long-scroll feel. */
.section.founder {
  padding-block: clamp(30px, 3.4vw, 44px);
}

.founder-grid {
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(30px, 4vw, 48px);
}

.founder-photo {
  width: min(100%, 380px);
}

.founder-photo figcaption {
  margin-top: 12px;
  font-size: 15px;
}

.founder .section-copy {
  max-width: 690px;
}

.founder .section-copy h2 {
  max-width: 15ch;
  margin-top: 12px;
  font-size: clamp(36px, 4vw, 50px);
  line-height: 1.02;
}

.founder .section-copy > p {
  max-width: 58ch;
  margin-top: 14px;
  line-height: 1.58;
}

.founder .founder-signoff {
  margin-top: 18px;
  font-size: 19px;
}

/* Prevent individual sections from rebuilding oversized gaps internally. */
.packages .packages-heading {
  margin-bottom: 22px;
}

.packages-notes {
  margin-top: 12px;
}

.faq-grid {
  gap: clamp(30px, 4vw, 48px);
}

.faq-list {
  gap: 8px;
}

.faq-list summary {
  min-height: 62px;
}

.final-panel {
  padding: clamp(38px, 5.4vw, 64px);
}

@media (max-width: 820px) {
  .section {
    padding-block: 30px;
  }

  .section.name-demo.parent-story-section,
  .section.product-arrival,
  .section.method,
  .section.faq {
    padding-block: 32px;
  }

  .section.founder {
    padding-block: 32px;
  }

  .founder-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .founder-photo {
    width: min(100%, 350px);
  }

  .founder .section-copy {
    max-width: none;
  }

  .founder .section-copy h2 {
    max-width: 18ch;
    font-size: clamp(34px, 7vw, 42px);
  }

  .founder .section-copy > p {
    max-width: 65ch;
  }

  .faq-grid {
    gap: 26px;
  }

  .final-cta {
    padding-block: 32px;
  }
}

@media (max-width: 620px) {
  .section,
  .section.how-it-works,
  .section.name-demo.parent-story-section,
  .section.product-arrival,
  .section.packages,
  .section.founder,
  .section.method,
  .section.faq {
    padding-block: 26px;
  }

  .section-heading {
    margin-bottom: 20px;
  }

  .founder-grid {
    gap: 22px;
  }

  .founder-photo {
    width: min(100%, 300px);
  }

  .founder-photo figcaption {
    margin-top: 9px;
    font-size: 14px;
  }

  .founder .section-copy h2 {
    margin-top: 10px;
    font-size: clamp(31px, 9.4vw, 38px);
  }

  .founder .section-copy > p {
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.55;
  }

  .founder .founder-signoff {
    margin-top: 15px;
    font-size: 18px;
  }

  .product-arrival .arrival-heading {
    margin-bottom: 22px;
  }

  .packages .packages-heading {
    margin-bottom: 16px;
  }

  .faq-list {
    gap: 7px;
  }

  .faq-list summary {
    min-height: 58px;
  }

  .final-cta {
    padding-block: 28px;
  }

  .final-panel {
    padding: 34px 20px;
  }
}


/* The approved Melody composition is specific to this slideshow image. */
.parent-story-first-slide {
  background-image: url("assets/images/parent-story-routines/01-girl-park-melody-approved.jpg");
}

/* Each scene has its own Melody composition instead of a generic overlay. */
.parent-story-sprite {
  background-size: cover;
  background-position: center;
}
.parent-story-sprite-2 { background-image: url("assets/images/parent-story-routines/melody-slide-2.jpg"); }
.parent-story-sprite-3 { background-image: url("assets/images/parent-story-routines/melody-slide-3.jpg"); }
.parent-story-sprite-4 { background-image: url("assets/images/parent-story-routines/melody-slide-4.jpg"); }
.parent-story-sprite-5 { background-image: url("assets/images/parent-story-routines/melody-slide-5.jpg"); }
.parent-story-sprite-6 { background-image: url("assets/images/parent-story-routines/melody-slide-6.jpg"); }
.parent-story-sprite-7 { background-image: url("assets/images/parent-story-routines/melody-slide-7.jpg"); }
.parent-story-sprite-8 { background-image: url("assets/images/parent-story-routines/melody-slide-8.jpg"); }

/* Shared section rhythm: adjacent sections contribute one half each. */
#how.section,
#stories.section,
#included.section,
#packages.section,
#story.section,
#method.section,
#faq.section,
.final-cta {
  padding-block: 32px;
}

/* The testimonial divider sits within a section, so it gets one full interval. */
#stories .parent-feedback {
  margin-top: 36px;
  padding-top: 28px;
}

@media (max-width: 620px) {
  #how.section,
  #stories.section,
  #included.section,
  #packages.section,
  #story.section,
  #method.section,
  #faq.section,
  .final-cta {
    padding-block: 22px;
  }

  #stories .parent-feedback {
    margin-top: 24px;
    padding-top: 20px;
  }
}

/* Use the existing musical artwork, alternating its entry side by section. */
#how::before {
  content: "";
  --flow-color: rgba(74, 132, 124, .13);
}

#how::before,
#packages::before,
#method::before,
.final-cta::before {
  transform: scaleX(-1);
}

#included::before,
#story::before,
#faq::before {
  transform: none;
}

/* Let the slideshow and its Melody have their own visual space. */
#stories::before { content: none; }

.final-cta::before {
  right: 0;
}

#how::before,
#stories::before,
#included::before,
#packages::before,
#story::before,
#method::before,
#faq::before,
.final-cta::before {
  -webkit-mask-position: 100% center;
  mask-position: 100% center;
  -webkit-mask-size: auto 100%;
  mask-size: auto 100%;
  clip-path: inset(0 0 0 calc(100% - max(90px, (100% - 1160px) / 2)));
}

#packages::before { z-index: 0; }
#packages > .wrap { position: relative; z-index: 1; }

@media (max-width: 760px) {
  #how::before,
  #stories::before,
  #included::before,
  #packages::before,
  #story::before,
  #method::before,
  #faq::before,
  .final-cta::before {
    -webkit-mask-position: 100% center;
    mask-position: 100% center;
    clip-path: inset(0 0 0 calc(100% - 40px));
  }

  #packages::before {
    -webkit-mask-image: url("assets/brand/music-section-flow-mobile.svg");
    mask-image: url("assets/brand/music-section-flow-mobile.svg");
  }
}

/* Keep the original vertical artwork on phones, with a dedicated edge lane. */
@media (max-width: 620px) {
  #how::before,
  #included::before,
  #packages::before,
  #story::before,
  #method::before,
  #faq::before,
  .final-cta::before {
    content: "";
    -webkit-mask-image: url("assets/brand/music-section-flow-mobile.svg");
    mask-image: url("assets/brand/music-section-flow-mobile.svg");
    -webkit-mask-position: 100% center;
    mask-position: 100% center;
    -webkit-mask-size: auto 100%;
    mask-size: auto 100%;
    clip-path: inset(0 0 0 calc(100% - 40px));
  }

  #how > .wrap,
  #packages > .wrap,
  #method > .wrap,
  .final-cta > .wrap {
    width: calc(100% - 54px);
    margin-left: 40px;
    margin-right: 14px;
  }

  #included > .wrap,
  #story > .wrap,
  #faq > .wrap {
    width: calc(100% - 54px);
    margin-left: 14px;
    margin-right: 40px;
  }
}

/* FAQ: comfortable targets and readable answers at every width. */
.faq-list summary {
  padding: 12px 0;
  line-height: 1.4;
}
.faq-list summary:focus-visible {
  outline: 3px solid #356a66;
  outline-offset: 3px;
  border-radius: 4px;
}
@media (max-width: 620px) {
  .faq-list details p {
    padding-right: 0;
    font-size: 15px;
    line-height: 1.6;
  }
}
