/* ============================================================
   ServiceFlow Light — Public Pages (Landing + Auth)
   Werkbank: Spline Sans Mono + Hanken Grotesk (2026-05-29)
   Hero-/Auth-Headlines in Hanken schwer (Mono bei ~100px klobig),
   Folio/Labels/Buttons in Mono. Altes Editorial in design-editorial-original.
   ============================================================ */

:root {
    --bg:           #f6f7f8;
    --bg-paper:     #edf0f1;
    --bg-deep:      #e3e7e9;
    --ink:          #15201b;
    --ink-muted:    #5f6a64;
    --ink-faint:    #79837d;
    --rule:         #d7dcdc;
    --rule-strong:  #15201b;
    --accent:       #1f7a57;
    --accent-deep:  #15573e;
    --ochre:        #a8620e;
    --ink-stamp:    #b54848;
    --danger-soft:  #f6e5e3;
    --accent-soft:  #e3f3ec;

    --font-display: "Spline Sans Mono", "JetBrains Mono", ui-monospace, monospace;
    --font-body:    "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono:    "Spline Sans Mono", "JetBrains Mono", "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.55;
    font-feature-settings: "kern", "liga", "calt", "onum";
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--ochre); color: var(--bg); }

/* ============== Paper grain overlay ============== */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .035;
    z-index: 1000;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ============== Shared: page shell (full viewport, no scroll) ============== */
.page {
    height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 28px 36px;
    gap: 14px;
}

/* ============== Top folio ============== */
.folio {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--rule-strong);
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--ink-muted);
}
.folio .mark { color: var(--ink); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.folio .mark .logo-mark { width: 16px; height: 16px; flex: 0 0 auto; }
.folio .mark .mark-sub {
    color: var(--accent);
    font-family: var(--font-mono);
    font-style: normal;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-left: 6px;
}
.folio .issue { letter-spacing: 0.28em; }
.folio .issue em {
    font-family: var(--font-mono);
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--ink);
    font-weight: 600;
    margin-right: 6px;
}

/* ============== Bottom foot ============== */
.foot {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 14px;
    border-top: 1px solid var(--rule);
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--ink-muted);
}
.foot a:hover { color: var(--ink); }
.foot .right { display: flex; gap: 22px; }

/* ============================================================
   LANDING
   ============================================================ */
.landing-main {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: center;
    gap: 60px;
    padding: 0 12px;
    min-height: 0;
}

.hero-headline {
    font-family: var(--font-body);
    font-weight: 800;
    color: var(--ink);
    margin: 0;
    line-height: 0.94;
    letter-spacing: -0.045em;
    font-size: clamp(40px, 6.2vw, 104px);
}
.hero-headline .word {
    display: block;
    opacity: 0;
    transform: translateY(24px);
    animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards;
}
.hero-headline .word:nth-child(1) { animation-delay: 0.05s; }
.hero-headline .word:nth-child(2) {
    animation-delay: 0.22s;
    font-style: normal;
    color: var(--accent);
}
.hero-headline .punct { color: var(--ochre); }

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

.hero-aside {
    display: flex;
    flex-direction: column;
    gap: 28px;
    align-self: center;
    opacity: 0;
    animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards;
    animation-delay: 0.42s;
}

.hero-lead {
    font-family: var(--font-body);
    font-size: clamp(17px, 1.4vw, 21px);
    line-height: 1.45;
    max-width: 32ch;
    color: var(--ink);
    margin: 0;
}
.hero-lead em {
    font-style: italic;
    color: var(--accent-deep);
}
.hero-lead .dash {
    color: var(--ochre);
    font-style: normal;
}

.hero-cta { align-self: flex-start; }

.btn-primary {
    background: var(--ink);
    color: var(--bg);
    padding: 17px 28px;
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    border: 0;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
    width: auto;
}
.btn-primary:hover { background: var(--accent); transform: translateX(2px); }
.btn-primary .arrow { transition: transform .25s ease; }
.btn-primary:hover .arrow { transform: translateX(4px); }
.btn-primary:disabled {
    opacity: .65;
    cursor: progress;
    background: var(--ink);
    transform: none;
}

/* ============================================================
   AUTH (Login)
   ============================================================ */
.auth-main {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: 80px;
    padding: 0 12px;
    min-height: 0;
}

.auth-side {
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-width: 480px;
}

.auth-headline {
    font-family: var(--font-body);
    font-weight: 800;
    color: var(--ink);
    margin: 0;
    line-height: 0.92;
    letter-spacing: -0.045em;
    font-size: clamp(48px, 7vw, 92px);
}
.auth-headline .word {
    display: block;
    opacity: 0;
    transform: translateY(20px);
    animation: rise .8s cubic-bezier(.2,.7,.2,1) forwards;
}
.auth-headline .word:nth-child(1) { animation-delay: 0.05s; }
.auth-headline .word:nth-child(2) {
    animation-delay: 0.18s;
    font-style: normal;
    color: var(--accent);
    margin-left: 0;
}
.auth-headline .punct { color: var(--ochre); }

.auth-lead {
    font-family: var(--font-body);
    font-size: 17px;
    color: var(--ink-muted);
    margin: 0;
    line-height: 1.5;
    max-width: 32ch;
    opacity: 0;
    animation: rise .8s cubic-bezier(.2,.7,.2,1) forwards;
    animation-delay: 0.3s;
}
.auth-lead em { font-style: italic; color: var(--accent-deep); }

.auth-form-wrap {
    border: 1px solid var(--rule-strong);
    background: var(--bg);
    padding: 36px 36px 32px;
    position: relative;
    opacity: 0;
    animation: rise .8s cubic-bezier(.2,.7,.2,1) forwards;
    animation-delay: 0.4s;
}
.auth-form-wrap::before {
    content: "ANMELDUNG";
    position: absolute;
    top: -8px;
    left: 24px;
    background: var(--bg);
    padding: 0 10px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.3em;
    color: var(--ink-muted);
}

.flash {
    padding: 10px 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 18px;
    border-left: 3px solid;
}
.flash-success { background: var(--accent-soft);  color: var(--accent-deep); border-color: var(--accent); }
.flash-danger  { background: var(--danger-soft);  color: var(--ink-stamp); border-color: var(--ink-stamp); }
.flash-warning { background: #fdf3e3;             color: var(--ochre); border-color: var(--ochre); }
.flash-info    { background: var(--bg-paper);     color: var(--ink); border-color: var(--ink); }

.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; }
.auth-form label span {
    font-family: var(--font-body);
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
    color: var(--ink);
    font-weight: 600;
}
.auth-form input {
    border: 1px solid #c4cdc7;
    border-radius: 2px;
    background: #fff;
    padding: 11px 13px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--ink);
    outline: none;
    width: 100%;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-form input::placeholder { color: var(--ink-faint); }
.auth-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.auth-form input:focus + .focus-bar { transform: scaleX(1); }

.auth-form .btn-primary {
    margin-top: 12px;
    justify-content: center;
    padding: 16px 26px;
}

.auth-forgot {
    display: inline-block;
    margin-top: 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--ink-muted);
    padding-bottom: 2px;
    border-bottom: 1px solid var(--rule);
    transition: color .2s ease, border-color .2s ease;
    align-self: flex-start;
}
.auth-forgot:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* Password-Toggle (Auge) — JS wickelt das Feld in .pw-wrap, Button sitzt darin */
.auth-form label { position: relative; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 42px !important; }
.pw-toggle-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    padding: 6px;
    cursor: pointer;
    color: var(--ink-muted);
    line-height: 0;
    transition: color .2s ease;
}
.pw-toggle-btn:hover { color: var(--ink); }
.pw-toggle-btn svg { width: 18px; height: 18px; display: block; }

/* ============================================================
   LEGAL (Impressum)
   ============================================================ */
.legal-info {
    opacity: 0;
    animation: rise .8s cubic-bezier(.2,.7,.2,1) forwards;
    animation-delay: 0.4s;
}
.legal-list {
    margin: 0;
    border-top: 1px solid var(--rule-strong);
}
.legal-list .item {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--rule);
    align-items: baseline;
}
.legal-list dt {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: var(--ink-muted);
    margin: 0;
    padding-top: 4px;
}
.legal-list dd {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--ink);
    margin: 0;
    line-height: 1.4;
}
.legal-list dd .muted {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--ink-muted);
    display: inline-block;
    margin-top: 4px;
}
.legal-list a {
    color: var(--accent);
    border-bottom: 1px solid var(--rule);
    padding-bottom: 1px;
    transition: border-color .2s ease;
}
.legal-list a:hover { border-bottom-color: var(--accent); }

@media (max-width: 820px) {
    .legal-list .item { grid-template-columns: 1fr; gap: 4px; padding: 14px 0; }
}

/* ============== Mobile ============== */
@media (max-width: 820px) {
    body { overflow: auto; }
    .page {
        height: auto;
        min-height: 100vh;
        padding: 18px 20px;
        gap: 18px;
    }

    .folio { font-size: 10px; letter-spacing: 0.16em; gap: 12px; align-items: flex-start; }
    .folio .mark { gap: 10px; align-items: center; }
    .folio .mark .logo-mark { width: 30px; height: 30px; }
    .folio .mark .mark-words { display: flex; flex-direction: column; line-height: 1.15; }
    .folio .mark .mark-name { font-size: 13px; }
    .folio .mark .mark-sub { font-size: 13px; margin-left: 0; }

    .landing-main {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 30px 0;
    }
    .hero-headline { font-size: clamp(34px, 8.5vw, 64px); }
    .hero-aside { gap: 22px; }
    .hero-lead { font-size: 17px; }

    .auth-main {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 24px 0;
    }
    .auth-side { gap: 16px; }
    .auth-headline { font-size: clamp(40px, 11vw, 64px); }
    .auth-form-wrap { padding: 28px 24px 26px; }

    .foot { flex-direction: column; gap: 8px; align-items: flex-start; font-size: 9px; }
    .foot .right { flex-direction: column; gap: 6px; }
}

/* ============== Reduced motion ([[feedback-windows-reduced-motion]]) ============== */
@media (prefers-reduced-motion: reduce) {
    .hero-headline .word,
    .auth-headline .word,
    .hero-aside,
    .auth-lead,
    .auth-form-wrap {
        opacity: 1;
        transform: none;
        animation: none;
    }
}
