:root {
        --r: 20px;
        --c: #171717;
        --light-reflect: inset -5px 20px 2px -20px #fff, inset 5px -20px 2px -20px #fff;
        --shadow-reflect: inset -19px 1px 2px -20px #000, inset 19px 1px 2px -20px #000, inset 19px 1px 2px -20px #000,
                inset -15px -26px 3px -30px #000;
        --hh: 8rem;
        --animation-duration: 0.3s;
        --perspective: 1000px;
        /* --font-size: clamp(1.2em, 4vw, 42px); */
        --font-size: 42px;
        --k: -0.1618033988749895em;
}

@keyframes backgroundColorAnimation {
        0% {
                --dynamic-color: #6d788f;
        }
        100% {
                --dynamic-color: #778299;
        }
}

body {
        display: flex;
        padding: 0 2rem;
        color: var(--c);
        flex-direction: column;
        margin: 0;
        overflow: hidden;
        font-family: "Space Mono", monospace;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        background: radial-gradient(#ffffff54 2px, transparent 0) 0 0/40px 40px,
                radial-gradient(#00000026 2px, transparent 0) -1px 1px/40px 40px,
                radial-gradient(ellipse at 150% -50%, var(--dynamic-color), #fff);
        animation: backgroundColorAnimation 30s ease infinite;
}

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

.form {
        position: relative;
        --gap: 0.5rem;
        max-width: 50rem;
        flex: 1 1 auto;
        height: var(--hh);
        transition: 250ms ease all;
        transform-style: preserve-3d;
}
.form.open {
        height: calc(var(--hh) * 1.5 + var(--gap));
}

button,
input {
        transition: background-color var(--animation-duration) ease, transform var(--animation-duration) ease;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        will-change: transform, background-color;
}

button:hover,
input:focus {
        transform: translateY(-3px);
}

button {
        appearance: none;
        border: none;
        background: none;
}

input {
        appearance: none;
        border: none;
        background: none;
        width: 100%;
        height: 4rem;
        padding: 0 2rem;
        color: var(--c);
}
input:focus {
        outline: none;
        background-color: #ffffff10;
        box-shadow: 0 0 0 2px #ffffff50;
}
input::placeholder {
        opacity: 0.3;
}

* {
        -webkit-tap-highlight-color: transparent;
}

.ia1-k {
        letter-spacing: var(--k);
}
.ia1-k-normal {
        letter-spacing: var(--k);
}
.ia1-anim-k {
        animation: in 10s ease-out forwards;
}

@keyframes in {
        0% {
                letter-spacing: inherit;
        }
        100% {
                letter-spacing: var(--k);
        }
}

.form-title {
        font-family: "Space Mono", monospace;
        font-weight: 400;
        font-style: normal;
        font-size: clamp(1.1618033988749895em, 4vw, 1.5em);
        color: #333;
        text-align: center;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}
@keyframes gradient {
        0% {
                background-size: 100%;
        }
        50% {
                background-size: 150%;
        }
        100% {
                background-size: 100%;
        }
}
.glass {
        overflow: hidden;
        position: relative;
        display: flex;
        align-items: center;
        min-height: 4rem;
        border-radius: var(--r);
        border: none;
        width: 100%;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(3px) brightness(90%) saturate(200%);
        text-shadow: 0.25em 0.25em 1px #00000010;
        --shadow-color: 0deg 0% 64%;
        --shadow-elevation-high: 0.5px 1px 1.1px hsl(var(--shadow-color) / 0.28), 1.4px 3.1px 3.4px -0.4px hsl(var(--shadow-color) / 0.27),
                2.5px 5.3px 5.9px -0.7px hsl(var(--shadow-color) / 0.25), 3.9px 8.4px 9.3px -1.1px hsl(var(--shadow-color) / 0.24),
                6px 12.9px 14.3px -1.5px hsl(var(--shadow-color) / 0.23), 9px 19.5px 21.6px -1.8px hsl(var(--shadow-color) / 0.21),
                13.4px 28.9px 32px -2.2px hsl(var(--shadow-color) / 0.2), 19.3px 41.7px 46.2px -2.6px hsl(var(--shadow-color) / 0.19),
                27.1px 58.5px 64.8px -2.9px hsl(var(--shadow-color) / 0.17), 37.1px 80px 88.6px -3.3px hsl(var(--shadow-color) / 0.16);
        --inner-light: inset 0 -6px 2px -5px #ffffff24, inset 0 -8px 3px -5px #ffffff3b, inset 0 -20px 10px -15px #ffffff5c,
                inset 7px 25px 10px -20px #ffffff5c;
        --inner-shadow: inset -20px 5px 10px -20px #00000021, inset -40px 50px 7px -55px #00000021;
        --external-light: 5px -30px 30px -20px #ffffff70, 5px 10px 30px -20px #ffffff70;
        --default: var(--external-light), var(--shadow-elevation-high), var(--inner-light), var(--inner-shadow);
        box-shadow: var(--default);
        animation: glassAnimation var(--animation-duration) infinite alternate, lightGlow 5s infinite alternate;
}
@keyframes lightGlow {
        0% {
                box-shadow: var(--default), 0 0 30px 10px #fff;
        }
        100% {
                box-shadow: var(--default), 0 0 20px 5px #fff;
        }
}
@keyframes glassAnimation {
        from {
                background-color: rgba(255, 255, 255, 0.1);
        }
        to {
                background-color: rgba(255, 255, 255, 0.2);
        }
}
.glass:focus {
        outline: none;
}
.glass--gradient {
        background-position: center;
        animation: gradient 10s linear infinite;
        background-image: linear-gradient(45deg, #85d5e757, #7a9ed254, #ba6ac93d, #de54c217, #f86b2d4f);
}
.glass--heading {
        font-size: 1.1rem;
}
.glass--heading:before {
        --i: 2px;
        opacity: 0.6;
}
.glass--heading:after {
        --i: 4px;
}
.glass:before,
.glass--heading:before,
.glass--heading:after {
        border-radius: calc(var(--r) - var(--i));
}
.glass--heading:before,
.glass--heading:after {
        content: "";
        pointer-events: none;
        position: absolute;
        inset: var(--i);
        border-radius: calc(var(--r) - var(--i));
        box-shadow: var(--light-reflect), var(--shadow-reflect);
}
.glass > * {
        position: relative;
        z-index: 1;
        border-radius: inherit;
}
.glass:before {
        --r: 20px;
        --bp: 50px;
        --s: calc(0% + var(--bp) + var(--r));
        --e: calc(100% - var(--bp) - var(--r));
        --z: calc(0% + var(--bp));
        --h: calc(100% - var(--bp));
        content: "";
        position: absolute;
}

.form-header {
        height: var(--hh);
        padding: 0 2rem;
        display: flex;
        align-items: center;
        gap: 2rem;
}
.form-title .highlight {
        font-weight: 700;
        font-size: clamp(1.2em, 4vw, 42px);
}

@keyframes icon {
        0% {
                rotate: 0deg;
                scale: 0.8;
                filter: hue-rotate(0deg);
        }
        50% {
                rotate: 180deg;
                scale: 1.2;
                filter: hue-rotate(90deg);
        }
        100% {
                rotate: 360deg;
                scale: 0.8;
                filter: hue-rotate(0deg);
        }
}
.form-icon {
        position: relative;
        background: rgba(255, 255, 255, 0.2);
        display: block;
        aspect-ratio: 1;
        flex: 0 0;
        border-radius: 50%;
        height: 4rem;
        box-shadow: var(--light-reflect), var(--shadow-reflect);
        animation: breathe var(--animation-duration) infinite alternate, rotateIcon 10s infinite linear;
}
@keyframes rotateIcon {
        0% {
                transform: rotate(0deg);
        }
        100% {
                transform: rotate(360deg);
        }
}
@keyframes breathe {
        from {
                transform: scale(1);
        }
        to {
                transform: scale(1.05);
        }
}
.form-icon:before {
        animation: icon 5000ms cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
        content: "a";
        position: absolute;
        inset: 0;
        background: radial-gradient(#ffffff54 2px, transparent 0) 0 0/40px 40px,
                radial-gradient(#00000026 2px, transparent 0) -1px 1px/40px 40px, radial-gradient(ellipse at 150% -50%, #6d788f, #fff);
}

.form-close-button {
        position: absolute;
        color: var(--c);
        background: rgba(255, 255, 255, 0.3);
        top: 0.75rem;
        right: 0.75rem;
        box-shadow: var(--light-reflect), var(--shadow-reflect);
        display: grid;
        place-content: center;
        height: 1.5rem;
        width: 1.5rem;
        border-radius: 50%;
        cursor: pointer;
        visibility: hidden;
        opacity: 0;
        transition: opacity 250ms ease;
}
.open .form-close-button {
        visibility: visible;
        opacity: 1;
}

#heading {
        transition: transform 250ms ease, filter 250ms ease;
        cursor: pointer;
        will-change: transform, filter;
}
.form:not(.open) #heading:hover {
        transform: scale(0.99);
        filter: brightness(0.95);
}
.form:not(.open) #heading:active {
        transform: scale(0.98);
        filter: brightness(0.8);
}

#input {
        position: absolute;
        top: 0;
        left: 0;
        z-index: -1;
        height: var(--hh);
        transition: var(--animation-duration) ease all;
        transform: translateY(0);
        opacity: 0;
        will-change: transform, opacity;
}
.open #input {
        transform: translateY(calc(var(--hh) + var(--gap)));
        height: calc(var(--hh) / 2);
        opacity: 1;
        z-index: 2;
}
.centered-title {
        position: absolute;
        text-align: center;
        margin-bottom: 5rem;
}

.text {
        margin: 0;
        font-family: "Space Mono", monospace;
        font-weight: 700;
        font-size: 25em;
        color: transparent;
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
        background-image: linear-gradient(45deg, #85d5e757, #7a9ed254, #ba6ac93d, #de54c217, #f86b2d4f);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        position: absolute;
        padding-top: 4rem;
        right: 50%;
        transform: translate(50%, -50%);
        text-transform: uppercase;
        line-height: 100%;
}
