/* Typography tokens */
:root {
  --fs-h1: 4.25rem;
  --fs-h2: 2.375rem;
  --fs-h3: 1.5rem;
  --fs-h4: 1.25rem;
  --fs-lead: 1.25rem;
  --fs-body-lg: 1.25rem;
  --fs-body: 1.125rem;
  --fs-small: 0.875rem;
  --fs-micro: 0.75rem;
  --fs-button: 0.875rem;

  --lh-h1: 1;
  --lh-h2: 1.1;
  --lh-h3: 1.15;
  --lh-h4: 1.2;
  --lh-lead: 1.5;
  --lh-body-lg: 1.5;
  --lh-body: 1.55;
  --lh-small: 1.4;
  --lh-micro: 1.35;

  --leone-hero-title-font-size: var(--fs-h1);
  --leone-hero-title-line-height: var(--lh-h1);
  --leone-hero-title-font-weight: 700;
  --leone-hero-title-letter-spacing: 0;
  --leone-hero-title-font-size-mobile: var(--fs-h1);
  --leone-hero-title-line-height-mobile: var(--lh-h1);

  --btn-font-size: var(--fs-button);
  --text-xs: var(--fs-micro);
  --text-sm: var(--fs-small);
  --text-base: var(--fs-body);
  --text-md: var(--fs-body);
  --text-lg: var(--fs-lead);
  --text-xl: var(--fs-h4);
  --text-2xl: var(--fs-h3);
  --text-3xl: var(--fs-h2);
  --text-4xl: var(--fs-h1);
  --text-5xl: var(--fs-h1);
  --font-size-sm: var(--fs-small);
  --font-size-md: var(--fs-body);
  --font-size-xl: var(--fs-lead);
  --font-size-2xl: var(--fs-h4);
  --catalog-hero-title-size: var(--fs-h1);
  --catalog-hero-title-line-height: var(--lh-h1);
  --catalog-card-title-size: var(--fs-h4);
  --catalog-card-title-line-height: var(--lh-h4);
}

html {
  font-size: 16px;
}

/* Headings */
h1,
:is(.hero h1, .hero .hero-content h1, .cat-banner .banner-text h1, .cat-banner .container h1, .marpe-hero-header h1, .catalogo-a-z-hero__content h1, .quality-hero h1, .instructions-hero h1, .course-page-hero h1, .publications-hero h1, .privacy-hero h1, .mad-lab-hero h1, .customer-support-hero .hero-content h1, .vp-title, .ts-title, .home-hero .hero-title) {
  font-size: var(--fs-h1) !important;
  font-weight: 700 !important;
  line-height: var(--lh-h1) !important;
  letter-spacing: 0 !important;
}

h2,
:is(.section-title, .category-section-title, .section-title-cards, .cat-section-title, .services-section h2, .split-showcase__content h2, .catalog-section-title, .product-section-title, .support-section-title) {
  font-size: var(--fs-h2) !important;
  font-weight: 700 !important;
  line-height: var(--lh-h2) !important;
  letter-spacing: 0 !important;
}

h3,
:is(.panel-title, .vp-panel-title) {
  font-size: var(--fs-h3) !important;
  font-weight: 600 !important;
  line-height: var(--lh-h3) !important;
  letter-spacing: 0 !important;
}

h4,
:is(.card h3, .card h4, .product-card h3, .product-card h4, .prod-card h3, .prod-card h4, .video-card h3, .video-card h4, .group-card h3, .focus-detail-card h3, .focus-detail-card h4, .feature-card h3, .feature-card h4, .card-title, .product-card-title, .catalog-card-title, .video-card-title) {
  font-size: var(--fs-h4) !important;
  font-weight: 600 !important;
  line-height: var(--lh-h4) !important;
  letter-spacing: 0 !important;
}

/* Body */
body,
p,
li,
td,
th,
input,
select,
textarea {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

p {
  font-weight: 400;
}

.text-body {
  font-size: var(--fs-body) !important;
  line-height: var(--lh-body) !important;
}

.text-lg,
.text-lead,
:is(.lead, .hero p, .hero-subtitle, .ts-lead, .vp-lead, .product-lead, .section-lead, .catalogo-a-z-hero__lead) {
  font-size: var(--fs-lead) !important;
  line-height: var(--lh-lead) !important;
}

/* Utility text */
.text-small,
.metadata,
:is(#breadcrumb, #breadcrumb li, .breadcrumb, .breadcrumb-list li, .video-breadcrumb, .video-breadcrumb li, footer h2, #footer-include h2, footer a, #footer-include a, footer address, #footer-include address, .made-in-italy, .vp-kicker, .eyebrow, .badge, .tag, .meta, .product-meta, .video-meta, .caption, small) {
  font-size: var(--fs-small) !important;
  line-height: var(--lh-small) !important;
}

.text-micro,
.micro {
  font-size: var(--fs-micro) !important;
  line-height: var(--lh-micro) !important;
}

button,
.btn,
.button,
.cta,
.btn-primary,
.btn-secondary,
.product-cta,
.video-modal-close,
input[type="button"],
input[type="submit"] {
  font-size: var(--fs-button) !important;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 900px) {
  :root {
    --fs-h1: clamp(2.75rem, 5vw, 4.25rem);
    --fs-h2: clamp(2rem, 3.5vw, 2.375rem);
    --fs-h3: clamp(1.375rem, 2.5vw, 1.5rem);
    --fs-h4: clamp(1.125rem, 2vw, 1.25rem);
  }
}
