/* MyDiWoP Keycloak theme — login flow.
   Mirrors the Weltkopf semantic palette (--wk-* in apps/platform/src/app/globals.css)
   as hardcoded hex from .rebrand/project/proto-themes.jsx, weltkopf-dark (lines 94-103).
   Dark-mode only — matches today's MyDiWoP /login page.

   Token reference (proto-themes.jsx weltkopf-dark):
     --wk-bg        #15191a    --wk-fg          #ece4d0    --wk-line2  rgba(45,127,131,.32)
     --wk-surface   #1c2122    --wk-fg-muted    #9aa3a4    --wk-accent #c19a3c
     --wk-surface2  #252b2c    --wk-fg-faint    #5e6768    --wk-accent-deep #a17d28
                                                           --wk-secondary #2d7f83
*/

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

.wk-body {
  min-height: 100vh;
  background: #15191a;
  color: #ece4d0;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Two-column shell (1.2fr / 1fr) ============================== */

.wk-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

@media (min-width: 768px) {
  .wk-shell { grid-template-columns: 1.2fr 1fr; }
}

/* === Hero pane (left) ============================================ */

.wk-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: #1c2122;
  padding: 48px 40px;
  border-bottom: 3px solid #c19a3c;
}

@media (min-width: 768px) {
  .wk-hero {
    padding: 48px 64px;
    border-bottom: 0;
    border-right: 3px solid #c19a3c;
  }
}

.wk-hero > * { position: relative; z-index: 1; }
.wk-hero-backdrop { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.wk-hero-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 70%, rgba(45,127,131,0.33) 0%, transparent 60%);
}

.wk-hero-spot {
  position: absolute; inset: -20%;
}

.wk-hero-spot-gold {
  background: radial-gradient(circle at 85% 25%, rgba(193,154,60,0.165) 0%, transparent 38%);
}

.wk-hero-spot-teal {
  background: radial-gradient(circle at 80% 80%, rgba(45,127,131,0.235) 0%, transparent 45%);
}

.wk-hero-line {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

/* === Backdrop animations (port of LoginBackdrop, proto-weltkopf.jsx 205-340) === */

@keyframes wk-spot-drift {
  0%, 100% { transform: translate(-10%, -8%) scale(1); }
  50%      { transform: translate(8%, 12%) scale(1.15); }
}

@keyframes wk-spot-drift-2 {
  0%, 100% { transform: translate(40%, 60%) scale(1.1); }
  50%      { transform: translate(20%, 30%) scale(0.9); }
}

@keyframes wk-tile-pulse {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  50%      { opacity: 1; transform: scale(1); }
}

@keyframes wk-scan {
  0%   { transform: translate(-100%, -100%) rotate(28deg); opacity: 0; }
  15%  { opacity: 0.7; }
  85%  { opacity: 0.7; }
  100% { transform: translate(120%, 120%) rotate(28deg); opacity: 0; }
}

@keyframes wk-line-draw {
  0%   { stroke-dashoffset: 1200; }
  100% { stroke-dashoffset: 0; }
}

.wk-hero-spot-gold { animation: wk-spot-drift   22s ease-in-out infinite; }
.wk-hero-spot-teal { animation: wk-spot-drift-2 28s ease-in-out infinite; }

.wk-hero-line path {
  stroke-dasharray: 1200;
  animation: wk-line-draw 4s ease-out forwards;
}

.wk-mosaic {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  grid-template-rows: repeat(22, minmax(0, 1fr));
  pointer-events: none;
  overflow: hidden;
}

.wk-tile {
  align-self: center;
  justify-self: center;
  aspect-ratio: 1 / 1;
  background: #c19a3c;
  border-radius: 1px;
  opacity: 0;
  transform-origin: center;
  animation: wk-tile-pulse var(--wk-tile-dur, 10s) ease-in-out var(--wk-tile-delay, 0s) infinite;
}

.wk-scan-wrap {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.wk-scan {
  position: absolute;
  left: -50%;
  top: -50%;
  width: 200%;
  height: 8px;
  background: linear-gradient(90deg, transparent 0%, rgba(193, 154, 60, 0.4) 50%, transparent 100%);
  filter: blur(2px);
  animation: wk-scan 14s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .wk-hero-spot-gold,
  .wk-hero-spot-teal,
  .wk-hero-line path,
  .wk-tile,
  .wk-scan { animation: none !important; }
  .wk-tile { opacity: 0.5; transform: scale(1); }
}

/* === Brand block ================================================= */

.wk-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wk-brand-mark {
  width: 56px; height: 56px;
  object-fit: contain;
}

.wk-brand-wordmark {
  display: flex;
  align-items: baseline;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.wk-brand-my  { color: #ece4d0; }
.wk-brand-di  { color: #c19a3c; }
.wk-brand-wop { color: #2d7f83; }

.wk-brand-tagline {
  margin-top: 2px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #9aa3a4;
}

/* === Leitartikel ================================================= */

.wk-leitartikel {
  max-width: 540px;
}

.wk-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: #c19a3c;
}

.wk-eyebrow-rule {
  display: inline-block;
  width: 32px;
  height: 1px;
  background: #c19a3c;
}

.wk-headline {
  margin: 0;
  font-family: "Instrument Serif", ui-serif, Georgia, serif;
  font-weight: 400;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: #ece4d0;
}

.wk-headline em {
  font-style: italic;
  color: #c19a3c;
}

.wk-lede {
  margin-top: 24px;
  max-width: 460px;
  font-family: "Instrument Serif", ui-serif, Georgia, serif;
  font-style: italic;
  font-size: 19px;
  line-height: 1.5;
  color: #9aa3a4;
}

/* === Hero footer strip =========================================== */

.wk-hero-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #5e6768;
}

/* === Form pane (right) =========================================== */

.wk-form-pane {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 40px;
  background: #15191a;
}

@media (min-width: 768px) {
  .wk-form-pane { padding: 48px 56px; }
}

.wk-form-card {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.wk-section-mark {
  margin-bottom: 14px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: #c19a3c;
}

.wk-form-headline {
  margin: 0 0 36px 0;
  font-family: "Instrument Serif", ui-serif, Georgia, serif;
  font-weight: 400;
  font-size: 46px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #ece4d0;
}

.wk-form-headline em {
  font-style: italic;
  color: #c19a3c;
}

/* === Form fields ================================================= */

.wk-auth-form { display: block; }

.wk-label-mono {
  display: block;
  margin-bottom: 6px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #9aa3a4;
}

.wk-input {
  display: block;
  width: 100%;
  padding: 10px 0;
  margin-bottom: 20px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid rgba(45, 127, 131, 0.32);
  border-radius: 0;
  font-family: "Instrument Serif", ui-serif, Georgia, serif;
  font-size: 17px;
  color: #ece4d0;
  outline: none;
  transition: border-color 120ms ease;
}

.wk-input:focus { border-bottom-color: #c19a3c; }
.wk-input::placeholder { color: #5e6768; }
.wk-input--last { margin-bottom: 28px; }
.wk-input--error { border-bottom-color: #c45a4a; }

/* === Submit button =============================================== */
/* Mirrors proto-weltkopf.jsx WeltkopfLogin: teal panel + cream fg + gold border.
   Teal hex from proto-themes.jsx weltkopf-dark.secondary (#2d7f83). */

.wk-btn-primary {
  display: block;
  width: 100%;
  padding: 16px 20px;
  margin-bottom: 28px;
  background: #2d7f83;
  border: 2px solid #c19a3c;
  border-radius: 0;
  color: #ece4d0;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.wk-btn-primary:hover { background: #c19a3c; color: #15191a; }
.wk-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

/* === Form meta row (remember me + forgot password) =============== */

.wk-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "Instrument Serif", ui-serif, Georgia, serif;
  font-style: italic;
  font-size: 12px;
  color: #9aa3a4;
}

.wk-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.wk-checkbox input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.wk-checkbox-box {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(45, 127, 131, 0.32);
  background: transparent;
}

.wk-checkbox input:checked + .wk-checkbox-box { background: #c19a3c; border-color: #c19a3c; }
.wk-checkbox input:focus-visible + .wk-checkbox-box { outline: 2px solid #c19a3c; outline-offset: 2px; }

.wk-link-accent {
  color: #c19a3c;
  text-decoration: none;
}

.wk-link-accent:hover { text-decoration: underline; }

/* === Form-level messages ========================================= */

.wk-form-message {
  margin-bottom: 20px;
  padding: 10px 12px;
  border-left: 2px solid #c45a4a;
  background: rgba(196, 90, 74, 0.08);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  color: #ece4d0;
}

.wk-form-message--success { border-left-color: #7a9a5a; background: rgba(122, 154, 90, 0.08); }
.wk-form-message--warning { border-left-color: #c19a3c; background: rgba(193, 154, 60, 0.08); }
.wk-form-message--info    { border-left-color: #2d7f83; background: rgba(45, 127, 131, 0.10); }

.wk-form-error {
  margin: -8px 0 16px 0;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  color: #c45a4a;
}

.wk-form-info {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(232, 222, 196, 0.08);
  font-family: "Instrument Serif", ui-serif, Georgia, serif;
  font-size: 14px;
  color: #9aa3a4;
}

/* === Aux template helpers (S28b/02) ============================== */

.wk-form-lede {
  margin: 0 0 24px 0;
  font-family: "Instrument Serif", ui-serif, Georgia, serif;
  font-style: italic;
  font-size: 17px;
  line-height: 1.45;
  color: #9aa3a4;
}

.wk-form-info-text {
  margin: 18px 0 0 0;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  color: #9aa3a4;
}

.wk-form-subhead {
  margin: 0 0 8px 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #c19a3c;
}

.wk-emphasize {
  color: #ece4d0;
  font-weight: 500;
  font-style: normal;
}

.wk-form-message--error { border-left-color: #c45a4a; background: rgba(196, 90, 74, 0.10); }
.wk-form-message--block { padding: 14px 16px; }
.wk-form-message--block p { margin: 0; }

.wk-form-meta--logout { margin: -4px 0 24px 0; }

.wk-link-button {
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.wk-input--otp {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 22px;
  letter-spacing: 0.5em;
  text-align: center;
}

.wk-otp-credentials {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.wk-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  color: #ece4d0;
}

.wk-radio input { accent-color: #c19a3c; }

.wk-terms-body {
  margin-bottom: 24px;
}

.wk-terms-text {
  max-height: 320px;
  overflow-y: auto;
  padding: 14px 16px;
  border: 1px solid rgba(45, 127, 131, 0.32);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  color: #9aa3a4;
}

/* === Reset Keycloak built-ins we do not want ===================== */

.kc-social-providers, #kc-social-providers, #kc-info, #kc-locale { display: none !important; }
