/* Kontakt-Lightbox „Bühne“ (Canvas-Entwurf D3, Wahl Fabian 24.11.2026).
   Breit (ab 980 × 700 px): zweigeteilter Dialog, links dunkle Fläche, rechts Formular.
   Schmal: Sheet von unten mit dunklem Kopf.
   Bestätigung: Die dunkle Fläche wächst über den ganzen Dialog, ein Häkchen zeichnet sich. */

html.gl-lb-open,
html.gl-lb-open body { overflow: hidden; }

.gl-lb[hidden] { display: none !important; }
.gl-lb { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; font-family: 'Montserrat', system-ui, sans-serif; color: var(--gl-ink); -webkit-font-smoothing: antialiased; }

/* Startseite dahinter: dunkler und unscharf */
.gl-lb-veil { position: absolute; inset: 0; background: radial-gradient(1100px 720px at 50% 50%, rgba(19,29,39,.46), rgba(19,29,39,.68)); -webkit-backdrop-filter: blur(9px) saturate(.85); backdrop-filter: blur(9px) saturate(.85); animation: glLbFade .45s ease both; }

.gl-lb-dlg { position: relative; z-index: 1; box-sizing: border-box; background: #ffffff; overflow: hidden; outline: none; }
.gl-lb-dark { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(90% 70% at 0% 0%, rgba(255,255,255,.07), rgba(255,255,255,0) 60%), var(--gl-primary-dark); transition: clip-path .8s cubic-bezier(.7,0,.2,1), -webkit-clip-path .8s cubic-bezier(.7,0,.2,1); }

/* Dunkle Seite: Überschrift und Zusagen */
.gl-lb-lead { position: relative; z-index: 2; box-sizing: border-box; color: #ffffff; transition: opacity .3s ease; }
.gl-lb-grip { display: none; }
.gl-lb-lead-top { display: flex; flex-direction: column; gap: 18px; }
.gl-lb-kicker { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: #eab89b; }
.gl-lb-h { margin: 0; font-family: 'termina', sans-serif; font-size: 32px; line-height: 1.14; font-weight: 600; letter-spacing: -.03em; color: #ffffff; }
.gl-lb-h-short { display: none; }
.gl-lb-sub { margin: 0; font-size: 15px; line-height: 1.6; font-weight: 300; color: #c3d0da; }
.gl-lb-note { display: none; margin: 0; align-items: center; gap: 7px; font-size: 13px; line-height: 18px; color: #c3d0da; }
.gl-lb-note svg { color: #eab89b; flex: none; }
.gl-lb-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.gl-lb-list li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: 14px; line-height: 20px; font-weight: 500; color: #e6edf2; }
.gl-lb-list li:last-child { border-bottom: 1px solid rgba(255,255,255,.1); }
.gl-lb-ico { flex: none; width: 36px; height: 36px; box-sizing: border-box; border-radius: 50%; border: 1px solid rgba(234,184,155,.32); display: flex; align-items: center; justify-content: center; color: #eab89b; }
.gl-lb-direct { display: flex; flex-direction: column; gap: 2px; }
.gl-lb-direct > span { font-size: 12.5px; line-height: 17px; font-weight: 400; color: #c3d0da; }
.gl-lb-direct a { color: #ffffff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.4); text-underline-offset: 3px; }
.gl-lb-direct a:hover { color: #eab89b; }

/* Formular */
.gl-lb-form { position: relative; z-index: 0; margin: 0; box-sizing: border-box; }
.gl-lb-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.gl-lb-fields { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 22px; transition: opacity .3s ease; }
.gl-lb-grid { display: grid; gap: 20px 16px; }
.gl-lb-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gl-lb-lbl { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gl-ink-3); }
.gl-lb-lbl em { font-style: normal; font-weight: 500; letter-spacing: .02em; text-transform: none; }
.gl-lb-in { box-sizing: border-box; width: 100%; height: 46px; margin: 0; padding: 0 14px; border: 1px solid rgba(38,43,44,.16); border-radius: 12px; background: #ffffff; font: inherit; font-size: 15px; line-height: 20px; color: var(--gl-ink); outline: none; transition: border-color .2s ease, box-shadow .2s ease; -webkit-appearance: none; appearance: none; }
.gl-lb-in:hover { border-color: rgba(38,43,44,.3); }
.gl-lb-in:focus { border-color: var(--gl-accent); box-shadow: 0 0 0 3px rgba(214,99,63,.16); }
.gl-lb-in::placeholder { color: #6f787c; opacity: 1; }
.gl-lb-area { height: 100px; padding: 12px 14px; line-height: 1.55; resize: none; }
.gl-lb-topics { display: flex; flex-direction: column; gap: 10px; }
.gl-lb-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.gl-lb-pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; margin: 0; padding: 0 16px; border: 1px solid rgba(38,43,44,.14); border-radius: 999px; background: transparent; color: var(--gl-ink-2); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease, transform .18s ease; }
.gl-lb-pill svg { display: none; }
.gl-lb-pill:hover { border-color: rgba(38,43,44,.32); }
.gl-lb-pill:active { transform: scale(.97); }
.gl-lb-pill.is-on { background: var(--gl-primary); border-color: var(--gl-primary); color: #ffffff; }
.gl-lb-pill.is-on svg { display: block; }

.gl-lb-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.gl-lb-err { margin: 0; font-size: 13px; line-height: 1.55; font-weight: 500; color: var(--gl-accent-text); }
.gl-lb-send { display: inline-flex; align-items: center; justify-content: center; min-width: 206px; height: 48px; margin: 0; padding: 0 26px; border: 0; border-radius: 999px; background: var(--gl-accent-dark); color: #ffffff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .2s ease, transform .18s cubic-bezier(.22,1,.36,1); }
.gl-lb-send:hover { background: var(--gl-accent-deep); }
.gl-lb-send:active { transform: scale(.97); }
.gl-lb-send-idle, .gl-lb-send-busy { display: inline-flex; align-items: center; gap: 10px; }
.gl-lb-send-busy { display: none; }
.gl-lb-spin { display: block; width: 16px; height: 16px; box-sizing: border-box; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #ffffff; animation: glLbSpin .8s linear infinite; }
.gl-lb-privacy { margin: 0; font-size: 12.5px; line-height: 18px; font-weight: 400; color: var(--gl-ink-3); }
.gl-lb-privacy a { color: var(--gl-accent-text); text-decoration: underline; text-underline-offset: 2px; }

/* Lade-Balken beim Senden */
.gl-lb-bar { position: absolute; z-index: 2; height: 3px; background: rgba(214,99,63,.14); overflow: hidden; opacity: 0; pointer-events: none; }
.gl-lb-bar i { display: block; width: 88%; height: 3px; background: var(--gl-accent); transform: scaleX(0); transform-origin: 0 50%; }

/* Schließen */
.gl-lb-x { position: absolute; z-index: 4; display: flex; align-items: center; justify-content: center; margin: 0; padding: 0; border: 0; border-radius: 50%; cursor: pointer; transition: background .25s ease, color .25s ease; }
.gl-lb-light { display: inline-flex; align-items: center; justify-content: center; height: 48px; margin: 0; padding: 0 34px; border: 0; border-radius: 999px; background: #ffffff; color: var(--gl-primary-dark); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .2s ease, transform .18s cubic-bezier(.22,1,.36,1); }
.gl-lb-light:hover { background: var(--gl-surface); }
.gl-lb-light:active { transform: scale(.97); }

.gl-lb-pill:focus-visible, .gl-lb-send:focus-visible, .gl-lb-x:focus-visible, .gl-lb-privacy a:focus-visible { outline: 2px solid var(--gl-accent); outline-offset: 3px; }
.gl-lb-light:focus-visible, .gl-lb-direct a:focus-visible { outline: 2px solid #eab89b; outline-offset: 3px; }

/* Bestätigung */
.gl-lb-done { position: absolute; inset: 0; z-index: 3; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 30px; box-sizing: border-box; padding: 0 24px; text-align: center; color: #ffffff; }
.gl-lb-glow { position: absolute; left: calc(50% - 350px); top: -330px; width: 700px; height: 760px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.075), rgba(255,255,255,0)); pointer-events: none; }
.gl-lb-glow2 { position: absolute; left: calc(50% - 120px); top: 78px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(closest-side, rgba(214,99,63,.13), rgba(214,99,63,0)); pointer-events: none; }
.gl-lb-check { position: relative; width: 120px; height: 120px; color: var(--gl-accent); }
.gl-lb-ring, .gl-lb-tick { stroke-dasharray: 100 200; stroke-dashoffset: 0; } /* Lücke > Pfad: sonst zeigt Safari vorab einen Punkt */
.gl-lb-done-copy { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.gl-lb-done-h { margin: 0; font-family: 'termina', sans-serif; font-size: 58px; line-height: 1; font-weight: 600; letter-spacing: -.035em; color: #ffffff; outline: none; }
.gl-lb-done-p { margin: 0; max-width: 34em; font-size: 18px; line-height: 1.6; font-weight: 300; color: #d3dde5; }
.gl-lb-done .gl-lb-light { position: relative; }

/* Zustände */
.gl-lb[data-state="sending"] .gl-lb-fields { opacity: .42; }
.gl-lb[data-state="sending"] .gl-lb-send { cursor: progress; transform: none; }
.gl-lb[data-state="sending"] .gl-lb-send:hover { background: var(--gl-accent-dark); }
.gl-lb[data-state="sending"] .gl-lb-send-idle { display: none; }
.gl-lb[data-state="sending"] .gl-lb-send-busy { display: inline-flex; }
.gl-lb[data-state="sending"] .gl-lb-bar { opacity: 1; }
.gl-lb[data-state="sending"] .gl-lb-bar i { animation: glLbLoad 1.2s cubic-bezier(.3,.7,.2,1) both; }

.gl-lb[data-state="done"] .gl-lb-dark { -webkit-clip-path: inset(0 0 0 0); clip-path: inset(0 0 0 0); }
.gl-lb[data-state="done"] .gl-lb-lead { opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility 0s linear .22s; }
.gl-lb[data-state="done"] .gl-lb-form { visibility: hidden; transition: visibility 0s linear .8s; }
.gl-lb[data-state="done"] .gl-lb-done { display: flex; }
.gl-lb[data-state="done"] .gl-lb-glow { animation: glLbFade 1.4s ease .55s both; }
.gl-lb[data-state="done"] .gl-lb-glow2 { animation: glLbFade 1s ease 1.1s both; }
.gl-lb[data-state="done"] .gl-lb-halo { animation: glLbFade .6s ease .5s both; }
.gl-lb[data-state="done"] .gl-lb-ring { animation: glLbDraw .8s cubic-bezier(.65,0,.35,1) .6s both; }
.gl-lb[data-state="done"] .gl-lb-tick { animation: glLbDraw .5s cubic-bezier(.65,0,.35,1) 1.2s both; }
.gl-lb[data-state="done"] .gl-lb-done-h { animation: glLbRise .7s cubic-bezier(.22,1,.36,1) .9s both; }
.gl-lb[data-state="done"] .gl-lb-done-p { animation: glLbRise .7s cubic-bezier(.22,1,.36,1) 1.05s both; }
.gl-lb[data-state="done"] .gl-lb-done .gl-lb-light { animation: glLbRise .7s cubic-bezier(.22,1,.36,1) 1.25s both; }
.gl-lb[data-state="done"] .gl-lb-x { background: rgba(255,255,255,.1); color: #ffffff; }
.gl-lb[data-state="done"] .gl-lb-x:hover { background: rgba(255,255,255,.18); }
.gl-lb[data-state="done"] .gl-lb-x:focus-visible { outline-color: #eab89b; }

.gl-lb.is-closing .gl-lb-veil { animation: glLbFadeOut .28s ease both; }
.gl-lb.is-closing .gl-lb-dlg { animation: glLbOut .28s ease both; }

/* Breit: zweigeteilter Dialog */
@media (min-width: 980px) and (min-height: 700px) {
  .gl-lb-dlg { width: min(1040px, calc(100vw - 64px)); height: auto; min-height: min(640px, calc(100vh - 48px)); max-height: calc(100vh - 48px); border-radius: 28px; display: grid; grid-template-columns: 400px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); box-shadow: 0 50px 120px -40px rgba(8,14,20,.6), 0 18px 40px -18px rgba(8,14,20,.35); animation: glLbDlgIn .65s cubic-bezier(.22,1,.36,1) .05s both; }
  .gl-lb-dark { -webkit-clip-path: inset(0 calc(100% - 400px) 0 0); clip-path: inset(0 calc(100% - 400px) 0 0); }
  .gl-lb-lead { grid-column: 1; grid-row: 1; padding: 56px 48px 44px; display: flex; flex-direction: column; justify-content: space-between; }
  .gl-lb-form { grid-column: 2; grid-row: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 56px 56px 44px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
  .gl-lb-lead { min-height: 0; overflow-y: auto; }
  .gl-lb-grid { grid-template-columns: 1fr 1fr; }
  .gl-lb-bar { left: 400px; right: 0; top: 0; }
  .gl-lb-x { right: 20px; top: 20px; width: 40px; height: 40px; background: var(--gl-surface); color: var(--gl-primary); }
  .gl-lb-x:hover { background: #dde6ee; }
}

/* Schmal oder niedrig: Sheet von unten, dunkler Kopf */
@media (max-width: 979px), (max-height: 699px) {
  .gl-lb { align-items: flex-end; }
  .gl-lb-dlg { width: 100%; max-width: 640px; height: calc(100% - 10px); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; box-shadow: 0 -12px 40px rgba(8,14,20,.28); animation: glLbSheetIn .6s cubic-bezier(.22,1,.36,1) .05s both; }
  .gl-lb-dark { -webkit-clip-path: inset(0 0 calc(100% - 96px) 0); clip-path: inset(0 0 calc(100% - 96px) 0); }
  .gl-lb-lead { flex: 0 0 96px; padding: 26px 72px 0 20px; }
  .gl-lb-grip { display: block; position: absolute; left: calc(50% - 18px); top: 8px; width: 36px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.28); }
  .gl-lb-lead-top { gap: 6px; }
  .gl-lb-kicker, .gl-lb-sub, .gl-lb-list, .gl-lb-h-long { display: none; }
  .gl-lb-h-short { display: inline; }
  .gl-lb-h { font-size: clamp(18px, 5.9vw, 24px); line-height: 28px; white-space: nowrap; }
  .gl-lb-note { display: flex; }
  .gl-lb-form { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .gl-lb-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 18px 20px; }
  .gl-lb-fields { gap: 16px; }
  .gl-lb-grid { grid-template-columns: 1fr; gap: 12px; }
  .gl-lb-field { gap: 6px; }
  .gl-lb-in { font-size: 16px; }
  .gl-lb-area { height: 88px; }
  .gl-lb-pill { padding: 0 14px; }
  .gl-lb-foot { flex: 0 0 auto; align-items: stretch; gap: 8px; padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(38,43,44,.08); background: #ffffff; }
  .gl-lb-send { width: 100%; font-size: 16px; }
  .gl-lb-privacy { font-size: 12px; line-height: 17px; text-align: center; }
  .gl-lb-bar { left: 0; right: 0; top: 96px; }
  .gl-lb-x { right: 14px; top: 22px; width: 44px; height: 44px; background: rgba(255,255,255,.1); color: #ffffff; }
  .gl-lb-x:focus-visible { outline-color: #eab89b; }
  .gl-lb-done { gap: 26px; padding: 0 20px calc(110px + env(safe-area-inset-bottom, 0px)); }
  .gl-lb-done .gl-lb-light { position: absolute; left: 20px; right: 20px; bottom: calc(34px + env(safe-area-inset-bottom, 0px)); font-size: 16px; }
  .gl-lb-check { width: 100px; height: 100px; }
  .gl-lb-glow { left: calc(50% - 350px); top: -60px; width: 700px; height: 620px; }
  .gl-lb-glow2 { left: calc(50% - 100px); top: 30%; width: 200px; height: 200px; }
  .gl-lb-done-h { font-size: 40px; line-height: 1.05; }
  .gl-lb-done-p { font-size: 15px; }
}

/* Sehr niedrig (Handy quer, starker Zoom): alles in einem Stück scrollen, Kopf kleiner */
@media (max-height: 560px) {
  .gl-lb-lead { flex-basis: 64px; padding-top: 18px; }
  .gl-lb-note { display: none; }
  .gl-lb-dark { -webkit-clip-path: inset(0 0 calc(100% - 64px) 0); clip-path: inset(0 0 calc(100% - 64px) 0); }
  .gl-lb-bar { top: 64px; }
  .gl-lb-x { top: 10px; }
  .gl-lb-form { overflow-y: auto; overscroll-behavior: contain; }
  .gl-lb-scroll { flex: none; overflow: visible; }
  .gl-lb-foot { flex: none; }
}

.gl-lb-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.gl-lb[data-state="sending"] .gl-lb-x { opacity: .5; cursor: progress; }

@keyframes glLbSpin { to { transform: rotate(360deg); } }
@keyframes glLbFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes glLbFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes glLbDlgIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes glLbSheetIn { from { transform: translateY(100%); } to { transform: none; } }
@keyframes glLbOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(12px) scale(.985); } }
@keyframes glLbRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes glLbLoad { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes glLbDraw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .gl-lb *, .gl-lb { animation: none !important; transition: none !important; }
  .gl-lb-spin { animation: glLbSpin 2.4s linear infinite !important; }
}
