/* Shared page gutters: keep content edges continuous through breakpoints. */
:root {
  --site-gutter: clamp(24px, calc(12.5vw - 60px), 120px);
  --site-content-width: 1200px;
}

.pricing-page {
  --pricing-gutter: var(--site-gutter);
}

/* Partner copy must be able to grow as titles wrap or fonts finish loading. */
.partner-carousel__viewport {
  container: partner-card / inline-size;
}

.partner-case__content {
  display: grid;
  height: auto;
  min-height: 528px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  padding-inline: clamp(20px, 3vw, 48px);
  gap: clamp(24px, 2.5vw, 36px);
}

.partner-case__copy {
  display: grid;
  width: 100%;
  align-self: center;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--partner-badge-height, auto) var(--partner-title-height, auto) var(--partner-description-height, auto) var(--partner-stats-height, auto);
  align-items: start;
  justify-items: start;
  gap: 24px;
}

.partner-case__copy > h3,
.partner-case__description {
  width: 100%;
}

.partner-case__description {
  height: auto;
  min-height: 0;
  flex: 0 0 auto;
}

.partner-case__media {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
  align-self: stretch;
}

@container partner-card (max-width: 720px) {
  .partner-case__content {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .partner-case__media {
    aspect-ratio: 440 / 433;
    align-self: start;
  }

  .partner-case__copy {
    align-self: start;
  }
}

/* Navigation has a denser gutter, but it must also remain continuous. */
.site-header {
  padding-inline: clamp(24px, 4vw, 64px);
}

.hero__content,
.journey-intro,
.journey-stack {
  width: min(var(--site-content-width), calc(100% - 2 * var(--site-gutter)));
}

.products-section {
  --product-gutter: var(--site-gutter);
}

/* Keep expanding text in normal flow above the mock illustration. */
.product-grid {
  align-items: stretch;
}

.product-card,
.product-card.is-active {
  height: max(640px, calc(var(--product-title-height, 72px) + var(--product-description-height, 92px) + 514px));
  min-height: 640px;
  transition: flex-grow 520ms cubic-bezier(0.16, 1, 0.3, 1), border-color 260ms ease, box-shadow 260ms ease;
}

.product-card .product-card__details {
  flex: 0 0 auto;
}

.product-card__visual {
  margin-top: auto;
}

.product-card.is-active .product-card__visual {
  margin-bottom: 0;
  animation: product-content-reveal 360ms ease-out 180ms both;
}

.product-card.is-active .product-card__details,
.product-card:not(.is-active) .product-card__details {
  padding: 24px 24px 16px;
}

.product-card.is-active .product-card__details > p,
.product-card:not(.is-active) .product-card__details > p {
  margin-top: 16px;
  font-size: 14px;
  line-height: 23px;
}

/* Expanded cards share an action baseline; compact cards keep their text link. */
.product-card.is-active .product-card__more {
  position: static;
  margin: 0;
  padding: 0;
}

.product-card.is-active .product-card__details {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--product-title-height, 72px) 16px var(--product-description-height, 92px) 32px 88px 32px 20px;
  gap: 0;
  align-items: start;
  justify-items: start;
}

.product-card.is-active .product-card__head {
  grid-row: 1;
  align-items: flex-start;
  height: var(--product-title-height, 72px);
  overflow: hidden;
}

.product-card.is-active .product-card__status {
  display: none;
}

.product-card.is-active .product-card__details > p {
  grid-row: 3;
  margin: 0;
  max-height: var(--product-description-height, 92px);
  overflow: hidden;
}

.product-card.is-active .product-card__list {
  grid-row: 5;
  margin: 0;
  gap: 8px;
}

.product-card.is-active .product-card__more {
  grid-row: 7;
}

.product-card.is-active .product-card__list,
.product-card.is-active .product-card__more {
  animation: product-content-reveal 300ms ease-out 120ms both;
}

.product-card__list li:nth-child(n) .product-card__list-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: #fff;
  background: #2f6ee9;
}

.product-card__list-icon svg {
  width: 15px;
  height: 15px;
}

@keyframes product-content-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .product-card,
  .product-card.is-active { transition: none; }
  .product-card.is-active .product-card__list,
  .product-card.is-active .product-card__more,
  .product-card.is-active .product-card__visual { animation: none; }
}

.product-card:not(.is-active) .product-card__emblem {
  bottom: -34px;
}

/* A fixed copy basis plus a full-size demo exceeded the shared content width. */
.voice-section__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
}

.voice-section__inner > .voice-copy,
.voice-section__inner > .voice-demo {
  width: 100%;
  min-width: 0;
}

.voice-section__inner > .voice-demo {
  max-width: 593px;
  justify-self: end;
}

.voice-demo__script,
.voice-demo__wave-bars {
  width: 100%;
  min-width: 0;
}

.voice-demo__wave-bars > * {
  min-width: 0;
  flex-shrink: 1;
}

@media (max-width: 1000px) {
  .voice-section__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 64px;
  }

  .voice-section__inner > .voice-copy,
  .voice-section__inner > .voice-demo {
    justify-self: center;
  }
}

.sms-section,
.whatsapp-section,
.voice-section,
.number-section,
.partner-section,
.developer-section,
.contact-main,
.sms-features,
.sms-use-cases,
.sms-advantages,
.sms-developer-experience,
.sms-pricing-campaign,
.sms-messaging-matrix,
.sms-features.sms-values,
.sms-service-story {
  padding-inline: var(--site-gutter);
}

/* The developer section already owns its gutter; do not apply it twice. */
.developer-section__inner {
  width: min(var(--site-content-width), 100%);
}

.site-footer__content {
  max-width: calc(var(--site-content-width) + 2 * var(--site-gutter));
  padding-inline: var(--site-gutter);
}

.sms-hero__columns {
  width: min(calc(var(--site-content-width) + 2 * var(--site-gutter)), 100%);
  padding-inline: var(--site-gutter);
}

.network-copy {
  left: var(--site-gutter);
}

@media (max-width: 920px) {
  .network-section {
    padding-inline: var(--site-gutter);
  }
}

/* Global network: copy and globe share a bounded row; metrics own a clear baseline. */
.network-section {
  min-height: 0;
  padding: 64px var(--site-gutter) 80px;
}

.network-section__inner {
  display: grid;
  width: min(var(--site-content-width), 100%);
  height: auto;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  column-gap: 48px;
  row-gap: 32px;
}

.network-copy,
.network-globe,
.network-stats,
.network-stat {
  position: relative;
  inset: auto;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.network-copy {
  align-self: center;
}

.network-copy h2 {
  width: 100%;
  font-size: clamp(40px, 4vw, 56px);
  line-height: 1.12;
  text-wrap: balance;
}

.network-copy__body {
  width: 100%;
  max-width: 42ch;
  margin-top: 32px;
  line-height: 1.6;
}

.network-globe {
  height: auto;
  aspect-ratio: 1;
  align-self: center;
}

.network-stats {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid rgb(1 47 203 / 0.12);
  pointer-events: auto;
}

.network-stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-content: start;
  gap: 12px;
  text-align: center;
}

.network-stat dd {
  width: 100%;
  max-width: 28ch;
  margin-inline: auto;
}

@media (max-width: 920px) {
  .network-section {
    padding-block: 80px 64px;
  }

  .network-section__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .network-copy {
    width: min(680px, 100%);
  }

  .network-globe {
    width: min(560px, 100%);
    justify-self: center;
  }
}

@media (max-width: 600px) {
  .network-section {
    padding-block: 64px 56px;
  }

  .network-section__inner {
    gap: 32px;
  }

  .network-copy h2 {
    font-size: clamp(36px, 9vw, 44px);
  }

  .network-copy__body {
    margin-top: 24px;
  }

  .network-stats {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-top: 32px;
  }

  .network-stat {
    grid-template-columns: 120px minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: center;
    gap: 24px;
    text-align: left;
  }

  .network-stat dd {
    margin: 0;
  }
}

/* Give the shared product scenes enough room before switching to one column. */
@media (min-width: 1121px) and (max-width: 1320px) {
  .sms-hero__columns {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }
}

@media (max-width: 1120px) {
  .sms-page .sms-hero,
  .sms-page .sms-hero__body {
    min-height: auto;
  }

  .sms-page .sms-hero__body {
    padding: 132px var(--site-gutter) 80px;
  }

  .sms-page .sms-hero__columns {
    display: flex;
    width: min(var(--site-content-width), 100%);
    min-height: 0;
    padding-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 64px;
  }

  .sms-page .sms-hero__content {
    width: min(680px, 100%);
    max-width: 100%;
  }
}
