/*
 * Shared visual rhythm.
 * Normalizes heading hierarchy and removes the competing section-intro layouts
 * that accumulated during the static prototype phase.
 */

body main h1,
body main h2,
body main h3 {
  font-family: "Manrope", sans-serif;
  text-wrap: balance;
}

body main h1 {
  font-weight: 650;
  line-height: 0.96;
  letter-spacing: -0.065em;
}

body main h2:not(.rf-preserve-size) {
  font-size: 50px !important;
  font-weight: 650;
  line-height: 1.08 !important;
  letter-spacing: -0.048em !important;
}

body main h2 em,
body main h1 em {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: inherit;
  letter-spacing: -0.035em;
}

body main h3 {
  line-height: 1.12;
  letter-spacing: -0.035em;
}

/*
 * One action-arrow system across the full site.
 * The mask keeps the icon crisp at every size and inherits each button color.
 */
:where(
  .menu-primary,
  .hero-actions a,
  .cap-poster a[href],
  .home-contact-form > button,
  .pre-footer-cta a,
  .services-hero-actions a,
  .service-story-copy > a,
  .services-testimonial > a,
  .contact-v2-actions a,
  .button-primary,
  .arrow-link,
  .platform-row a,
  .mini-footer-bottom a,
  .rf-footer-button
) {
  gap: 10px;
}

:where(
  .menu-primary,
  .hero-actions a,
  .cap-poster a[href],
  .home-contact-form > button,
  .pre-footer-cta a,
  .services-hero-actions a,
  .service-story-copy > a,
  .services-testimonial > a,
  .contact-v2-actions a,
  .button-primary,
  .arrow-link,
  .platform-row a,
  .mini-footer-bottom a,
  .rf-footer-button
)::after {
  content: "" !important;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  display: block;
  background: currentColor;
  -webkit-mask: url("../images/action-arrow.svg") center / contain no-repeat;
  mask: url("../images/action-arrow.svg") center / contain no-repeat;
  transition: transform 180ms ease;
}

:where(
  .menu-primary,
  .hero-actions a,
  .cap-poster a[href],
  .home-contact-form > button,
  .pre-footer-cta a,
  .services-hero-actions a,
  .service-story-copy > a,
  .services-testimonial > a,
  .contact-v2-actions a,
  .button-primary,
  .arrow-link,
  .platform-row a,
  .mini-footer-bottom a,
  .rf-footer-button
):hover::after {
  transform: translate(2px, -2px);
}

.section-heading,
.process-heading,
.work-intro,
.capability-showcase-heading,
.ip-heading {
  max-width: 930px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 18px !important;
  align-items: start !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  text-align: left !important;
}

.section-heading,
.process-heading,
.work-intro {
  margin-bottom: clamp(58px, 7vw, 88px) !important;
}

.capability-showcase-heading {
  margin-bottom: clamp(48px, 6vw, 74px) !important;
}

.ip-heading {
  margin-bottom: clamp(52px, 7vw, 84px) !important;
}

.section-heading > .section-label,
.work-intro > .section-label,
.capability-showcase-heading > p,
.ip-heading > .ip-label {
  margin: 0 !important;
}

.section-heading > div,
.capability-showcase-heading > div,
.ip-heading-copy {
  max-width: 880px !important;
}

.section-heading > div > p,
.capability-showcase-heading > div > p,
.ip-heading-copy > p {
  max-width: 700px !important;
  margin-top: 20px !important;
  font-size: 17px;
  line-height: 1.62;
}

.section-label,
.ip-label,
.services-eyebrow,
.service-story-index,
.services-testimonial > p {
  font-family: "DM Sans", sans-serif !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase;
}

.proof-copy {
  max-width: 650px;
}

.proof-copy h2 {
  max-width: 630px;
}

.proof-copy > p {
  max-width: 610px;
  font-size: 17px;
  line-height: 1.62;
}

/*
 * Shared description size.
 * UI labels, metadata and illustration microcopy intentionally stay compact.
 */
body main :where(
  .hero-copy > p,
  .services-hero-bottom > p,
  .service-spectrum-heading > span,
  .capability-showcase-heading > div > p,
  .cap-poster-copy > p,
  .cap-stack-item > p,
  .cap-launch-copy > p,
  .proof-copy > p,
  .process-list li > p,
  .home-contact-copy > p,
  .inner-hero-bottom > p,
  .ip-heading-copy > p,
  .split-copy > p:not(.ip-label),
  .article-body > p,
  .value-card > p,
  .case-content > p:first-of-type,
  .service-detail-card > p,
  .platform-row > p,
  .service-story-copy > p:not(.service-story-index),
  .service-brief > p,
  .balance-services-heading > span,
  .balance-services-grid article > p,
  .contact-v2-intro,
  .contact-v2-copy > p:not(:first-child),
  .contact-v2-next-grid article > p
) {
  font-size: 17px !important;
}

.site-footer .footer-column h2 {
  font-size: 12px !important;
  line-height: 1.2 !important;
  letter-spacing: 0.08em !important;
}

.site-footer .footer-contact > h2 {
  font-size: 30px !important;
  line-height: 1.16 !important;
}

.site-header .hero-color-wash {
  filter: blur(20px) !important;
  opacity: 0.42 !important;
}

/* Keep the selected-work intro on the same grid as its project cards. */
.work-section .work-intro {
  width: min(1280px, calc(100% - 72px)) !important;
  max-width: none !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

/* Shared inner-page hero: centered content with one animated wave. */
.inner-page .inner-hero {
  min-height: 760px !important;
  display: flex !important;
  align-items: center !important;
  padding: 160px 0 90px !important;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(248, 252, 255, 0.86), rgba(253, 249, 255, 0.94)),
    #fbfbfe !important;
  color: #17171b !important;
  isolation: isolate;
}

.inner-page .inner-hero::before,
.inner-page .inner-hero::after {
  display: none !important;
}

.inner-hero-wave {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.inner-page .inner-hero-shell {
  width: min(1040px, calc(100% - 72px)) !important;
  display: flex;
  position: relative;
  z-index: 1;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  text-align: center;
}

.inner-page .inner-kicker {
  width: max-content;
  justify-content: center;
  margin: 0 auto 28px !important;
  padding: 10px 15px;
  border: 1px solid rgba(37, 40, 53, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 34px rgba(60, 54, 94, 0.08);
  color: #40424c !important;
  backdrop-filter: blur(12px);
}

.inner-page .inner-kicker::before {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #7657e8;
}

.inner-page .inner-hero h1,
.services-page-main .services-hero h1,
.contact-v2-main .contact-v2-hero h1 {
  max-width: 920px !important;
  margin: 0 auto 28px !important;
  color: #17171b !important;
  font-size: clamp(52px, 4.75vw, 74px) !important;
  font-weight: 650 !important;
  line-height: 1.02 !important;
  letter-spacing: -0.055em !important;
  text-align: center;
}

.inner-page .inner-hero h1 em,
.services-page-main .services-hero h1 em,
.contact-v2-main .contact-v2-hero h1 em {
  color: #7657e8 !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-style: italic;
  font-weight: 400 !important;
}

.services-page-main .services-hero-inner,
.contact-v2-main .contact-v2-hero-inner {
  text-align: center;
}

.services-page-main .services-eyebrow,
.contact-v2-main .contact-v2-eyebrow,
.contact-v2-main .contact-v2-intro {
  margin-right: auto;
  margin-left: auto;
}

.services-page-main .services-hero-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}

.services-page-main .services-hero-actions,
.contact-v2-main .contact-v2-actions {
  justify-content: center;
}

.inner-page .inner-hero-bottom {
  width: 100%;
  display: flex !important;
  flex-direction: column;
  align-items: center !important;
  justify-content: center;
  gap: 24px !important;
}

.inner-page .inner-hero-bottom > p {
  max-width: 720px !important;
  margin: 0 auto !important;
  color: rgba(23, 23, 27, 0.7) !important;
  line-height: 1.65;
  text-align: center;
}

.inner-page .inner-hero .hero-code-card {
  width: min(360px, 100%);
  padding: 16px 20px;
  border-color: rgba(118, 87, 232, 0.13) !important;
  background: rgba(255, 255, 255, 0.82) !important;
  box-shadow: 0 18px 55px rgba(51, 45, 88, 0.1) !important;
  text-align: left;
}

.inner-page .inner-hero .hero-code-card span {
  color: rgba(23, 23, 27, 0.5) !important;
}

.inner-page .inner-hero .hero-code-card code {
  color: #4b4d58 !important;
}

.inner-page .inner-hero .hero-code-card b {
  color: #7657e8 !important;
}

@media (max-width: 760px) {
  body main h2:not(.rf-preserve-size) {
    font-size: 42px !important;
  }

  .section-heading,
  .process-heading,
  .work-intro,
  .capability-showcase-heading,
  .ip-heading {
    gap: 14px !important;
  }

  .inner-page .inner-hero {
    min-height: 700px !important;
    padding: 132px 0 72px !important;
  }

  .inner-page .inner-hero-shell {
    width: calc(100% - 32px) !important;
  }

  .inner-page .inner-hero h1,
  .services-page-main .services-hero h1,
  .contact-v2-main .contact-v2-hero h1 {
    font-size: clamp(54px, 15vw, 76px) !important;
  }
}

@media (max-width: 430px) {
  body main h2:not(.rf-preserve-size) {
    font-size: 38px !important;
  }
}
