/* ## Typography
--------------------------------------------- */

* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

::selection {
    background-color: $dark;
    color: $white;
}

html {
    font-size: 62.5%; // 10px browser default.
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    background-color: $white;
    color: $dark;
    font-family: $font-body;
    font-size: 1.8rem;
    font-weight: $normal;
    line-height: 1.618; // Golden ratio.
    -webkit-font-smoothing: antialiased;
    -moz-font-smoothing: grayscale;
    margin: 0;
    max-width: 100vw;
    overflow-x: hidden;
    @include breakpoint(sm) {
        font-size: 2rem;
    }
}

body>div {
    font-size: 1.8rem;
    @include breakpoint(sm) {
        font-size: 2rem;
    }
}

p {
    margin: 0 0 1.382em;
    padding: 0;
}

a {
    color: $accent;
    word-wrap: break-word;
    &:hover,
    &:focus {
        color: $dark;
    }
}

ol,
ul {
    margin: 0;
    padding: 0;
}

li {
    list-style-type: none;
}

hr {
    border: 0;
    border-collapse: collapse;
    border-bottom: $site-border;
    clear: both;
    padding: 1em 0 0;
    margin: 0 0 2em;
}

b,
strong {
    font-weight: $bolder;
}

blockquote,
cite,
em,
i {
    font-style: italic;
}

blockquote {
    border-left: $site-border;
    margin: 1em 0;
    padding: 0 1em;
}


/* ## Headings
--------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: $font-heading;
    font-weight: $bolder;
    line-height: 1.382; // Golden ratio.
    margin: 0 0 0.618em;
}

h1 {
    font-size: 2.4em;
    @include breakpoint(sm) {
        font-size: 3.2em;
    }
}

h2 {
    font-size: 1.8em;
}

h3 {
    font-size: 1.4em;
}

h4 {
    font-size: 1.2em;
}

h5 {
    font-size: 1.1em;
}

h6 {
    font-size: 1em;
}


/* ## Forms
--------------------------------------------- */

input,
select,
textarea {
    background-color: $light;
    border: $site-border;
    border-color: $outline;
    border-radius: 2em;
    padding: 0.5em 1.382em;
    width: 100%;
    line-height: 2;
    font-size: 1.5rem;
    color: $gray;
    font-weight: $normal;
    &:focus {
        outline: none;
        border-color: $accent;
    }
}

:focus {
    outline: 2px solid $border;
}

input[type="checkbox"],
input[type="image"],
input[type="radio"] {
    width: auto;
}

input[type="search"] {
    -webkit-appearance: none;
}

::-moz-placeholder {
    color: $gray;
    opacity: 1;
}

::-webkit-input-placeholder {
    color: $gray;
}

.button,
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
    background-color: $dark;
    border: 0;
    border-radius: 9rem;
    color: $white;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: $bold;
    padding: 1.1em 2.4em;
    text-decoration: none;
    $white-space: nowrap;
    display: inline-block;
    width: auto;
    height: auto;
    line-height: 1;
    box-shadow: 0 3rem 2rem -0.5rem rgba($dark, 0.2);
    @include transition;
    &:hover,
    &:focus {
        color: $white;
        box-shadow: 0 1rem 2rem -0.5rem rgba($dark, 0.2);
    }
    &.secondary {
        background-color: $accent;
    }
    &.white {
        background-color: $white;
        color: $accent;
    }
    &.small {
        font-size: 1.2rem;
    }
    &.large {
        font-size: 1.8rem;
    }
    &:disabled {
        background-color: $light;
        border-width: 0;
        color: darken($light, 50%);
        cursor: not-allowed;
    }
    +button,
    +.button {
        margin-top: 1em;
        clear: both;
        @include breakpoint(xs) {
            margin-top: 0;
            clear: none;
        }
    }
}

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button {
    display: none;
}

fieldset {
    margin-bottom: 1em;
}


/* ## Objects
--------------------------------------------- */

embed,
iframe,
img,
object,
video,
.wp-caption,
.wp-video-shortcode {
    max-width: 100%;
    display: block;
}

img {
    height: auto;
}

figure {
    margin: 0;
}

video {
    object-fit: cover;
}

.wp-video-shortcode {
    width: auto !important;
}


/* ## Tables
--------------------------------------------- */

table {
    background-color: $white;
    border: $site-border;
    border-collapse: collapse;
    border-spacing: 0;
    line-height: 1;
    margin-bottom: 4rem;
    width: 100%;
}

tbody {
    border-bottom: $site-border;
}

td,
th {
    text-align: left;
    padding: 0.618em;
    border-top: $site-border;
    border-right: $site-border;
}


/* ## Accessibility
--------------------------------------------- */

.screen-reader-text,
.screen-reader-text span,
.screen-reader-shortcut,
.wp-custom-logo .site-title,
.wp-custom-logo .site-description {
    position: absolute !important;
    clip: rect(0, 0, 0, 0);
    height: 0.1rem;
    width: 0.1rem;
    border: 0;
    overflow: hidden;
}

.screen-reader-text:focus,
.screen-reader-shortcut:focus {
    clip: auto !important;
    height: auto;
    width: auto;
    display: block;
    padding: 1rem 2rem;
    z-index: 100000;
    text-decoration: none;
    box-shadow: 0 0 0.2rem 0.2rem rgba($dark, 0.1);
}

.more-link {
    position: relative;
    font-style: normal;
}

.genesis-skip-link {
    margin: 0;
    li {
        height: 0;
        width: 0;
        list-style: none;
    }
}