///
/// Fractal by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///

/* Type */

	html, body {
		background: _palette(bg-alt);
	}

	body {
		color: _palette(fg);
	}

	html, input, select, textarea {
		font-size: 16pt;

		// XLarge.
			@include breakpoint('<=xlarge') {
				font-size: 13pt;
			}

		// Large.
			@include breakpoint('<=large') {
				font-size: 12pt;
			}

		// XXSmall.
			@include breakpoint('<=xxsmall') {
				font-size: 11pt;
			}

	}

	body, input, select, textarea {
		font-family: _font(family);
		font-weight: _font(weight);
		line-height: 1.5em;
		letter-spacing: -0.015em;
	}

	a {
		@include vendor('transition', ('color #{_duration(transition)} ease-in-out', 'border-bottom-color #{_duration(transition)} ease-in-out'));
		text-decoration: none;
		border-bottom: dotted 1px;

		&:hover {
			border-bottom-color: transparent !important;
		}
	}

	strong, b {
		font-weight: _font(weight-bold);
	}

	em, i {
		font-style: italic;
	}

	p {
		margin: 0 0 _size(element-margin) 0;
	}

	h1, h2, h3, h4, h5, h6 {
		font-weight: _font(weight);
		line-height: 1em;
		margin: 0 0 (_size(element-margin) * 0.5) 0;
		letter-spacing: -0.0125em;

		a {
			color: inherit;
			text-decoration: none;
			border-bottom: none;
		}

		// Medium.
			@include breakpoint('<=medium') {
				br {
					display: none;
				}
			}

	}

	h2 {
		font-size: 1.75em;
		line-height: 1.5em;
	}

	h3 {
		font-size: 1.5em;
		line-height: 1.5em;
	}

	h4 {
		font-size: 1.1em;
		line-height: 1.5em;
	}

	h5 {
		font-size: 0.9em;
		line-height: 1.5em;
	}

	h6 {
		font-size: 0.7em;
		line-height: 1.5em;
	}

	// Small.
		@include breakpoint('<=small') {
			h2 {
				font-size: 1.25em;
			}

			h3 {
				font-size: 1.2em;
			}

			h4 {
				font-size: 1em;
			}
		}

	sub {
		font-size: 0.8em;
		position: relative;
		top: 0.5em;
	}

	sup {
		font-size: 0.8em;
		position: relative;
		top: -0.5em;
	}

	blockquote {
		border-left-style: solid;
		border-left-width: (_size(border-width) * 4);
		font-style: italic;
		margin: 0 0 _size(element-margin) 0;
		padding: (_size(element-margin) / 4) 0 (_size(element-margin) / 4) _size(element-margin);
	}

	code {
		border-radius: _size(border-radius);
		border-style: solid;
		border-width: _size(border-width);
		font-family: _font(family-fixed);
		font-size: 0.9em;
		margin: 0 0.25em;
		padding: 0.25em 0.65em;
	}

	pre {
		-webkit-overflow-scrolling: touch;
		font-family: _font(family-fixed);
		font-size: 0.9em;
		margin: 0 0 _size(element-margin) 0;

		code {
			display: block;
			line-height: 1.75em;
			padding: 1em 1.5em;
			overflow-x: auto;
		}
	}

	hr {
		border: 0;
		border-bottom-style: solid;
		border-bottom-width: _size(border-width);
		margin: _size(element-margin) 0;

		&.major {
			margin: (_size(element-margin) * 1.5) 0;
		}
	}

	.align-left {
		text-align: left;
	}

	.align-center {
		text-align: center;
	}

	.align-right {
		text-align: right;
	}

	@mixin color-typography($p: null) {
		@if $p != null {
			background-color: _palette($p, bg);
			color: _palette($p, fg);
		}

		input, select, textarea {
			color: _palette($p, fg);
		}

		a {
			color: inherit;
			border-bottom-color: _palette($p, border2);

			@if _palette($p, invert) == true {
				color: _palette($p, fg-bold);
			}
			@else {
				&:hover {
					color: _palette(accent1, bg);
				}
			}
		}

		strong, b {
			color: _palette($p, fg-bold);
		}

		h1, h2, h3, h4, h5, h6 {
			color: _palette($p, fg-bold);
		}

		blockquote {
			border-left-color: _palette($p, border);
		}

		code {
			background: _palette($p, border-bg);
			border-color: _palette($p, border);
		}

		hr {
			border-bottom-color: _palette($p, border);
		}
	}

	@include color-typography;