/* Layout-curated overrides for index-layout-curated.html
   - Keep the original palette, typography, shadows, radii, and brand assets untouched.
   - Only rebalance layout: spacing, alignment, width distribution, grid structure, and section rhythm.
   - This file is scoped to .layout-curated so the main homepage remains unchanged.
*/

/* 1) Desktop navbar
   - Rebalance logo / navigation / actions into a steadier header grid.
   - Tighten desktop button spacing without changing button visuals.
*/
@media (min-width: 1280px) {
  .layout-curated .ds-navbar__main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) max-content;
    align-items: center;
    column-gap: clamp(2rem, 2.2vw, 3.2rem);
  }

  .layout-curated .ds-navbar__menu {
    width: 100%;
    max-width: 74rem;
    margin: 0 auto;
  }

  .layout-curated .ds-navbar__menu-list {
    justify-content: center;
    gap: clamp(1.4rem, 1.7vw, 2.4rem);
  }

  .layout-curated .ds-navbar__link span {
    white-space: nowrap;
  }

  .layout-curated .ds-navbar__menu-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.2rem;
    margin-left: auto;
  }

  .layout-curated .ds-navbar__menu-buttons > * {
    min-width: max-content;
  }
}

/* 2) Hero block
   - Reduce line length in the heading and subheading.
   - Smooth the rhythm between copy, stats, CTAs, and logo rail.
*/
.layout-curated .ds-homepage-hero {
  padding-bottom: clamp(4rem, 6vw, 6.8rem);
}

.layout-curated .ds-homepage-hero .wrapper {
  display: grid;
  gap: clamp(2.8rem, 3vw, 4.8rem);
}

.layout-curated .ds-homepage-hero__main {
  max-width: 110rem;
  margin-inline: auto;
}

.layout-curated .ds-homepage-hero__heading {
  max-width: 22ch;
  margin-inline: auto;
  text-wrap: balance;
}

.layout-curated .ds-homepage-hero__subheading {
  max-width: 80rem;
  margin-inline: auto;
  text-wrap: balance;
}

.layout-curated .ds-homepage-hero__stats {
  margin-top: 3rem;
}

.layout-curated .ds-homepage-hero__stats-list {
  justify-content: center;
  gap: 1.6rem 2rem;
}

.layout-curated .ds-homepage-hero__actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem 1.6rem;
  margin-top: 2.8rem;
}

.layout-curated .ds-homepage-hero__logos {
  margin-top: 2rem;
}

.layout-curated .ds-logos-marquee__mask {
  padding-inline: clamp(1.2rem, 2vw, 2.8rem);
}

/* 3) Section cadence
   - Alternate existing light surfaces to reduce the long white-page feel.
   - Normalize vertical spacing for the decision-stage sections.
*/
.layout-curated .ds-section-trust {
  padding: 3.4rem 0 3.2rem !important;
}

.layout-curated .ds-section-trust .wrapper {
  max-width: 86rem;
}

.layout-curated .ds-section-trust__logos {
  gap: 1.6rem 3.2rem;
}

.layout-curated .ds-features-section,
.layout-curated .ds-stack-nav,
.layout-curated .ds-homepage__why-choose {
  background: var(--color-dark-blue-100);
}

/* Keep the testimonial module on its original dark stage so the white copy
   remains readable and the page gains a stronger section break. */
.layout-curated .ds-testimonial-slider {
  background: radial-gradient(209.95% 398.41% at 50% 50.02%, #3aaf95 9.28%, #08091C 23.56%);
}

.layout-curated .ds-comparison-section,
.layout-curated .ds-features-section,
.layout-curated .ds-table-section {
  padding: clamp(5rem, 6vw, 7rem) 0 !important;
}

.layout-curated .ds-testimonial-slider,
.layout-curated .ds-stack-nav,
.layout-curated .ds-product-cards,
.layout-curated .ds-homepage__why-choose,
.layout-curated .ds-homepage__blog-feed,
.layout-curated .ds-reference {
  padding-block: clamp(5rem, 6vw, 7rem);
}

.layout-curated .ds-cta-section {
  padding: clamp(5.4rem, 6vw, 7rem) 0 !important;
}

.layout-curated .ds-testimonial-slider .wrapper,
.layout-curated .ds-comparison-section .wrapper,
.layout-curated .ds-features-section .wrapper,
.layout-curated .ds-table-section .wrapper,
.layout-curated .ds-stack-nav .wrapper,
.layout-curated .ds-product-cards .wrapper,
.layout-curated .ds-blogpost-listing,
.layout-curated .ds-reference .wrapper {
  max-width: 112rem;
}

/* 4) Decision-stage sections
   - Widen comparison and capability areas for easier scanning.
   - Keep cards aligned to a consistent content measure.
*/
.layout-curated .ds-comparison-section__heading,
.layout-curated .ds-features-section__heading,
.layout-curated .ds-table-section__heading {
  max-width: 18ch;
  margin-inline: auto;
}

.layout-curated .ds-comparison-section__grid {
  max-width: 102rem;
  gap: 2.4rem;
  align-items: stretch;
}

.layout-curated .ds-comparison-section__column {
  display: grid;
  align-content: start;
  gap: 1.6rem;
  padding: clamp(2.4rem, 2.5vw, 3.2rem);
}

.layout-curated .ds-features-section__list {
  max-width: 102rem;
  gap: 2.4rem;
}

.layout-curated .ds-features-section__item {
  height: 100%;
}

.layout-curated .ds-table-section__table-wrapper {
  max-width: 104rem;
}

.layout-curated .ds-table-section__table {
  table-layout: fixed;
}

.layout-curated .ds-table-section__th:first-child,
.layout-curated .ds-table-section__td:first-child {
  width: 24%;
}

.layout-curated .ds-table-section__th:nth-child(2),
.layout-curated .ds-table-section__td:nth-child(2) {
  width: 38%;
}

.layout-curated .ds-table-section__th:nth-child(3),
.layout-curated .ds-table-section__td:nth-child(3) {
  width: 38%;
}

.layout-curated .ds-table-section__th,
.layout-curated .ds-table-section__td {
  line-height: 1.55;
}

/* 5) Platform navigation and module cards
   - Keep the ecosystem strip compact.
   - Turn the six product cards into two cleaner grouped columns on desktop.
*/
.layout-curated .ds-stack-nav .wrapper {
  display: grid;
  gap: 2.4rem;
}

.layout-curated .ds-stack-nav__list {
  justify-content: center;
  gap: 1.2rem 1.6rem;
}

.layout-curated .ds-product-cards .wrapper {
  display: grid;
  gap: 4rem;
}

.layout-curated .ds-product-cards__header {
  max-width: 72rem;
  margin: 0 auto;
}

.layout-curated .ds-product-cards__subheading {
  max-width: 62rem;
  margin: 1.6rem auto 0;
}

.layout-curated .ds-product-cards__groups {
  display: grid;
  gap: 2.8rem;
}

.layout-curated .ds-product-cards__group {
  display: grid;
  align-content: start;
  gap: 1.8rem;
}

.layout-curated .ds-product-cards__group-title {
  margin: 0;
}

/* 6) Why choose / CTA / editorial resources
   - Keep supporting content centered and give the long page clearer beats.
*/
.layout-curated .ds-homepage__why-choose,
.layout-curated .ds-homepage__blog-feed {
  display: grid;
  gap: 2.4rem;
}

.layout-curated .ds-homepage__why-choose .icons-with-content-grid {
  background: transparent;
  padding-bottom: 0;
}

.layout-curated .icons-with-content-grid .wrapper {
  row-gap: 3rem;
}

.layout-curated .icons-with-content-grid__grid {
  gap: 3.2rem 4rem;
}

.layout-curated .ds-homepage__why-choose > .ds-button,
.layout-curated .ds-homepage__blog-feed > .ds-button {
  margin: 0 auto;
}

.layout-curated .ds-blogpost-listing {
  width: 100%;
}

.layout-curated .ds-blog-feed__posts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.layout-curated .ds-blog-tile {
  height: 100%;
}

/* 7) Reference/support section
   - Build a clearer two-stage end section on desktop.
   - Keep the community panel and rollout cards aligned in one row.
*/
.layout-curated .ds-reference__support {
  display: grid;
  gap: 2rem;
}

.layout-curated .ds-reference__tiles {
  display: grid;
  gap: 1.8rem;
}

.layout-curated .ds-reference__panel,
.layout-curated .ds-reference__tile {
  height: 100%;
}

@media (min-width: 1100px) {
  .layout-curated .ds-product-cards__groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .layout-curated .ds-product-cards__group .ds-product-cards__list {
    grid-template-columns: 1fr !important;
    max-width: none;
  }

  .layout-curated .ds-reference .wrapper {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) auto minmax(0, 1.08fr);
    align-items: stretch;
    column-gap: clamp(2.4rem, 3vw, 4rem);
  }

  .layout-curated .ds-reference__divider {
    align-self: stretch;
    width: 1px;
    height: auto;
    margin: 0;
  }

  .layout-curated .ds-reference__tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 8) Tablet and mobile fallbacks
   - Preserve the curated rhythm while preventing cramped layouts.
*/
@media (max-width: 1023px) {
  .layout-curated .ds-table-section__table {
    table-layout: auto;
  }

  .layout-curated .ds-table-section__th,
  .layout-curated .ds-table-section__td {
    width: auto;
  }

  .layout-curated .ds-blog-feed__posts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .layout-curated .ds-comparison-section__grid,
  .layout-curated .ds-features-section__list {
    grid-template-columns: 1fr;
    max-width: 64rem;
  }
}

@media (max-width: 767px) {
  .layout-curated .ds-homepage-hero__actions {
    flex-direction: column;
  }

  .layout-curated .ds-homepage-hero__actions .ds-button {
    width: min(100%, 28rem);
  }

  .layout-curated .ds-homepage-hero__stats-list {
    gap: 1.2rem;
  }

  .layout-curated .ds-section-trust__logos {
    gap: 1.2rem 2rem;
  }
}
