/*
 * MANOVA — GLOBAL TYPOGRAPHY + ALIGNMENT CONTRACT
 *
 * Loaded last on every route. This file owns only type hierarchy, shared
 * content edges and section-header rhythm; individual page styles continue
 * to own colour, imagery, component layout, motion and interaction.
 */

:root{
  --type-grid-max:1280px;
  --type-gutter:clamp(1.25rem,4vw,3.5rem);
  --type-label:clamp(.67rem,.7vw,.73rem);
  --type-hero:clamp(3.1rem,6.25vw,6.75rem);
  --type-section:clamp(2.2rem,4.15vw,4.35rem);
  --type-subsection:clamp(1.45rem,2.25vw,2.25rem);
  --type-lead:clamp(1rem,1.2vw,1.14rem);
  --type-body:1rem;
  --type-copy:62ch;
  --type-head-measure:18ch;
  --type-section-gap:clamp(2.5rem,4.5vw,4.5rem);
}

/* One family and one base reading rhythm everywhere. */
html{font-family:var(--font-body)}
body{
  font-family:var(--font-body);
  font-size:var(--type-body);
  font-weight:400;
  line-height:1.68;
  letter-spacing:-.008em;
}
body :where(button,input,textarea,select){font-family:inherit}
body :where(h1,h2,h3,h4,h5,h6){
  font-family:var(--font-display);
  text-rendering:optimizeLegibility;
}
body :where(p,li,dd,figcaption){line-height:1.68}

/* Shared content grid. Sections that already provide horizontal padding use
   the full 1280px container; zero-padding editorial/resource shells receive
   the same responsive gutter here. */
.container{
  width:100%;
  max-width:var(--type-grid-max);
  margin-inline:auto;
}
:is(.editorial-page,.resources-hub,.resource-archive,.resource-single,.faq-page,.service-capability-page) .container{
  width:min(calc(100% - var(--type-gutter) - var(--type-gutter)),var(--type-grid-max));
  max-width:none;
}
.svc-exp{--sx-container:min(calc(100% - var(--type-gutter) - var(--type-gutter)),var(--type-grid-max))}
.svcx{--svc-section-width:var(--type-grid-max)}

/* Labels / eyebrows: one weight, tracking, line and left-edge relationship. */
body :is(
  .section-label,
  .ed-eyebrow,
  .ed-kicker,
  .ed-section-head>span,
  .resource-eyebrow,
  .resource-section-head>div>span,
  .sx-eyebrow,
  .svcx-eyebrow,
  .faq-eyebrow,
  .faq-hero__eyebrow,
  .case-eyebrow,
  .page-hero__eyebrow
){
  display:inline-flex!important;
  align-items:center;
  justify-content:flex-start!important;
  gap:.7rem;
  margin:0 0 .95rem!important;
  font-family:var(--font-body)!important;
  font-size:var(--type-label)!important;
  font-weight:700!important;
  line-height:1.2!important;
  letter-spacing:.15em!important;
  text-align:left!important;
  text-transform:uppercase!important;
}
body :is(
  .section-label,
  .ed-eyebrow,
  .ed-kicker,
  .ed-section-head>span,
  .resource-section-head>div>span,
  .sx-eyebrow,
  .svcx-eyebrow,
  .faq-eyebrow,
  .faq-hero__eyebrow
)::before{
  content:"";
  flex:0 0 26px;
  width:26px;
  height:1px;
  background:currentColor;
  opacity:.62;
}

/* Hero hierarchy. The compact single-service glass-panel heading is excluded
   deliberately because it is a UI panel title, not a full-canvas display H1. */
body :is(
  .hero h1,
  .ed-hero__title,
  .page-hero-title,
  .faq-hero__title,
  .resources-hub-hero h1,
  .resource-single-hero h1,
  .case-hero h1,
  .sx-hero__title,
  .resource-archive>.resource-section:first-child h1
){
  max-width:14ch!important;
  margin-top:clamp(1.25rem,3vh,2.5rem)!important;
  margin-bottom:clamp(1.35rem,3.5vh,2.75rem)!important;
  font-family:var(--font-display)!important;
  font-size:var(--type-hero)!important;
  font-weight:650!important;
  line-height:.92!important;
  letter-spacing:-.058em!important;
  text-align:left!important;
  text-wrap:balance;
}
.svcx .service-hero-title{
  max-width:30ch!important;
  font-weight:750!important;
  line-height:1.06!important;
  letter-spacing:-.035em!important;
  text-align:left!important;
  text-wrap:balance;
}

/* Major section heading hierarchy. Card headings remain under their component
   styles; only explicit section-level headings participate. */
body :is(
  .section-title,
  .ed-section-head h2,
  .ed-story__copy h2,
  .ed-history__sticky h2,
  .process-intro h2,
  .process-step__copy h2,
  .process-showcase__copy h2,
  .process-delivery h2,
  .culture-bts__copy h2,
  .proof-trust__copy h2,
  .resource-section-head h2,
  .hub-feature__copy h2,
  .hub-handbooks__intro h2,
  .hub-answers__head h2,
  .hub-more__head h2,
  .resource-newsletter h2,
  .case-story-body h2,
  .resource-closing h2,
  .faq-docs__head h2,
  .svcx-intro__copy>.svcx-h2,
  .svcx-section:not(.svcx-cta) .svcx-head .svcx-h2,
  .sx-h2,
  .case-results>.container>h2
){
  max-width:var(--type-head-measure)!important;
  margin:0!important;
  font-family:var(--font-display)!important;
  font-size:var(--type-section)!important;
  font-weight:750!important;
  line-height:1.04!important;
  letter-spacing:-.045em!important;
  text-align:left!important;
  text-wrap:balance;
}

/* Supporting descriptions share a readable measure and sit directly below
   the heading edge instead of floating in a separate column. */
body :is(
  .section-sub,
  .ed-section-head>p,
  .resource-section-head p,
  .hub-answers__head>p,
  .svcx-head__sub,
  .sx-lead,
  .faq-docs__head>p,
  .page-hero-sub,
  .page-hero__intro,
  .faq-hero__intro,
  .ed-hero__foot p,
  .resources-hub-hero__grid p,
  .resource-single-hero__content>p
){
  max-width:var(--type-copy)!important;
  margin:1rem 0 0!important;
  font-family:var(--font-body)!important;
  font-size:var(--type-lead)!important;
  font-weight:400!important;
  line-height:1.68!important;
  letter-spacing:-.012em!important;
  text-align:left!important;
}

/* Section-header wrappers use one clean left edge. Links/actions may remain
   on the far side where the component intentionally provides them. */
body :is(.services-header,.sx-cards__head){
  display:block;
  max-width:56rem;
  margin-bottom:var(--type-section-gap);
  text-align:left;
}
.services-header>.section-sub,
.sx-cards__head>.sx-lead{margin-top:1rem}

.ed-section-head{
  display:block;
  grid-template-columns:none;
  max-width:62rem;
  gap:0;
  padding-top:1.1rem;
  padding-bottom:var(--type-section-gap);
  text-align:left;
}
.ed-section-head>p{grid-column:auto}

body :is(.resource-section-head,.faq-docs__head,.svcx-head){
  margin-left:0;
  margin-right:0;
  text-align:left;
}
.faq-docs__head{
  display:block;
  grid-template-columns:none;
  max-width:62rem;
  gap:0;
}
.svcx-head{max-width:62rem}

/* Legacy centered homepage sections no longer center ordinary editorial
   headers through inheritance. */
body :is(.tech,.stories,.contact) :is(.section-label,.section-title,.section-sub){
  justify-content:flex-start;
  margin-left:0;
  margin-right:0;
  text-align:left;
}

/* Deliberate centered compositions retained from the original art direction. */
.hero .hero-content,
.hero .hero-content h1,
.hero .hero-sub,
.hero .hero-btns,
.hero .hero-trust{
  margin-left:auto!important;
  margin-right:auto!important;
  text-align:center!important;
  justify-content:center!important;
}
.hero .hero-content h1{max-width:14ch!important}
.tech>.container>.section-label,
.tech>.container>.section-title,
.tech>.container>.section-sub,
.stories>.container>.section-label,
.stories>.container>.section-title,
.case-studies-page .resource-section-head>div,
.case-studies-page .resource-section-head h2,
.case-studies-page .resource-closing :is(.resource-eyebrow,h2,p){
  margin-left:auto!important;
  margin-right:auto!important;
  text-align:center!important;
  justify-content:center!important;
}
.case-studies-page .resource-section-head{display:block;text-align:center}

/* The homepage's original centered compositions are intentional. Keep this
   scoped to the front page so the site-wide editorial alignment contract can
   continue to left-align headings everywhere else. */
body.home .hero .hero-content,
body.home .hero .hero-content h1,
body.home .hero .hero-sub,
body.home .hero .hero-btns,
body.home .hero .hero-trust,
body.home #tech>.container>.section-label,
body.home #tech>.container>.section-title,
body.home #tech>.container>.section-sub,
body.home #testimonials>.container>.section-label,
body.home #testimonials>.container>.section-title,
body.home #contact .contact-cta,
body.home #contact .contact-cta :is(.section-label,.section-title,.section-sub){
  margin-left:auto!important;
  margin-right:auto!important;
  text-align:center!important;
  justify-content:center!important;
}

/* Blog and Case Studies need their supporting copy fully visible before the
   scroll cue. The cue sits below the standfirst instead of sharing its row. */
.resource-archive :is(.ed-hero--blog,.ed-hero--work) .ed-hero__foot{
  display:block;
  max-width:62ch;
}
.resource-archive :is(.ed-hero--blog,.ed-hero--work) .ed-hero__foot p{
  display:block;
  margin-top:0!important;
}
.ed-hero__support{min-width:0}
.ed-hero__support>p{margin:0}
.ed-hero__support>ul{display:flex;flex-wrap:wrap;gap:.55rem 1.15rem;margin:1rem 0 0;padding:0;list-style:none}
.ed-hero__support>ul li{display:flex;align-items:center;gap:.5rem;color:rgba(255,255,255,.66);font-size:.68rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase}
.ed-hero__support>ul li:before{content:"";width:5px;height:5px;border-radius:50%;background:var(--ed-accent-ink,#67e8ed)}
.resource-archive :is(.ed-hero--blog,.ed-hero--work) .ed-scroll{
  display:flex;
  width:max-content;
  margin-top:clamp(1.5rem,3vh,2.5rem);
}
.resource-archive :is(.ed-hero--blog,.ed-hero--work) :is(.ed-hero__content,.ed-eyebrow,.ed-hero__title,.ed-hero__foot p,.ed-hero__support>ul){
  margin-left:0!important;
  margin-right:0!important;
  text-align:left!important;
  justify-content:flex-start!important;
}
.resource-archive :is(.ed-hero--blog,.ed-hero--work) .ed-scroll{margin-left:0;margin-right:0}

/* Secondary editorial headings and body copy use a quieter, repeatable tier. */
body :is(
  .proj-title,
  .sx-build__title,
  .svcx-h4,
  .case-intro h2,
  .prose h3,
  .contact-form h3,
  .contact-form-heading
){
  font-family:var(--font-display)!important;
  font-size:var(--type-subsection)!important;
  font-weight:700!important;
  line-height:1.12!important;
  letter-spacing:-.03em!important;
}
.contact-form-heading{margin:0 0 1.5rem;text-align:left}
.contact-location-title{
  margin:0;
  font-family:var(--font-display)!important;
  font-size:clamp(1.1rem,1.4vw,1.25rem)!important;
  font-weight:700!important;
  line-height:1.2!important;
  letter-spacing:-.02em!important;
}
body :is(
  .proj-text,
  .sx-card__desc,
  .service-related-card-summary,
  .resource-tile p,
  .ed-pillar p,
  .team-discipline p
){
  font-family:var(--font-body)!important;
  font-size:.92rem!important;
  font-weight:400!important;
  line-height:1.68!important;
  letter-spacing:-.006em!important;
}

/* Explicitly designed closing actions remain centered. */
:is(
  .contact-cta,
  .ed-cta-wrap--centered .ed-cta__content,
  .svcx-cta__card,
  .sx-cta__inner
){text-align:center!important}
:is(
  .contact-cta,
  .ed-cta-wrap--centered .ed-cta__content,
  .svcx-cta__card,
  .sx-cta__inner
) :is(.section-label,.section-title,.section-sub,.ed-kicker,.svcx-eyebrow,.sx-eyebrow,h2,p){
  justify-content:center!important;
  margin-left:auto!important;
  margin-right:auto!important;
  text-align:center!important;
}

/* Light editorial surfaces retain their approved ink palette. */
.editorial-page .ed-section--paper :where(h1,h2,h3,strong){color:var(--ed-ink,#141414)}
.editorial-page .ed-section--paper :where(p,li){color:var(--ed-muted,#65635d)}

@media(max-width:900px){
  :root{
    --type-gutter:clamp(1rem,4vw,2rem);
    --type-hero:clamp(3rem,10vw,5.25rem);
    --type-section:clamp(2.15rem,7vw,3.75rem);
  }
  body :is(.resource-section-head){align-items:flex-start}
}

@media(max-width:720px){
  :root{
    --type-gutter:1rem;
    --type-hero:clamp(2.75rem,12vw,4.35rem);
    --type-section:clamp(2rem,9vw,3.25rem);
    --type-lead:clamp(.96rem,4vw,1.06rem);
  }
  body :is(
    .hero h1,
    .ed-hero__title,
    .page-hero-title,
    .faq-hero__title,
    .resources-hub-hero h1,
    .resource-single-hero h1,
    .case-hero h1,
    .sx-hero__title
  ){max-width:none!important;line-height:.95!important;letter-spacing:-.05em!important}

  body :is(
    .section-title,
    .ed-section-head h2,
    .ed-story__copy h2,
    .ed-history__sticky h2,
    .process-intro h2,
    .process-step__copy h2,
    .process-showcase__copy h2,
    .process-delivery h2,
    .culture-bts__copy h2,
    .proof-trust__copy h2,
    .resource-section-head h2,
    .hub-feature__copy h2,
    .hub-handbooks__intro h2,
    .hub-answers__head h2,
    .hub-more__head h2,
    .resource-newsletter h2,
    .case-story-body h2,
    .resource-closing h2,
    .faq-docs__head h2,
    .svcx-intro__copy>.svcx-h2,
    .svcx-section:not(.svcx-cta) .svcx-head .svcx-h2,
    .sx-h2
  ){max-width:none!important;line-height:1.06!important}

  .resource-section-head{align-items:flex-start;flex-direction:column;gap:1.25rem}
}
