array( 'fontSize' => 'clamp(2.25rem, 1.3275rem + 3.785vw, 3.75rem)', 'fontWeight' => '700', 'letterSpacing' => '-0.025em', 'lineHeight' => 'max(1em, 2.5rem)' ), 'display-strong' => array( 'fontSize' => 'clamp(2.25rem, 1.08rem + 4.8vw, 3rem)', 'fontWeight' => '800', 'letterSpacing' => '-0.025em', 'lineHeight' => 'max(1em, 2.5rem)' ), 'display-tight' => array( 'fontSize' => 'clamp(38px, 5.6vw, 60px)', 'fontWeight' => '800', 'letterSpacing' => '-0.03em', 'lineHeight' => '1.03' ), 'heading' => array( 'fontSize' => 'clamp(1.875rem, 1.29rem + 2.4vw, 2.25rem)', 'fontWeight' => '700', 'letterSpacing' => '-0.025em', 'lineHeight' => 'max(1.111em, 2.25rem)' ), 'heading-tight' => array( 'fontSize' => 'clamp(24px, 3.2vw, 34px)', 'fontWeight' => '800', 'letterSpacing' => '-0.022em', 'lineHeight' => '1.08' ), 'heading-small' => array( 'fontSize' => 'calc(1.5rem)', 'fontWeight' => '700', 'letterSpacing' => '-0.025em', 'lineHeight' => '1.3334' ), 'heading-tight-small' => array( 'fontSize' => 'clamp(20px, 2.4vw, 24px)', 'fontWeight' => '800', 'letterSpacing' => '-0.02em', 'lineHeight' => '1.15' ), 'pill' => array( 'fontSize' => 'calc(15px)', 'fontWeight' => '600', 'letterSpacing' => '0', 'lineHeight' => '1.2' ), 'lede' => array( 'fontSize' => 'calc(1.125rem)', 'lineHeight' => '1.625' ), 'lede-snug' => array( 'fontSize' => 'calc(1.125rem)', 'lineHeight' => '1.556' ), 'lede-hero' => array( 'fontSize' => 'clamp(1.125rem, 0.93rem + 0.8vw, 1.25rem)', 'lineHeight' => '1.625' ), 'lede-compact' => array( 'fontSize' => 'calc(17px)', 'lineHeight' => '1.55' ), 'eyebrow' => array( 'fontWeight' => '600', 'letterSpacing' => '0.05em', 'lineHeight' => '1.4286', 'textTransform' => 'uppercase' ), 'eyebrow-caps' => array( 'fontSize' => 'calc(11px)', 'fontWeight' => '700', 'letterSpacing' => '0.16em', 'lineHeight' => '1.6', 'textTransform' => 'uppercase' ), ); const DISPLAYS = array( 'home' => array( 'h1' => 'display', 'h2' => 'heading', 'h3' => 'heading-small', 'lede' => 'lede-snug', 'hero-lede' => 'lede' ), 'promo' => array( 'h1' => 'display-strong', 'h2' => 'heading', 'h2-small' => 'heading-small', 'h3' => 'heading-small', 'lede' => 'lede', 'hero-lede' => 'lede-hero', 'eyebrow' => 'eyebrow' ), 'rooster-one' => array( 'h1' => 'display-tight', 'h2' => 'heading-tight', 'h3' => 'heading-tight-small', 'lede' => 'lede-compact', 'eyebrow' => 'eyebrow-caps' ), ); const THEME_HEADS = array( 'h1' => '3xl', 'h2' => '2xl', 'h3' => 'xl' ); public static function head_role( $level ) { return (int) $level <= 1 ? 'h1' : ( (int) $level >= 3 ? 'h3' : 'h2' ); } public static function step( $name ) { return self::SCALE[ (string) $name ] ?? array(); } public static function role( $display, $role ) { $step = self::DISPLAYS[ (string) $display ][ (string) $role ] ?? ''; return '' !== $step ? self::step( $step ) : array(); } }