* {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    font-family: Arial, Helvetica, sans-serif;
    color: #172033;
    background: #f5f7fb;
}

body {
    margin: 0;
    min-height: 100vh;
}

.container {
    width: min(1050px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    background: #172b4d;
    color: white;
}

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    color: white;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: .2px;
}

.header-note {
    color: #cbd5e1;
    font-size: .9rem;
}

.intro {
    padding: 58px 0 30px;
}

.eyebrow {
    margin: 0 0 12px;
    color: #4968a5;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .13em;
}

h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: -.04em;
}

.intro-text {
    margin: 12px 0 0;
    color: #647084;
    font-size: 1.05rem;
}

.tapahtuma-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    padding: 12px 0 60px;
}

.tapahtuma-osa {
    display: flex;
    flex-direction: column;
    min-height: 235px;
    padding: 24px;
    background: white;
    border: 1px solid #e4e9f2;
    border-radius: 14px;
    box-shadow: 0 5px 18px rgb(23 43 77 / 5%);
}

.tapahtuma-aika {
    color: #4968a5;
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.tapahtuma-osa h2 {
    margin: 13px 0 10px;
    font-size: 1.25rem;
}

.tapahtuma-kuvaus {
    margin: 0 0 22px;
    color: #596579;
    line-height: 1.6;
    white-space: normal;
}

.tapahtuma-sijainti {
    margin: auto 0 0;
    color: #34445f;
    font-size: .92rem;
    font-weight: 600;
}

.notice {
    margin: 10px 0 70px;
    padding: 22px;
    background: white;
    border: 1px solid #e4e9f2;
    border-radius: 12px;
    color: #596579;
}

.notice.error {
    border-color: #efcaca;
    color: #9c2c2c;
}

.site-footer {
    padding: 24px 0;
    background: #eaf0f8;
    color: #647084;
    font-size: .9rem;
}


/* Buttons */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 43px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: #244b83;
    color: white;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    background: #193a6b;
}

/* Registration page */

.form-page {
    max-width: 760px;
    padding-bottom: 60px;
}

.selected-event {
    margin-bottom: 22px;
    padding: 22px 24px;
    background: white;
    border: 1px solid #e4e9f2;
    border-radius: 14px;
}

.selected-event h2 {
    margin: 13px 0 10px;
    font-size: 1.25rem;
}

.selected-event p {
    color: #596579;
    line-height: 1.6;
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    background: white;
    border: 1px solid #e4e9f2;
    border-radius: 14px;
}

.signup-form label {
    margin-top: 8px;
    font-weight: 700;
    font-size: .94rem;
}

.signup-form input,
.signup-form select,
.signup-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd4e2;
    border-radius: 8px;
    background: white;
    color: #172033;
    font: inherit;
}

.signup-form input:focus,
.signup-form select:focus,
.signup-form textarea:focus {
    outline: 2px solid #8aa8d8;
    outline-offset: 1px;
}

.field-help {
    margin: 0 0 5px;
    color: #647084;
    font-size: .85rem;
    line-height: 1.5;
}

.signup-form .button {
    width: 100%;
    margin-top: 12px;
}

.notice.success {
    border-color: #b7dfc4;
    color: #21643b;
}

.header-link {
    color: #dce6f7;
    text-decoration: none;
    font-size: .92rem;
}

.header-link:hover {
    text-decoration: underline;
}

@media (max-width: 520px) {
    .form-page {
        padding-bottom: 40px;
    }

    .signup-form {
        padding: 20px;
    }
}


@media (max-width: 520px) {
    .header-note {
        font-size: .8rem;
    }

    .intro {
        padding-top: 42px;
    }

    .tapahtuma-osa {
        padding: 20px;
    }
}
