/* Registration pages: the hero's night sky, dimmed, behind a glass card. */

.page {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
}

.page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(3, 18, 43, .55), rgba(3, 18, 43, .92) 70%),
        url('/images/aspi/background.webp') center 30% / cover no-repeat;
    animation: pageBgIn 1.4s ease-out both;
}

@keyframes pageBgIn {
    from {
        opacity: 0;
        transform: scale(1.06);
    }
}

.page-main {
    flex: 1;
    width: min(640px, 100% - 32px);
    margin: 0 auto;
    padding: 120px 0 64px;
}

.panel {
    padding: clamp(26px, 5vw, 44px);
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(160deg, rgba(10, 42, 94, .62), rgba(3, 18, 43, .78));
    backdrop-filter: blur(18px);
    box-shadow: 0 30px 80px rgba(3, 18, 43, .55);
    animation: panelIn .9s cubic-bezier(.16, .84, .32, 1) .15s both;
}

@keyframes panelIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
}

.panel h1 {
    margin: 6px 0 8px;
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.2;
}

.panel .lead {
    margin: 0 0 28px;
    text-align: center;
    color: var(--ink-dim);
}

.panel .form-title {
    position: relative;
    margin: 0 -8px 14px;
    overflow: hidden;
    animation: titleIn 1.1s cubic-bezier(.16, .84, .32, 1) .35s both;
}

.form-title img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 6px 24px rgba(3, 18, 43, .5));
}

/* Light sweep across the wordmark, repeating gently. */
.form-title::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .55) 50%, transparent 62%);
    mix-blend-mode: screen;
    opacity: 0;
    pointer-events: none;
    animation: formSweep 5s ease-in-out 1.4s infinite;
}

@keyframes titleIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(.97);
        filter: blur(8px);
    }
}

@keyframes formSweep {
    0% {
        opacity: 0;
        transform: translateX(-30%);
    }

    12% {
        opacity: 1;
    }

    30%,
    100% {
        opacity: 0;
        transform: translateX(30%);
    }
}

.panel .event-line {
    text-align: center;
    margin: 0 0 22px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--blue-400);
}

.alert {
    margin: 0 0 22px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 120, 120, .35);
    background: rgba(255, 90, 90, .1);
    color: #ffc9c9;
    font-size: 14px;
}

.fields {
    display: grid;
    gap: 18px;
}

.field label,
.field legend {
    display: block;
    margin-bottom: 8px;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
}

.field .hint {
    font-weight: 400;
    color: var(--ink-dim);
}

.field input,
.field textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(3, 18, 43, .55);
    color: var(--ink);
    font: inherit;
    transition: border-color .25s, box-shadow .25s, background .25s;
}

.field textarea {
    resize: vertical;
    min-height: 56px;
}

.field input::placeholder,
.field textarea::placeholder {
    color: rgba(234, 244, 255, .36);
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--blue-400);
    background: rgba(3, 18, 43, .75);
    box-shadow: 0 0 0 4px rgba(65, 195, 255, .16);
}

.field.has-error input,
.field.has-error textarea {
    border-color: rgba(255, 120, 120, .6);
}

.field .err {
    margin-top: 6px;
    font-size: 13px;
    color: #ff9d9d;
}

fieldset.field {
    margin: 0;
    padding: 0;
    border: 0;
}

.choices {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice span {
    display: grid;
    place-items: center;
    min-height: 56px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(3, 18, 43, .55);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    transition: border-color .25s, background .25s, box-shadow .25s, transform .25s;
}

.choice span:hover {
    border-color: rgba(169, 226, 255, .4);
}

.choice input:checked+span {
    border-color: var(--blue-400);
    background: linear-gradient(140deg, rgba(24, 168, 240, .28), rgba(240, 176, 60, .14));
    box-shadow: 0 0 0 4px rgba(65, 195, 255, .14);
}

.choice input:focus-visible+span {
    outline: 2px solid var(--blue-200);
    outline-offset: 2px;
}

.submit {
    width: 100%;
    margin-top: 28px;
}

.note {
    margin: 16px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--ink-dim);
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(65, 195, 255, .14);
    color: var(--blue-200);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.panel.center {
    text-align: center;
}

.panel.center .btn {
    margin-top: 8px;
}

@media (max-width: 520px) {
    .choices {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {

    .page-bg,
    .panel,
    .form-title,
    .form-title::after {
        animation: none;
    }
}
