@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/montserrat/montserrat-400.ttf) format('truetype');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/montserrat/montserrat-500.ttf) format('truetype');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/montserrat/montserrat-600.ttf) format('truetype');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/montserrat/montserrat-700.ttf) format('truetype');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../assets/fonts/montserrat/montserrat-800.ttf) format('truetype');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(../assets/fonts/montserrat/montserrat-900.ttf) format('truetype');
}

/* Shared typography and responsive layout.
   Important declarations in this named layer take precedence over legacy
   unlayered !important rules, including page-local Materials styles.
   Change heading typography here; do not append page-specific font patches. */
@layer ws-layout {
    :root {
        --ws-header-height: 100px;
        --ws-title-size: clamp(2.25rem, 5.8vw, 6.5rem);
        --ws-section-size: clamp(1.75rem, 3.8vw, 4.5rem);
        --ws-card-size: clamp(1.125rem, 1.7vw, 1.5rem);
    }
    :is(main, .site-footer, .cookie-banner, .cookie-modal, .legal-modal)
    :is(h1, h2, h3, h4) {
        font-family: 'Montserrat', sans-serif !important;
        font-weight: 800 !important;
        font-style: normal !important;
        min-width: 0 !important;
        max-width: 100% !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    main h1 {
        font-size: var(--ws-title-size) !important;
        line-height: 1.16 !important;
        letter-spacing: -.025em !important;
        gap: 0 !important;
    }
    :is(main, .site-footer) h2 {
        font-size: var(--ws-section-size) !important;
        line-height: 1.22 !important;
        letter-spacing: -.015em !important;
    }
    :is(main, .site-footer, .cookie-banner, .cookie-modal, .legal-modal) h3 {
        font-size: var(--ws-card-size) !important;
        line-height: 1.3 !important;
        letter-spacing: 0 !important;
    }
    /* People names retain their established visual hierarchy. */
    :is(.footer-person-content, .contact-person-content) h3 {
        font-size: clamp(1.5rem, 2.5vw, 2.5rem) !important;
    }
    :is(main, .site-footer, .cookie-banner, .cookie-modal, .legal-modal)
    :is(h1, h2, h3, h4) :is(span, strong, b, em, a) {
        font-family: inherit !important;
        font-size: inherit !important;
        font-weight: inherit !important;
        line-height: inherit !important;
        letter-spacing: inherit !important;
        white-space: normal !important;
        max-width: 100% !important;
        overflow-wrap: inherit !important;
    }
    /* Give gradient backgrounds room for accents and lower glyph edges. */
    :is(main, .site-footer) :is(h1, h2) > span {
        padding-top: .12em !important;
        padding-bottom: .12em !important;
        margin-top: -.12em !important;
        margin-bottom: -.12em !important;
        overflow: visible !important;
        -webkit-box-decoration-break: clone;
        box-decoration-break: clone;
    }
    :is(.hero-content, .wrap-hero-content, .ppf-hero-content,
        .contact-hero-inner, .mat-brand-header > *, .mat-final-heading > *) {
        min-width: 0 !important;
    }
    :is(.hero-actions, .wrap-hero-actions, .ppf-hero-actions, .contact-hero-actions) {
        flex-wrap: wrap !important;
        gap: 16px !important;
        margin-top: 24px !important;
    }
    :is(.hero-actions, .wrap-hero-actions, .ppf-hero-actions, .contact-hero-actions) > a {
        max-width: 100% !important;
        white-space: normal !important;
    }
    :is(.hero-description, .wrap-hero-lead, .ppf-hero-lead, .contact-hero p) {
        margin-top: 24px !important;
    }
    /* Subpage heroes keep statistics in document flow, on every screen. */
    :is(.wrap-hero, .ppf-hero, .contact-hero) {
        height: auto !important;
        max-height: none !important;
        min-height: 100vh !important;
        min-height: 100svh !important;
    }
    :is(.wrap-hero-inner, .ppf-hero-inner) {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        min-height: 100vh !important;
        min-height: 100svh !important;
        height: auto !important;
        gap: 32px !important;
        padding-top: calc(var(--ws-header-height) + 32px) !important;
        padding-bottom: 36px !important;
    }
    :is(.wrap-hero-content, .ppf-hero-content) {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
    :is(.wrap-hero-stats, .ppf-hero-stats) {
        position: relative !important;
        inset: auto !important;
        transform: none !important;
        margin-top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .contact-hero {
        padding-top: calc(var(--ws-header-height) + 32px) !important;
        padding-bottom: 48px !important;
    }
    .contact-hero-inner { padding-top: 0 !important; }
    /* Homepage: one content row and one statistics/features row. */
    @media (min-width: 901px) {
        .hero {
            display: grid !important;
            grid-template-columns: minmax(0, 1fr) minmax(220px, 340px) !important;
            grid-template-rows: 1fr auto !important;
            align-items: start !important;
            gap: 32px 24px !important;
            padding: calc(var(--ws-header-height) + 32px) 4vw 48px !important;
            min-height: 100vh !important;
            min-height: 100svh !important;
            height: auto !important;
            max-height: none !important;
        }
        .hero > .hero-content {
            grid-column: 1 / -1 !important;
            width: min(72%, 1120px) !important;
            padding: 0 !important;
            margin: 0 !important;
        }
        .hero > .hero-stats {
            position: relative !important;
            inset: auto !important;
            transform: none !important;
            grid-column: 1 !important;
            align-self: end !important;
            display: flex !important;
            flex-wrap: wrap !important;
            width: auto !important;
            max-width: 100% !important;
            margin: 0 !important;
            gap: 20px 28px !important;
        }
        .hero > .hero-features {
            position: relative !important;
            inset: auto !important;
            transform: none !important;
            grid-column: 2 !important;
            align-self: end !important;
            width: 100% !important;
            max-width: 340px !important;
            height: 64px !important;
            margin: 0 !important;
        }
        .hero .scroll-down { display: none !important; }
    }
    @media (min-width: 701px) and (max-height: 950px) {
        main h1 { font-size: clamp(2.25rem, min(5.8vw, 8svh), 4.75rem) !important; }
    }
    @media (max-width: 1100px) {
        .ws-materials :is(.mat-brand-header, .mat-final-heading) {
            grid-template-columns: minmax(0, 1fr) !important;
            gap: 24px !important;
        }
        :is(.wrap-hero-stats, .ppf-hero-stats) {
            grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        }
    }
    @media (max-width: 900px) {
        .hero {
            display: block !important;
            height: auto !important;
            max-height: none !important;
            min-height: 100svh !important;
            padding-bottom: 36px !important;
        }
        .hero > .hero-content {
            width: calc(100% - 32px) !important;
            margin-inline: auto !important;
            padding-inline: 0 !important;
            padding-top: calc(var(--ws-header-height) + 24px) !important;
            padding-bottom: 0 !important;
        }
        .hero > .hero-stats {
            position: relative !important;
            inset: auto !important;
            transform: none !important;
            margin: 32px auto 0 !important;
            width: calc(100% - 32px) !important;
        }
        .hero > .hero-features {
            position: relative !important;
            inset: auto !important;
            transform: none !important;
            margin: 24px auto 0 !important;
            max-width: calc(100% - 32px) !important;
            height: 64px !important;
        }
        .hero .scroll-down { display: none !important; }
    }
    @media (max-width: 700px) {
        main h1 { font-size: clamp(2rem, 8.5vw, 3.25rem) !important; }
        :is(main, .site-footer) h2 { font-size: clamp(1.75rem, 6.8vw, 2.5rem) !important; }
        .footer-person-content h3 { font-size: clamp(1.75rem, 7vw, 2.5rem) !important; }
    }
    @media (max-width: 400px) {
        :is(.wrap-hero-stats, .ppf-hero-stats) {
            grid-template-columns: minmax(0, 1fr) !important;
        }
    }
}

@layer ws-layout {
    body .detailing-page .detailing-hero-title-accent {
        box-sizing: content-box !important;
        padding-right: .12em !important;
        max-width: calc(100% - .12em) !important;
    }
}