/*
 * Auftritt PILATUS VISION: Startseite und Anmeldeseiten. Nachtblau, Alpenglühen (Korallenrosa), Schnee-Weiss;
 * Marcellus für die Marke, Montserrat (app.css) für alles Bedienbare. Formulare nutzen dieselben Bausteine
 * wie das Album (app.css); die Variablen werden hier für .brand-body auf den immer dunklen Auftritt gesetzt.
 * Die Szene der Startseite liegt in pilatus.css, die Akzentfarbe kommt zusätzlich aus /marke.css (config.php).
 */

/* ---------- Farben und Schrift für Startseite und Anmeldung (immer dunkel) ---------- */

.brand-body {
    color-scheme: dark;
    --brand-night: #161a3a;
    --brand-deep: #0e0f26;
    --brand-accent: #e48a88;
    --brand-accent-light: #ffc9a8;
    --brand-snow: #fbf1ec;
    --brand-glass: rgb(22 26 58 / 0.78);
    --brand-glass-line: rgb(251 241 236 / 0.14);

    /* Bausteine aus app.css (Felder, Knöpfe, Meldungen) in den Markenfarben */
    --paper: transparent;
    --surface: rgb(255 255 255 / 0.06);
    --ink: var(--brand-snow);
    --ink-muted: rgb(251 241 236 / 0.72);
    --line: rgb(255 255 255 / 0.14);
    --field-border: rgb(255 255 255 / 0.4);
    --accent: var(--brand-accent);
    --accent-strong: #f0a39b;
    --on-accent: #1d1114;
    --cloth: var(--brand-accent-light);
    --cloth-deep: #d9776d;
    --on-cloth: #1d1114;
    --cloth-tint: rgb(228 138 136 / 0.16);
    --focus: var(--brand-accent-light);
    --danger: #ff9a8f;
    --danger-tint: rgb(255 154 143 / 0.12);
    --on-danger: #1b0b0a;
    --ok: #86d9a6;
    --ok-tint: rgb(134 217 166 / 0.12);
    --font-ui: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-title: 'Montserrat', system-ui, sans-serif;
    --radius: 10px;

    background: linear-gradient(to bottom, var(--brand-night) 0%, #2a2858 40%, #55427a 70%, #8a5b80 100%) fixed;
    color: var(--ink);
    font-family: var(--font-ui);
    font-weight: 400;
}
.brand-body h1, .brand-body h2, .brand-body h3 { font-family: var(--font-title); font-weight: 600; letter-spacing: 0; }
.brand-body a { color: var(--brand-accent-light); }
.brand-body .btn--primary { background: var(--brand-snow); color: #1d1a3a; }
.brand-body .btn--primary:hover { background: #ffffff; color: #1d1a3a; }
.brand-body .btn--secondary { border-color: rgb(251 241 236 / 0.35); color: var(--brand-snow); }
.brand-body .input, .brand-body .select { background: rgb(255 255 255 / 0.07); }
.brand-body .input::placeholder { color: rgb(255 255 255 / 0.45); }
.brand-body .skip-link { color: var(--on-cloth); background: var(--brand-accent); }

/* ---------- Marke ---------- */

/* Der alte Schriftzug (zwei Hälften) bleibt als Klasse gültig, zeigt aber nichts Besonderes mehr */
.wordmark { font-family: 'Marcellus', Georgia, serif; font-weight: 400; letter-spacing: 0.1em; }
.wordmark--small { font-size: 1.25rem; }
a.wordmark { text-decoration: none; }

/* Grundform der Marke (.pv-logo) in app.css; hier nur die Farben des Auftritts */
.brand-body a.pv-logo { color: var(--brand-snow); }
.brand-body a.pv-logo:focus-visible { outline: 3px solid var(--brand-accent-light); outline-offset: 6px; border-radius: 6px; }

/* ---------- Knöpfe und Links des Auftritts ---------- */

.brand-btn {
    display: inline-flex; align-items: center; justify-content: center; min-width: 11rem; min-height: 48px;
    padding: 0 var(--s-6); border-radius: 999px; border: 1px solid transparent;
    font: 600 1rem/1.2 var(--font-ui); letter-spacing: 0.02em; text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.brand-body a.brand-btn--primary, .brand-btn--primary { background: var(--brand-snow); color: #1d1a3a; box-shadow: 0 8px 28px -10px rgb(251 241 236 / 0.6); }
.brand-btn--primary:hover { background: #ffffff; box-shadow: 0 10px 32px -8px rgb(251 241 236 / 0.75); }
.brand-body a.brand-btn--ghost, .brand-btn--ghost { background: rgb(255 255 255 / 0.06); color: #ffffff; border-color: rgb(255 255 255 / 0.35); backdrop-filter: blur(6px); }
.brand-btn--ghost:hover { background: rgb(255 255 255 / 0.14); border-color: rgb(255 255 255 / 0.6); }
.brand-btn:active { transform: scale(0.98); }
.brand-btn:focus-visible { outline: 3px solid var(--brand-accent-light); outline-offset: 3px; }

.brand-link {
    display: inline-flex; align-items: center; min-height: 32px;
    color: rgb(251 241 236 / 0.66); font-size: 0.8125rem; letter-spacing: 0.03em; text-decoration: none;
}
.brand-body a.brand-link { color: rgb(251 241 236 / 0.66); }
.brand-body a.brand-link:hover { color: #ffffff; text-decoration: underline; text-underline-offset: 0.2em; }

/* ---------- Fenster (Anmelden, Kontakt) ---------- */

.brand-dialog {
    width: min(26rem, calc(100vw - 2 * var(--s-4))); max-height: calc(100dvh - 2 * var(--s-4));
    margin: auto; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: visible;
}
.brand-dialog--info { width: min(34rem, calc(100vw - 2 * var(--s-4))); }
.brand-dialog::backdrop { background: rgb(10 11 34 / 0.55); backdrop-filter: blur(4px); }
.brand-dialog[open] { animation: dialogIn 260ms cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes dialogIn { from { opacity: 0; transform: translateY(12px) scale(0.985); } }

.brand-card {
    position: relative; display: grid; gap: var(--s-4);
    max-height: calc(100dvh - 2 * var(--s-4)); overflow: auto;
    padding: var(--s-6) var(--s-5) var(--s-5);
    background: var(--brand-glass); border: 1px solid var(--brand-glass-line); border-radius: 18px;
    box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.8), inset 0 1px 0 rgb(255 255 255 / 0.06);
    backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
}
@media (min-width: 480px) { .brand-card { padding: var(--s-7) var(--s-6) var(--s-6); } }
.brand-card .wordmark--small, .brand-card > .pv-logo { justify-self: center; margin-bottom: var(--s-2); }
.brand-card .auth-heading { font-size: 1.5rem; margin: 0; }
.brand-card .auth-lead { margin: 0; font-size: 0.9375rem; }
.brand-card .form { gap: var(--s-4); max-width: none; }
.brand-card__links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-4); font-size: 0.875rem; max-width: none; }
.brand-dialog__close {
    position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: 50%; background: transparent; color: rgb(255 255 255 / 0.7); cursor: pointer;
}
.brand-dialog__close:hover { background: rgb(255 255 255 / 0.1); color: #ffffff; }
.brand-dialog__close svg { width: 22px; height: 22px; }
.brand-card--text { gap: var(--s-3); line-height: 1.65; font-weight: 300; }
.brand-card--text h2 { font-size: 1.375rem; padding-right: var(--s-6); }
.brand-card--text h3 { font-size: 1rem; margin-top: var(--s-3); color: var(--brand-accent-light); font-weight: 600; }
.brand-steps { margin: 0; padding-left: 1.3em; display: grid; gap: var(--s-2); }
.brand-steps li::marker { color: var(--brand-accent-light); font-weight: 600; }

/* ---------- Anmeldeseiten (Layout «cover»): Karte vor dem ruhigen Berg ---------- */

.brand-auth { position: relative; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; overflow: hidden; }
.brand-auth__bg { position: fixed; inset: 0; z-index: 0; background: var(--brand-night) url(pilatus-cover.svg) no-repeat center bottom / cover; pointer-events: none; }
.brand-auth__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgb(14 15 38 / 0.25), rgb(14 15 38 / 0) 35%, rgb(14 15 38 / 0.35) 100%); }
.brand-auth__top { position: relative; z-index: 1; display: grid; justify-items: center; gap: var(--s-3); text-align: center; padding: var(--s-6) var(--s-4) var(--s-4); }
.brand-auth__caption { max-width: 22rem; margin: 0; font-weight: 300; font-size: 0.9375rem; letter-spacing: 0.04em; color: rgb(251 241 236 / 0.74); }
.brand-auth main { position: relative; z-index: 1; width: min(28rem, calc(100% - 2 * var(--s-4))); align-self: start; padding-bottom: var(--s-6); }
.brand-auth .brand-card { max-height: none; overflow: visible; }
.brand-auth__foot { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-1) var(--s-5); padding: var(--s-3) var(--s-4) calc(env(safe-area-inset-bottom) + var(--s-4)); }
.brand-auth__app { width: 100%; text-align: center; font-size: 0.75rem; letter-spacing: 0.02em; opacity: .7; }
@media (min-height: 760px) { .brand-auth main { align-self: center; padding-bottom: var(--s-7); } }
.brand-auth--wide main { width: min(46rem, calc(100% - 2 * var(--s-4))); align-self: start; }
.brand-auth .brand-card--text h1 { margin: 0 0 var(--s-1); }
.brand-auth .brand-card--text h2 { font-size: 1.0625rem; margin: var(--s-4) 0 0; color: var(--brand-accent-light); font-weight: 600; }
.brand-auth .brand-card--text p, .brand-auth .brand-card--text li { margin: 0; font-size: 0.9375rem; }
.legal-address { line-height: 1.55; }
.legal-list { margin: 0; padding-left: 1.2em; display: grid; gap: var(--s-2); }
.legal-list li::marker { color: var(--brand-accent-light); }
.brand-auth .auth-heading { font-size: 1.5rem; }
.brand-auth .auth-lead { margin-bottom: 0; }
.brand-auth .auth-foot { margin-top: 0; text-align: center; }
.brand-auth .stack { display: grid; gap: var(--s-4); }

/* ---------- Wartungshinweis (alle Seiten) ---------- */

.maintenance {
    display: flex; align-items: center; justify-content: center; gap: var(--s-3);
    padding: var(--s-3) var(--s-4); background: rgb(22 26 58 / 0.96); color: #ffffff;
    border-bottom: 2px solid var(--brand-accent, #e48a88); font-size: 0.9rem;
}
.maintenance svg { width: 22px; height: 22px; flex: none; fill: var(--brand-accent, #e48a88); }
.maintenance p { margin: 0; max-width: 60rem; }
.maintenance--floating {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; border-bottom: 0; border-top: 2px solid var(--brand-accent, #e48a88);
    box-shadow: 0 -5px 20px rgb(0 0 0 / 0.7); animation: slideUp 0.5s ease-out both;
}
@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } }

/* ---------- Kleine Bildschirme, ruhige Darstellung ---------- */

@media (max-width: 768px) {
    .brand-btn { min-width: 0; width: 100%; }
    .pv-logo--cover { font-size: 2.4rem; }
}
@media (prefers-reduced-motion: reduce) {
    .brand-dialog[open], .maintenance--floating { animation: none; }
}
@media (forced-colors: active) {
    .brand-btn { border: 1px solid ButtonText; }
}

/* Schwebender Ankündigungs-Hinweis unten (ab Tablet): Fusszeile darüber Platz lassen */
@media (min-width: 641px) {
    .brand-body:has(.announce-stack--floating) .pv-foot { padding-bottom: calc(env(safe-area-inset-bottom) + 8.5rem); }
    .brand-body:has(.announce-stack--floating) .brand-auth__foot { padding-bottom: calc(env(safe-area-inset-bottom) + 8.5rem); }
}

/* Sprachumschalter als Textlink in den Fusszeilen */
.lang-switch--link { display: inline; margin: 0; }
.brand-link--button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 0.8125rem; letter-spacing: 0.03em; color: rgb(251 241 236 / 0.66); min-height: 32px; }
.brand-link--button:hover { color: #fff; text-decoration: underline; text-underline-offset: 0.2em; }
.brand-link--button:focus-visible { outline: 2px solid var(--brand-accent-light); outline-offset: 3px; border-radius: 3px; }

/* Kontaktformular: Honigtopf unsichtbar (Bots füllen ihn), Turnstile-Widget mit Abstand, Hinweis wenn noch nicht bestätigt */
.field--honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { min-height: 65px; margin: 4px 0 12px; }
.cf-turnstile.is-missing { outline: 2px solid var(--brand-accent-light); outline-offset: 4px; border-radius: 4px; }

/* Eigenes Logo statt Marke (System → Einstellungen → Logo) */
.brand-auth__logo { display: block; }
.brand-auth__logo img { height: clamp(40px, 9vw, 64px); max-width: min(320px, 80vw); object-fit: contain; filter: drop-shadow(0 10px 30px rgb(0 0 0 / 0.5)); }
.landing__logo { margin: 0; }
.landing__logo img { height: clamp(56px, 14vw, 120px); max-width: min(520px, 86vw); object-fit: contain; filter: drop-shadow(0 10px 30px rgb(0 0 0 / 0.5)); }
