@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
    --primary-blue: #d49b09d9;
    --black: #000000;
    --white: #ffffff;
    --success-green: #008a20;
    --error-red: #d63638;
    --wp-custom-contrast-50: #2c3338;

    --font-size-large: 2rem;
    --font-size-body: 1.4rem;
    --font-size-input: 1.2rem;
    --font-size-small: 1rem;

    --body-padding: 0.75rem;
}

* {
    text-wrap: pretty;
}

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

html {
    font-family: 'Inter', sans-serif;
    background-color: var(--black);
    color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    display: flex;
    min-height: 100vh;
    margin: 0;
    padding: 0;

    flex-direction: column;
}

p, label {
    font-size: var(--font-size-body);
    line-height: 1.5;
    letter-spacing: -0.03rem;
    font-weight: 400;
}

/**
 * Header Styles
 */
.header {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    padding: var(--body-padding);
    padding-bottom: 0;
}

.header__logo {
    font-size: var(--font-size-large);
    margin-top: 0;
    font-weight: 500;
    line-height: 1.1;
}

.header__logo-highlight {
    color: var(--primary-blue);
}

.form-section {
    max-width: 500px;
    padding: var( --body-padding );
    padding-top: 0;
}

.form-section__body {
    font-weight: 500;
}

.form-section__link {
    color: var(--primary-blue);
}

.form-section__link:hover {
    color: var(--white);
}

.form-section__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-section__input-container {
    position: relative;
    top: 0;
    right: 0;
}

.form-section__form-input {
    width: 100%;
}

.form-section__form-label {
    font-size: var(--font-size-small);
    text-align: center;
}

.form-section__form-input {
    font-size: var(--font-size-input);
    padding: 1.5rem 2rem;
    border-radius: 4rem;
    border: 1px solid transparent;
}

.form-section__form-result {
    font-size: var(--font-size-small);
    text-align: center;
    margin-bottom: 1rem;
}

.form-section__search-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 1.5rem;

    width: 32px;
    height: 32px;
}

.form-section__download {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.form-section__download-body {
    flex-basis: 50%;
    font-size: var(--font-size-small);
    line-height: 1.4;
}

.form-section__download-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;

    padding: 0.75rem 1.5rem 0.75rem 1.2rem;

    font-size: var(--font-size-small);
    border: 1px solid var(--primary-blue);
    border-radius: 4px;
    color: var(--white);
    text-decoration: none;
}

.download-button__content {
    text-wrap: nowrap;
}

.form-section__download-button:hover {
    border-color: var(--white);
}

.form-section__download-button > svg {
    height: 1.75rem;
    width: 1.75rem;
}

.form-section__download-button:hover > svg > path {
    fill: var(--white);
}

.footer {
    display: flex;
    flex-direction: column;
    font-size: var(--font-size-small);
    gap: 1rem;
    padding: 2rem var(--body-padding);
    border-top: 2px solid var(--wp-custom-contrast-50);
}

.footer__content {
    display: flex;
    gap: 0.5rem;
}

.footer__link {
    color: var(--white);
}

.footer__link:hover {
    color: var(--primary-blue);
}

.number-of-sites__count {
    margin: 0;
    padding: var(--body-padding);
    font-weight: 500;
    font-size: calc( 100vw / 3.5 );
    line-height: 1;
    text-align: center;
    letter-spacing: -0.4rem;
}

.form-section__form-result.error {
    color: var(--error-red);
}

.form-section__form-result.success {
    color: var(--success-green);
}

.form-section__form-input.error {
    color: var(--white);
    background-color: var(--error-red);
    border-color: var(--error-red);
}

.form-section__form-input.success {
    color: var(--white);
    background-color: var(--success-green);
    border-color: var(--success-green);
}

@media (min-width: 610px) {
    .footer {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (min-width: 800px) {
    :root {
        --body-padding: 2rem;
    }

    .header {
        flex-direction: row;
        column-gap: 5rem;
    }

    .header__logo {
        position: absolute;
    }


    .form-section {
        position: absolute;
        top: var(--body-padding);
        right: var(--body-padding);
        width: 500px;
        padding: 0;
    }

    .form-section__body {
        margin-top: 0;
    }

    .form-section__download {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 2.5rem;
    }

    .number-of-sites {
        display: flex;
        flex-direction: column-reverse;
        align-items: end;
        justify-content: space-between;
        min-height: calc( 100vw / 1.35 )/* Rough calculation of: viewport height, minus footer height, minus body top/bottom padding */
    }

    .number-of-sites__count {
        text-align: right;
        letter-spacing: -0.4rem;
    }
}

@media (min-width: 1200px) {
    .number-of-sites {
        min-height: calc( 100vw / 1.7 );/* Rough calculation of: viewport height, minus footer height, minus body top/bottom padding */
    }
}

@media (min-width: 1700px) {
    .number-of-sites {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        gap: 5rem;
        margin-top: auto;
        margin-bottom: 3vw;
        padding-right: var(--body-padding);
        min-height: unset;
    }

    .number-of-sites__count {
        padding: 0;
        font-size: calc( 100vw / 4.25 );
    }

    .form-section {
        position: initial;
    }
}
