/* Shared reading rhythm. Keep this after the component styles.
   Font families, vector wordmarks and motion/layout geometry stay unchanged. */
:root {
  --type-display-leading: 1.14;
  --type-heading-leading: 1.18;
  --type-copy-leading: 1.65;
  --type-label-leading: 1.4;
  --type-display-tracking: -.01em;
}

.hero-content h1,
.flight-copy h2,
.studio-work .sw-section-head h2,
.products-intro h2,
.product-section h2,
.product-secondary .ps-section-head h2,
.gmb-hubai h2,
.ecosystem h2,
.contact-title,
.footer-index h2,
.hubui-intro h2 {
  line-height: var(--type-display-leading);
  letter-spacing: var(--type-display-tracking);
}

#idea .card-copy h3,
.studio-work .sw-case-story h3,
.studio-work.sw-work-featured .sw-case-story h3,
.studio-work .sw-more-copy h3,
.product-feature-intro h3,
.hubui-awareness h3,
.hubui-example-card h4,
.gmb-film-modal-header h2 {
  line-height: var(--type-heading-leading);
  letter-spacing: var(--type-display-tracking);
}

/* Body copy uses the font's natural word and letter spacing. */
.flight-copy p,
#idea .card-description,
.studio-work .sw-section-lead,
.studio-work .sw-service > p,
.studio-work .sw-case-brief dd,
.studio-work.sw-work-featured .sw-case-summary,
.studio-work .sw-more-copy > p:last-child,
.products-intro-bottom p,
.product-lead,
.product-secondary .ps-section-lead,
.ecosystem-intro,
.contact-lead,
.hubui-intro > p,
.hubui-awareness-copy {
  line-height: var(--type-copy-leading);
  letter-spacing: normal;
  word-spacing: normal;
}

.studio-work .sw-quick-contact p {
  line-height: 1.3;
  letter-spacing: var(--type-display-tracking);
}
.studio-work.sw-work-featured .sw-case-index {
  line-height: 1.5;
  letter-spacing: normal;
}

/* Labels need breathing room too, without widening the navigation itself. */
.floating-nav,
.floating-nav a,
.mobile-menu summary,
.mobile-menu-panel a,
.explore-link,
.contact-cta,
.contact-links,
.studio-work .sw-service summary,
.studio-work .sw-case-link,
.studio-work .sw-case-scope > p,
.footer-index a,
.footer-index address,
.footer-index-group h3,
.footer-index-bottom {
  line-height: var(--type-label-leading);
  letter-spacing: normal;
  word-spacing: normal;
}
.studio-work .sw-service summary { line-height: 1.45; }

.hero-eyebrow,
.studio-work .sw-eyebrow,
.studio-work.sw-work-featured .sw-client,
.slogan,
.section-intro h2,
.section-coordinate,
#idea .card-kicker,
.products-intro-top,
.ecosystem-eyebrow,
.contact-eyebrow,
.footer-index-eyebrow,
.hubui-sectionline,
.hubui-eyebrow {
  line-height: 1.5;
  letter-spacing: .08em;
}

/* The rail has ID-scoped type rules; match that scope rather than using !important. */
#hubapps-rail.hubapps-rail .hr-copy h2 {
  line-height: var(--type-display-leading);
  letter-spacing: var(--type-display-tracking);
}
#hubapps-rail.hubapps-rail .hr-brand,
.product-secondary .ps-product-name,
.gmb-hubai-brand,
.product-section-label span:last-child,
.hubui-sectionline > span:last-child {
  line-height: 1.25;
  letter-spacing: normal;
}
#hubapps-rail.hubapps-rail .hr-copy > p:not(.hr-brand),
#hubapps-rail.hubapps-rail .hr-copy .product-lead {
  line-height: var(--type-copy-leading);
  letter-spacing: normal;
  word-spacing: normal;
}
#hubapps-rail.hubapps-rail .hr-copy :is(.product-feature-button, .product-step-button, .gmb-hubai-feature, .ps-feature-tab, .hr-overview-button, .gmb-hubai-feature-title, .ps-feature-tab strong),
#hubapps-rail.hubapps-rail :is(.hr-nav-link, .hr-audit-tab, .hr-product-link, .product-link) {
  line-height: var(--type-label-leading);
  letter-spacing: normal;
  word-spacing: normal;
}
#hubapps-rail.hubapps-rail .hr-copy :is(.product-feature-copy, .product-step-copy, .product-feature-copy p, .product-step-copy p) {
  line-height: 1.6;
  letter-spacing: normal;
}
#hubapps-rail.hubapps-rail .hr-visual :is(.product-panel-content h4, .ps-panel-intro h3, .gmb-hubai-panel h3, .wh-main-top h3, .ps-capability-copy h3, .ps-report-sheet > p, .ps-doc-content > p) {
  line-height: var(--type-heading-leading);
  letter-spacing: var(--type-display-tracking);
}
.hubui-demo-top h3,
.hubui-tabs button,
.hubui-example-action,
.hubui-meaning strong,
.hubui-principles li,
.hubui-contact,
.compatibility-grid strong {
  line-height: 1.45;
  letter-spacing: normal;
}

/* Vertical accordion labels retain their accepted equal glass-panel dimensions. */
@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  #idea .approach-cards[data-active-card] .approach-card:not(.approach-card-expanded) .card-copy h3 {
    line-height: 1.2;
    letter-spacing: normal;
  }
  #idea .card-description { line-height: 1.5; }
}

/* Keep the complete desktop product copy inside the pinned viewport. */
@media (min-width: 1100px) and (min-height: 851px) and (pointer: fine) {
  #hubapps-rail.hubapps-rail .hr-copy h2 { font-size: clamp(37px, 3vw, 58px); }
}

/* A normal tracking value needs a fluid size on narrow screens, not tighter letters. */
@media (max-width: 760px) {
  .hero-content h1 { font-size: clamp(40px, 11.9vw, 90px); }
  .flight-copy h2 { font-size: clamp(28px, 7.2vw, 50px); }
  .studio-work .sw-case-story h3,
  .studio-work.sw-work-featured .sw-case-story h3 { font-size: clamp(30px, 8vw, 42px); }
  .products-intro h2 { font-size: clamp(38px, 9.7vw, 66px); }
  .hubui-intro h2 { font-size: clamp(34px, 8.7vw, 52px); }
  .ecosystem h2 { font-size: clamp(29px, 7.7vw, 45px); }
}
@media (max-width: 380px) {
  #hubapps-rail.hubapps-rail .hr-copy h2 { font-size: 31px; }
  .contact-title { font-size: 42px; }
  .footer-index h2 { font-size: 38px; }
  .footer-index-contact address a { font-size: 20px; }
}
