/*
 * Public type template. Load after layout styles.
 * Change sizes, weights, leading and tracking here, never in page styles.
 * Roles: display / heading / subheading / lead / body / label / caption.
 * Logo lettering and decorative icons keep their proportions in brand.css.
 */
.dfi-public {
  --dfi-hero-type-scale: .8;
  --dfi-type-display-size: clamp(3rem, 5.5vw, 5rem);
  --dfi-type-heading-size: 2.625rem;
  --dfi-type-subheading-size: 1.5rem;
  --dfi-type-lead-size: 1.125rem;
  --dfi-type-body-size: 1rem;
  --dfi-type-label-size: .875rem;
  --dfi-type-caption-size: .8125rem;

  --dfi-type-display-weight: 700;
  --dfi-type-heading-weight: 600;
  --dfi-type-subheading-weight: 600;
  --dfi-type-lead-weight: 400;
  --dfi-type-body-weight: 400;
  --dfi-type-label-weight: 600;
  --dfi-type-caption-weight: 400;

  --dfi-type-display-leading: 1.25;
  --dfi-type-heading-leading: 1.3;
  --dfi-type-subheading-leading: 1.4;
  --dfi-type-lead-leading: 1.75;
  --dfi-type-body-leading: 1.75;
  --dfi-type-label-leading: 1.5;
  --dfi-type-caption-leading: 1.5;

  --dfi-type-display-tracking: -.035em;
  --dfi-type-heading-tracking: -.03em;
  --dfi-type-subheading-tracking: -.02em;
  --dfi-type-lead-tracking: -.01em;
  --dfi-type-body-tracking: -.01em;
  --dfi-type-label-tracking: -.01em;
  --dfi-type-caption-tracking: 0;

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

/* Shared chrome overrides the older base stylesheet's font shorthands. */
.dfi-public :is(.dfi-header, .dfi-menu, .dfi-footer, button, input, select, textarea) {
  font-family: var(--dfi-font-family);
}

/* :where keeps every role at the same specificity, regardless of DOM nesting. */
/* Body: paragraphs, product descriptions, tables, navigation links and fields. */
.dfi-public[class] :is(.dfi-type-body, .dfi-type-body-sm),
.dfi-public :is(.dfi-type-body, .dfi-type-body-sm, :where(
  p, li, dd, dt, td, th, input, select, textarea,
  .dfi-header, .dfi-menu, .dfi-footer,
  .dfi-menu-links a, .dfi-menu-contact > a,
  .dfi-catalog-category-links a, .dfi-catalog-description li,
  .dfi-consent details p, .contact-location address
)) {
  font-size: var(--dfi-type-body-size);
  font-weight: var(--dfi-type-body-weight);
  line-height: var(--dfi-type-body-leading);
  letter-spacing: var(--dfi-type-body-tracking);
}

/* Lead: introductory copy and long-form reading. */
.dfi-public[class] :is(.dfi-type-lead, .dfi-type-body-lg),
.dfi-public :is(.dfi-type-lead, .dfi-type-body-lg, :where(
  .dfi-hero-copy, .dfi-intro p,
  .dfi-media-heading p, .dfi-editorial-heading > div > p,
  .dfi-facility-copy > p:where(:not(.dfi-section-label)), .dfi-stage-copy > p,
  :where(.dfi-company-hero) .dfi-shell > p:where(:last-child),
  :where(.dfi-company-quality) > .dfi-shell > div > p,
  .dfi-detail-copy > p, .dfi-article-body,
  .ceo-message > div > p:where(:not(.page-kicker):not(.ceo-signature)),
  .history-stage__lead, .contact-page-heading > span,
  .dfi-footer-phone, .contact-info-grid strong,
  .dfi-catalog-category summary, .history-event h3, h4, h5, h6
)) {
  font-size: var(--dfi-type-lead-size);
  font-weight: var(--dfi-type-lead-weight);
  line-height: var(--dfi-type-lead-leading);
  letter-spacing: var(--dfi-type-lead-tracking);
}

/* Display: hero statements. The video-only homepage keeps its content. */
.dfi-public[class] .dfi-type-display,
.dfi-public :is(.dfi-type-display, :where(h1, .dfi-scroll-lines > p)) {
  font-size: var(--dfi-type-display-size);
  font-weight: var(--dfi-type-display-weight);
  line-height: var(--dfi-type-display-leading);
  letter-spacing: var(--dfi-type-display-tracking);
}

/* Heading: section and detail titles, including history year groups. */
.dfi-public[class] .dfi-type-heading,
.dfi-public :is(.dfi-type-heading, :where(
  h2, .dfi-detail-copy h1, .dfi-article h1,
  .ceo-message h1, .dfi-inquiry-hero h1, .history-year, .history-list h2,
  .dfi-facility-slide .dfi-facility-copy h3
)) {
  font-size: var(--dfi-type-heading-size);
  font-weight: var(--dfi-type-heading-weight);
  line-height: var(--dfi-type-heading-leading);
  letter-spacing: var(--dfi-type-heading-tracking);
}

/* Subheading: cards, menu groups and the page name above hero copy. */
.dfi-public[class] .dfi-type-subheading,
.dfi-public :is(.dfi-type-subheading, :where(
  h3:not(.history-event h3):not(.dfi-facility-slide .dfi-facility-copy h3), .dfi-scroll-title,
  .dfi-news-row h2, .dfi-newsroom-card h2, .dfi-catalog-copy h2,
  .dfi-form-aside h2, .dfi-policy h2, .dfi-receipt strong,
  .dfi-company-facts :is(h2, h3), .dfi-capability-grid :is(h2, h3)
)) {
  font-size: var(--dfi-type-subheading-size);
  font-weight: var(--dfi-type-subheading-weight);
  line-height: var(--dfi-type-subheading-leading);
  letter-spacing: var(--dfi-type-subheading-tracking);
}

/* Hero copy uses 80% of its role size, including responsive and reduced-motion values. */
.dfi-public .dfi-scroll-hero .dfi-scroll-lines > p {
  font-size: calc(var(--dfi-type-display-size) * var(--dfi-hero-type-scale));
}
.dfi-public .dfi-scroll-hero .dfi-scroll-title {
  font-size: calc(var(--dfi-type-subheading-size) * var(--dfi-hero-type-scale));
}

/* Controls: one label style for links, tabs, buttons and form labels. */
.dfi-public[class] .dfi-type-label,
.dfi-public :is(.dfi-type-label, :where(
  button, label, legend, .dfi-button,
  .dfi-desktop-nav > a, .dfi-nav-group summary, .dfi-nav-dropdown a,
  .dfi-header-contact, .dfi-round-link, .dfi-text-link,
  .dfi-page-nav a, .dfi-facility-nav a, .dfi-company-nav a,
  .dfi-section-nav span, .dfi-section-label, .page-kicker,
  .dfi-back-top, .dfi-scroll-link, .dfi-scroll-next, .dfi-inquiry-cta,
  .dfi-field, .contact-field, .dfi-check, .dfi-consent summary,
  .dfi-product-tabs button, .history-periods button,
  .dfi-catalog-reset, .dfi-catalog-count, .dfi-newsroom-category,
  .ceo-signature, .contact-location__header > a, .contact-info-grid span
)),
.dfi-public .dfi-field input[type="file"]::file-selector-button {
  font-family: var(--dfi-font-family);
  font-size: var(--dfi-type-label-size);
  font-weight: var(--dfi-type-label-weight);
  line-height: var(--dfi-type-label-leading);
  letter-spacing: var(--dfi-type-label-tracking);
}

/* Caption: dates, breadcrumbs, counts and helpers; brand lettering is exempt. */
.dfi-public[class] .dfi-type-caption,
.dfi-public :is(.dfi-type-caption, :where(
  small:not(.dfi-brand-name small), figcaption, time,
  .dfi-breadcrumb, .dfi-post-meta,
  .dfi-news-category, .dfi-news-date, .dfi-newsroom-copy time,
  .dfi-copyright, .dfi-footer-bottom, .dfi-footer-bottom p,
  .dfi-field small, .contact-field small,
  .dfi-catalog-trail, .dfi-catalog-badge, .dfi-catalog-category-count,
  .dfi-business-index, .history-event time,
  .contact-page-heading small, .contact-info-grid em, .contact-form-actions p
)) {
  font-size: var(--dfi-type-caption-size);
  font-weight: var(--dfi-type-caption-weight);
  line-height: var(--dfi-type-caption-leading);
  letter-spacing: var(--dfi-type-caption-tracking);
}

/* Emphasis keeps its assigned size. Use installed SUIT weights consistently. */
.dfi-public :where(strong, b, th) { font-weight: var(--dfi-type-heading-weight); }
.dfi-public :is(
  dt, th, h4, h5, h6, .dfi-spec dt, .dfi-post-meta > span,
  .dfi-footer-company p:first-child, .contact-info-grid strong,
  .history-event h3, .dfi-catalog-category summary,
  .dfi-language-button[aria-pressed="true"],
  .dfi-page-nav a[aria-selected="true"], .dfi-page-nav a[aria-current],
  .dfi-facility-nav a[aria-current], .history-periods button[aria-pressed="true"]
) { font-weight: var(--dfi-type-label-weight); }

/* Menu title links inherit the complete heading role, not the normal link role. */
.dfi-public .dfi-menu-columns h3 a { font: inherit; letter-spacing: inherit; }
.dfi-public .dfi-article-body :where(p, li) { font: inherit; letter-spacing: inherit; }
.dfi-public p.ceo-message__mark { font-size: 0; line-height: 0; }

/* Reading copy wraps at words; explicit paragraphs carry sentence boundaries. */
.dfi-public :is(p, li, dd, figcaption, .dfi-article-body) {
  text-wrap: pretty;
  word-break: keep-all;
  overflow-wrap: break-word;
}
html[lang="en"] .dfi-public :is(p, li, dd, figcaption, .dfi-article-body) {
  word-break: normal;
}

/* One responsive scale for all pages. Fields stay at 1rem on mobile. */
@media (max-width: 980px) {
  .dfi-public {
    --dfi-type-heading-size: 2.25rem;
    --dfi-type-subheading-size: 1.375rem;
    --dfi-type-lead-size: 1.0625rem;
  }
}
@media (max-width: 700px) {
  .dfi-public {
    --dfi-type-display-size: clamp(2.25rem, 8.5vw, 3rem);
    --dfi-type-heading-size: 1.75rem;
    --dfi-type-subheading-size: 1.25rem;
    --dfi-type-lead-size: 1rem;
  }
}

/* Short screens leave room for the fixed header and hero controls. */
@media (max-height: 520px) {
  .dfi-public :is(.dfi-scroll-hero, .dfi-hero) {
    --dfi-type-display-size: clamp(1.75rem, 4.5vw, 2.5rem);
    --dfi-type-subheading-size: var(--dfi-type-lead-size);
  }
}
/* All four statements are visible in reduced motion, using the section scale. */
@media (prefers-reduced-motion: reduce) {
  .dfi-public .dfi-scroll-hero { --dfi-type-display-size: var(--dfi-type-heading-size); }
}
