* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    min-height: 100%;
}

body {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    isolation: isolate;
}

body.is-logged-out {
    overflow: hidden;
}

body.is-logged-in {
    overflow-y: auto;
}

img {
    display: block;
    max-width: 100%;
}

/* Background */
.background {
    position: fixed;
    inset: 0;
    z-index: -1;

    width: 100%;
    height: 100%;
    object-fit: cover;

    pointer-events: none;
}

.site-title {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 5;

    max-width: calc(100% - 32px);
    margin: 0;

    color: black;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0;
}

.is-logged-in .site-title {
    max-width: calc(100% - 116px);
    font-size: 20px;
}

.login-form {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 4;
    transform: translate(-50%, -50%);

    display: flex;
    flex-direction: column;
    gap: 8px;

    width: min(360px, calc(100vw - 32px));
    max-height: calc(100dvh - 96px);
    overflow-y: auto;
    padding: 16px;

    background: white;
    border: 2px solid black;
}

.login-form p {
    margin: 0 0 4px;
    line-height: 1.35;
}

.login-form input,
.login-form button {
    width: 100%;
    min-height: 44px;
    padding: 8px 10px;
    font: inherit;
    font-size: 16px;
}

.login-form button,
.logout-form button {
    cursor: pointer;
}

.logout-form {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 6;
    margin: 0;
}

.logout-form button {
    min-height: 44px;
    padding: 8px 14px;
}

.login-result {
    position: fixed;
    bottom: 16px;
    left: 50%;
    z-index: 4;
    transform: translateX(-50%);

    width: min(360px, calc(100vw - 32px));
    margin: 0;
    padding: 8px 12px;

    background: white;
    border: 2px solid black;
    color: black;
}

.logged-layout {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;
    gap: 24px;

    min-height: 100vh;
    min-height: 100dvh;
    padding: 72px 12px 24px;
}

.visit-table-wrap {
    position: relative;
    z-index: 4;

    width: 100%;
    max-height: min(32dvh, 260px);
    overflow: auto;

    background: white;
    border: 1px solid black;
    overscroll-behavior: contain;
}

.visit-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;

    background: white;
    color: black;
}

.visit-table th,
.visit-table td {
    padding: 8px;
    white-space: nowrap;
}

.visit-table td:first-child {
    max-width: 180px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.hero {
    position: relative;
    z-index: 1;

    display: grid;
    gap: 24px;

    width: 100%;
    min-width: 0;
    padding: 8px 0 24px;
}

.hero-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;

    min-width: 0;
}

h1 {
    position: relative;
    z-index: 2;

    max-width: 100%;
    margin: 0;

    color: white;
    font-size: 52px;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
    overflow-wrap: break-word;
}

.foto {
    position: relative;
    z-index: 3;

    flex: 0 0 auto;
    width: 92px;
    height: 92px;
    object-fit: contain;
}

.hero-gallery {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(96px, 0.75fr);
    align-items: center;
    gap: 12px;

    width: 100%;
    max-width: 620px;
    margin: 0 auto;
}

.fotolinux,
.max-verstappen {
    position: relative;
    z-index: 2;

    width: 100%;
    height: auto;
    object-fit: cover;
}

.fotolinux {
    aspect-ratio: 800 / 448;
}

.max-verstappen {
    justify-self: center;
    max-width: 180px;
    transform: rotate(-8deg);
}

@media (min-width: 640px) {
    .site-title {
        top: 24px;
        left: 24px;
        font-size: 30px;
    }

    .is-logged-in .site-title {
        max-width: calc(100% - 136px);
        font-size: 28px;
    }

    .logout-form {
        top: 20px;
        right: 24px;
    }

    .logged-layout {
        gap: 32px;
        padding: 92px 24px 32px;
    }

    .visit-table-wrap {
        width: min(520px, 100%);
        max-height: min(36dvh, 320px);
    }

    .hero-heading {
        flex-direction: row;
        gap: 16px;
    }

    h1 {
        font-size: 80px;
    }

    .foto {
        width: 112px;
        height: 112px;
    }

    .hero-gallery {
        gap: 24px;
        max-width: 760px;
    }

    .max-verstappen {
        max-width: 190px;
        transform: rotate(-10deg);
    }
}

@media (min-width: 900px) {
    .site-title,
    .is-logged-in .site-title {
        font-size: 32px;
    }

    .logged-layout {
        display: grid;
        grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
        align-items: center;
        gap: 32px;

        padding: 96px 32px 32px;
    }

    .visit-table-wrap {
        align-self: start;
        width: 100%;
        max-height: calc(100dvh - 128px);
    }

    .hero {
        align-self: center;
        padding: 0;
    }

    h1 {
        font-size: 72px;
    }

    .foto {
        width: 108px;
        height: 108px;
    }
}

@media (min-width: 1200px) {
    .logged-layout {
        grid-template-columns: minmax(340px, 440px) minmax(0, 1fr);
        gap: 48px;
        padding-right: 48px;
        padding-left: 48px;
    }

    h1 {
        font-size: 96px;
    }

    .foto {
        width: 128px;
        height: 128px;
    }

    .hero-gallery {
        max-width: 820px;
    }

    .max-verstappen {
        max-width: 210px;
        transform: rotate(-12deg);
    }
}

@media (min-width: 1500px) {
    h1 {
        font-size: 112px;
    }

    .foto {
        width: 140px;
        height: 140px;
    }
}

@media (max-height: 500px) {
    .is-logged-out .site-title {
        top: 8px;
        font-size: 20px;
    }

    .login-form {
        top: calc(50% + 12px);
        max-height: calc(100dvh - 56px);
    }
}
