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

:root {
    /* Colors */
    --white: #FFFFFF;
    --grey: #949494;
    --blue-800: #242742;
    --blue-700: #36384D;
    --red: #FF6155;
    --red-100: #FFE7E6;

    /* Gradient */
    --gradient-start: #FF6A3A;
    --gradient-end: #FF527B;
    --gradient: linear-gradient(to right, var(--gradient-start), var(--gradient-end));

    /* Spacing */
    --spacing-8: 0.5rem;
    --spacing-16: 1rem;
    --spacing-24: 1.5rem;
    --spacing-32: 2rem;
    --spacing-40: 2.5rem;
    --spacing-48: 3rem;
    --spacing-64: 4rem;
    --spacing-72: 4.5rem;
    --spacing-104: 6.5rem;

    /* Typography - Font Sizes */
    --font-size-sm: 0.75rem;
    --font-size-base: 1rem;
    --font-size-lg: 2.5rem;
    --font-size-xl: 3.5rem;

    /* Typography - Font Weights */
    --font-weight-normal: 400;
    --font-weight-bold: 700;

    /* Border Radius */
    --border-radius-sm: 0.5rem;
    --border-radius-lg: 2.25rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    letter-spacing: 0;
    color: var(--blue-800);
}

.newsletter-signup {
    max-width: 375px;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-40);
    justify-content: center;
    align-items: center;
}

.newsletter-signup--hidden {
    display: none;
}

.newsletter-signup__wrapper {
    max-width: 327px;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-40);
}

.newsletter-signup__content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-24);
}

.newsletter-signup__title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    line-height: 100%;
}

.newsletter-signup__description {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: 150%;
}

.features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-16);
}

.features-list__item {
    padding-left: var(--spacing-32);
    position: relative;
    font-size: var(--font-size-base);
    line-height: 150%;
}

.features-list__item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 21px;
    height: 21px;
    background-image: url('./assets/images/icon-list.svg');
    background-size: contain;
    background-repeat: no-repeat;
}

.email-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-24);
    padding-bottom: var(--spacing-40);
}

.email-form__label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    line-height: 150%;
    display: flex;
    flex-direction: column;
}

.email-form__label-row {
    display: flex;
    justify-content: space-between;
}

.email-form__label-text {
    /* Inherits styles from .email-form__label */
}

.email-form__error {
    color: var(--red);
}

.email-form__input {
    padding: var(--spacing-16) var(--spacing-24);
    border: 1px solid var(--grey);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
}

.email-form__input--error {
    border: 1px solid var(--red);
    color: var(--red);
    background-color: var(--red-100);
}

.email-form__button, .success-message__button {
    padding: var(--spacing-16);
    border: none;
    border-radius: var(--border-radius-sm);
    background: var(--blue-800);
    color: var(--white);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    line-height: 150%;
    cursor: pointer;
    width: 100%;
}

.success-message {
    max-width: 375px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--spacing-104) var(--spacing-24) var(--spacing-40);
}

.success-message--hidden {
    display: none;
}

.success-message__header {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-32);
}

.success-message__icon {
    width: 64px;
    height: 64px;
}

.success-message__title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    line-height: 100%;
}

.success-message__description {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: 150%;
}

@media (min-width: 768px) {
    body {
        background: var(--blue-700);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        display: flex;
        min-height: 100vh;
    }

    main {
        background: var(--white);
        padding: var(--spacing-40);
        border-radius: var(--border-radius-lg);
    }

    .newsletter-signup__wrapper {
        min-width: 100%;
    }

    .newsletter-signup {
        max-width: 100%;
    }

    .newsletter-signup__title {
        font-size: var(--font-size-xl);
    }

    .email-form {
        padding-bottom: 0;
    }

    .success-message {
        background: var(--white);
        border-radius: var(--border-radius-lg);
        padding: var(--spacing-24);
        max-width: 504px;
        min-height: auto;
        gap: var(--spacing-32);
    }

    .success-message__header {
        gap: var(--spacing-32);
    }
}

@media (min-width: 1440px) {
    .newsletter-signup {
        flex-direction: row-reverse;
        justify-content: normal;
        gap: var(--spacing-64);
    }

    .newsletter-signup__wrapper {
        min-width: 376px;
    }

    .email-form__button:hover, .success-message__button:hover {
        color: var(--white);
        background: var(--gradient);
    }
}