@font-face {
    font-family: 'Roboto Condensed';
    src: url('fonts/roboto.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Roboto Condensed';
    src: url('fonts/roboto-bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-dark: #123;
    --primary: #80c0ff;
    --highlight: #08f;
    --highlight-light: #8cf;
    --error: #ff4040;
    --text-light: #aad4ff;
    --text-muted: #aaa;
    --snackbar-bg: #333;
    --snackbar-text: #fff;
    --btn-bg: #4080c0;
    --btn-bg-hover: var(--primary);
    --ease-standard: 0.5s ease;
}

html {
    font-size: clamp(14px, 1.2vw, 18px);
    font-weight: 300;
    scroll-behavior: smooth;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    margin: 0 auto;
    max-width: 1500px;
    font-family: 'Roboto Condensed', sans-serif;
    background: linear-gradient(to bottom, var(--bg-dark), #000);
    color: #fff;
    line-height: 1.6;
    padding: 0 1rem;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.fade-init {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--ease-standard), transform var(--ease-standard);
}
.fade-in {
    opacity: 1;
    transform: translateY(0);
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 4rem 1rem 2rem;
}
header h2 {
    font-size: 1rem;
    font-weight: 300;
    margin: 1rem 0;
}
header img {
    max-width: 100%;
    height: 4rem;
    margin-bottom: 1rem;
}

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10rem;
    margin-bottom: 10rem;
    width: 100%;
}

nav a,
button,
.ripple-button {
    -webkit-tap-highlight-color: transparent;
}

nav a {
    flex: 1 1 auto;
    min-width: 120px;
    height: 2.5rem;
    padding: 0.25rem;
    color: var(--primary);
    text-decoration: none;
    border-radius: 0.5rem;
    background-color: rgba(255 255 255 / 0.1);
    backdrop-filter: blur(4px);
    text-align: center;
    font-weight: 500;
    user-select: none;
    transition: background-color var(--ease-standard), color var(--ease-standard);
}
nav a:hover,
nav a:focus-visible {
    background-color: rgba(128 192 255 / 0.5);
    color: #fff;
    outline: none;
}

section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 10rem 1rem;
    text-align: left;
}
section:nth-of-type(odd) {
    flex-direction: row-reverse;
}
section img {
    display: block;
    width: 100%;
    max-width: 500px;
    height: auto;
    margin: auto;
    border-radius: 0.75rem;
    flex-shrink: 0;
}
section > div {
    flex: 1 1 300px;
    min-width: 250px;
    max-width: 700px;
}
section h2 {
    font-size: 2rem;
    color: var(--highlight-light);
    margin-bottom: 1rem;
    font-weight: 400;
}

ul li {
    margin-bottom: 1.25rem;
    word-break: break-word;
}

form {
    margin: 4rem auto;
    max-width: 700px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    color: #cceeff;
    padding: 1rem;
    position: relative;
}
form label {
    font-weight: 400;
    color: var(--text-light);
    margin-top: 0.5rem;
    display: block;
}
form input,
form textarea,
form select {
    margin-top: -0.5rem;
    margin-bottom: -0.5rem;
    border-radius: 0.25rem;
    padding: 1rem;
    font-weight: 400;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    background-color: var(--bg-dark);
    color: #fff;
    transition: background-color var(--ease-standard), color var(--ease-standard);
}
input:-webkit-autofill {
    box-shadow: 0 0 0 1000px var(--bg-dark) inset;
    -webkit-text-fill-color: #fff;
    color: #fff;
}
form input:focus,
form textarea:focus,
form select:focus {
    background-color: #234;
    box-shadow: 0 0 0 1000px #234 inset;
    color: #fff;
}
form input:focus-visible,
form textarea:focus-visible,
form select:focus-visible {
    box-shadow: 0 0 0 1000px #234 inset;
    outline: 2px solid var(--highlight);
}

.input-error,
.input-valid {
    background-color: var(--bg-dark);
}

.error-message {
    color: var(--error);
    font-size: 0.75rem;
    display: block;
    height: 2em;
    visibility: hidden;
}
.input-error ~ .error-message {
    visibility: visible;
}

.btn,
.ripple-button {
    position: relative;
    overflow: hidden;
    z-index: 0;
    border-radius: 2rem;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    font-weight: 400;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: background-color var(--ease-standard), transform var(--ease-standard);
}

.ripple-button {
    background-color: var(--btn-bg);
    color: #000;
}
.ripple-button:hover,
.ripple-button:focus-visible {
    background-color: var(--btn-bg-hover);
    transform: scale(1.1);
    outline: none;
}
.ripple-button:focus-visible {
    box-shadow: 0 0 0 3px var(--primary);
    transform: none;
    transition: box-shadow var(--ease-standard);
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(0 0 0 / 0.3);
    transform: scale(0);
    animation: ripple-animation 500ms linear;
    pointer-events: none;
    z-index: 1000;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

#snackbar {
    min-width: 250px;
    background-color: var(--snackbar-bg);
    color: var(--snackbar-text);
    text-align: center;
    border-radius: 8px;
    padding: 12px 24px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--ease-standard), transform var(--ease-standard);
}
#snackbar.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

footer {
    text-align: center;
    margin: 5rem;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
}

#overlay {
    position: fixed;
    inset: 0;
    background: rgba(0 16 32 / 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.spinner .circle {
    position: absolute;
    border: 10px solid transparent;
    border-top-color: var(--highlight);
    border-radius: 50%;
    filter: drop-shadow(0 0 10px var(--highlight));
    animation-timing-function: linear;
}
.spinner .circle.outer {
    width: 200px;
    height: 200px;
    animation: spin 1s ease infinite;
}
.spinner .circle.inner {
    width: 100px;
    height: 100px;
    animation: spinReverse 0.5s ease infinite;
}

@keyframes spin {
    0% { transform: rotate(0); }
    100% { transform: rotate(360deg); }
}
@keyframes spinReverse {
    0% { transform: rotate(0); }
    100% { transform: rotate(-360deg); }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    header img {
        max-width: 100%;
        width: 100%;
        height: auto;
    }
    section h2 {
        font-size: 2rem;
    }
    header h2 {
        font-size: 1rem;
    }
    nav {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        height: auto;
    }
    nav a {
        width: 100%;
        max-width: 300px;
    }
    section {
        flex-direction: column !important;
        padding: 4rem 1rem;
        text-align: center;
    }
    section img {
        width: 90%;
        max-width: 300px;
    }
    form {
        gap: 0.5rem;
    }
    form input,
    form textarea,
    form select {
        padding: 1rem;
        margin-top: -0.1rem;
        margin-bottom: -0.1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

#fileName {
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    vertical-align: middle;
}
.hidden {
    display: none;
}
