@font-face {
    font-family: "Google Sans";
    src: url("./fonts/google-sans/google-sans-v69-cyrillic_latin-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Google Sans";
    src: url("./fonts/google-sans/google-sans-v69-cyrillic_latin-500.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Google Sans";
    src: url("./fonts/google-sans/google-sans-v69-cyrillic_latin-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Google Sans";
    src: url("./fonts/google-sans/google-sans-v69-cyrillic_latin-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --cyan: #3ec0f0;
    --green: #009346;
    --green-bright: #20bd6a;
    --ink: #080b0a;
    --background: #131313;
    --surface: rgba(19, 22, 21, 0.82);
    --surface-strong: rgba(25, 29, 27, 0.96);
    --surface-soft: rgba(255, 255, 255, 0.045);
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.18);
    --text: #f6faf8;
    --muted: #a6afaa;
    /* Nejtmavší odstín textu, jaký na kartě ještě splní kontrast 4.5:1. */
    --muted-dark: #868e89;
    --error-start: #ff9a9e;
    --error-end: #e97c9d;
    --radius-card: clamp(22px, 4vw, 34px);
    --radius-control: 14px;
    --shadow-card: 0 32px 90px rgba(0, 0, 0, 0.62), 0 8px 28px rgba(0, 0, 0, 0.35);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --spot-x: 50%;
    --spot-y: 30%;
}

html {
    min-width: 320px;
    min-height: 100%;
    color-scheme: dark;
    background: var(--background);
    font-family: "Google Sans", Arial, sans-serif;
    font-size: clamp(15px, 14.5px + 0.18vw, 17px);
    line-height: 1.5;
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
button,
input,
select {
    font-family: inherit;
}

body {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 10%, rgba(62, 192, 240, 0.075), transparent 31rem),
        radial-gradient(circle at 86% 84%, rgba(0, 147, 70, 0.09), transparent 34rem),
        linear-gradient(145deg, #101211 0%, #131313 50%, #0e1110 100%);
    overflow-x: hidden;
}

a {
    color: var(--cyan);
    text-underline-offset: 0.2em;
    text-decoration-thickness: 1px;
    transition: color 180ms ease, text-decoration-color 180ms ease;
}

a:hover {
    color: #7ad8f8;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
}

[hidden] {
    display: none !important;
}

/* Ambient background ------------------------------------------------------ */

.ambient-scene {
    position: fixed;
    z-index: -2;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.ambient-grid {
    position: absolute;
    inset: -30%;
    opacity: 0.17;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.038) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.038) 1px, transparent 1px);
    background-size: 54px 54px;
    -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 68%);
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 68%);
    transform: perspective(600px) rotateX(60deg) translateY(18%);
    transform-origin: center;
}

/* Měkký okraj kreslíme radiálním přechodem, ne filter: blur(86px). Blur téhle
   velikosti se počítá při každém snímku animace a orby leží pod kartou
   s backdrop-filterem, takže jí donekonečna zneplatňovaly pozadí.
   will-change tu taky nemá co dělat – vrstvu si kompozitor u animovaného
   transformu vyrobí sám a MDN nedoporučuje držet ho natrvalo ve stylech. */
.ambient-orb {
    position: absolute;
    display: block;
    width: clamp(18rem, 38vw, 40rem);
    aspect-ratio: 1;
    opacity: 0.16;
    animation: orb-drift 17s ease-in-out infinite alternate;
}

.ambient-orb--cyan {
    top: -17%;
    left: -12%;
    background: radial-gradient(closest-side circle, rgba(62, 192, 240, 0.9), rgba(62, 192, 240, 0.34) 45%, transparent 76%);
}

.ambient-orb--green {
    right: -16%;
    bottom: -23%;
    background: radial-gradient(closest-side circle, rgba(0, 147, 70, 0.9), rgba(0, 147, 70, 0.34) 45%, transparent 76%);
    animation-delay: -6s;
    animation-duration: 21s;
}

.ambient-orb--mixed {
    top: 35%;
    left: 47%;
    width: clamp(10rem, 22vw, 22rem);
    background: radial-gradient(closest-side circle, rgba(62, 192, 240, 0.9), rgba(0, 147, 70, 0.4) 52%, transparent 78%);
    opacity: 0.08;
    animation-delay: -11s;
    animation-duration: 15s;
}

/* Světlo pod kurzorem. Samostatný prvek posouvaný transformem, ne gradient
   v body::before: transform zvládne kompozitor sám, kdežto přepisování
   souřadnic v custom property na :root nutilo přepočítat styl a překreslit
   celý viewport při každém pohybu myši. Registrovat je přes @property
   s inherits: false nejde – do ::before by se neprosadily. */
.ambient-pointer {
    position: absolute;
    top: 0;
    left: 0;
    width: 760px;
    height: 760px;
    margin: -380px 0 0 -380px;
    border-radius: 50%;
    background: radial-gradient(closest-side circle, rgba(62, 192, 240, 0.085), transparent);
    opacity: 0;
    transition: opacity 500ms ease;
}

@keyframes orb-drift {
    from {
        transform: translate3d(-3%, -2%, 0) scale(0.92);
    }

    to {
        transform: translate3d(8%, 9%, 0) scale(1.08);
    }
}

/* Shared glass card ------------------------------------------------------- */

.registration-page,
.status-page {
    display: grid;
    place-items: center;
    padding: clamp(16px, 3vw, 38px);
}

.interactive-card {
    position: relative;
    isolation: isolate;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 30%),
        linear-gradient(150deg, rgba(20, 24, 22, 0.94), rgba(12, 15, 14, 0.91));
    border: 1px solid rgba(255, 255, 255, 0.095);
    box-shadow: var(--shadow-card);
    -webkit-backdrop-filter: blur(24px) saturate(135%);
    backdrop-filter: blur(24px) saturate(135%);
}

/* Světelný okraj leží v pásmu borderu, tedy mimo padding box karty.
   Karta proto nesmí mít overflow: hidden, jinak se celý ořízne pryč. */
.interactive-card::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -1px;
    padding: 1px;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(360px circle at var(--spot-x) var(--spot-y), rgba(62, 192, 240, 0.7), transparent 62%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.19), rgba(255, 255, 255, 0.02) 45%, rgba(0, 147, 70, 0.22));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.interactive-card::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0.3;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='https://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.11'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
}

.card-glow {
    position: absolute;
    z-index: -2;
    top: -1px;
    left: 12%;
    width: 42%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    box-shadow: 0 0 28px 4px rgba(62, 192, 240, 0.32);
    opacity: 0.85;
}

/* Registration ----------------------------------------------------------- */

#form-container {
    width: min(100%, 620px);
    border-radius: var(--radius-card);
    padding: clamp(25px, 5vw, 50px);
}

#registration {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 2.4vh, 25px);
}

#logo-container:empty {
    display: none;
}

#registration>svg,
.status-logo {
    display: block;
    width: clamp(132px, 31%, 180px);
    height: auto;
    margin-inline: auto;
    overflow: visible;
    filter: drop-shadow(0 7px 20px rgba(0, 0, 0, 0.4));
}

.form-heading {
    display: grid;
    justify-items: center;
    gap: 6px;
    margin-top: 2px;
    text-align: center;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.22em;
}

.eyebrow span {
    width: 18px;
    height: 1px;
    background: linear-gradient(90deg, var(--cyan), var(--green));
    box-shadow: 0 0 9px rgba(62, 192, 240, 0.65);
}

#form-header,
.status-title,
.legal-header h1 {
    margin: 0;
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: clamp(0.11em, 1vw, 0.19em);
}

#form-header {
    font-size: clamp(1.65rem, 5vw, 2.35rem);
    background: linear-gradient(100deg, #ffffff 15%, #cdd6d1 55%, #ffffff 85%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

fieldset {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 1.7vh, 17px);
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

fieldset>div {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.label-container {
    display: flex;
    align-items: baseline;
    gap: 4px;
    padding-inline: 3px;
}

form label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.045em;
    transition: color 240ms ease, transform 240ms var(--ease-out);
}

.label-container span {
    color: var(--cyan);
    font-size: 0.8rem;
}

fieldset>div:focus-within label {
    color: var(--text);
    transform: translateX(2px);
}

form input:not([type="checkbox"]),
form select {
    width: 100%;
    min-width: 0;
    height: 50px;
    margin: 0;
    padding: 0 46px 0 15px;
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.2;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    outline: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
    transition:
        border-color 240ms ease,
        background-color 240ms ease,
        box-shadow 240ms ease,
        transform 240ms var(--ease-out);
}

form input:not([type="checkbox"]):hover,
form select:hover {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.052);
}

form input:not([type="checkbox"]):focus,
form select:focus {
    border-color: rgba(62, 192, 240, 0.66);
    background: rgba(62, 192, 240, 0.055);
    box-shadow: 0 0 0 4px rgba(62, 192, 240, 0.09), 0 10px 28px rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

form input[aria-invalid="true"],
form select[aria-invalid="true"] {
    border-color: rgba(233, 124, 157, 0.8);
    background: rgba(233, 124, 157, 0.055);
    box-shadow: 0 0 0 4px rgba(233, 124, 157, 0.075);
}

fieldset>div.is-valid input,
fieldset>div.is-valid select {
    border-color: rgba(32, 189, 106, 0.38);
}

fieldset>div.is-valid::after {
    content: "✓";
    position: absolute;
    right: 16px;
    bottom: 15px;
    color: var(--green-bright);
    font-size: 0.8rem;
    font-weight: 700;
    pointer-events: none;
    animation: valid-pop 360ms var(--ease-spring) both;
}

#date-of-birth-container.is-valid::after,
#invitation-container.is-valid::after {
    right: 40px;
}

@keyframes valid-pop {
    from {
        opacity: 0;
        transform: scale(0.45) rotate(-20deg);
    }

    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

input::placeholder {
    color: var(--muted-dark);
    opacity: 1;
}

input[type="date"] {
    min-width: 0;
    color-scheme: dark;
    -webkit-appearance: none;
    appearance: none;
}

input[type="date"]::-webkit-date-and-time-value {
    min-height: 1.2em;
    text-align: left;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    width: 18px;
    height: 18px;
    margin: 0;
    opacity: 0.72;
    cursor: pointer;
    filter: brightness(1.45) saturate(0);
    transition: opacity 180ms ease, transform 180ms ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    transform: scale(1.08);
}

input[type="date"]:invalid::-webkit-datetime-edit {
    color: var(--muted-dark);
}

.select-wrapper {
    position: relative;
}

form select {
    padding-right: 48px;
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.select-arrow {
    position: absolute;
    top: 50%;
    right: 17px;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid var(--muted);
    border-bottom: 1.5px solid var(--muted);
    pointer-events: none;
    transform: translateY(-68%) rotate(45deg);
    transition: border-color 180ms ease, transform 240ms var(--ease-out);
}

.select-wrapper:focus-within .select-arrow {
    border-color: var(--cyan);
    transform: translateY(-30%) rotate(225deg);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    caret-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px #1b2220 inset, 0 0 0 4px rgba(62, 192, 240, 0.08);
}

#newsletter-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    min-height: 30px;
}

#newsletter-container label {
    cursor: pointer;
    user-select: none;
}

form input[type="checkbox"] {
    display: grid;
    place-content: center;
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    margin: 0;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface-soft);
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 180ms var(--ease-spring);
}

form input[type="checkbox"]::before {
    content: "";
    width: 10px;
    height: 6px;
    border-left: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    opacity: 0;
    transform: translateY(-1px) rotate(-45deg) scale(0.4);
    transition: opacity 140ms ease, transform 220ms var(--ease-spring);
}

form input[type="checkbox"]:hover {
    border-color: rgba(62, 192, 240, 0.6);
    transform: scale(1.06);
}

form input[type="checkbox"]:checked {
    border-color: transparent;
    background: linear-gradient(135deg, var(--cyan), var(--green-bright));
    box-shadow: 0 0 18px rgba(62, 192, 240, 0.24);
}

form input[type="checkbox"]:checked::before {
    opacity: 1;
    transform: translateY(-1px) rotate(-45deg) scale(1);
}

#register-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#submit-button,
.status-button {
    --button-x: 0px;
    --button-y: 0px;
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 52px;
    padding: 0.9rem 1.25rem;
    overflow: hidden;
    color: #07110c;
    background: linear-gradient(105deg, var(--cyan) 0%, #32c9ba 46%, var(--green-bright) 100%);
    border: 0;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 147, 70, 0.17), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.15em;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transform: translate(var(--button-x), var(--button-y));
    transition: transform 260ms var(--ease-out), box-shadow 260ms ease, filter 260ms ease, opacity 180ms ease;
}

#submit-button::before,
.status-button::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -80% -25%;
    background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.48) 50%, transparent 62%);
    transform: translateX(-58%) rotate(8deg);
    transition: transform 760ms var(--ease-out);
}

#submit-button:hover,
.status-button:hover {
    color: #07110c;
    filter: saturate(1.08) brightness(1.06);
    box-shadow: 0 17px 40px rgba(0, 147, 70, 0.25), 0 4px 18px rgba(62, 192, 240, 0.17), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

#submit-button:hover::before,
.status-button:hover::before {
    transform: translateX(58%) rotate(8deg);
}

#submit-button:active,
.status-button:active {
    filter: saturate(1.02) brightness(0.96);
}

#submit-button:disabled {
    cursor: wait;
    filter: saturate(0.6);
    opacity: 0.74;
}

#submit-button:disabled:not(.is-success),
#submit-button:disabled:not(.is-success):hover {
    transform: none;
    box-shadow: 0 12px 30px rgba(0, 147, 70, 0.17), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

#submit-button:disabled:not(.is-success)::before,
#submit-button:disabled:not(.is-success):hover::before {
    transform: translateX(-58%) rotate(8deg);
}

#submit-button.is-success:disabled {
    cursor: default;
    filter: none;
    opacity: 1;
    background: linear-gradient(105deg, #7ad8f8, var(--green-bright));
    box-shadow: 0 0 0 5px rgba(32, 189, 106, 0.08), 0 14px 36px rgba(0, 147, 70, 0.25);
    animation: success-button 430ms var(--ease-spring) both;
}

@keyframes success-button {
    0% {
        transform: scale(0.98);
    }

    65% {
        transform: scale(1.015);
    }

    100% {
        transform: scale(1);
    }
}

#submit-button:disabled::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35%;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 12px white;
    animation: loading-track 1.15s ease-in-out infinite;
}

#submit-button.is-success::after {
    display: none;
}

@keyframes loading-track {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(400%);
    }
}

.loading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.loading-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.button-ripple {
    position: absolute;
    z-index: 2;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.65);
    transform: translate(-50%, -50%) scale(0);
    animation: ripple 620ms ease-out forwards;
}

@keyframes ripple {
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(24);
    }
}

#gdpr-notice {
    color: var(--muted-dark);
    font-size: 0.73rem;
    font-style: italic;
    line-height: 1.48;
}

.global-error {
    position: relative;
    padding: 12px 14px 12px 40px;
    color: #ffdce6;
    background: linear-gradient(135deg, rgba(255, 154, 158, 0.12), rgba(233, 124, 157, 0.08));
    border: 1px solid rgba(233, 124, 157, 0.34);
    border-radius: 12px;
    font-size: 0.84rem;
    line-height: 1.4;
    animation: message-in 360ms var(--ease-out) both;
}

.global-error::before {
    content: "!";
    position: absolute;
    top: 50%;
    left: 13px;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: #281014;
    background: var(--error-start);
    font-weight: 700;
    transform: translateY(-50%);
}

@keyframes message-in {
    from {
        opacity: 0;
        transform: translateY(-7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Validation tooltip ----------------------------------------------------- */

.field-error {
    position: absolute;
    z-index: 5;
    right: 15px;
    top: 0;
    display: none;
    align-items: center;
    height: 50px;
    pointer-events: none;
}

/* Pole s vlastním ovládacím prvkem vpravo (šipka selectu, ikona kalendáře).
   Zarovnáno na stejnou hranu jako fajfka u .is-valid::after níže. */
.field-error--offset {
    right: 40px;
}

.field-error.is-visible {
    display: flex;
}

.field-error__icon {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    padding: 0;
    color: inherit;
    font: inherit;
    background: none;
    border: 0;
    border-radius: 50%;
    pointer-events: auto;
    cursor: help;
    filter: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.42));
    animation: error-pop 370ms var(--ease-spring) both;
}

.field-error__icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

@keyframes error-pop {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-14deg);
    }

    70% {
        transform: scale(1.12) rotate(3deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.field-error__tooltip {
    position: absolute;
    right: -10px;
    bottom: calc(100% + 9px);
    width: max-content;
    max-width: min(245px, 74vw);
    padding: 9px 11px;
    color: #291015;
    background: linear-gradient(135deg, #ffb1b4, var(--error-end));
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px) scale(0.97);
    transform-origin: bottom right;
    transition: opacity 190ms ease, visibility 190ms ease, transform 240ms var(--ease-out);
}

.field-error__tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 13px;
    border: 6px solid transparent;
    border-top-color: var(--error-end);
}

.field-error.is-open .field-error__tooltip,
.field-error__icon:focus+.field-error__tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.validation-shake {
    animation: validation-shake 380ms ease both;
}

@keyframes validation-shake {

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

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(4px);
    }

    75% {
        transform: translateX(-2px);
    }
}

/* Status pages ----------------------------------------------------------- */

.status-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(18px, 3vh, 27px);
    width: min(100%, 640px);
    padding: clamp(34px, 6vw, 64px);
    border-radius: var(--radius-card);
    text-align: center;
}

.status-logo {
    width: clamp(145px, 36%, 205px);
}

.status-badge {
    position: relative;
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin-block: 5px;
    color: #07110c;
    background: linear-gradient(135deg, var(--cyan), var(--green-bright));
    border-radius: 50%;
    box-shadow: 0 0 0 8px rgba(62, 192, 240, 0.06), 0 0 45px rgba(0, 147, 70, 0.25);
    font-size: 2rem;
    font-weight: 700;
}

.status-badge::before,
.status-badge::after {
    content: "";
    position: absolute;
    inset: -9px;
    border: 1px solid rgba(62, 192, 240, 0.28);
    border-radius: inherit;
    animation: status-ring 2.8s ease-out infinite;
}

.status-badge::after {
    animation-delay: 1.4s;
}

.status-badge--error {
    color: #291015;
    background: linear-gradient(135deg, var(--error-start), var(--error-end));
    box-shadow: 0 0 0 8px rgba(233, 124, 157, 0.06), 0 0 45px rgba(233, 124, 157, 0.2);
}

.status-badge--error::before,
.status-badge--error::after {
    border-color: rgba(233, 124, 157, 0.3);
}

@keyframes status-ring {
    0% {
        opacity: 0.75;
        transform: scale(0.9);
    }

    75%,
    100% {
        opacity: 0;
        transform: scale(1.34);
    }
}

.status-title {
    max-width: 19ch;
    font-size: clamp(1.45rem, 5vw, 2.2rem);
}

.status-text,
.status-note {
    margin: 0;
    line-height: 1.6;
}

.status-text {
    max-width: 44ch;
    color: #c2cbc6;
}

.status-note {
    max-width: 54ch;
    color: var(--muted-dark);
    font-size: 0.82rem;
}

.status-button:visited {
    color: #07110c;
}

.status-button--ghost {
    color: var(--text);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--line-strong);
    box-shadow: none;
}

.status-button--ghost:visited,
.status-button--ghost:hover {
    color: var(--text);
}

.status-button--ghost:hover {
    background: rgba(255, 255, 255, 0.075);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

/* Legal page ------------------------------------------------------------- */

.legal-page {
    padding: clamp(16px, 4vw, 64px);
}

.reading-progress {
    position: fixed;
    z-index: 20;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.04);
}

/* scaleX místo width: width je layoutová vlastnost, takže se při každém
   snímku scrollu přepočítával layout. Transform jede na kompozitoru. */
.reading-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--green-bright));
    box-shadow: 0 0 14px rgba(62, 192, 240, 0.75);
    transform: scaleX(var(--reading-progress, 0));
    transform-origin: left center;
}

/* Kde prohlížeč umí scroll-driven animace, jede ukazatel úplně bez JS.
   Longhandy schválně – zkratka `animation` by animation-timeline resetovala.
   Fallback přes --reading-progress výše zůstává hlavně kvůli Firefoxu,
   který má featuru zatím za flagem (layout.css.scroll-driven-animations). */
@supports (animation-timeline: scroll()) {
    .reading-progress span {
        animation-name: reading-progress;
        animation-timing-function: linear;
        animation-fill-mode: both;
        /* Scroll timeline délku ignoruje, Firefox ji ale vyžaduje uvedenou. */
        animation-duration: 1ms;
        animation-timeline: scroll(root block);
    }
}

@keyframes reading-progress {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

.legal-card {
    width: min(100%, 940px);
    margin-inline: auto;
    padding: clamp(26px, 6vw, 72px);
    border-radius: var(--radius-card);
    /* Karta je vysoká přes 4 000 px a z 91–94 % neprůhledná: rozostření pozadí
       pod ní není prakticky vidět, ale musí se přepočítávat při každém posunu.
       Backdrop-filter na velkém skrolujícím prvku je učebnicová příčina
       trhaného scrollu. */
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

/* Na tak vysokém prvku je 360px světlo pod kurzorem stejně k nerozeznání,
   zato jeho posun znamená přerastrovat maskovaný gradient přes celou plochu.
   Necháváme statický lineární přechod, který se nakreslí jednou. */
.legal-card::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.19), rgba(255, 255, 255, 0.02) 45%, rgba(0, 147, 70, 0.22));
}

.legal-header {
    display: grid;
    justify-items: start;
    gap: 14px;
    margin-bottom: clamp(32px, 6vw, 58px);
    padding-bottom: clamp(26px, 4vw, 42px);
    border-bottom: 1px solid var(--line);
}

.legal-logo-link {
    display: inline-block;
    margin-bottom: clamp(14px, 3vw, 28px);
}

.legal-logo {
    display: block;
    width: clamp(145px, 25vw, 205px);
    height: auto;
}

.legal-header h1 {
    max-width: 19ch;
    font-size: clamp(2rem, 6vw, 4.1rem);
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.legal-validity {
    display: inline-flex;
    margin: 0;
    padding: 7px 11px;
    color: var(--muted);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.75rem;
}

.legal-card>p:not(.legal-back) {
    max-width: 72ch;
    margin: 0 0 clamp(28px, 4vw, 42px);
    color: #c6cfca;
    font-size: clamp(1rem, 1.5vw, 1.12rem);
    line-height: 1.75;
}

.legal-card section {
    position: relative;
    margin-top: clamp(18px, 4vw, 32px);
    padding: clamp(22px, 4vw, 38px);
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--line);
    border-radius: 20px;
    /* box-shadow ve výčtu chybí schválně – jeho animace znamená překreslení
       sekce v každém snímku, kdežto transform a barvy zvládne kompozitor. */
    transition: border-color 260ms ease, background-color 260ms ease, transform 320ms var(--ease-out);
}

.legal-card section:hover {
    border-color: rgba(62, 192, 240, 0.2);
    background: rgba(255, 255, 255, 0.034);
    transform: translateY(-2px);
}

.legal-card section h2 {
    margin: 0 0 22px;
    color: var(--text);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    line-height: 1.25;
}

.legal-card section h2::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 1em;
    margin-right: 12px;
    vertical-align: -0.1em;
    background: linear-gradient(180deg, var(--cyan), var(--green));
    border-radius: 99px;
    box-shadow: 0 0 14px rgba(62, 192, 240, 0.28);
}

.legal-card section h3 {
    margin: 30px 0 10px;
    color: #e7ece9;
    font-size: 1rem;
    line-height: 1.35;
}

.legal-card section p,
.legal-card section li {
    color: #aeb8b2;
    line-height: 1.72;
}

.legal-card section p {
    margin: 0 0 15px;
}

.legal-card section p:last-child {
    margin-bottom: 0;
}

.legal-card ul {
    display: grid;
    gap: 7px;
    margin: 14px 0 20px;
    padding-left: 1.25rem;
}

.legal-card li::marker {
    color: var(--cyan);
}

.legal-back {
    margin: clamp(30px, 5vw, 52px) 0 0;
}

/* Entrance sequences ----------------------------------------------------- */

.is-ready #form-container,
.is-ready .status-card,
.is-ready .legal-card {
    animation: card-enter 720ms var(--ease-out) both;
}

.is-ready #registration>*,
.is-ready .status-card>*:not(.card-glow) {
    animation: content-enter 620ms var(--ease-out) both;
}

/* Poslední pravidlo je vždy `n+X`, aby další přidaný prvek doběhl na konci
   řady a ne bez prodlevy jako první. */
.is-ready #registration> :nth-child(2) {
    animation-delay: 70ms;
}

.is-ready #registration> :nth-child(3) {
    animation-delay: 120ms;
}

.is-ready #registration> :nth-child(4) {
    animation-delay: 170ms;
}

.is-ready #registration> :nth-child(5) {
    animation-delay: 220ms;
}

.is-ready #registration> :nth-child(n+6) {
    animation-delay: 270ms;
}

.is-ready .status-card> :nth-child(3) {
    animation-delay: 90ms;
}

.is-ready .status-card> :nth-child(4) {
    animation-delay: 140ms;
}

.is-ready .status-card> :nth-child(5) {
    animation-delay: 190ms;
}

.is-ready .status-card> :nth-child(6) {
    animation-delay: 240ms;
}

.is-ready .status-card> :nth-child(n+7) {
    animation-delay: 290ms;
}

@keyframes card-enter {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes content-enter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive and accessibility ------------------------------------------ */

@media (max-width: 620px) {

    .registration-page,
    .status-page {
        place-items: start center;
        padding: 12px;
    }

    #form-container,
    .status-card {
        border-radius: 24px;
    }

    #form-container {
        padding: 25px 18px;
    }

    #registration {
        gap: 17px;
    }

    fieldset {
        gap: 12px;
    }

    form input:not([type="checkbox"]),
    form select {
        height: 48px;
        font-size: 16px;
    }

    .field-error {
        height: 48px;
    }

    .status-card {
        align-self: center;
        padding: 36px 22px;
    }

    .legal-page {
        padding: 10px;
    }

    .legal-card {
        padding: 27px 17px;
        border-radius: 24px;
    }

    .legal-card section {
        padding: 21px 17px;
        border-radius: 16px;
    }
}

@media (max-height: 760px) and (min-width: 621px) {
    .registration-page {
        place-items: start center;
        padding-block: 18px;
    }

    #form-container {
        padding-block: 30px;
    }
}

@media (hover: none),
(pointer: coarse) {
    .ambient-pointer {
        display: none;
    }

    .legal-card section:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .ambient-orb {
        animation: none;
    }

    /* Ukazatel čtení není samovolný pohyb, jen odraz pozice scrollu, takže ho
       necháváme běžet. Scroll timeline sice délku ignoruje, ale ať se chová
       stejně jako mimo reduced motion a nespoléhá se na to. */
    .reading-progress span {
        animation-duration: 1ms !important;
    }
}

@media (prefers-contrast: more) {
    :root {
        --line: rgba(255, 255, 255, 0.32);
        --line-strong: rgba(255, 255, 255, 0.55);
        --muted: #d5dbd7;
        --muted-dark: #b5bdb8;
    }

    .interactive-card {
        background: #101311;
    }
}