* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    height: 100%;
    scroll-behavior: smooth;
}


body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;

    > h1 {
        text-align: center;
        text-wrap: nowrap;
        font-family: 'Work Sans', sans-serif;
        font-size: clamp(1.5rem, 6vw, 3rem);
        color: #333;
        margin: 1rem 0;
        flex-grow: 1;

        > span {
            color: #4f1964;
        }
    }

    > div {
        display: flex;
        align-items: center;
        justify-content: end;
        padding-right: .4rem;

        &:first-child {
            justify-content: start;
            padding-left: .4rem;
        }

        > a.button {
            text-decoration: none;
            color: #fff;
            background-color: #8E6BBE;
            padding: 0.5rem 1rem;
            border-radius: 0.25rem;
            transition: background-color 0.3s ease;

            &:hover {
                background-color: color-mix(in srgb, #8E6BBE 80%, black);
            }
        }
    }
}

main {
    flex: 1;
    min-height: 0;
}

main > div {
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}

main > div > div:first-child {
    grid-row: 1 / 3;
}

header > div > a > img {
    height: clamp(.8rem, 9vw, 3rem);
    width: auto;
    vertical-align: middle;
    transform: translateY(-0.05em);
}

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    overflow: hidden;
}

#contact {
    scroll-margin-top: 2rem;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f8f5ff 0%, #ffffff 100%);
    padding: 0;

    > div:first-child {
        padding: clamp(2rem, 10vw, 3rem);
        min-width: 50%;
    }

    > div:last-child {
        height: 100%;
        flex: 1;
    }
}

form {
    display: grid;
    gap: clamp(0.6rem, 1.2vw, 1rem);
}

label {
    font-weight: 600;
    color: #333;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
}

input,
textarea {
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    padding: clamp(0.7rem, 1vw, 0.95rem);
    font: inherit;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
}

textarea {
    resize: vertical;
    min-height: clamp(140px, 24vh, 320px);
}

button {
    margin-top: 0.5rem;
    border: 0;
    border-radius: 0.5rem;
    background-color: #8E6BBE;
    color: #fff;
    font-weight: 600;
    padding: clamp(0.8rem, 1vw, 1rem) clamp(1rem, 1.6vw, 1.5rem);
    cursor: pointer;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
}

button:hover {
    background-color: color-mix(in srgb, #8E6BBE 80%, black);
}

.contact-alert {
    display: none;
    padding: 12px 14px;
    border-radius: 8px;
    margin: 12px 0;
    font-weight: bold;
    font-size: .75rem;

    &:target {
        display: block;
    }
}

.alert-success {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #86efac;
}

.alert-error {
    color: rgb(209, 0, 45);
    background: rgba(209, 0, 45, 0.2);
    border: 1px solid rgba(209, 0, 45, 0.5);
}
