/* ========================================================================== 
   ESPO 2.5.1.79 — Compact global page rhythm
   Keeps the approved homepage intact and standardizes all internal pages.
   ========================================================================== */

body:not(.home) {
  --espo-section-space: clamp(3rem, 5vw, 4.25rem);
}

/* Shared internal-page heroes */
body:not(.home) .espo-page-hero-inner {
  padding-block: clamp(3rem, 5vw, 4.35rem) !important;
  gap: clamp(1.8rem, 4vw, 3.5rem) !important;
}

body:not(.home) .espo-page-hero-inner > div > p {
  margin-top: 1rem !important;
}

/* Utility-based legacy sections */
body:not(.home) main > article[class~="py-16"],
body:not(.home) main > section[class~="py-16"],
body:not(.home) main > section[class~="py-14"],
body:not(.home) main > section > div[class~="py-16"],
body:not(.home) main > section > div[class~="py-14"] {
  padding-block: clamp(3rem, 5vw, 4.25rem) !important;
}

body:not(.home) main > section[class~="py-12"],
body:not(.home) main > section > div[class~="py-12"] {
  padding-block: clamp(2.25rem, 4vw, 3.25rem) !important;
}

body:not(.home) main > section[class~="py-10"] {
  padding-block: clamp(2rem, 3.5vw, 2.75rem) !important;
}

/* About page */
body:not(.home) .espo-about-hero {
  padding-block: clamp(3.4rem, 5.5vw, 4.8rem) clamp(2.8rem, 4.5vw, 4rem) !important;
}

body:not(.home) .espo-about-story,
body:not(.home) .espo-about-approach,
body:not(.home) .espo-about-principles,
body:not(.home) .espo-about-leadership,
body:not(.home) .espo-about-credentials {
  padding-block: clamp(3.5rem, 5.8vw, 5rem) !important;
}

body:not(.home) .espo-about-story__mast {
  padding-bottom: 1.35rem !important;
}

body:not(.home) .espo-about-story__media,
body:not(.home) .espo-about-approach__path,
body:not(.home) .espo-about-principles__panel,
body:not(.home) .espo-about-credentials__grid {
  margin-top: clamp(1.5rem, 3vw, 2.25rem) !important;
}

body:not(.home) .espo-about-leadership__layout {
  gap: clamp(2rem, 5vw, 4.5rem) !important;
}

/* Contact page */
body:not(.home) .espo-contact-hero {
  padding-block: clamp(3.1rem, 5vw, 4.35rem) clamp(2.5rem, 4vw, 3.5rem) !important;
}

body:not(.home) .espo-contact-hero__inner {
  gap: clamp(1.8rem, 3.5vw, 3.25rem) !important;
}

body:not(.home) .espo-contact-routes,
body:not(.home) .espo-contact-form-section {
  padding-block: clamp(3rem, 5vw, 4.25rem) !important;
}

body:not(.home) .espo-contact-routes__grid {
  margin-top: 1.65rem !important;
}

body:not(.home) .espo-contact-detailbar {
  margin-top: .8rem !important;
}

body:not(.home) .espo-contact-form-layout {
  gap: clamp(1.8rem, 4vw, 3.5rem) !important;
}

body:not(.home) .espo-contact-next {
  margin-top: 1.25rem !important;
  padding-top: 1rem !important;
}

body:not(.home) .espo-form-step {
  padding-block: 1.15rem !important;
}

/* Project case studies */
body:not(.home) .espo-project-intro {
  padding-block: 1.25rem clamp(2.75rem, 4vw, 3.5rem) !important;
}

body:not(.home) .espo-project-narrative {
  padding-block: clamp(3rem, 5vw, 4.25rem) !important;
}

body:not(.home) .espo-project-overview-grid,
body:not(.home) .espo-project-hero-grid,
body:not(.home) .espo-project-story-row {
  gap: clamp(2rem, 4vw, 4rem) !important;
}

body:not(.home) .espo-project-story {
  gap: clamp(2.5rem, 5vw, 4.5rem) !important;
  margin-top: clamp(2.75rem, 5vw, 4.25rem) !important;
}

body:not(.home) .espo-project-gallery-section {
  padding-block: .75rem clamp(3.25rem, 5vw, 4rem) !important;
}

body:not(.home) .espo-project-before-after,
body:not(.home) .espo-project-video {
  padding-bottom: clamp(3.25rem, 5vw, 4rem) !important;
}

body:not(.home) .espo-project-related {
  padding-block: clamp(3rem, 5vw, 4rem) !important;
}

body:not(.home) .espo-project-contact {
  padding-block: clamp(3rem, 5vw, 4rem) !important;
}

/* Archives and listing pages */
body:not(.home) .espo-project-filters + .mt-10 {
  margin-top: 2rem !important;
}

body:not(.home) main > section .mt-16 {
  margin-top: 2.5rem !important;
}

body:not(.home) main > section .mt-12 {
  margin-top: 2.25rem !important;
}

body:not(.home) main > section .mt-10 {
  margin-top: 2rem !important;
}

/* Prevent accidental stacked whitespace from adjacent sections */
body:not(.home) main > section + section,
body:not(.home) main > div + section,
body:not(.home) main > section + div {
  margin-top: 0 !important;
}

@media (max-width: 900px) {
  body:not(.home) {
    --espo-section-space: clamp(2.6rem, 7vw, 3.5rem);
  }

  body:not(.home) .espo-page-hero-inner,
  body:not(.home) .espo-about-hero,
  body:not(.home) .espo-contact-hero {
    padding-block: clamp(2.7rem, 7vw, 3.6rem) !important;
  }

  body:not(.home) .espo-about-story,
  body:not(.home) .espo-about-approach,
  body:not(.home) .espo-about-principles,
  body:not(.home) .espo-about-leadership,
  body:not(.home) .espo-about-credentials,
  body:not(.home) .espo-contact-routes,
  body:not(.home) .espo-contact-form-section {
    padding-block: clamp(2.8rem, 7vw, 3.75rem) !important;
  }
}

@media (max-width: 640px) {
  body:not(.home) {
    --espo-section-space: 2.6rem;
  }

  body:not(.home) .espo-page-hero-inner,
  body:not(.home) .espo-about-hero,
  body:not(.home) .espo-contact-hero {
    padding-block: 2.5rem !important;
    gap: 1.5rem !important;
  }

  body:not(.home) main > article[class~="py-16"],
  body:not(.home) main > section[class~="py-16"],
  body:not(.home) main > section[class~="py-14"],
  body:not(.home) main > section > div[class~="py-16"],
  body:not(.home) main > section > div[class~="py-14"],
  body:not(.home) .espo-about-story,
  body:not(.home) .espo-about-approach,
  body:not(.home) .espo-about-principles,
  body:not(.home) .espo-about-leadership,
  body:not(.home) .espo-about-credentials,
  body:not(.home) .espo-contact-routes,
  body:not(.home) .espo-contact-form-section {
    padding-block: 2.75rem !important;
  }

  body:not(.home) .espo-project-intro {
    padding-block: 1rem 2.5rem !important;
  }

  body:not(.home) .espo-project-narrative,
  body:not(.home) .espo-project-related,
  body:not(.home) .espo-project-contact {
    padding-block: 2.75rem !important;
  }
}
