/* ==========================================================
   drei-60 · Designsystem (Basis für alle Seiten)
   Kamerablende aus 6 Lamellen à 60°. Signalfarbe Koralle → Amber,
   ruhiges Nachtblau und warmes Papierweiß.
   ========================================================== */

@font-face {
  font-family: "Space Grotesk";
  src: url("/static/fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* Markenfarben */
  --brand-ink: #12141c;
  --brand-paper: #f6f4ef;
  --brand-coral: #ff3d2e;
  --brand-amber: #ffb43b;
  --brand-gradient: linear-gradient(135deg, var(--brand-coral), var(--brand-amber));

  /* Rollen (hell) */
  --bg: var(--brand-paper);
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --text: var(--brand-ink);
  --muted: #5f6270;
  --line: #e3e0d8;
  --accent: #c9361a;
  --primary: var(--brand-ink);
  --primary-text: var(--brand-paper);
  --danger: #b3261e;
  --ok: #1f7a4d;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(18, 20, 28, 0.04), 0 8px 24px rgba(18, 20, 28, 0.06);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Fraunces", Georgia, serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-force-light]) {
    --bg: #0e1016;
    --surface: #171a23;
    --surface-2: #1c202b;
    --text: #f1eee8;
    --muted: #9a9daa;
    --line: #272a36;
    --accent: #ff7a57;
    --primary: var(--brand-paper);
    --primary-text: var(--brand-ink);
    --danger: #f2b8b5;
    --ok: #7fd1a5;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

a { color: var(--accent); }
img, video { max-width: 100%; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.m-0 { margin: 0; }

/* ---------- Logo ---------- */
.logo {
  display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -0.03em; line-height: 1;
}
.logo img { width: 1.4em; height: 1.4em; flex: none; display: block; }
.logo .hy { color: var(--brand-coral); }
.logo .tag {
  font-family: var(--font-body); font-weight: 500; font-size: 12px; letter-spacing: 0.02em;
  color: var(--muted); margin-left: 4px; padding-left: 12px; border-left: 1px solid var(--line);
}

/* ---------- Bedienelemente ---------- */
button, .btn {
  font: inherit; font-weight: 500; cursor: pointer; border-radius: 999px; padding: 8px 16px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
}
button:hover, .btn:hover { border-color: var(--muted); }
button.primary, .btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
button.primary:hover, .btn.primary:hover { opacity: .88; }
.btn.brand, button.brand { background: var(--brand-gradient); border: 0; color: var(--brand-ink); font-weight: 600; }
.btn.brand:hover, button.brand:hover { filter: saturate(1.15) brightness(1.03); }
button.danger, .btn.danger { color: var(--danger); }
button.ghost, .btn.ghost { background: transparent; border-color: transparent; }
button.ghost:hover, .btn.ghost:hover { background: color-mix(in srgb, var(--text) 6%, transparent); border-color: transparent; }
button.small, .btn.small { padding: 5px 12px; font-size: 13px; }
button:disabled { opacity: 0.5; cursor: default; }

input[type=text], input[type=email], input[type=password], input[type=datetime-local], input[type=date], input[type=url], input[type=number], select, textarea {
  font: inherit; width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
textarea { resize: vertical; min-height: 70px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, .btn:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
.field { display: grid; gap: 0; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--text); margin: 0; font-weight: 400; }
.check input { width: 18px; height: 18px; accent-color: var(--brand-coral); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.stack { display: grid; gap: 14px; }
.error { color: var(--danger); font-size: 14px; min-height: 1em; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; padding: 2px 9px; border-radius: 99px;
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.badge.warn { color: var(--danger); border-color: currentColor; }
.badge.accent { color: var(--accent); border-color: currentColor; }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px;
  z-index: 50; box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
}
.toast.long { border-radius: 16px; width: max-content; max-width: min(92vw, 560px); text-align: center; line-height: 1.45; }

/* ---------- Lightbox (Fotos & Videos) ---------- */
.lightbox {
  position: fixed; inset: 0; background: #0b0b0c; z-index: 40;
  display: grid; grid-template-rows: auto 1fr; color: #eee;
}
.lightbox .bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 16px; }
.lightbox .bar .name { font-size: 14px; color: #bbb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 50vw; }
.lightbox button, .lightbox .btn { background: rgba(255,255,255,.08); color: #eee; border-color: transparent; }
.lightbox button:hover, .lightbox .btn:hover { background: rgba(255,255,255,.16); }
.lightbox .stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 64px 18px; }
.lightbox .video-fallback { position: relative; max-width: 100%; max-height: 100%; display: grid; place-items: center; }
.lightbox .video-fallback img { opacity: .35; }
.lightbox .video-fallback .vf-text { position: absolute; inset: auto 16px; display: grid; gap: 10px; justify-items: center; text-align: center; max-width: 440px; margin: 0 auto; font-size: 14px; line-height: 1.5; }
.lightbox .video-fallback strong { font-size: 17px; }
.lightbox .stage img, .lightbox .stage video { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; background: #000; }
.lightbox .nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 26px; padding: 10px 15px; }
.lightbox .nav.prev { left: 10px; }
.lightbox .nav.next { right: 10px; }
@media (max-width: 600px) {
  .lightbox .stage { padding: 0 0 12px; }
  .lightbox .nav { background: rgba(0,0,0,.45); }
  .lightbox .bar .name { display: none; }
}

/* Foto-Infos in der Großansicht */
.lightbox button[aria-pressed=true] { background: rgba(255,255,255,.22); }
.lightbox .info-panel { position: absolute; right: 16px; bottom: 24px; z-index: 3; width: min(340px, calc(100vw - 32px)); background: rgba(18,20,28,.86); backdrop-filter: blur(14px); color: #eee; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 14px 16px; font-size: 13px; display: grid; gap: 8px; }
.lightbox .info-panel[hidden] { display: none; }
.lightbox .info-row { display: grid; grid-template-columns: 96px 1fr; gap: 10px; }
.lightbox .info-row .k { color: #9a9ca6; }
.lightbox .info-row a { color: #ffb43b; }

/* ---------- Hinweisseiten (Link ungültig, abgelaufen …) ---------- */
body.has-screen { background: #0b0c12; }
.msg-screen {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; display: grid; place-items: center; align-content: center; gap: 22px;
  padding: 40px max(16px, env(safe-area-inset-left)) 32px max(16px, env(safe-area-inset-right)); background: #0b0c12; color: #f6f4ef;
}
.msg-glow { position: absolute; inset: 0; pointer-events: none; filter: blur(80px); opacity: .7; }
.msg-glow i { position: absolute; border-radius: 50%; width: 46vmax; height: 46vmax; }
.msg-glow i:first-child { left: -14vmax; top: -18vmax; background: radial-gradient(circle, rgba(var(--glow-a, 255, 61, 46), .7), transparent 65%); animation: msg-drift 18s ease-in-out infinite alternate; }
.msg-glow i:last-child { right: -16vmax; bottom: -20vmax; background: radial-gradient(circle, rgba(var(--glow-b, 255, 180, 59), .5), transparent 65%); animation: msg-drift 24s ease-in-out infinite alternate-reverse; }
@keyframes msg-drift { to { transform: translate(6vmax, 4vmax) scale(1.1); } }
.msg-ring { position: absolute; width: 900px; max-width: none; right: -320px; top: 50%; margin-top: -450px; opacity: .06; animation: msg-spin 120s linear infinite; pointer-events: none; }
@keyframes msg-spin { to { transform: rotate(360deg); } }
.msg-card {
  position: relative; z-index: 1; width: min(520px, 100%); display: grid; justify-items: center; text-align: center; gap: 14px;
  padding: 40px 32px; border-radius: 28px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .7);
}
.msg-logo { position: absolute; top: 18px; left: 22px; text-decoration: none; }
.msg-logo .logo { color: #f6f4ef; font-size: 17px; }
.msg-mark { width: 84px; height: 84px; margin: 26px 0 6px; filter: drop-shadow(0 10px 30px rgba(255, 90, 50, .5)); animation: msg-spin 40s linear infinite; }
.msg-card h1 { font-size: clamp(30px, 6vw, 42px); letter-spacing: -.04em; line-height: 1.05; color: #f6f4ef; }
.msg-text { margin: 0; font-size: 17px; color: rgba(246, 244, 239, .75); max-width: 30em; }
.msg-tips { list-style: none; margin: 8px 0 4px; padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, .05); display: grid; gap: 8px; text-align: left; font-size: 14px; color: rgba(246, 244, 239, .7); width: 100%; }
.msg-tips li { display: flex; gap: 10px; }
.msg-tips li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 8px; border-radius: 50%; background: linear-gradient(135deg, #ff3d2e, #ffb43b); }
body .msg-screen .btn.msg-btn { margin-top: 6px; background: linear-gradient(135deg, #ff3d2e, #ffb43b); color: #12141c; border: 0; font-weight: 600; padding: 12px 22px; }
.msg-screen .legal-links { position: relative; z-index: 1; display: flex; gap: 18px; font-size: 13px; }
.msg-screen .legal-links a { color: rgba(246, 244, 239, .55); text-decoration: none; }
.msg-screen .legal-links a:hover { color: #f6f4ef; }
@media (max-width: 520px) { .msg-card { padding: 32px 20px; border-radius: 22px; } .msg-mark { width: 68px; height: 68px; } }
@media (prefers-reduced-motion: reduce) { .msg-glow i, .msg-ring, .msg-mark { animation: none; } }

/* Passwortseite im selben Look */
.msg-eyebrow { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #ffb43b; }
.msg-lock { width: 76px; height: 76px; margin: 26px 0 4px; border-radius: 24px; display: grid; place-items: center; background: linear-gradient(135deg, #ff3d2e, #ffb43b); box-shadow: 0 16px 40px -10px rgba(255, 90, 50, .6); }
.msg-lock::after { content: ""; width: 34px; height: 34px; background: #12141c; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 10V8a6 6 0 1112 0v2h1.5v12h-15V10H6zm3 0h6V8a3 3 0 10-6 0v2z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 10V8a6 6 0 1112 0v2h1.5v12h-15V10H6zm3 0h6V8a3 3 0 10-6 0v2z'/%3E%3C/svg%3E") center/contain no-repeat; }
.msg-field { width: 100%; display: grid; gap: 6px; text-align: left; margin-top: 6px; }
.msg-field label { color: rgba(246, 244, 239, .65); margin: 0; }
body .msg-screen .msg-field input { width: 100%; padding: 14px 16px; border-radius: 14px; font-size: 16px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); color: #f6f4ef; }
body .msg-screen .msg-field input:focus-visible { outline: 2px solid #ffb43b; outline-offset: 2px; }
.msg-form .error { color: #ff9d8a; min-height: 0; }
.msg-form .msg-btn { width: 100%; font-size: 16px; padding: 14px; }

/* Kundenbranding auf der Passwortseite: Logo statt Schloss, Lichtfarbe aus dem Logo */
.msg-screen.brand-glow { --glow-a: var(--brand-rgb); --glow-b: var(--brand-rgb); }
.msg-screen.brand-glow .msg-ring { display: none; }
.msg-screen.brand-glow .msg-eyebrow { color: rgb(var(--brand-rgb)); }
body .msg-screen.brand-glow .btn.msg-btn { background: rgb(var(--brand-rgb)); background-image: linear-gradient(135deg, rgb(var(--brand-rgb)), rgba(var(--brand-rgb), .75)); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); box-shadow: 0 12px 30px -10px rgba(var(--brand-rgb), .7); }
.msg-screen.brand-glow .msg-field input:focus-visible { outline-color: rgb(var(--brand-rgb)); }
.msg-brand { max-width: 240px; max-height: 110px; margin: 18px 0 6px; object-fit: contain; filter: drop-shadow(0 10px 30px rgba(var(--brand-rgb, 255, 120, 60), .45)); }
.msg-brand-name { margin: 22px 0 4px; font: 700 28px var(--font-display); letter-spacing: -.03em; color: #f6f4ef; }
.msg-powered { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(246, 244, 239, .5); }
.msg-powered .logo { font-size: 14px; color: rgba(246, 244, 239, .75); }
