:root {
    --bg: #f4f7fb;
    --bg-soft: #edf3fb;
    --surface: rgba(255,255,255,0.88);
    --surface-solid: #ffffff;
    --text: #1f2a3a;
    --muted: #68768a;
    --primary: #376fe8;
    --primary-hover: #285fd4;
    --primary-soft: #e9f0ff;
    --border: rgba(38, 58, 89, 0.12);
    --danger: #c9414d;
    --shadow: 0 28px 70px rgba(55, 79, 115, 0.16);
    --radius: 26px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    min-height: 100vh;
    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;
    color: var(--text);
    background:
        linear-gradient(135deg, #f7faff 0%, #eef4fb 52%, #f7f4ff 100%);
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -2;
    border-radius: 50%;
    filter: blur(12px);
    opacity: 0.55;
    pointer-events: none;
}

body::before {
    width: 520px;
    height: 520px;
    top: -160px;
    left: -110px;
    background: radial-gradient(
        circle,
        rgba(99, 149, 255, 0.28),
        rgba(99, 149, 255, 0)
    );
    animation: floatOne 24s ease-in-out infinite alternate;
}

body::after {
    width: 620px;
    height: 620px;
    right: -190px;
    bottom: -220px;
    background: radial-gradient(
        circle,
        rgba(174, 132, 255, 0.22),
        rgba(174, 132, 255, 0)
    );
    animation: floatTwo 30s ease-in-out infinite alternate;
}

@keyframes floatOne {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(90px, 65px, 0) scale(1.08);
    }
}

@keyframes floatTwo {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(-85px, -55px, 0) scale(1.1);
    }
}

.page-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(430px, 0.88fr);
}

.brand-side {
    position: relative;
    min-height: 100vh;
    padding: 48px 58px 34px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #4c83f1, #6d73ea);
    box-shadow: 0 12px 30px rgba(55, 111, 232, 0.25);
}

.brand-name {
    display: flex;
    flex-direction: column;
}

.brand-name strong {
    font-size: 16px;
    letter-spacing: -0.01em;
}

.brand-name span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 13px;
}

.hero {
    max-width: 690px;
    margin: auto 0;
    padding: 60px 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: #52627a;
    background: rgba(255,255,255,0.65);
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.hero h1 {
    margin: 0;
    max-width: 650px;
    font-size: clamp(46px, 5.4vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.055em;
    font-weight: 760;
}

.hero p {
    margin: 24px 0 0;
    max-width: 590px;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.7;
}

.brand-footer {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    color: #7a8799;
    font-size: 13px;
}

.login-side {
    min-height: 100vh;
    padding: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid rgba(38, 58, 89, 0.08);
    background: rgba(255,255,255,0.32);
    backdrop-filter: blur(20px);
}

.login-card {
    width: min(100%, 470px);
    padding: 42px;
    border: 1px solid rgba(38, 58, 89, 0.10);
    border-radius: 28px;
    background: rgba(255,255,255,0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.login-card h2 {
    margin: 0;
    font-size: 34px;
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.login-intro {
    margin: 12px 0 30px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
}

.field {
    margin-bottom: 21px;
}

.field label {
    display: block;
    margin-bottom: 9px;
    color: #344258;
    font-size: 16px;
    font-weight: 700;
}

.input-wrap {
    position: relative;
}

.field input {
    width: 100%;
    min-height: 58px;
    padding: 0 17px;
    border: 1px solid rgba(38, 58, 89, 0.15);
    border-radius: 15px;
    outline: none;
    background: #fbfcfe;
    color: var(--text);
    font-size: 17px;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
}

.field input:hover {
    border-color: rgba(55, 111, 232, 0.34);
}

.field input:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(55, 111, 232, 0.13);
}

.password-input {
    padding-right: 105px !important;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    min-height: 40px;
    padding: 0 12px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    color: #52627a;
    background: transparent;
    font-size: 14px;
    font-weight: 700;
}

.password-toggle:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.primary-button {
    width: 100%;
    min-height: 60px;
    margin-top: 5px;
    border: 0;
    border-radius: 15px;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(135deg, #376fe8, #6575ea);
    box-shadow: 0 14px 30px rgba(55, 111, 232, 0.25);
    font-size: 17px;
    font-weight: 750;
    transition:
        transform 150ms ease,
        box-shadow 150ms ease,
        filter 150ms ease;
}

.primary-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 17px 34px rgba(55, 111, 232, 0.30);
}

.primary-button:active {
    transform: translateY(0);
}

.primary-button:focus-visible,
.password-toggle:focus-visible,
.help-button:focus-visible {
    outline: 4px solid rgba(55, 111, 232, 0.22);
    outline-offset: 3px;
}

.error-box {
    margin: 0 0 22px;
    padding: 15px 16px;
    border-radius: 14px;
    border: 1px solid rgba(201, 65, 77, 0.18);
    background: #fff3f4;
    color: #9d303a;
    font-size: 15px;
    line-height: 1.5;
}

.help-box {
    margin-top: 26px;
    padding: 17px;
    display: flex;
    gap: 13px;
    align-items: flex-start;
    border: 1px solid rgba(55, 111, 232, 0.10);
    border-radius: 16px;
    background: #f7f9fd;
}

.help-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #eaf1ff;
    font-size: 23px;
}

.help-content strong {
    display: block;
    margin-bottom: 4px;
    color: #314158;
    font-size: 15px;
}

.help-content p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.help-button {
    margin-top: 9px;
    padding: 0;
    border: 0;
    cursor: pointer;
    color: var(--primary);
    background: none;
    font-size: 14px;
    font-weight: 750;
}

@media (max-width: 980px) {
    .page-shell {
        grid-template-columns: 1fr 1fr;
    }

    .brand-side {
        padding: 38px;
    }

    .hero h1 {
        font-size: 54px;
    }

    .hero p {
        font-size: 17px;
    }

    .login-card {
        padding: 34px;
    }
}

@media (max-width: 780px) {
    .page-shell {
        display: block;
    }

    .brand-side {
        min-height: auto;
        padding: 28px 24px 22px;
    }

    .hero {
        padding: 55px 0 35px;
    }

    .hero h1 {
        font-size: 44px;
    }

    .hero p {
        font-size: 16px;
    }

    .brand-footer {
        display: none;
    }

    .login-side {
        min-height: auto;
        padding: 22px 18px 36px;
        border-left: 0;
        border-top: 1px solid rgba(38, 58, 89, 0.08);
    }

    .login-card {
        width: 100%;
        padding: 28px 23px;
    }
}

@media (max-width: 460px) {
    .brand-side {
        padding: 23px 18px;
    }

    .brand-logo {
        width: 44px;
        height: 44px;
    }

    .hero {
        padding: 45px 0 25px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .login-card h2 {
        font-size: 29px;
    }

    .field input {
        min-height: 56px;
    }

    .primary-button {
        min-height: 58px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}

/* ===== Erlebnisfläche / Aurora ===== */

.brand-side {
    isolation: isolate;
    overflow: hidden;
}

.brand-side::before {
    content: "";
    position: absolute;
    z-index: -3;
    width: 720px;
    height: 720px;
    top: -260px;
    right: -260px;
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(92, 125, 255, 0.34) 0%,
            rgba(124, 98, 255, 0.18) 38%,
            transparent 70%
        );
    filter: blur(18px);
    animation: auroraMove 18s ease-in-out infinite alternate;
}

.brand-side::after {
    content: "";
    position: absolute;
    z-index: -3;
    width: 620px;
    height: 620px;
    left: -240px;
    bottom: -250px;
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(54, 184, 219, 0.20),
            rgba(84, 130, 255, 0.10) 42%,
            transparent 72%
        );
    filter: blur(20px);
    animation: auroraMoveTwo 24s ease-in-out infinite alternate;
}

@keyframes auroraMove {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(-90px, 100px, 0) scale(1.16);
    }
}

@keyframes auroraMoveTwo {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(120px, -70px, 0) scale(1.12);
    }
}


/* ===== Schwebende Foto-Welt ===== */

.memory-scene {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.memory-card {
    position: absolute;
    width: 150px;
    height: 185px;
    padding: 9px;
    border: 1px solid rgba(255,255,255,0.68);
    border-radius: 20px;
    background: rgba(255,255,255,0.52);
    box-shadow:
        0 24px 60px rgba(44, 72, 118, 0.15),
        inset 0 1px 0 rgba(255,255,255,0.8);
    backdrop-filter: blur(12px);
}

.memory-card::before {
    content: "";
    display: block;
    width: 100%;
    height: 128px;
    border-radius: 14px;
    background:
        linear-gradient(
            145deg,
            rgba(74, 126, 236, 0.78),
            rgba(128, 103, 223, 0.62),
            rgba(87, 192, 207, 0.55)
        );
}

.memory-card::after {
    content: "Erinnerung";
    display: block;
    padding: 12px 5px 0;
    color: rgba(48, 64, 87, 0.62);
    font-size: 12px;
    font-weight: 650;
}

.memory-card.one {
    top: 14%;
    right: 7%;
    transform: rotate(8deg);
    animation: photoFloatOne 12s ease-in-out infinite alternate;
}

.memory-card.two {
    top: 57%;
    right: 17%;
    width: 125px;
    height: 155px;
    opacity: 0.74;
    transform: rotate(-8deg);
    animation: photoFloatTwo 15s ease-in-out infinite alternate;
}

.memory-card.two::before {
    height: 102px;
}

.memory-card.three {
    top: 34%;
    left: 4%;
    width: 105px;
    height: 135px;
    opacity: 0.43;
    transform: rotate(-12deg);
    animation: photoFloatThree 17s ease-in-out infinite alternate;
}

.memory-card.three::before {
    height: 84px;
}

@keyframes photoFloatOne {
    from {
        transform: translateY(0) rotate(8deg);
    }

    to {
        transform: translateY(-22px) rotate(5deg);
    }
}

@keyframes photoFloatTwo {
    from {
        transform: translateY(0) rotate(-8deg);
    }

    to {
        transform: translateY(18px) rotate(-4deg);
    }
}

@keyframes photoFloatThree {
    from {
        transform: translateY(0) rotate(-12deg);
    }

    to {
        transform: translateY(-14px) rotate(-8deg);
    }
}

.brand-logo-image {
    overflow: hidden;
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(255,255,255,0.8);
}

.brand-logo-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

@media (max-width: 780px) {
    .memory-card {
        opacity: 0.22;
    }

    .memory-card.three {
        display: none;
    }
}

