#banner {
    position: absolute;
    background: var(--color-bg-hover);
    inset: 0;
    top: unset;
    padding: 16px;
    z-index: 999999999;
}

#banner a {
    color: var(--color-accent);
}

:root {
    --color: #292a2c;
    --color-bg: #fffefb;
    --color-bg-hover: #f0f2f6;
    --color-bg-active: #e3e5e8;
    --color-blobs: #4b85f9;

    --nav-radius: 0;

    --color-accent: #2d4f94;

    /* #082234 */
}

/* @media (prefers-color-scheme: dark) {
    :root {
        --color: #ebeae7;
        --color-bg: #191a1b;
    }
} */

@font-face {
    font-family: serif-font;
    src: url("./dm_serif.ttf");
}

html, body {
    height: 100%;
    font-size: 18px;
    color: var(--color);
    background: var(--color-bg);
    overflow: hidden;
}

::selection {
    background: var(--color-accent);
    color: var(--color-bg);
}

* {
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-sizing: border-box;
    font-family: serif-font, serif;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, header {
    -webkit-font-smoothing: antialiased;
}

h1 {
    font-size: 2em;
}

h2 {
    font-size: 1.5em;
}

h3 {
    font-size: 1.15em;
}

header {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    gap: 5px;
}

nav, #inverted-nav {
    padding: 2px 0;
    display: flex;
    justify-content: center;
    position: relative;
}

a {
    cursor: pointer;
    color: inherit;
    outline: none;
}

nav a, #inverted-nav a {
    position: relative;
    width: max-content;
    font-weight: 600;
    text-decoration: none;
    padding: 0 7.5px;
    text-align: center;
}

nav a:first-child, #inverted-nav a:first-child {
    margin-left: 6px;
}

nav a:last-of-type, #inverted-nav a:last-child {
    margin-right: 6px;
}

#inverted-nav {
    background: var(--color);
    position: absolute;
    pointer-events: none;
    transition: clip-path 0.3s ease;
    inset: 0;
    clip-path: inset(100% 100% 100% 100%);
}

#inverted-nav a {
    color: var(--color-bg);
}

section {
    position: fixed;
    inset: 0;
    top: 100px;
    padding: 50px;
    overflow: auto;
    background: var(--color-bg);
}

#piece {
    z-index: 2;
    transition: transform 0.2s ease, opacity 0.1s linear;
}

#piece.hidden {
    opacity: 0;
    transform: translateY(50%);
}

form, #form-complete {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 0 auto;
    max-width: min(275px, 100%);
}

#form-complete {
    text-align: center;
}

input[type="text"], input[type="email"], textarea {
    outline: 1px solid var(--color);
    transition: outline-offset 0.15s ease, padding 0.15s ease, margin 0.15s ease;
    padding: 5px;
    font-size: inherit;
    width: 100%;
    min-height: 35.5px;
    color: inherit;
    resize: vertical;
    display: block;
}

textarea {
    height: 100px;
    max-height: calc(100svh - 100px - (35.5px * 2) - 34.5px - 60px - 100px);
    background-image: none;
}

::-webkit-resizer {
    background-color: transparent;
}

.textarea-resizer {
    pointer-events: none;
    position: absolute;
    right: 1px;
    bottom: 1px;
    height: 12px;
    width: 12px;
    background: var(--color-bg);
    outline: 1px solid var(--color-bg);
    border-top-left-radius: 10px;
}

.textarea-resizer svg {
    color: var(--color);
    position: absolute;
    inset: 0;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper > label {
    position: absolute;
    left: 3px;
    top: 5px;
    pointer-events: none;
    padding: 0 2px;
    transition: transform 0.15s ease, font-size 0.15s ease;
}

.input-wrapper > label::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--color-bg);
    transform: translateY(-50%);
    z-index: -1;
}

.input-wrapper:has(:where(input, textarea):not(:placeholder-shown), :where(input, textarea):focus) > label {
    transform: translateY(-20px);
    font-size: 0.875em;
}

:where(input[type="text"], input[type="email"], textarea):is(:focus-visible, :not(:placeholder-shown)) {
    outline-offset: 2px;
}

#submit {
    font-size: inherit;
    cursor: pointer;
    padding: 5px;
    width: 100%;
    transition: outline-offset 0.15s ease;
}

#submit {
    background: var(--color);
    color: var(--color-bg);
    outline: 2px solid var(--color);
    outline-offset: -2px;
}

#submit:hover {
    outline-offset: 0;
}

#submit:active {
    outline-offset: -1px;
}

#submit:focus-visible:not(:hover) {
    transition: none;
    outline: 1px solid var(--color);
    outline-offset: 2px;
}

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active{
    -webkit-box-shadow: 0 0 0 30px var(--color-bg) inset !important;
    color: var(--color) !important;
}

#email-span {
    display: inline-block;
    font-size: 0.75em;
    margin-top: -15px;
    width: 100%;
}

#email-address {
    user-select: all;
}

#email-address:hover {
    outline: 1px solid var(--color);
    outline-offset: 1px;
}

#recordings {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    justify-content: center;
}

#recordings iframe {
    display: block;
    flex-shrink: 0;
    max-width: 100%;
}

details {
    interpolate-size: allow-keywords;
    transition: outline-offset 0.15s ease;
    /* outline: 1px solid var(--color); */
    margin-bottom: 10px;
    position: relative;
}

details::before {
    content: "";
    position: absolute;
    inset: var(--outline-offset, 0);
    /* bottom: calc(100% - 47px - var(--outline-offset, 0px)); */
    border: 1px solid var(--color);
    pointer-events: none;
    transition: inset 0.15s ease;
}

details:has(summary:hover) {
    --outline-offset: -2px;
}

details:has(summary:active) {
    --outline-offset: -1px;
}

details:has(summary:focus-visible:not(:hover)) {
    --outline-offset: -2px;
}

details::details-content {
    overflow: hidden;
    height: 0;
    transition: height 0.2s ease, content-visibility 0.2s linear, margin 0.2s ease, padding 0.2s ease;
    transition-behavior: allow-discrete;
}

details[open]::details-content {
    height: auto;
}

summary {
    padding: 5px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.1s linear;
    cursor: pointer;
    outline: none;
    position: relative;
}

summary::-webkit-details-marker {
    display: none;
}

summary > svg {
    height: 1.25rem;
    width: 1.25rem;
    transition: transform 0.2s ease;
    margin-left: auto;
}

details[open] > summary > svg {
    transform: rotate(90deg);
}

summary::marker {
    display: none;
    content: "";
}

.details-content {
    position: relative;
    padding: 10px;
    padding-top: 5px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.details-content li {
    position: relative;
    padding-left: 15px;
}

.details-content li::before {
    content: "•";
    position: absolute;
    left: 0;
    height: 1em;
}

.details-content li > div {
    display: flex;
    gap: 1ch;
    white-space: nowrap;
    flex-wrap: wrap;
}

.details-content li > div > a {
    color: var(--color-accent);
}

.details-content li > div > div {
    display: flex;
    gap: 1ch;
    white-space: nowrap;
    flex-wrap: wrap;
}

.details-content li > div > div > :first-child::after {
    content: ",";
}

.sub-category {
    display: flex;
    flex-direction: column;
    gap: 10px;
    list-style: none;
}

details:has(summary:hover)::details-content {
    margin: 0 -2px;
    padding: 0 2px;
    --inset: -2px;
}

details:has(summary:active)::details-content {
    margin: 0 -1px;
    padding: 0 1px;
    --inset: -1px;
}

details:has(summary:focus-visible:not(:hover))::details-content {
    margin: 0 -2px;
    padding: 0 2px;
    --inset: -2px;
}

.video-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.video-wrapper > iframe {
    max-width: 100%;
}
