/* ==================================================
Global Styles
================================================== */

html {
    background: #fff;
    font-family: sans-serif;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.5em;
}

html, body {
    margin: 0;
    padding: 0;
}

a {
    color: #59acff;
    text-decoration: underline;
}


/* ==================================================
Buttons
================================================== */

button, .button {
    display: inline-block;
    background-color: #f0f0f0;
    padding: 1em;
    border: none;
    cursor: pointer;
    border-radius: 0.5em;
    line-height: 1.125em;
    color: #444;
    text-decoration: none;
    font-weight: 500;
}

button.primary, .button.primary {
    background-color: #ff8cec;
    color: #fff;
}

button:disabled, .button:disabled {
    opacity: 0.4;
    cursor: default;
}


/* ==================================================
Webpage Header
================================================== */

.webpage-header {
    margin: 8px 64px 64px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
    text-align: center;
}

.webpage-header .logo img {
    max-height: 4.5em;
    max-width: 100%;
}


/* ==================================================
Webpage Footer
================================================== */

.webpage-footer {
    margin: 64px;
    border-top: 2px solid #f0f0f0;
    text-align: center;
    padding-top: 64px;
    font-size: 0.75em;
    line-height: 1.5em;
}

.webpage-footer .logo img {
    max-height: 6em;
    max-width: 100%;
}

.webpage-footer .navigation {
    margin: 0;
    padding: 0;
    list-style: none;
    font-weight: 500;
}

.webpage-footer .navigation li {
    display: inline;
    margin: 0 0.5em;
}

.webpage-footer .boilerplate {
    padding-top: 64px;
    color: #999;
}

.webpage-footer .boilerplate .company-logo img {
    max-height: 6em;
    max-width: 100%;
    filter: invert(60%);
}

.webpage-footer .boilerplate a {
    color: #999;
    text-decoration: none;
}


/* ==================================================
Homepage - Hero
================================================== */

.hero {
    background: #59acff;
    margin: 0 auto 64px;
    padding: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.hero .description {
    width: 799px;
}

.hero .description h1 {
    font-size: 2.5em;
    line-height: 1.25em;
    font-weight: 500;
    margin: 0 0 0.25em;
}

.hero .description h2 {
    font-size: 1.5em;
    line-height: 1.25em;
    font-weight: 300;
    margin: 0 0 1.5em;
}

.hero .description .download {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero .description .download .app-store img {
    height: 5em;
}

.hero .description .download .price {
    font-size: 1.5em;
    line-height: 1.5em;
    font-weight: 500;
    margin: 0 0 0.25em;
}

.hero .description .download .requirements {
    font-size: 0.75em;
    line-height: 1.5em;
    margin: 0;
}

.hero .screenshot {
    width: 225px;
    height: 460px;
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        gap: 32px;
    }
    .hero .description {
        text-align: center;
        width: auto;
    }
    .hero .description .download {
        flex-direction: column;
    }
}


/* ==================================================
Homepage - Features
================================================== */

.features {
    margin: 0 auto;
    padding: 0 64px;
    list-style: none;
    display: flex;
    flex-flow: row wrap;
    gap: 64px 32px;
    align-items: stretch;
    justify-content: space-between;
    max-width: 1024px;
}

.features li {
    flex: 1 1 auto;
    width: 0;
}


@media (max-width: 768px) {
    .features li {
        width: 200px;
    }
}

.features li h3 {
    margin: 0;
    font-size: 1em;
    line-height: 1.5em;
    font-weight: 500;
    color: #ff8cec;
}

.features li h3::before {
    content: "";
    display: block;
    background-color: #ff8cec;
    width: 1em;
    height: 1em;
    position: relative;
    top: 0.2em;
    float: left;
    margin: 0 0.25em 0 0;
}

.features li.laps h3::before {
    mask-image: url("/images/icons/check.svg");
}

.features li.stats h3:before {
    mask-image: url("/images/icons/coaster.svg");
}

.features li.share h3::before {
    mask-image: url("/images/icons/message.svg");
}

.features li.nearby h3::before {
    mask-image: url("/images/icons/world.svg");
}

.features li p {
    margin: 0;
}


/* ==================================================
Document
================================================== */

.document {
    margin: 0 auto;
    padding: 0 64px;
    max-width: 1024px;
}

.document h1 {
    font-size: 1.5em;
    line-height: 1.25em;
    margin: 2.5em 0;
    font-weight: 500;
}

.document h2 {
    font-size: 1.25em;
    line-height: 1.25em;
    margin: 2.5em 0 0.25em;
    font-weight: 500;
}

.document h3 {
    font-size: 1em;
    line-height: 1.25em;
    margin: 2.5em 0 0.25em;
    font-weight: 500;
}

.document p {
    margin: 1em 0;
}


/* ==================================================
App Link Pages
================================================== */

.app-link {
    background-color: #59acff;
    padding: 32px;
}

.app-link .logo {
    display: block;
    margin: 0 auto;
    max-height: 5em;
    max-width: 480px;
}

.app-link .app-link-alert {
    margin: 32px auto;
    border-radius: 16px;
    max-width: 480px;
    overflow: hidden;
    background: #fff;
    text-align: center;
}

.app-link .app-link-alert .alert-content {
    margin: 32px;
}

.app-link .app-link-alert .alert-content .description {
    font-size: 1.5em;
    line-height: 1.25em;
}

.app-link .app-link-alert .alert-content .button {
    font-size: 1.5em;
}


/* ==================================================
404 Page
================================================== */

.error {
    margin: 0 64px;
    text-align: center;
}

.error h1 {
    font-size: 4em;
    line-height: 1.125em;
    margin: 0 0 0.5em;
}

.error p {
    font-size: 1.5em;
    line-height: 1.375em;
    margin: 0 0 2em;
}

.error .button {
    font-size: 2em;
}


/* ==================================================
Email Subscription Settings
================================================== */

.email-subscription-settings {
    margin: 0 auto;
    padding: 0 64px;
    max-width: 1024px;
    border: none;
    position: relative;
}

.email-subscription-settings fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 1.5em;
}

.email-subscription-settings .intro {
    text-align: center;
}

.email-subscription-settings .lists {
    list-style: none;
    max-width:  16em;
    margin: 2em auto;
    padding: 0;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
}

.email-subscription-settings .lists li {
    margin: 0.25em 0;
    padding: 0.5em;
    display: flex;
    border-bottom: 1px solid #f0f0f0;
}

.email-subscription-settings .lists li:last-child {
    border-bottom: none;
}

.email-subscription-settings .lists label {
    padding-left: 0.25em;
}

.email-subscription-settings .buttons {
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: center;
}

.email-subscription-settings .buttons li {
    margin: 1em 0;
    padding: 0;
}

.email-subscription-settings button {
    font-size: 1em;
}


/* ==================================================
Loaders
================================================== */

.loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5);
}

.loader::after {
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -24px 0 0 -24px;
    content: "";
    width: 48px;
    height: 48px;
    border: 5px solid #444;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* ==================================================
Alerts
================================================== */

.alert-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert {
    margin: 16px;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.25);
    background: #fff;
    text-align: center;
}

.alert::before {
    content: "";
    display: block;
    width: 2em;
    height: 2em;
    margin: 1.5em auto;
    border-radius: 50%;
    background: #0c0;
    color: #fff;
    line-height: 2em;
}

.alert.success::before {
    content: "✓";
    background: #0c0;
}

.alert.error::before {
    content: "×";
    background: #c00;
}
