*, *::before, *::after {
    box-sizing: border-box;  
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
}

/* sections */

.intro, .ad-input{
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 .5em;
}

.intro {
    margin-top: 0;
    background-image: url('bg.png');
    background-repeat: no-repeat;
    background-position: right 90%;
    background-size: cover;
    background-color: #59C3C3;
    color: white;
}

.ad-input{
    margin: 1em 1em 0 1em;
}

.ad-output {
    display: none;
    width: 340px;
    margin: 1em auto;
    border: 3px solid #354CA1;
    padding: 1em;
    border-radius: 15px;
}

.response-text {
    white-space: pre-wrap;
    line-height: 1.6;
    color: #1f2d5a;
}

.response-text.is-error {
    color: #b42318;
}

.feedback-panel {
    margin-top: 1.5em;
    padding-top: 1em;
    border-top: 1px solid #d7def7;
}

.feedback-title {
    margin: 0 0 0.75em 0;
    color: #354CA1;
    font-weight: 700;
    text-align: center;
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 0.35em;
}

.star-btn {
    width: auto;
    margin-top: 0;
    padding: 0;
    background: transparent;
    color: #c6cde5;
    font-size: 2rem;
    line-height: 1;
}

.star-btn.is-active,
.star-btn.is-hovered {
    color: #f4b400;
}

.flag-btn {
    background: #d64550;
    font-size: 1rem;
}

.feedback-status {
    min-height: 1.25em;
    margin: 0.75em 0 0;
    color: #354CA1;
    text-align: center;
    font-size: 0.95rem;
}

h1 {
    font-size: 2.2rem;
    margin-top: .5em;
}

h2, h3, h4 {
    text-align: center;
    font-weight: 300;
    margin: 0 0 .5em 0;
    padding: 0 2rem;
}

h3 {
    font-size: 1.4rem;
}

h4 {
    font-size: 1rem;
    font-weight: 400;
    color: #354CA1;
}

strong {
    font-weight: 700;
}

textarea, input[type="text"] {
    border: 1px solid #354CA1;
    width: 280px;
    padding: 15px 15px;
    border-radius: 5px;
}

textarea {
    resize: none;
    height: 75px;
}

input::placeholder, textarea::placeholder {
    opacity: 0.4;
    color: #354CA1;
}

button {
    margin-top: 1em;
    background: #354CA1;
    width: 280px;
    padding: 15px 0;
    color: white;
    border: none;
    border-radius: 5px;
    font-family: 'Poppins';
    font-size: 1.3rem;
}

label {
    margin-bottom: -.6em;
    margin-top: .6em;
    z-index: 1;
    background-color: white;
    padding: 0 .5em;
    color: #354CA1;
}

@media (min-width: 600px){
    main {
        display: flex;
    }
    
    .intro {
        height: 100vh;
        max-width: 50%;
        justify-content: space-around;
        background-position: bottom 50% right;
    }
    
    .ad-input {
        justify-content: center;
        align-items: center;
        margin-top: unset;
        width: 50%;
    }
    
    p {
    background-color: white;
    color: #354CA1;
    padding: .3em;
    border-radius: 5px
}
}
