@font-face {
    font-family: Barlow;
    src: url('/fonts/barlow-400.ttf') format('truetype');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: Barlow;
    src: url('/fonts/barlow-600.ttf') format('truetype');
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}
:root {
    --blue: #174bd5;
    --blue-hover: #103ba9;
    --ink: #172638;
    --muted: #536171;
    --paper: #fafbfd;
    --surface: #ffffff;
    --field: #f0f3f7;
    --line: #d9dfe6;
    --red: #c92832;
    --error: #b4232d;
    color-scheme: light;
    scrollbar-color: #8b99ac var(--paper);
}
:root[data-theme='dark'] {
    --blue: #8bacff;
    --blue-hover: #acc3ff;
    --ink: #eef2f8;
    --muted: #b5c0ce;
    --paper: #111b28;
    --surface: #172332;
    --field: #1d2a3c;
    --line: #354456;
    --error: #ffadb4;
    color-scheme: dark;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100svh;
    position: relative;
    background: var(--paper);
    color: var(--ink);
    font: 400 15px/1.5 Barlow, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: var(--blue); color: var(--surface); }
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 4px;
}
.svg-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; left: 20px; top: 12px; padding: 12px 16px; background: var(--surface); z-index: 10; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.header {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 36px clamp(32px, 4.5vw, 72px);
    pointer-events: none;
}
.header > * { pointer-events: auto; }
.header .brand { color: #ffffff; }
.header .brand-period { color: #ff8e98; }
.header .brand:focus-visible { outline-color: #8bacff; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { object-fit: contain; }
.brand > span { font-size: 23px; font-weight: 600; letter-spacing: -.035em; }
.brand-period { color: var(--red); }
.theme-toggle {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
}
.theme-toggle:hover { background: var(--field); color: var(--ink); }
main { width: 100%; }
.entry { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); min-height: 100svh; width: 100%; }
.welcome {
    --panel: #172638;
    --panel-gutter: clamp(32px, 4.5vw, 72px);
    position: relative;
    overflow: hidden;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 140px var(--panel-gutter) 104px;
    background: var(--panel);
    color: #fff;
}
:root[data-theme='dark'] .welcome { --panel: #142a50; box-shadow: inset -1px 0 #2b4470; }
.welcome-copy, .welcome-foot { position: relative; z-index: 1; }
.welcome h2 { margin: 0; font-size: clamp(44px, 4.6vw, 68px); line-height: 1.04; font-weight: 600; letter-spacing: -.035em; }
.welcome h2 span { color: #8bacff; }
.welcome p { margin: 26px 0 0; max-width: 340px; color: #cbd7e7; font-size: 17px; line-height: 1.65; }
.welcome-foot { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #cbd7e7; }
.welcome-foot > span:last-child { color: #fff; font-weight: 600; }
.route-art {
    display: block;
    flex-shrink: 0;
    width: calc(100% + 2 * var(--panel-gutter));
    height: auto;
    aspect-ratio: 520 / 214;
    max-height: 30svh;
    margin: clamp(24px, 5svh, 56px) calc(-1 * var(--panel-gutter)) clamp(20px, 3.5svh, 36px);
    overflow: visible;
    opacity: .4;
    pointer-events: none;
}
.route-track { stroke: #b7ccff; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 2400; animation: route-arrive 1.4s cubic-bezier(.16,1,.3,1) both; }
.route-track-secondary { stroke: #527cea; stroke-width: 1; }
.route-point {
    fill: var(--panel);
    stroke: #fff;
    stroke-width: 2;
    offset-path: path('M-40 230h165c64 0 72-130 140-130h295');
    offset-distance: var(--route-rest);
    offset-rotate: 0deg;
    animation: route-travel 36s linear infinite;
    animation-delay: var(--route-phase);
}
.motion-paused .route-point { animation-play-state: paused; }
@keyframes route-travel { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes route-arrive { from { stroke-dashoffset: 160; } to { stroke-dashoffset: 0; } }
.form-panel { display: grid; place-items: center; min-width: 0; padding: 120px clamp(32px, 6vw, 96px) 100px; }
.login { width: 100%; max-width: 420px; }
h1 { margin: 0; font-size: 38px; line-height: 1.2; font-weight: 600; letter-spacing: -.03em; }
.intro { margin: 10px 0 32px; color: var(--muted); font-size: 15px; }
.field + .field { margin-top: 20px; }
.field > label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.field input {
    display: block;
    width: 100%;
    min-width: 0;
    height: 50px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--ink);
    background: var(--surface);
    caret-color: var(--blue);
    font-size: 16px;
    transition: border-color .15s;
}
.field input:hover { border-color: var(--muted); }
.field input:focus {
    border-color: var(--blue);
    outline: 2px solid var(--blue);
    outline-offset: -2px;
}
.field input[aria-invalid='true'] { border-color: var(--error); }
.password-field { position: relative; }
.password-field input { padding-right: 48px; }
.password-toggle {
    position: absolute;
    right: 4px;
    top: 3px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
}
.password-toggle:hover, .password-toggle[aria-pressed='true'] { color: var(--blue); background: var(--field); }
.form-options { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; margin-block: 20px 28px; font-size: 14px; }
.remember { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 28px; }
.remember input { margin: 0; width: 16px; height: 16px; accent-color: var(--blue); }
.form-options > a { color: var(--blue); padding-block: 6px; }
.form-options > a:hover, .footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.submit-button {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border: 0;
    border-radius: 10px;
    background: var(--blue);
    color: var(--surface);
    font-weight: 600;
    font-size: 15px;
    transition: background .15s;
}
.submit-button:hover { background: var(--blue-hover); }
.submit-button .icon { transition: transform .2s cubic-bezier(.16,1,.3,1); }
.submit-button:hover .icon { transform: translateX(3px); }
.submit-button:disabled { opacity: .65; cursor: wait; }
.field-error { margin: 8px 0 0; font-size: 13px; color: var(--error); }
.recovery-form .submit-button { margin-top: 28px; }
.recovery-feedback { margin-bottom: 24px; }
.back-link { display: inline-flex; align-items: center; gap: 9px; margin-top: 24px; padding-block: 6px; color: var(--muted); font-size: 14px; }
.back-link .icon { width: 17px; height: 17px; transform: rotate(180deg); }
.back-link:hover { color: var(--blue); }
.status-message { padding: 12px 14px; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); font-size: 14px; }
.footer { position: absolute; bottom: 0; left: 0; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 32px clamp(32px, 4.5vw, 72px); color: var(--muted); font-size: 13px; }
.footer a { padding-block: 4px; }
.footer > span { color: #cbd7e7; }
@media (max-width: 1050px) and (min-width: 761px) {
    .welcome h2 { font-size: 46px; }
    .welcome { padding-inline: 36px; }
    .form-panel { padding-inline: 36px; }
    h1 { font-size: 32px; }
}
@media (max-width: 760px) {
    .header { padding: 22px 24px; }
    .theme-toggle { color: #dce6ff; }
    .theme-toggle:hover { background: #263a53; color: #fff; }
    .theme-toggle:focus-visible { outline-color: #8bacff; }
    .entry { grid-template-columns: 1fr; min-height: 100svh; grid-template-rows: auto 1fr; }
    .welcome { --panel-gutter: 24px; min-height: 0; justify-content: flex-start; padding: 92px 24px 0; }
    :root[data-theme='dark'] .welcome { box-shadow: inset 0 -1px #2b4470; }
    .welcome h2 { font-size: 31px; line-height: 1.08; }
    .welcome h2 br { display: none; }
    .welcome p { font-size: 15px; line-height: 1.5; margin-top: 12px; max-width: 360px; }
    .welcome p br { display: none; }
    .route-art { aspect-ratio: auto; height: 64px; max-height: none; margin: 14px -24px 0; opacity: .45; }
    .welcome-foot { display: none; }
    .form-panel { place-items: start center; padding: 36px 24px 96px; }
    .login { max-width: 420px; }
    h1 { font-size: 28px; }
    .intro { margin: 8px 0 24px; }
    .footer { padding: 20px 24px; font-size: 13px; }
    .footer > span { color: var(--muted); }
}
@media (max-width: 360px) {
    .form-options { font-size: 13px; }
    .welcome h2 { font-size: 27px; }
    .footer { align-items: flex-start; flex-direction: column; gap: 4px; }
}
@media (max-height: 650px) and (min-width: 761px) {
    .welcome { padding-block: 104px 84px; }
    .welcome h2 { font-size: 46px; }
    .form-panel { padding-block: 100px 80px; }
}
@media (max-height: 700px) and (max-width: 760px) {
    .welcome { padding-top: 80px; }
    .welcome p { display: none; }
    .welcome h2 { font-size: 27px; }
    .route-art { height: 48px; margin-top: 8px; }
    .form-panel { padding-top: 24px; }
    .form-options { margin-block: 16px 20px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Mobile: 16px in Eingabefeldern verhindert das automatische Hineinzoomen auf iOS. */
@media (max-width: 760px) {
  input:not([type='checkbox'], [type='radio'], [type='range'], [type='file'], [type='submit'], [type='button'], [type='hidden']),
  select,
  textarea { font-size: 16px; }
}
