/*
 * Home editorial flow / Poshly Kanal.
 * The sections share their neighbour's EXACT edge colour.
 * Blends live in the empty section padding, never over copy or controls.
 * Homepage only.  No images, JavaScript or extra HTTP libraries.
 */

/* Silk -> manifesto is handled by the existing hero-soft-landing.
   Keep its original shimmer and text untouched. */
#main > .hero + .kinetic-statement {
  background-color: #eeeae5;
  border-top: 0;
}

/* Manifesto #eeeae5 -> journal white.
   Starts in the manifesto's colour and fades gently over the empty
   leading space of the article section; no straight horizontal cutoff. */
#main > #latest.editorial-section {
  background: linear-gradient(
    to bottom,
    #eeeae5 0,
    #f0ece8 42px,
    #f5f2ef 93px,
    #faf9f7 143px,
    #ffffff 205px,
    #ffffff 100%
  );
  padding-top: clamp(155px, 13vw, 205px);
}

/* White journal -> warm factual section. */
#main > #myth-week.myth-week {
  background: linear-gradient(
    to bottom,
    #ffffff 0,
    #faf9f7 42px,
    #f6f3f0 94px,
    #f2eeea 164px,
    #f2eeea 100%
  );
  position: relative;
  isolation: isolate;
  padding-top: clamp(145px, 13vw, 194px);
  /* Keep the final colour transition entirely BELOW the footer labels. */
  padding-bottom: 100px;
}

/* The old fade ended at full burgundy BEFORE the burgundy section.
   Put the actual transition INSIDE the dark section to make it visible. */
#main > #myth-week.myth-week::after { content: none; }
#main > #myth-week.myth-week > .myth-week__wrap {
  position: relative;
  z-index: 1;
}

/* Dark community stays the same precise tone as the previous section's
   last pixel.  No delayed background animation can create a seam. */
/* Warm #f2eeea -> burgundy #302128.
   The first pixel matches Myth of the Week; the last pixel matches
   the full burgundy section. All typography starts AFTER the fade. */
#main > #community.kinetic-community,
#main > #community.kinetic-community.is-visible {
  background-color: #302128;
  background-image: linear-gradient(
    to bottom,
    #f2eeea 0%,
    #f0e9e8 14%,
    #e4d5d6 32%,
    #b69ca3 56%,
    #76545e 80%,
    #302128 100%
  );
  background-size: 100% 250px;
  background-position: top center;
  background-repeat: no-repeat;
  transition: none;
  padding-top: 270px;
  padding-bottom: 210px;
}

/* Dark community -> grey editorial footer, in the spacious lower margin.
   Unlike an overlaid blur, this cannot soften or wash out the text. */
#main > #community.kinetic-community::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 0;
  pointer-events: none;
  height: clamp(165px, 13vw, 190px);
  background: linear-gradient(
    to bottom,
    rgba(239,238,235,0) 0%,
    rgba(239,238,235,.06) 19%,
    rgba(239,238,235,.19) 38%,
    rgba(239,238,235,.48) 64%,
    rgba(239,238,235,.80) 83%,
    #efeeeb 100%
  );
}
#main > #community.kinetic-community > .kinetic-community-inner {
  position: relative;
  z-index: 1;
}
#main + footer.footer {
  background-color: #efeeeb;
}

/* On mobile: shorter, lighter fades and sufficient room beneath labels. */
@media (max-width: 750px) {
  #main > #latest.editorial-section {
    background: linear-gradient(
      to bottom,
      #eeeae5 0,
      #f2efeb 38px,
      #f9f7f5 94px,
      #ffffff 155px,
      #ffffff 100%
    );
    padding-top: 145px;
  }
  #main > #myth-week.myth-week {
    background: linear-gradient(
      to bottom,
      #ffffff 0,
      #faf9f7 38px,
      #f5f2ef 88px,
      #f2eeea 146px,
      #f2eeea 100%
    );
    padding-top: 155px;
    padding-bottom: 130px;
  }
  #main > #myth-week.myth-week {
    padding-bottom: 90px;
  }
  #main > #community.kinetic-community,
  #main > #community.kinetic-community.is-visible {
    background-size: 100% 185px;
    padding-top: 203px;
    padding-bottom: 167px;
  }
  #main > #community.kinetic-community::after {
    height: 146px;
  }
}

@media (max-width: 390px) {
  #main > #latest.editorial-section { padding-top: 136px; }
  #main > #myth-week.myth-week { padding-top: 142px; }
}
