/*
 * Site-wide body copy at 16px.
 *
 * Linked last on every page by components/head.php, after each page's own
 * stylesheet. Many pages set their own small text sizes (11-15px, several
 * inside media queries), so this file overrides them in one place instead of
 * editing every rule. `#main` gives these rules the specificity to win at
 * every breakpoint. The site header and footer sit outside #main and keep
 * their own sizes.
 *
 * Left alone on purpose: eyebrows and labels, breadcrumbs, buttons, stat
 * figures, short meta lines (reviewer company, team role, portfolio tile
 * captions and counts, bylines, source notes), the animated demo in the home
 * hero, the mock interface panels on the ecommerce page, and text that is
 * already larger than 16px (page intros, section intros). Testimonial text
 * has its own 14px rule further down.
 * The hero paragraphs on the API, SaaS, AI and CTO pages (.api-lead,
 * .ss-lead, .ai-lead, .ct-lead) are body copy and are set to 16px here too.
 */
body {
  font-size: 16px;
}

#main :is(p, li, dd, td, th[scope="row"], .project-planning__link):not(
    .review__text,
    [class*="eyebrow"], [class*="kicker"], .hero__lead,
    [class*="-label"], [class*="__note"], .mo-tag, .ws-label,
    .review__org, .person__role, .work__name, .work__cat, .workcount,
    .editorial-byline, .cms-source, .about-award p, .home-mockup-cta__contact p,
    .pagehero__inner > p, .section-head > p, .notfound__code,
    .breadcrumb li, .ec-ui *, .hero__art *) {
  font-size: 16px;
  line-height: 1.6;
}

/* A text link inside a paragraph matches the paragraph instead of its smaller button size. */
#main p > .link-arrow {
  font-size: inherit;
}

/* Names and group titles that sat just under 16px move up to match the text. */
#main :is(h3.person__name, h3.clientgroup__title, .review__name) {
  font-size: 16px;
}

/*
 * Card, step and FAQ question headings that were set smaller than 16px would
 * now sit below their own body text, so they move up to 18px to keep the
 * hierarchy. Headings already 16px or larger are not in this list.
 */
#main :is(.wa-process, .wa-tech-grid, .wa-security, .ws-language-cards, .ws-team-features,
          .ws-process, .ec-order-flow, .ec-model-grid, .mo-launch-grid, .mo-usecase-grid,
          .mo-quality, .mo-tech, .mo-benefits, .api-process, .ss-features, .ss-principles,
          .ss-process, .ai-features, .ai-principles, .ai-process, .ai-use-cases,
          .ct-features, .ct-principles, .ct-process,
          .wa-faq summary, .api-faq summary, .ss-faq summary, .ai-faq summary,
          .ct-faq summary) h3 {
  font-size: 18px;
  line-height: 1.35;
}

/*
 * Client testimonial text is 14px on every page: the Testimonials review wall,
 * the home page carousel, the About quote and the single quotes on the website,
 * ecommerce and mobile app pages. Names and companies keep their own sizes.
 */
#main :is(.review__text, .testimonial blockquote, .ws-review blockquote,
          .ec-review blockquote, .mo-review-grid blockquote) {
  font-size: 14px;
  line-height: 1.6;
}

/*
 * Card and list paragraphs in these service-page sections are 14px, plus the
 * home page callouts and process steps, and the solutions pages' scope grid
 * (.scope-card) and process steps (.process is only used on those pages). The :not()
 * list matches the 16px rule above so labels and notes keep their own sizes,
 * and the extra element in it gives this rule the specificity to win.
 */
#main :is(.wa-cards, .wa-security-features, .wa-process-list,
          .ws-journey-grid,
          .ec-feature-grid, .ec-models.ec-section, .ec-flow-panel, .ec-services, .ec-sector-grid,
          .mo-benefits, .mo-platforms, .mo-launch-grid, .mo-usecase-grid, .mo-delivery-steps,
          .api-service-grid,
          .ss-features, .ss-use-cases, .ss-principles,
          .ai-features, .ai-use-cases, .ai-principles,
          .ct-features, .ct-audiences, .ct-principles, .ct-process,
          .callouts, .process, .scope-card, .cms-benefits) p:not(
    .review__text,
    [class*="eyebrow"], [class*="kicker"], .hero__lead,
    [class*="-label"], [class*="__note"], .mo-tag, .ws-label,
    .review__org, .person__role, .work__name, .work__cat, .workcount,
    .editorial-byline, .cms-source, .about-award p, .home-mockup-cta__contact p,
    .pagehero__inner > p, .section-head > p, .notfound__code,
    .breadcrumb li, .ec-ui *, .hero__art *) {
  font-size: 14px;
}

/* Web application page: problem-flow labels (were 11px, 9px on phones). */
#main .wa-flow > span { font-size: 14px; }
/* At 14px the four boxes no longer fit one phone-width row: keep the three
   labels on the first row and give the yellow result box its own row. */
@media (max-width: 480px) {
  #main .wa-flow { flex-wrap: wrap; row-gap: 8px; }
  #main .wa-flow > b:last-of-type { display: none; }
  #main .wa-flow > strong { flex: 1 1 100%; }
}

/* Ecommerce "Custom build or a standard store platform?" comparison boxes. */
#main .ec-fit article {
  padding: 28px 26px;
  border-radius: 14px;
  border-top: 3px solid #dbb454;
}
#main .ec-fit article h3 {
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e3ddcf;
}
#main .ec-fit ul {
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
#main .ec-section .ec-fit ul li {
  position: relative;
  margin: 0;
  padding-left: 22px;
  font-size: 14px;
  line-height: 1.55;
  color: #3d3d3d;
}
#main .ec-fit li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a17a25;
}

/* Mobile "Types of app we build" cards: keep the description off the card edges. */
#main .mo-usecase-grid p {
  margin: -6px 0 0;
  padding: 0 14px 18px;
  text-align: center;
  color: #555;
}
@media (max-width: 480px) {
  #main .mo-usecase-grid p { padding: 0 10px 14px; }
}

/* Small-screen sizes that the page stylesheets set differently. */
@media (max-width: 480px) {
  body.page-mobile.page-service #main .mo-benefits article h3 { font-size: 20px; }
}
