/*
 * AMP shared subpage design system
 *
 * This file is intentionally loaded after the legacy page styles. It provides
 * one small contract for typography and vertical rhythm while the older files
 * continue to own component-specific layout, colour and interaction details.
 */

:root {
  /* Type families */
  --ds-font-body: var(--sans);
  --ds-font-accent: var(--font-accent);

  /* Type roles */
  --ds-type-body: 16px;
  --ds-type-support: 14px;
  --ds-type-action: 15px;
  --ds-type-eyebrow: 14px;
  --ds-type-hero-home: clamp(64px, 5.65vw, 84px);
  --ds-type-hero-service: clamp(48px, 5.85vw, 82px);
  --ds-type-hero-article: clamp(52px, 5.15vw, 74px);
  --ds-type-hero-contact: clamp(56px, 6vw, 86px);
  --ds-type-hero-knowledge: clamp(60px, 6vw, 92px);
  --ds-type-section: clamp(40px, 4.2vw, 58px);
  --ds-type-section-editorial: clamp(38px, 3.9vw, 50px);
  --ds-type-component-heading: clamp(28px, 2.5vw, 34px);
  --ds-type-article-heading: clamp(30px, 3vw, 36px);

  /* Vertical rhythm roles */
  --ds-space-hero-service: clamp(52px, 6vw, 77px);
  --ds-space-section: clamp(72px, 9vw, 128px);
  --ds-space-section-compact: clamp(64px, 6vw, 77px);
}

/* Homepage hero is the strongest typographic moment in the system. */
body.page-home .hero .hero-display {
  font-size: var(--ds-type-hero-home);
}

/* Template foundations */
.page-service,
.page-article,
.page-contact,
.page-knowledge,
.page-library {
  font-family: var(--ds-font-body);
  font-size: var(--ds-type-body);
  line-height: 1.5;
}

/* Eyebrows are supporting content, not decorative microcopy. */
.page-service .eyebrow,
.page-service .hero-kicker,
.page-service .human-app-kicker,
.page-article .eyebrow,
.page-article .hero-kicker,
.page-contact .eyebrow,
.page-contact .hero-kicker,
.page-knowledge .eyebrow,
.page-knowledge .hero-kicker,
.page-library .eyebrow {
  font-size: var(--ds-type-eyebrow);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: .12em;
}

/* Accent italics always use the editorial face. */
.page-service h1 em,
.page-service h2 em,
.page-article h1 em,
.page-article h2 em,
.page-contact h1 em,
.page-contact h2 em,
.page-knowledge h1 em,
.page-knowledge h2 em,
.page-library h1 em,
.page-library h2 em {
  font-family: var(--ds-font-accent);
  font-weight: 400;
}

/* Service template */
.page-service .subpage-hero {
  padding-top: var(--ds-space-hero-service);
  padding-bottom: var(--ds-space-hero-service);
}

.page-service .subpage-hero h1 {
  font-family: var(--ds-font-body);
  font-size: var(--ds-type-hero-service);
  font-weight: 600;
  line-height: .99;
  letter-spacing: -.055em;
}

.page-service .section-shell > h2,
.page-service .byq-section-head h2,
.page-service .byq-fit-copy h2,
.page-service .byq-process .section-shell > h2,
.page-service .cooperation-section-head h2,
.page-service .cooperation-start-intro h2,
.page-service .cooperation-team-copy h2,
.page-service .human-app-heading h2,
.page-service .outcomes-editorial-copy h2 {
  font-family: var(--ds-font-body);
  font-size: var(--ds-type-section);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.045em;
}

.page-service .proof-editorial h2,
.page-service .roles-switch-copy h2,
.page-service .faq-heading h2 {
  font-size: var(--ds-type-section-editorial);
  line-height: .99;
  letter-spacing: -.045em;
}

.page-service .service-problem-heading h2,
.page-service .cooperation-cycle .cooperation-section-head h2 {
  font-size: var(--ds-type-component-heading);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.035em;
}

/* The accepted FAQ component has one outer rhythm on every service page. */
body.page-service .faq-section.faq-compact {
  padding-top: var(--ds-space-section-compact);
  padding-bottom: var(--ds-space-section-compact);
}

/* Article template */
.page-article .subpage-hero h1 {
  font-size: var(--ds-type-hero-article);
}

.page-article .article-body h2 {
  font-size: var(--ds-type-article-heading);
  line-height: 1.14;
  letter-spacing: -.025em;
}

/* Contact template */
.page-contact .contact-hero h1 {
  font-size: var(--ds-type-hero-contact);
}

.page-contact main h2 {
  font-size: var(--ds-type-section);
  line-height: 1.04;
  letter-spacing: -.045em;
}

/* Knowledge template */
.page-knowledge .knowledge-intro h1 {
  font-size: var(--ds-type-hero-knowledge);
}

.page-knowledge .knowledge-feature h2,
.page-knowledge .knowledge-cluster h2,
.page-knowledge .knowledge-section-heading h2 {
  font-size: var(--ds-type-section);
  line-height: 1.04;
  letter-spacing: -.045em;
}

/* Primary interaction text remains comfortably readable. */
.page-service .button,
.page-article .button,
.page-contact .button,
.page-knowledge .button,
.page-library .button {
  font-size: var(--ds-type-action);
}

@media (max-width: 620px) {
  :root {
    --ds-type-hero-home: clamp(50px, 14vw, 60px);
    --ds-type-hero-service: 44px;
    --ds-type-hero-article: 44px;
    --ds-type-hero-contact: clamp(50px, 13.5vw, 62px);
    --ds-type-hero-knowledge: clamp(52px, 14.5vw, 64px);
    --ds-type-section: 34px;
    --ds-type-section-editorial: 34px;
    --ds-type-component-heading: 28px;
    --ds-type-article-heading: 30px;
    --ds-space-hero-service: 52px;
    --ds-space-section-compact: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-service *,
  .page-article *,
  .page-contact *,
  .page-knowledge *,
  .page-library * {
    scroll-behavior: auto;
  }
}
