@import url('https://fonts.googleapis.com/css2?family=Funnel+Display:wght@300..800&family=Funnel+Sans:ital,wght@0,300..800;1,300..800&display=swap');

/* Basic Setup */
:root {
    --x: 50%;
    --y: 50%;
    --hue-1: #a722ac;
    --hue-2: #00000000;
    --hue-3: #00000000;
}

body {
    background-color: #000000;
    color: #eee;
    font-family: "Funnel Display", sans-serif;
    display: grid;
    place-items: start center;
    min-height: 100vh;
    margin: 0;
    text-align: center;
}

main {
    width: 100%;
}

h1, h2 {
    color: #fff;
    font-weight: 300;
    letter-spacing: 1px;
}

.form-section {
    z-index: 10;
    justify-self: center;
    align-self: end;
    
    max-width: 200px;
    margin-left: 2rem;
    padding-left: 2rem;
    padding-right: 2rem;
    background-color: #ffffff0e;
    border-radius: 12px;
}

button {
    color: #fff;
    margin: 1rem;
    background-color: #ffffff3c;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 2px;
    cursor: pointer;
    transition: background-color 0.3s;
}

input, select {
    color: #fff;
    background-color: #ffffff3c;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 2px;
    margin: 0.25rem;
}

select:open {
    color: #323232;
}

input {
    max-width: 145px;
}

button:hover {
    background-color: #5e5e5e
}

.logo {
    width: 40%;
    margin: 0.5rem;
}

.interactive-container {
    position: relative;
    cursor: none;
    display: grid;
}

.spotlight-wrapper {
    grid-area: 1 / 1 / 2 / 2;
    overflow: hidden;

    mask-image: radial-gradient(
        circle 150px at var(--x) var(--y),
        black 0%,
        rgba(0, 0, 0, 0.2) 85%,
        transparent 100%
    );
    -webkit-mask-image: radial-gradient(
        circle 150px at var(--x) var(--y),
        black 0%,
        rgba(0, 0, 0, 0.2) 85%,
        transparent 100%
    );
}

.base-image {
    display: block;
    width: 90%;
    height: auto;
    max-height: 80vh;
    margin: 0 auto;
}

.led-overlay {
    grid-area: 1 / 1 / 2 / 2;
    background-color: #00000000;
}

.led-1, .led-2, .led-3 {
    position: absolute;
    inset: 0;
    width: 90%;
    height: 100%;
    margin: 0 auto;
    pointer-events: none;

    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

/* --- Individual settings for each LED --- */
/* The main div and the ::before pseudo-element get the same mask and color */
.led-1 {
    -webkit-mask-image: url('led1.png');
    mask-image: url('led1.png');
    background-color: var(--hue-1);
}

.led-2 {
    -webkit-mask-image: url('led2.png');
    mask-image: url('led2.png');
    background-color: var(--hue-2);
}

.led-3 {
    -webkit-mask-image: url('led3.png');
    mask-image: url('led3.png');
    background-color: var(--hue-3);
}

.layout-container {
    position: relative;
    display: grid; /* This allows us to easily overlap items */
}

.interactive-container,
.form-section {
    grid-area: 1 / 1 / 2 / 2;
}

@media (max-width: 800px) {
    /* Change the layout container to a vertical flexbox */
    .layout-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem; /* Adds some space between the image and the form */
    }

    .spotlight-wrapper {
        mask-image: radial-gradient(
            circle 60px at var(--x) var(--y),
            black 0%,
            rgba(0, 0, 0, 0.2) 85%,
            transparent 100%
        );
        -webkit-mask-image: radial-gradient(
            circle 60px at var(--x) var(--y),
            black 0%,
            rgba(0, 0, 0, 0.2) 85%,
            transparent 100%
        );
    }

    /* Reset form-specific alignment and margin */
    .form-section {
        align-self: auto;
        justify-self: auto;
        margin-left: 0;
    }

    /* Reduce image max-height to prevent scrolling on mobile */
    .base-image,
    .led-overlay {
        max-height: 60vh;
    }

    .logo {
        width: 80%;
        margin: 0.5rem;
    }
}