/* Layout & mobile fixes - max page width, work grid, industry cards, heroes */

html[data-theme="dark"] {
  --ds-page-max: 1200px;
  --ds-page-gutter: clamp(1rem, 3vw, 1.5rem);
  --ds-hero-max-height: 860px;
  --ds-hero-media-max: 420px;
}

@media (min-width: 1600px) {
  html[data-theme="dark"] {
    --ds-hero-max-height: 820px;
    --ds-hero-media-max: 400px;
  }
}

/* —— Home landing hero (index) —— */
body.site-themed .home-landing-hero.home-banner {
  height: auto !important;
  min-height: min(78vh, var(--ds-hero-max-height)) !important;
  max-height: var(--ds-hero-max-height) !important;
  padding-top: 5.25rem !important;
  padding-bottom: 3.75rem !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  background: var(--ds-bg, #06080f);
  background-image: none;
}

/* Full-bleed background video - fills hero; blank canvas if video unavailable */
body.site-themed .home-landing-hero .video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  max-height: none !important;
  overflow: hidden;
  background: var(--ds-bg, #06080f);
}

body.site-themed .home-landing-hero .video-bg .video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none !important;
  min-height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: brightness(0.42) saturate(1.2) contrast(1.05);
  pointer-events: none;
  background: transparent;
}

body.site-themed .home-landing-hero .video-bg .video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      118deg,
      rgba(6, 8, 15, 0.78) 0%,
      rgba(6, 8, 15, 0.45) 38%,
      rgba(12, 18, 34, 0.62) 68%,
      rgba(6, 8, 15, 0.8) 100%
    ),
    radial-gradient(ellipse 70% 55% at 75% 35%, rgba(10, 165, 255, 0.14), transparent 52%),
    radial-gradient(ellipse 55% 45% at 15% 70%, rgba(99, 102, 241, 0.1), transparent 48%);
}

body.site-themed .home-landing-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: min(62vh, calc(var(--ds-hero-max-height) - 7rem));
  max-height: calc(var(--ds-hero-max-height) - 5rem);
  padding-top: 2.25rem;
  padding-bottom: 2.75rem;
}

body.site-themed .home-landing-copy {
  padding-top: 1rem;
  padding-bottom: 1.25rem;
}

body.site-themed .home-landing-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 7rem;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(6, 8, 15, 0.85) 55%, var(--ds-bg, #06080f) 100%);
}

body.site-themed .home-landing-hero .learn-more-arrow {
  z-index: 3;
}

@media (min-width: 992px) {
  body.site-themed .home-landing-hero.home-banner {
    padding-top: 6rem !important;
    padding-bottom: 4.5rem !important;
  }

  body.site-themed .home-landing-inner {
    padding-top: 2.75rem;
    padding-bottom: 3.25rem;
  }

  body.site-themed .home-landing-copy {
    padding-top: 1.25rem;
    padding-bottom: 1.5rem;
    padding-right: 1.5rem;
  }
}

body.site-themed .home-landing-hero .hero-dashboard-frame {
  max-width: min(100%, 540px);
  max-height: var(--ds-hero-media-max);
  margin-left: auto;
  margin-right: auto;
}

body.site-themed .home-landing-hero .hero-dashboard-frame__inner,
body.site-themed .home-landing-hero .hero-dashboard-frame img {
  max-height: calc(var(--ds-hero-media-max) - 8px);
  object-fit: cover;
  object-position: center top;
}

@media (max-width: 991px) {
  body.site-themed .home-landing-hero.home-banner {
    min-height: auto !important;
    max-height: none !important;
    padding-top: 5rem !important;
    padding-bottom: 3rem !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.site-themed .home-landing-inner {
    min-height: auto;
    max-height: none;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
  }

  body.site-themed .home-landing-hero .hero-dashboard-frame {
    margin-top: 1.5rem;
    max-height: min(320px, 50vw);
  }

  /* Override legacy main.min 150px hero top padding on marketing pages */
  body.site-themed .home-banner.pt80,
  body.site-themed .work-page-hero.home-banner {
    padding-top: 4.5rem !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    height: auto !important;
    min-height: 0 !important;
  }
}

/* Global media caps on very large screens */
@media (min-width: 1400px) {
  body.site-themed .hero-side-visual {
    max-height: var(--ds-hero-media-max);
  }

  body.site-themed .ind-card-media {
    max-height: 11.5rem;
  }

  body.site-themed .ind-card-media img {
    max-height: 11.5rem;
  }

  body.site-themed .work-item-media {
    max-height: 16rem;
  }

  body.site-themed .work-item-img {
    max-height: 16rem;
  }
}

/* Cap content width on very large viewports (avoid stretched layouts) */
body.site-themed .container.s-container,
body.site-themed .works-container.container,
body.site-themed main.pt100 > .container.s-container,
body.site-themed main.pt100.pb60 > .container.s-container,
body.site-themed .cs-detail-hero.container {
  width: 100%;
  max-width: var(--ds-page-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--ds-page-gutter);
  padding-right: var(--ds-page-gutter);
}

@media (min-width: 992px) {
  body.site-themed .container:not(.container-fluid) {
    max-width: min(100%, var(--ds-page-max));
  }
}

@media (min-width: 1400px) {
  body.site-themed .s-navbar {
    padding-left: max(var(--ds-page-gutter), calc((100vw - var(--ds-page-max)) / 2));
    padding-right: max(var(--ds-page-gutter), calc((100vw - var(--ds-page-max)) / 2));
  }

  body.site-themed .home-banner .container.s-container,
  body.site-themed .section-spacing .container,
  body.site-themed .section-spacing .container.s-container {
    max-width: var(--ds-page-max);
  }
}

/* —— Work / case studies page —— */
body.site-themed .work-page-hero.home-banner {
  height: auto !important;
  min-height: 0 !important;
  padding-top: 6.5rem !important;
  padding-bottom: 2.75rem !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-bottom: 0;
  overflow: visible;
}

html[data-theme="dark"] body.site-themed .work-page-hero.home-banner:not(:has(.video-bg)) {
  min-height: auto !important;
}

html[data-theme="dark"] body.site-themed .work-page-hero.home-banner:not(:has(.video-bg))::before {
  display: none !important;
}

body.site-themed .work-page-hero .hero-visual-wrap {
  transform: none !important;
  position: relative;
  z-index: 1;
}

body.site-themed .work-page-hero .header-headings {
  position: relative;
  z-index: 2;
}

body.site-themed #our-work,
body.site-themed .work-page-list {
  position: relative;
  z-index: 3;
  padding-top: 2.5rem !important;
  padding-bottom: 4rem !important;
  margin-top: 0 !important;
  scroll-margin-top: 5.5rem;
  overflow: visible;
}

body.site-themed #our-work .row.work-page-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

body.site-themed #our-work .work-item-col {
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
  float: none;
}

body.site-themed #our-work .work-item {
  /* Override legacy main.min negative / huge margins */
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  width: 100%;
  flex: 1 1 auto;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body.site-themed #our-work .work-item:nth-child(2n),
body.site-themed #our-work .work-item-col:nth-child(2n) .work-item {
  margin-top: 0 !important;
}

@media (max-width: 991px) {
  body.site-themed #our-work .work-item:nth-child(2n),
  body.site-themed #our-work .work-item-col:nth-child(2n) .work-item {
    margin-top: 0 !important;
  }
}

body.site-themed #our-work .work-item.reveal {
  transform: none;
  opacity: 1;
}

body.site-themed #our-work .work-item.reveal.is-visible {
  transform: none;
  opacity: 1;
}

body.site-themed #our-work .work-item a {
  display: block;
  flex: 1 1 auto;
}

body.site-themed #our-work .work-item-media {
  aspect-ratio: 16 / 10;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

body.site-themed #our-work .work-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 180px;
}

body.site-themed #our-work .work-item-img.is-placeholder {
  object-fit: contain;
  padding: 2rem;
  opacity: 0.9;
  background: linear-gradient(145deg, rgba(12, 18, 34, 0.95), rgba(15, 23, 42, 0.85));
}

body.site-themed #our-work .work-item h3 {
  padding-right: 0.25rem;
  font-size: 1.25rem;
  line-height: 1.35;
  margin-top: 1rem;
  margin-bottom: 0.35rem;
  position: static;
}

body.site-themed #our-work .work-item h3::after {
  display: none !important;
  content: none !important;
}

body.site-themed .work-page-hero .header-headings > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.5rem;
}

body.site-themed .work-page-hero .hero-visual-wrap {
  margin-top: 1.25rem;
  max-width: 100%;
}

@media (min-width: 768px) {
  body.site-themed .work-page-hero .hero-visual-wrap {
    margin-top: 0.5rem;
  }
}

@media (max-width: 767px) {
  body.site-themed .work-page-hero.home-banner:not(:has(.video-bg))::before {
    display: none;
  }

  body.site-themed .work-page-hero .hero-side-visual {
    max-height: 240px;
    animation: none;
  }

  body.site-themed .work-page-hero.home-banner {
    padding-top: 5.5rem !important;
  }
}

/* —— Homepage & industries: industry cards —— */
#industries .ind-card.reveal {
  opacity: 1;
  transform: none;
}

#industries .ind-card.reveal.is-visible {
  opacity: 1;
  transform: none;
}

html[data-theme="dark"] #industries .ind-card:has(.ind-card-media)::before,
html[data-theme="dark"] .ind-card.ind-card--media::before {
  display: none !important;
}

html[data-theme="dark"] #industries .ind-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

html[data-theme="dark"] #industries .ind-card-media {
  flex: 0 0 auto;
  aspect-ratio: 16 / 10;
  max-height: none;
}

html[data-theme="dark"] #industries .ind-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

html[data-theme="dark"] #industries .ind-card-body {
  flex: 1 1 auto;
}

html[data-theme="dark"] article.ind-card .ind-card-icon--overlay {
  top: 0.5rem;
  right: 0.5rem;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 0.95rem;
}

html[data-theme="dark"] a.ind-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.75rem 1rem 1.15rem !important;
  overflow: hidden;
}

html[data-theme="dark"] a.ind-card .ind-card-chrome {
  margin: -0.75rem -1rem 0.85rem;
  border-radius: 12px 12px 0 0;
  flex-shrink: 0;
}

html[data-theme="dark"] a.ind-card h5,
html[data-theme="dark"] a.ind-card p {
  padding-left: 0.15rem;
  padding-right: 0.15rem;
}

/* —— Inner page hero visual (JS-injected) —— */
@media (max-width: 991px) {
  main.pt100.page-hero-layout .page-hero__visual {
    display: none !important;
  }

  main.pt100.page-hero-layout .section-header,
  main.pt100.page-hero-layout > .container > .row.section-header {
    max-width: 100%;
  }
}

/* —— Hero CTAs & actions (global) —— */
@media (max-width: 767px) {
  body.site-themed .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  body.site-themed .hero-actions .cta-link {
    margin-left: 0.75rem;
    margin-right: 0.75rem;
    text-align: center;
    justify-content: center;
  }

  body.site-themed .home-banner:not(:has(.video-bg))::before {
    opacity: 0.12;
    width: 100%;
    height: 35%;
    right: 0;
    bottom: 0;
    top: auto;
    transform: none;
  }

  body.site-themed .hero-visual-wrap,
  body.site-themed .hero-dashboard-frame {
    transform: none !important;
  }

  body.site-themed .hero-side-visual {
    max-height: 260px;
    animation: none;
  }

  body.site-themed .section-header .header-headings h2::after,
  body.site-themed .section-header .header-headings .h1::after {
    margin-left: auto;
    margin-right: auto;
  }

  body.site-themed .section-header.text-center .header-headings h2::after,
  body.site-themed .section-header .col-12.text-center .header-headings h2::after {
    margin-left: auto;
    margin-right: auto;
  }
}

/* —— Navbar / collapse —— */
@media (max-width: 767px) {
  body.site-themed .s-navbar .navbar-collapse.collapse:not(.show) {
    display: none !important;
  }
}

/* —— Prevent horizontal scroll from decorative layers —— */
body.site-themed {
  overflow-x: clip;
}

/* —— Case study hero on small screens —— */
@media (max-width: 768px) {
  html[data-theme="dark"] .cs-detail-hero::before {
    display: none !important;
  }

  html[data-theme="dark"] .cs-hero-frame {
    margin-top: 1rem;
  }
}

/* Hero / dashboard frames - do not over-stretch on ultra-wide screens */
body.site-themed .hero-visual-wrap {
  max-width: min(100%, 540px);
}

@media (min-width: 768px) {
  body.site-themed .work-page-hero .col-md-5 .hero-visual-wrap {
    margin-left: auto;
  }
}

body.site-themed .banner-illustration,
body.site-themed .hero-side-visual {
  max-width: 100%;
}

/* =========================================================
   Marketing pages - mobile / tablet responsive system
   ========================================================= */

/* Kill legacy 100vw horizontal scroll */
body.site-themed .mobile-nav-container.--open-nav,
body.site-themed .ambient-bg {
  width: 100%;
  max-width: 100%;
}

/* —— Grid lists: 2 columns on phones —— */
@media (max-width: 767.98px) {
  /* Compact repeating grids */
  body.site-themed .row > [class*="col-"]:has(.ind-card),
  body.site-themed .row > [class*="col-"]:has(.solution-card),
  body.site-themed .row > [class*="col-"]:has(.trust-pill),
  body.site-themed .row > [class*="col-"]:has(.stat-card),
  body.site-themed .row > [class*="col-"]:has(.feature-card),
  body.site-themed .row > [class*="col-"]:has(.case-study-card),
  body.site-themed .row > [class*="col-"]:has(.playbook-card),
  body.site-themed .row > .work-item-col,
  body.site-themed .row > [class*="col-"].ethos-group,
  body.site-themed .row > [class*="col-"].team-member,
  body.site-themed .row > [class*="col-"]:has(.card.p-3) {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
    margin-bottom: 0.85rem !important;
  }

  /* Important / content-heavy: stay full width */
  body.site-themed .row > [class*="col-"]:has(.svc-card),
  body.site-themed .row > [class*="col-"]:has(.plan),
  body.site-themed .row > [class*="col-"]:has(.testimonial-card),
  body.site-themed .row > [class*="col-"]:has(.faq-item),
  body.site-themed .row > [class*="col-"]:has(.cta-band),
  body.site-themed .section-header > [class*="col-"],
  body.site-themed .section-header-inner > [class*="col-"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  body.site-themed .ind-card,
  body.site-themed .solution-card,
  body.site-themed .trust-pill,
  body.site-themed .stat-card,
  body.site-themed .feature-card,
  body.site-themed .playbook-card,
  body.site-themed .card.p-3 {
    padding: 0.85rem 0.75rem;
    min-width: 0;
  }

  body.site-themed .case-study-card {
    padding: 0 !important;
    min-width: 0;
  }

  body.site-themed .case-study-card .cs-body {
    padding: 0.7rem 0.7rem 0.85rem !important;
  }

  body.site-themed .ind-card h3,
  body.site-themed .ind-card h5,
  body.site-themed .solution-card h3,
  body.site-themed .trust-pill h4,
  body.site-themed .process-step h4,
  body.site-themed .feature-card h3,
  body.site-themed .playbook-body h3,
  body.site-themed .case-study-card h3,
  body.site-themed .card h5,
  body.site-themed .ethos-group h2 {
    font-size: 0.92rem;
    line-height: 1.3;
    word-break: break-word;
  }

  body.site-themed .ind-card p,
  body.site-themed .solution-card p,
  body.site-themed .trust-pill p,
  body.site-themed .process-step p,
  body.site-themed .feature-body p,
  body.site-themed .playbook-body p,
  body.site-themed .case-study-card p,
  body.site-themed .card p,
  body.site-themed .ethos-group p,
  body.site-themed .solution-card .solution-outcome {
    font-size: 0.78rem;
    line-height: 1.4;
  }

  body.site-themed .ind-card-media,
  body.site-themed .ind-card-media img,
  body.site-themed .feature-media img,
  body.site-themed .playbook-media img,
  body.site-themed .case-study-card .cs-media img {
    max-height: 96px;
    object-fit: cover;
  }

  body.site-themed .ind-card-media,
  body.site-themed .ind-card-media img {
    aspect-ratio: 16 / 10;
  }

  body.site-themed .playbook-media img,
  body.site-themed .feature-media img {
    height: 96px;
  }

  body.site-themed .solution-icon {
    width: 2.1rem;
    height: 2.1rem;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  body.site-themed .process-step {
    padding: 0.65rem 0.25rem;
  }

  body.site-themed .process-step .step-num {
    width: 2.1rem;
    height: 2.1rem;
    font-size: 0.85rem;
    margin-bottom: 0.45rem;
  }

  body.site-themed .team-member {
    margin-bottom: 1.25rem !important;
  }

  body.site-themed .team-member img {
    width: 112px;
    height: 112px;
  }

  body.site-themed #our-work .work-item-media,
  body.site-themed #our-work .work-item-img {
    max-height: 130px;
  }

  body.site-themed #our-work .work-item h3 {
    font-size: 0.9rem;
    line-height: 1.3;
  }

  /* Bullet / checklist grids → 2 columns */
  body.site-themed .benefit-row,
  body.site-themed main .anchor ul,
  body.site-themed .cs-section ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem 0.75rem;
    padding-left: 0;
    list-style-position: inside;
  }

  body.site-themed .benefit-row li,
  body.site-themed main .anchor ul li,
  body.site-themed .cs-section ul li {
    margin-bottom: 0;
    font-size: 0.85rem;
    line-height: 1.4;
    min-width: 0;
  }

  /* Keep lists inside important cards as single column */
  body.site-themed .svc-card ul,
  body.site-themed .plan ul {
    display: block;
    padding-left: 1.1rem;
  }

  body.site-themed .svc-card ul li,
  body.site-themed .plan ul li {
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
  }

  body.site-themed .cs-tag {
    display: inline-block;
    margin: 0.15rem 0.3rem 0.15rem 0;
  }
}

/* —— Heroes, headers, CTAs —— */
@media (max-width: 767.98px) {
  body.site-themed .home-landing-hero .header-headings,
  body.site-themed .home-landing-copy {
    text-align: center;
  }

  body.site-themed .home-landing-hero h1,
  body.site-themed .home-banner .header-headings h1 {
    font-size: clamp(1.55rem, 6.2vw, 2rem) !important;
    line-height: 1.25 !important;
    padding-top: 0.5rem !important;
  }

  body.site-themed .home-landing-hero .hero-lead,
  body.site-themed .home-banner .header-headings p,
  body.site-themed .home-banner .hero-lead {
    font-size: 0.95rem !important;
    line-height: 1.55 !important;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
  }

  body.site-themed .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
  }

  body.site-themed .hero-actions .cta-link {
    width: 100%;
    margin: 0 !important;
    text-align: center;
    justify-content: center;
  }

  body.site-themed .home-landing-hero .hero-dashboard-frame {
    margin-top: 1.25rem;
    max-height: min(240px, 58vw);
  }

  body.site-themed .home-landing-hero .hero-dashboard-frame__inner,
  body.site-themed .home-landing-hero .hero-dashboard-frame img {
    max-height: min(232px, 56vw);
  }

  body.site-themed .section-header {
    text-align: center;
  }

  body.site-themed .section-header .header-headings,
  body.site-themed .section-header .header-cta {
    text-align: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
  }

  body.site-themed .section-header .header-cta {
    margin-top: 0.75rem;
  }

  body.site-themed .section-header .header-cta .cta-link {
    display: inline-flex;
  }

  body.site-themed main.pt100,
  body.site-themed main.pt100.pb60 {
    padding-top: 1.25rem !important;
    padding-bottom: 2.5rem !important;
  }

  body.site-themed .cs-detail-hero {
    padding-top: 1rem !important;
    padding-bottom: 2rem !important;
  }

  body.site-themed .cs-detail-hero .h1,
  body.site-themed .cs-detail-hero h1 {
    font-size: clamp(1.45rem, 6vw, 1.85rem);
    line-height: 1.25;
  }

  body.site-themed .cs-detail-hero .hero-lead {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  body.site-themed .cs-detail-hero .cs-hero-img,
  body.site-themed .cs-hero-img {
    max-height: 220px;
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
  }

  body.site-themed .cs-section {
    margin-bottom: 1.75rem;
    padding-left: 0.75rem;
  }

  body.site-themed .cs-section h2 {
    font-size: 1.15rem;
  }

  body.site-themed .cta-band {
    padding: 1.5rem 1rem;
  }

  body.site-themed .cta-band .h1,
  body.site-themed .cta-band h2 {
    font-size: 1.35rem;
    line-height: 1.3;
  }

  body.site-themed .contact-us .d-flex {
    display: block !important;
  }

  body.site-themed .contact-us-details,
  body.site-themed .contact-us .header-headings {
    max-width: 100%;
  }

  body.site-themed .contact-form .form-row > [class*="col-"],
  body.site-themed #sales-form .form-row > [class*="col-"],
  body.site-themed .modal-dialog-custom .form-row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  body.site-themed .modal-dialog-custom {
    margin: 0.75rem;
    max-width: calc(100% - 1.5rem);
    max-height: calc(100vh - 1.5rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.site-themed .svc-card,
  body.site-themed .plan {
    padding: 1.15rem 1rem;
  }

  body.site-themed .svc-card h3,
  body.site-themed .plan h3 {
    font-size: 1.1rem;
  }

  body.site-themed .plan .price {
    font-size: 1.25rem;
  }

  body.site-themed details {
    margin-bottom: 0.65rem;
  }

  body.site-themed details summary {
    font-size: 0.95rem;
    line-height: 1.4;
    padding: 0.35rem 0;
  }

  body.site-themed .footer-section {
    padding-left: 0;
    padding-right: 0;
  }

  body.site-themed .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 0.85rem;
  }

  body.site-themed .social-media {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
  }

  body.site-themed .next-page-section {
    padding: 1.5rem 0;
  }

  body.site-themed .next-page-section .col {
    justify-content: center !important;
    text-align: center;
  }
}

/* Very small phones: keep grids usable, avoid overflow */
@media (max-width: 379.98px) {
  body.site-themed .row > [class*="col-"]:has(.ind-card),
  body.site-themed .row > [class*="col-"]:has(.solution-card),
  body.site-themed .row > [class*="col-"]:has(.trust-pill),
  body.site-themed .row > .work-item-col,
  body.site-themed .row > [class*="col-"].ethos-group,
  body.site-themed .row > [class*="col-"].team-member {
    padding-left: 0.3rem;
    padding-right: 0.3rem;
  }

  body.site-themed .benefit-row,
  body.site-themed main .anchor ul,
  body.site-themed .cs-section ul {
    grid-template-columns: 1fr;
  }

  body.site-themed .container,
  body.site-themed .container.s-container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
}

/* Tablet polish */
@media (min-width: 768px) and (max-width: 991.98px) {
  body.site-themed .home-landing-hero h1 {
    font-size: 2.15rem;
  }

  body.site-themed .cs-detail-hero .cs-hero-img {
    max-height: 320px;
  }

  body.site-themed .section-header .header-cta {
    justify-content: flex-end;
  }
}

/* —— Smaller CTAs & hero type (override legacy main.min sizes) —— */
body.site-themed .cta-link {
  font-size: 0.9375rem !important;
  line-height: 1.35 !important;
  padding-right: 1.15rem;
}

body.site-themed .cta-link.--md {
  font-size: 0.9375rem !important;
  line-height: 1.35 !important;
  padding-right: 1.25rem;
}

body.site-themed .cta-link.--lg {
  font-size: 1.05rem !important;
  line-height: 1.4 !important;
  padding-right: 1.4rem;
}

body.site-themed .cta-link::after,
body.site-themed .cta-link.--md::after,
body.site-themed .cta-link.--lg::after {
  content: none !important;
}

body.site-themed .hero-actions .cta-link,
body.site-themed .hero-actions .cta-link.--md,
body.site-themed .hero-actions .cta-link.--primary-cta {
  font-size: 0.875rem !important;
  line-height: 1.3 !important;
  padding: 0.5rem 1rem !important;
  font-weight: 600;
}

body.site-themed .cta-band .cta-link,
body.site-themed .cta-band .cta-link.--md,
body.site-themed .cta-band .cta-link.--lg {
  font-size: 0.875rem !important;
  line-height: 1.3 !important;
  padding: 0.5rem 1.05rem !important;
}

body.site-themed .section-header .header-cta .cta-link,
body.site-themed .header-cta .cta-link {
  font-size: 0.875rem !important;
  line-height: 1.3 !important;
  padding: 0.45rem 0.95rem !important;
}

body.site-themed .s-navbar .navbar-nav .nav-cta .nav-link {
  font-size: 0.78rem !important;
  line-height: 1.2 !important;
  padding: 0.45rem 0.95rem !important;
}

body.site-themed .home-banner .header-headings h1,
body.site-themed .home-landing-hero h1 {
  font-size: clamp(1.55rem, 3.2vw, 2.15rem) !important;
  line-height: 1.18 !important;
}

body.site-themed .home-banner .hero-lead,
body.site-themed .home-landing-hero .hero-lead {
  font-size: 0.8125rem !important;
  line-height: 1.55 !important;
}

body.site-themed .section-header .header-headings h2,
body.site-themed .section-header .header-headings .h1 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem) !important;
  line-height: 1.25 !important;
}

body.site-themed .section-header .header-headings p,
body.site-themed .section-header .header-headings .mb0 {
  font-size: 0.8125rem;
  line-height: 1.55;
}

@media (max-width: 767.98px) {
  body.site-themed .hero-actions .cta-link,
  body.site-themed .hero-actions .cta-link.--primary-cta,
  body.site-themed .cta-band .cta-link,
  body.site-themed .section-header .header-cta .cta-link {
    font-size: 0.8125rem !important;
    padding: 0.45rem 0.9rem !important;
  }

  body.site-themed .home-landing-hero h1,
  body.site-themed .home-banner .header-headings h1 {
    font-size: clamp(1.45rem, 5.8vw, 1.85rem) !important;
  }

  body.site-themed .home-landing-hero .hero-lead,
  body.site-themed .home-banner .hero-lead {
    font-size: 0.9rem !important;
  }
}
