/* Ridge Foundry interior page rhythm
   Applies only to section-driven interior pages. */

/* The base theme adds large top/bottom padding to .page-content. Section-driven
   interiors already own their vertical spacing, so remove the wrapper padding. */
.theme-ridgefoundry.layout-interior .page-content {
  padding: 0;
  overflow: hidden;
}

/* Bring the first section closer to the header and reduce oversized hero depth. */
.theme-ridgefoundry.layout-interior .component-hero {
  padding-top: clamp(54px, 5.2vw, 78px);
  padding-bottom: clamp(58px, 5.8vw, 88px);
}

.theme-ridgefoundry.layout-interior .component-hero__grid {
  align-items: center;
}

.theme-ridgefoundry.layout-interior .component-hero__grid--single .component-hero__content {
  max-width: 840px;
}

.theme-ridgefoundry.layout-interior .component-hero h1 {
  max-width: 820px;
  margin-bottom: 20px;
}

.theme-ridgefoundry.layout-interior .component-hero .component-lead {
  max-width: 700px;
  margin-top: 0;
}

/* Establish one consistent vertical rhythm for section-driven interiors. */
.theme-ridgefoundry.layout-interior .page-content > .component:not(.component-hero) {
  padding-top: clamp(64px, 6.2vw, 92px);
  padding-bottom: clamp(64px, 6.2vw, 92px);
}

.theme-ridgefoundry.layout-interior .page-content > .component + .component {
  margin-top: 0;
}

/* Keep prose readable but less narrow than the initial implementation. */
.theme-ridgefoundry.layout-interior .content-prose,
.theme-ridgefoundry.layout-interior .component-rich-content__inner,
.theme-ridgefoundry.layout-interior .component-rich-content .container {
  max-width: 900px;
}

.theme-ridgefoundry.layout-interior .component-rich-content h2,
.theme-ridgefoundry.layout-interior .component-card-grid h2,
.theme-ridgefoundry.layout-interior .component-process h2,
.theme-ridgefoundry.layout-interior .cta-panel h2 {
  margin-top: 0;
}

/* Tighten heading-to-content rhythm. */
.theme-ridgefoundry.layout-interior .component-rich-content h2 + .content-prose,
.theme-ridgefoundry.layout-interior .component-rich-content h2 + div,
.theme-ridgefoundry.layout-interior .component-card-grid h2 + p,
.theme-ridgefoundry.layout-interior .component-process h2 + p {
  margin-top: 18px;
}

/* Card grids should read as a single structured block. */
.theme-ridgefoundry.layout-interior .component-card-grid .component-heading,
.theme-ridgefoundry.layout-interior .component-card-grid__heading {
  margin-bottom: 28px;
}

.theme-ridgefoundry.layout-interior .component-card-grid .card-grid,
.theme-ridgefoundry.layout-interior .component-card-grid__grid {
  margin-top: 28px;
}

.theme-ridgefoundry.layout-interior .component-card-grid article,
.theme-ridgefoundry.layout-interior .component-card-grid .card {
  min-height: 0;
}

/* Closing CTA: shorter, stronger contrast, and close to the footer. */
.theme-ridgefoundry.layout-interior .page-content > .component:last-child {
  padding-bottom: clamp(44px, 4vw, 60px);
}

.theme-ridgefoundry.layout-interior .cta-panel {
  padding: clamp(30px, 3.2vw, 46px) clamp(28px, 4vw, 58px);
  align-items: center;
}

.theme-ridgefoundry.layout-interior .cta-panel h2 {
  color: #f8fafc;
  line-height: 1.02;
  max-width: 650px;
}

.theme-ridgefoundry.layout-interior .cta-panel p {
  color: #c4ccd6;
  max-width: 620px;
  margin-bottom: 0;
}

.theme-ridgefoundry.layout-interior .cta-panel .eyebrow {
  color: #d7dde6;
}

.theme-ridgefoundry.layout-interior .cta-panel .component-actions {
  margin-top: 0;
}

.theme-ridgefoundry.layout-interior .site-footer {
  margin-top: 0;
}

@media (max-width: 820px) {
  .theme-ridgefoundry.layout-interior .component-hero {
    padding-top: 42px;
    padding-bottom: 58px;
  }

  .theme-ridgefoundry.layout-interior .page-content > .component:not(.component-hero) {
    padding-top: 54px;
    padding-bottom: 54px;
  }

  .theme-ridgefoundry.layout-interior .cta-panel {
    padding: 30px 24px;
  }

  .theme-ridgefoundry.layout-interior .cta-panel .component-actions {
    margin-top: 22px;
  }
}

@media (max-width: 560px) {
  .theme-ridgefoundry.layout-interior .component-hero {
    padding-top: 34px;
    padding-bottom: 48px;
  }

  .theme-ridgefoundry.layout-interior .page-content > .component:not(.component-hero) {
    padding-top: 46px;
    padding-bottom: 46px;
  }
}
