html {
    scroll-behavior: smooth;
}

body, html {
    background-color: var(--background-color);
    font-family: "Anonymous Pro", monospace;
    color: var(--text-color, #000);
    font-size: 16px;
}

h1, h2, h3 {
    font-family: "Instrument Serif", serif;
    letter-spacing: 0.03em;
    font-weight: normal;
}

h1.large {
    font-size: 3.2em;
    text-align: center;
}

a:link, a:visited {
    color: var(--link-color);
}

a:hover {
    color: magenta;
}

.flex {display: flex;}
.justify-center { justify-content: center;}
.justify-between { justify-content: space-between;}
.justify-end { justify-content: flex-end;}
.justify-start { justify-content: flex-start;}
.align-start { align-items: flex-start;}
.align-end { align-items: flex-end;}
.align-center { align-items: center;}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.w-full { width: 100%;}

.text-right { text-align: right;}
.text-center { text-align: center;}
.text-left { text-align: left;}

.inline-block { display: inline-block; }
.block { display: block; }

hr.line {
    border: none;
    border-top: 1px solid rgba(0,0,0,0.2);
    margin: 4em 0;
}

@media (prefers-color-scheme: dark) {
    hr.line {
        border-top: 1px solid var(--EEE);
    }
}

.padded  {
    max-width: 800px;
    margin: auto;
    padding:0 20px
}

.centered-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin:3em 0;

    .blob {
        transition: fill 0.3s;
        fill: var(--text-color, #000);
    }

    .text {
        fill: var(--background-color, #FFF);
    }

    &:hover {
        .blob {
            fill:var(--signal-color, #000);
            transition: fill 0.3s;
        }
        .text {
            fill: #FFF;
        }
    }
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1em 2em;
    font-size: 1.2em;


    background-color: var(--background-color, #FFF);

    position: sticky;
    top: 0;
    z-index: 1000;

    .logo {
        path {
            fill: var(--text-color, #000);
        }
    }
    nav a {
        text-decoration: none;
        color: inherit;
        margin-left: 1.5em;
        transition: color 0.3s ease;
        letter-spacing: 1px;

        &:hover {
            color: var(--signal-color, #000);
        }
    }
}

.main-footer {
    display: flex;
    justify-content: space-between;
    padding: 30px 0;
}

.book-split {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 60px;
    h1 {
        font-size: 2.8em;
        text-align: right;
        display: inline-block;
        margin-top: -13px;
    }
    p {
        padding-bottom: 1em;
        letter-spacing: 0.05em;
    }

    .left {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

.info-screen {
    border:5px solid #000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 5px;
    margin-top:20px;
    margin-left:20px
}

.logo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top:30px;
    margin-bottom: 30px;

    img {
        opacity: 0.6;
    }
}

@media (prefers-color-scheme: dark) {
    .dark\:invert {
        filter: invert(1);
    }
}

.button, a.button {
    padding: 0.5em 1em;
    font-size: 19px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    text-align: center;
    border-radius: 10px;
    color: #FFF;
    text-decoration: none;
    background: #000;

    &:hover {
        background-color: var(--signal-color, #000);
        color: #FFF;
    }
}

.card-stack {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;

    .card {
        background-color: var(--EEE);
        border-radius: 5px;
        aspect-ratio: 9/17;
        padding:15px;
        display: flex;
        flex-direction: column;
        position: relative;
        * {
            z-index: 1;
        }
        h1 {
            font-size: 32px;
            line-height: 120%;
            margin-bottom: 10px;
        }
        .illustration {
            position: absolute;
            bottom:0;
            z-index: 0;
            left: 0;
            right: 0;
            display: flex;
            justify-content: center;
        }
        .button {
            margin-top: auto;
            align-self: flex-start;
            width: 100%;
        }
    }

    a.card {
        text-decoration: none;
        color: inherit;
        transition: transform 0.15s;
        &:hover {
            transform: scale(105%);
        }
    }
}

.people {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    margin-top: 100px;
    .person {
        text-align: center;
        svg {
            display: block;
            width: 100%;
            height: auto;
            max-width: 400px; /* optional: limit physical size */
        }
        .name {
            font-family: "Instrument Serif", serif;
            font-size: 1.3em;
        }
        .role {
            font-size:0.8em;
            text-transform: uppercase;
            opacity: 0.7;
        }
    }
}

.caos-illustration {
    width:100%;
    margin-right: -50px;
    margin-top: 30px;
}

.environment-logo {
    margin-top: 20px;
    width: 100%;
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
    img {
        max-width: 150px;
        margin-right: -10px;
    }
}


@media (max-width: 600px) {
    body { font-size: 4vw }
    h1.large { font-size: 2em;}
    p { font-size: 1em; }

    .centered-logo svg { width: 50vw; }

    .people { grid-template-columns: 1fr 1fr; }

    .main-header nav a { display: none; }
    .main-header nav a:last-child { display: block; }
    .main-footer {
        flex-direction: column;
        gap: 20px;
    }

    .card-stack {
        grid-template-columns: 1fr;
        .card {
            margin: auto;
            max-width: 230px;
        }
    }

    .book-split {
        grid-template-columns: 1fr;
        gap:0;
        h1 {
            font-size: 2em;
            text-align: center;
            margin: 1em 0 0.5em 0 ;
        }
        .left {
            flex-direction: column-reverse;
        }
    }

    .caos-illustration { margin-right: 0;}
    .info-screen { max-width: 200px; }

    .environment-logo {
        justify-content: center;
        img {
            margin-right: 0;
        }
    }
}

.centered-logo-mask {
    max-width: 400px;
    width:80%
}