/* The former standalone views are now chapters in one continuous homepage. */
html {
  /* Chapter margins already reserve the measured fixed-header clearance. */
  scroll-padding-top: 0 !important;
}

html body #main-nav {
  transition: transform .22s ease, opacity .22s ease, visibility .22s;
}
html body #main-nav.nav-scrolled-away {
  transform: translateY(calc(-100% - 2px));
  opacity: 0;
  visibility: hidden;
  pointer-events: none !important;
}
@media (prefers-reduced-motion: reduce) {
  html body #main-nav { transition: none; }
}

html body.single-page-home #main-site .homepage-chapter {
  width: 100%;
  max-width: none;
  /* Preserve the rendered chapter rhythm, formerly supplied by section:not(). */
  padding: clamp(4.25rem, 8vw, 7.5rem) clamp(1.15rem, 5vw, 4.5rem) !important;
  margin: 0;
  scroll-margin-top: var(--site-nav-clearance, 110px);
  outline: none;
}

html body.single-page-home #main-site #hero-section,
html body.single-page-home #main-site #socials,
html body.single-page-home #main-site #framework,
html body.single-page-home #main-site #giveaway-entry-page,
html body.single-page-home #main-site #education-page {
  scroll-margin-top: var(--site-nav-clearance, 110px);
}

html body.single-page-home #main-site #giveaway-entry-page,
html body.single-page-home #main-site #education-page {
  display: block !important;
  min-height: 0 !important;
  width: 100%;
}

/* Only the shared fixed header remains; no back-to-site subpage toolbars. */
html body.single-page-home #main-site #giveaway-entry-page > div:first-child,
html body.single-page-home #main-site #education-page > div:first-child,
html body.single-page-home #main-site #giveaway-over[hidden] {
  display: none !important;
}

html body.single-page-home #main-site #education-page {
  border-bottom: 1px solid var(--cloud-line);
}

html body.single-page-home #main-site #education-page > div:nth-child(2) {
  padding-block: clamp(2.5rem, 6vw, 4rem) !important;
}

/* Smaller video cards remain usable on narrow phones without horizontal crop. */
@media (min-width: 1500px) {
  html body.single-page-home #main-site .homepage-chapter {
    padding-inline: clamp(4rem, 8vw, 9rem) !important;
  }
}

@media (max-width: 600px) {
  html body.single-page-home #main-site .homepage-chapter {
    padding: 3.6rem 1rem !important;
  }
  html body.single-page-home #main-site #education-page .edu-video-card {
    flex-direction: column;
    align-items: stretch !important;
  }
  html body.single-page-home #main-site #education-page .edu-video-card > img {
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }
}