/* Helvetica Neue Regular is the site's face: no Light. The section headings are semi bold (below). */
@font-face {
  font-family: "Helvetica Neue";
  src: url("./public/fonts/HelveticaNeue-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* Semi bold, for the section headings (Rafael, 2026-11-07: "Make the headings of sections semi bold
   consistently"): the system's own Helvetica Neue Medium where it has one (iPhone, Mac). Where it
   has none, the heading falls to "Helvetica Neue Heading", the regular, which the browser draws
   heavier (font-synthesis: weight on the headings), so it keeps the site's face, never another
   sans-serif. */
@font-face {
  font-family: "Helvetica Neue";
  src: local("HelveticaNeue-Medium"), local("Helvetica Neue Medium");
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: "Helvetica Neue Heading";
  src: url("./public/fonts/HelveticaNeue-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Single source for site-wide typography. Adjust these tokens once.
   Native headings and paragraphs receive the shared styles automatically.
   Use type-h1…type-h6 only when visual size differs from semantic heading level. */
:root {
  --font-primary: "Helvetica Neue", sans-serif;
  --font-heading: var(--font-primary);
  --font-body: var(--font-primary);
  --font-numerals: var(--font-primary);
  --weight-heading: 400;
  --weight-body: 400;
  --weight-numerals: 400;
  /* the section headings: semi bold (the faces above) */
  --font-section-heading: "Helvetica Neue", "Helvetica Neue Heading", sans-serif;
  --weight-section-heading: 600;
  /* Phones grow every text size by this one factor (1.15 on phones, set in the phone ramp below;
     the user, 2026-10-31: "Grow all the fonts evenly 15% on mobile only"). Sizes the phone ramp
     sets carry it there; sizes it does not set carry it where they are defined. */
  --type-phone-scale: 1;

  --type-h1-size: clamp(1.575rem, 3.675vw, 3.675rem);
  --type-founders-title-size: calc(var(--type-h1-size) * .9);
  --type-founders-title-leading: var(--type-h1-leading);
  --type-founders-summary-size: var(--type-h2-size);
  --type-founders-summary-leading: var(--type-h2-leading);
  --type-h1-leading: 1.04;
  --type-h1-tracking: -0.045em;
  /* Company name XL: independent of heading styles, capped to fit its container. */
  --type-company-name-xl-family: var(--font-primary);
  --type-company-name-xl-weight: 400;
  --type-company-name-xl-size: min(clamp(4rem, 10.5vw, 11rem), 20cqw);
  --type-company-name-xl-leading: 1.0;
  --type-company-name-xl-tracking: -0.035em;
  /* Paragraph XL: large introductory copy, independent of headings and company name. */
  --type-paragraph-xl-size: min(clamp(1.880327925rem, 4.387431825vw, 4.387431825rem), 8.77486365cqw);
  --type-paragraph-xl-leading: 1.04;
  --type-paragraph-xl-tracking: -0.045em;
  --type-h2-size: clamp(1.18125rem, 2.625vw, 2.3625rem);
  --type-h2-leading: 1.1;
  --type-h2-tracking: -0.035em;
  --type-h3-size: clamp(.84375rem, 1.485vw, 1.18125rem);
  --type-h3-leading: 1.4;
  --type-h3-tracking: -0.015em;
  --type-h4-size: clamp(.759375rem, 1.215vw, 1.0125rem);
  --type-h4-leading: 1.4;
  --type-h4-tracking: -0.01em;
  --type-h5-size: clamp(.675rem, 1.0125vw, .84375rem);
  --type-h5-leading: 1.4;
  --type-h5-tracking: 0;
  --type-h6-size: calc(.675rem * var(--type-phone-scale));
  --type-h6-leading: 1.4;
  --type-h6-tracking: 0;
  --type-section-title-size: calc(clamp(.39375rem, .7875vw, .91875rem) * var(--type-phone-scale));
  --type-why-us-number-size: calc(var(--type-h3-size) * 7 / 3);

  --type-body-size: clamp(.81rem, 1.053vw, .91125rem);
  --type-body-large-size: clamp(.91125rem, 1.377vw, 1.11375rem);
  --type-body-small-size: calc(0.70875rem * var(--type-phone-scale));
  --type-body-xs-size: calc(0.6075rem * var(--type-phone-scale));
  --type-body-lead-size: clamp(.945rem, 1.79991vw, 1.575rem);
  --type-body-lead-leading: 1.15;
  --type-body-lead-tracking: -0.03em;
  --type-body-leading: 1.6;
  --type-body-tracking: 0;
  --space-paragraph: 1em;
  --space-heading-subtitle: clamp(1.25rem, 3vw, 2rem);
}

body {
  font-family: var(--font-body);
  font-weight: var(--weight-body);
  font-size: var(--type-body-size);
  line-height: var(--type-body-leading);
  letter-spacing: var(--type-body-tracking);
  font-synthesis: none;
}

.type-section-title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  font-size: var(--type-section-title-size);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-style: normal;
}

:where(h1, h2, h3, h4, h5, h6, .type-h1, .type-h2, .type-h3, .type-h4, .type-h5, .type-h6) {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  font-style: normal;
  color: inherit;
  overflow-wrap: break-word;
}

h1, .type-h1 {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  font-size: var(--type-h1-size);
  line-height: var(--type-h1-leading);
  letter-spacing: var(--type-h1-tracking);
}
/* The section headings are semi bold, so they stand apart from the lines under them and the text
   (Rafael, 2026-11-07: "Make the headings of sections semi bold consistently. They are hard to tell
   apart from the sub titles and body. Exclude the our founders big text at the top"): Where we come
   from, What we can do for you, each service's title, Why us, Case studies, Our street cred, the
   Blog and Let's talk, and the AI partner networks at the top (2026-11-09). The founders' words keep
   the regular; so do the lines under the headings. On phones, Where we come from and the AI partner
   networks line are regular too (styles.css, under .h-row__partners-title). */
.capabilities > h4, .h-row__partners-title, .partner-services > h1, .svc-item-head h2, .why-us-slider-header h1, .partner-grid-head h1, .contact-intro :is(h1, h2) {
  font-family: var(--font-section-heading);
  font-weight: var(--weight-section-heading);
  font-synthesis: weight;
}
.type-company-name-xl {
  margin: 0;
  font-family: var(--type-company-name-xl-family);
  font-weight: var(--type-company-name-xl-weight);
  font-style: normal;
  font-size: var(--type-company-name-xl-size);
  line-height: var(--type-company-name-xl-leading);
  letter-spacing: var(--type-company-name-xl-tracking);
  color: inherit;
  white-space: nowrap;
  word-break: keep-all;
  overflow: hidden;
  text-overflow: ellipsis;
}
h2, .type-h2 {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  font-size: var(--type-h2-size);
  line-height: var(--type-h2-leading);
  letter-spacing: var(--type-h2-tracking);
}
h3, .type-h3 {
  font-size: var(--type-h3-size);
  line-height: var(--type-h3-leading);
  letter-spacing: var(--type-h3-tracking);
}
h4, .type-h4 {
  font-size: var(--type-h4-size);
  line-height: var(--type-h4-leading);
  letter-spacing: var(--type-h4-tracking);
}
/* Bold markup (article **bold**, table headers) stays Regular too. */
b, strong, th { font-weight: var(--weight-body); }
h5, .type-h5 {
  font-size: var(--type-h5-size);
  line-height: var(--type-h5-leading);
  letter-spacing: var(--type-h5-tracking);
}
h6, .type-h6 {
  font-size: var(--type-h6-size);
  line-height: var(--type-h6-leading);
  letter-spacing: var(--type-h6-tracking);
}

p, .text-body, .text-large, .text-small, .text-xs, .text-lead, .text-xl {
  margin: 0;
  font-family: var(--font-body);
  font-weight: var(--weight-body);
  font-style: normal;
  font-size: var(--type-body-size);
  line-height: var(--type-body-leading);
  letter-spacing: var(--type-body-tracking);
  overflow-wrap: break-word;
}
.text-large { font-size: var(--type-body-large-size); }
.text-small { font-size: var(--type-body-small-size); }
.text-xs { font-size: var(--type-body-xs-size); }
.text-lead {
  font-size: var(--type-body-lead-size);
  line-height: var(--type-body-lead-leading);
  letter-spacing: var(--type-body-lead-tracking);
}
p + p { margin-top: var(--space-paragraph); }

/* Wrap numeric runs in this class; leave surrounding copy in its own role. */
.type-number {
  font-family: var(--font-numerals);
  font-weight: var(--weight-numerals);
  font-style: normal;
  letter-spacing: 0;
}

button, input, select, textarea { font: inherit; }

/* Paragraph XL: shared Helvetica Neue body family and light weight. */
.text-xl {
  font-family: var(--font-body);
  font-weight: var(--weight-body);
  font-size: var(--type-paragraph-xl-size);
  line-height: var(--type-paragraph-xl-leading);
  letter-spacing: var(--type-paragraph-xl-tracking);
}

/* Service title: a shared display role with its parenthesised hover counterpart. */
:root {
  --type-service-size: calc(clamp(1.18125rem, 3.045vw, 3.4125rem) * var(--type-phone-scale));
  --type-service-leading: 1.12;
  --type-service-tracking: -0.045em;
}
.type-service-title, .type-service-title-alternate {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--type-service-size);
  line-height: var(--type-service-leading);
  letter-spacing: var(--type-service-tracking);
}
.type-service-title-alternate {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
}

/* Shared category and row typography for service tables. */
:root {
  --type-service-table-size: clamp(.91125rem, 1.62vw, 1.4175rem);
  --type-service-table-leading: 1.3;
  --type-service-table-tracking: -0.025em;
}
.type-service-table {
  font-family: var(--font-primary);
  font-weight: var(--weight-heading);
  font-size: var(--type-service-table-size);
  line-height: var(--type-service-table-leading);
  letter-spacing: var(--type-service-table-tracking);
}

/* One responsive role for all three parts of the centered partnership pairing. */
:root { --type-partnership-name-size: calc(clamp(.65625rem, 3.675vw, 3.675rem) * var(--type-phone-scale)); }
.type-partnership-name {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  font-size: var(--type-partnership-name-size);
  line-height: var(--type-h1-leading);
  letter-spacing: var(--type-h1-tracking);
}

/* Phone type ramp (spec docs/specs/2026-10-08-mobile-pass.md): every phone, portrait or
   landscape, gets the same fixed steps instead of sizes that grow with the screen.
   H1 21, H2 16.8, Lead 15.12, Heading (H3-H5) 13.5, Body 12.96 (Large and the blog rows join it),
   Small 11.34, XS 9.72. Company name XL and the founders story keep their roles.
   Cut twice on 2026-10-31: headings a quarter and text a tenth (spec
   docs/specs/2026-10-31-smaller-type.md), then the large headings and display text 30% and the
   text, the small headings at text size and the labels 10% (spec
   docs/specs/2026-10-31-smaller-type-2.md). Then every phone size grew 15% (spec
   docs/specs/2026-10-31-phone-type-up.md): H1 24.15, H2 19.32, Lead 17.39, Heading 15.53,
   Body 14.9, Small 13.04, XS 11.18. The large Telemyr name keeps its size. */
@media (max-width: 600px), (max-width: 950px) and (max-height: 550px) and (orientation: landscape) {
  :root {
    --type-phone-scale: 1.15;
    --type-h1-size: calc(1.3125rem * var(--type-phone-scale));
    --type-h2-size: calc(1.05rem * var(--type-phone-scale));
    --type-body-lead-size: calc(.945rem * var(--type-phone-scale));
    --type-h3-size: calc(.84375rem * var(--type-phone-scale));
    --type-h4-size: calc(.84375rem * var(--type-phone-scale));
    --type-h5-size: calc(.84375rem * var(--type-phone-scale));
    --type-body-size: calc(.81rem * var(--type-phone-scale));
    --type-body-large-size: calc(.81rem * var(--type-phone-scale));
    --type-service-table-size: calc(.81rem * var(--type-phone-scale));
    --type-paragraph-xl-size: min(var(--type-h1-size), 8.77486365cqw);
    --type-why-us-number-size: var(--type-h1-size);
  }
}

/* Founders story on phones: scales with its column, so every phone keeps the same breaks. */
@media (max-width: 600px) {
  :root {
    /* Founders story scales with its column (11.2em wide, 18em for the summary),
       so every phone keeps the same line breaks. Open leading holds the portraits.
       .6825 is the .525 of the 2026-10-31 cuts made 30% bigger (the user, 2026-10-31). */
    --type-founders-title-size: calc((100vw - 2 * var(--page-gutter)) / 11.2 * .6825 * var(--type-phone-scale));
    --type-founders-title-leading: 1.2;
    --type-founders-summary-size: calc((100vw - 2 * var(--page-gutter)) / 18 * .6825 * var(--type-phone-scale));
    --type-founders-summary-leading: 1.32;
  }
}
/* Landscape phones: the hero statement follows the screen height so the hero fits. */
@media (max-width: 950px) and (max-height: 550px) and (orientation: landscape) {
  :root {
    --type-paragraph-xl-size: calc(clamp(.945rem, 3.78svh, 1.575rem) * var(--type-phone-scale));
  }
}

/* Temporary wordmarks in the centered company-logo row. */
:root { --type-background-logo-size: calc(clamp(.70875rem, 1.26vw, 1.26rem) * var(--type-phone-scale)); }
.type-background-logo {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  font-size: var(--type-background-logo-size);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

/* Partner lockup on case study pages: the Telemyr mark and name beside the client's wordmark,
   which is sized in em of this role (case-studies/case-study.css). */
:root { --type-lockup-size: calc(clamp(.91875rem, 1.68vw, 1.575rem) * var(--type-phone-scale)); }
.type-lockup {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  font-size: var(--type-lockup-size);
  line-height: 1;
  letter-spacing: -0.045em;
}

/* Founders narrative: 90% of the responsive H1 size; other H1s stay unchanged. */
.type-founders-title { font-size: var(--type-founders-title-size); line-height: var(--type-founders-title-leading); }
.type-founders-summary { font-size: var(--type-founders-summary-size); line-height: var(--type-founders-summary-leading); }

/* Why Us cards: a display number, then the reason in the lead size over a light grey line. */
.type-card-title { font-weight: var(--weight-heading); }


/* Why Us card numbers: display figures, 7/3 of the card heading size (three times it until the
   second cut of 2026-10-31, when display text shrank 30% and headings at text size 10%), tight in
   the top corner; on phones the H1 size, so no number is larger than the page's titles. */
.why-us-slider-number { font-size: var(--type-why-us-number-size); line-height: 1; letter-spacing: -0.04em; }
