@layer reset, base;

@layer reset {
    *, *::before, *::after { box-sizing: border-box; }
    * {  margin: 0;  }

    img, picture, video, canvas, svg {
        display: block;
        max-width: 100%;
        height: auto;
    }

    input, button, textarea, select {
        font: inherit;
        color: inherit;
    }

    :root {  color-scheme: light dark;  }
    html { overflow-x: hidden; }
}

@layer base {
    :root {
        --bg: #ffffff;
        --ink: #000000;
        --link: #0d3fab;
        --link-visited: #6633ba;
    }

    @media (prefers-color-scheme: dark) {
        :root {
            --bg: #000000;
            --ink: #ffffff;
            --link: #41B8FF;
            --link-visited: #b37ffd;
        }
    }

    [data-theme="light"] {
        --bg: #ffffff;
        --ink: #000000;
        --link: #0d3fab;
        --link-visited: #6633ba;
    }

    [data-theme="dark"] {
        --bg: #000000;
        --ink: #ffffff;
        --link: #41B8FF;
        --link-visited: #b37ffd;
    }

    html, body {
        height: 100%;
        font-size: 100%;
    }

    body {
        background: var(--bg);
        color: var(--ink);
        font-family:
            'JetBrains Mono', ui-monospace,
            SFMono-Regular, Menlo, Monaco, /* Mac */
            'Cascadia Code', 'Cascadia Mono', Consolas, /* Windows */
            'Ubuntu Mono', 'DejaVu Sans Mono', 'Liberation Mono', 'Noto Sans Mono', /* Linux */
            monospace;
        line-height: 1.5;
        -webkit-font-smoothing: antialiased;
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        overflow-x: hidden;
        position: relative;
    }

    #background-canvas {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
        pointer-events: none;
    }

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

    :where(h1, h2) {
        line-height: 1.2;
        font-weight: 700;
    }

    h1 {  font-size: 6rem;  }
    h2 {  
        font-size: 2.5rem;
        margin-bottom: clamp(1.5rem, 2rem, 2.5rem);
    }

    p { 
        margin-block: 2rem; 
        overflow-wrap: break-word;
    }

    header {
        padding-top: clamp(1rem, 2rem, 2rem);
    }

    nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        max-width: 1200px;
        margin-inline: auto;
        flex-wrap: wrap;
        gap: 1rem;
    }

    @media (max-width: 768px) {
        nav {
            flex-direction: column;
            align-items: center;
        }
        .theme-toggle {
            align-self: normal;
        }
    }

    .nav-links {
        display: flex;
        gap: clamp(1rem, 2rem, 2rem);
        flex-wrap: wrap;
    }

    .nav-links a {
        color: var(--ink);
        text-decoration: none;
        font-weight: 500;
        transition: opacity 0.2s ease;
    }

    .nav-links a:hover {
        opacity: 0.9;
    }

    main {
        padding: clamp(1rem, 2rem, 2rem);
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
        flex: 1;
        width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    main > .title-main + * { margin-block-start: auto; }
    main > :last-child { margin-block-end: auto; }

    .title-main {
        font-size: clamp(4rem, 6rem, 132px);
        font-weight: 700;
        margin: 0 0 clamp(2rem, 2rem, 3rem) 0;
        text-align: center;
    }

    .theme-toggle {
        display: flex;
        align-items: center;
        margin-left: 2rem;
    }

    .theme-switch {
        position: relative;
        display: inline-block;
        width: 60px;
        height: 34px;
    }

    .theme-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

    .slider {
        position: absolute;
        cursor: pointer;
        inset: 0;
        background-color: var(--ink);
        transition: transform 0.2s ease;
        border-radius: 34px;
    }

    .slider:before {
        position: absolute;
        content: "";
        height: 26px;
        width: 26px;
        left: 4px;
        bottom: 4px;
        background-color: var(--bg);
        transition: transform 0.2s ease;
        border-radius: 50%;
    }

    input:checked + .slider:before {
        transform: translateX(26px);
    }

    input:checked + .slider {
        background-color: var(--ink);
    }

    .slider:hover {
        opacity: 0.9;
    }

    footer {
        width: 100%;
        padding: 2rem 0;
        border-top: 1px solid var(--ink);
        position: relative;
    }

    .footer-content {
        max-width: 1200px;
        margin-inline: auto;
        padding-inline: 1rem;
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 1rem;
    }

    .footer-copyright {
        justify-self: center;
        grid-column: 2;
        font-size: 0.9rem;
        color: var(--ink);
        opacity: 0.9;
    }

    .partner-logos {
        display: flex;
        gap: clamp(1rem, 2rem, 2rem);
        align-items: center;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .partner-logo {
        height: 60px;
        width: auto;
        max-width: 100%;
    }

}
