// Headings

@mixin u-double-underline {
	text-decoration: underline;
	-webkit-text-decoration-skip: skip;
	text-decoration-skip-ink: auto;
	border-bottom: 1px solid;
}

@mixin u-small-caps {
	font-size: 0.8em; /* scale based on containing text */
	text-transform: uppercase;
}

@mixin u-text-font-smoothing {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

@mixin u-word-wrap {
	word-wrap: break-word;
	overflow-wrap: break-word;
	word-break: break-word;
}

@mixin u-text-interface {
	font-family: $context--font-family-sans;
	font-size: $context--font-size-interface;
	line-height: $context--line-height-tight;
}

%u-h1 {
	font-weight: $context--font-weight-light;
	font-size: $context--font-size-h1;
	font-size: unquote('min(max(#{$context--font-size-h1-min}, 4vw), #{$context--font-size-h1})');
	font-family: $context--font-family-serif;
	line-height: unquote('min(max(#{$context--line-height-h1-min}, 4vw), #{$context--line-height-h1})');
}

%u-h2 {
	font-weight: $context--font-weight-normal;
	font-size: unquote('min(max(#{$context--font-size-h2-min}, 4vw), #{$context--font-size-h2})');
	font-family: $context--font-family-serif;
	line-height: unquote('min(max(#{$context--line-height-h2-min}, 4vw), #{$context--line-height-h2})');
}

%u-h3 {
	font-weight: $context--font-weight-bold;
	font-size: unquote('min(max(#{$context--font-size-h3-min}, 4vw), #{$context--font-size-h3})');
	font-family: $context--font-family-serif;
	line-height: unquote('min(max(#{$context--line-height-h3-min}, 4vw), #{$context--line-height-h3})');
}

%u-h4 {
	font-weight: $context--font-weight-bold;
	font-size: unquote('min(max(#{$context--font-size-h4-min}, 4vw), #{$context--font-size-h4})');
	font-family: $context--font-family-serif;
	line-height: unquote('min(max(#{$context--line-height-h4-min}, 4vw), #{$context--line-height-h4})');
}

%u-h5 {
	font-weight: $context--font-weight-bold;
	font-size: unquote('min(max(#{$context--font-size-h5-min}, 4vw), #{$context--font-size-h5})');
	font-family: $context--font-family-serif;
	line-height: unquote('min(max(#{$context--line-height-h5-min}, 4vw), #{$context--line-height-h5})');
}


@mixin u-heading($arg) {
	@extend %u-#{$arg};
}

@mixin u-h1 {
	@extend %u-h1;
}

@mixin u-h2 {
	@extend %u-h2;
}

@mixin u-h3 {
	@extend %u-h3;
}

@mixin u-h4 {
	@extend %u-h4;
}

@mixin u-h5 {
	@extend %u-h5;
}


@mixin u-small() {
	font-size: $context--font-size-sm;
}

@mixin u-meta-large() {
	font-weight: $context--font-weight-normal;
	font-family: $context--font-family-sans;
	font-size: $context--font-size-h3;
}

@mixin u-meta-medium() {
	font-weight: $context--font-weight-normal;
	font-family: $context--font-family-sans;
	font-size: $context--font-size-base;
}

@mixin u-meta-small() {
	@include u-small();
	font-weight: $context--font-weight-normal;
	font-family: $context--font-family-sans;
}
