/* BER-LINK Newsletter-Anmeldung: Formular am Seitenende (Startseite, Eventseiten) und Pop-up (nur Startseite).
 * Nutzt die Farben und Knoepfe aus styles.css (--text, --line, .button ...). Eigene Klassen beginnen mit nl-.
 * Keine Schriftdateien, keine Schriftangaben: die Schrift kommt von styles.css. Kleinste Schrift 14 px, Tippflaechen mindestens 44 px.
 * Pop-up: dunkles Fenster mit Kartenfaecher (Variante C), STATISCH - keine Animation, kein Kippen, kein Glanz; nur Einblenden der Deckkraft. */

.nl-section { padding: 30px 0 48px; }
.nl-card {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(19, 138, 138, 0.1), transparent 42%),
    var(--surface);
  box-shadow: var(--shadow-soft);
}
.nl-card .nl-title, .nl-pop-card .nl-title { font-size: clamp(1.5rem, 4.2vw, 2.1rem); line-height: 1.2; margin: 0 0 10px; color: var(--text); }
.nl-card .nl-lead, .nl-pop-card .nl-lead { margin: 0 0 20px; color: var(--text-soft); font-size: 1.02rem; line-height: 1.6; }

.nl-form { margin: 0; }
.nl-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.nl-field { flex: 1 1 260px; min-width: 0; display: grid; gap: 6px; }
.nl-label { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.nl-input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid rgba(25, 42, 65, 0.22);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 1rem; /* 16 px: kein Zoomen beim Antippen auf dem iPhone */
}
.nl-input::placeholder { color: #6b7a90; opacity: 1; }
.nl-input:focus-visible { outline: 3px solid rgba(19, 138, 138, 0.45); outline-offset: 2px; border-color: var(--brand-teal); }
.nl-input[aria-invalid="true"] { border-color: #b02a37; }
.nl-submit { flex: 0 0 auto; align-self: flex-end; min-height: 52px; min-width: 170px; cursor: pointer; font: inherit; font-weight: 700; }
.nl-submit[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

/* Honigtopf: aus dem Blick, nicht per display:none (manche Bots lassen solche Felder aus) */
.nl-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Einwilligung: EIN Haekchen, nie vorangekreuzt. Zeile mindestens 44 px hoch (ganze Zeile ist Tippflaeche). */
.nl-check {
  display: flex; align-items: flex-start; gap: 12px;
  min-height: 44px; margin: 10px 0 0; padding: 10px 0;
  color: var(--text-soft); font-size: 0.875rem; line-height: 1.5; cursor: pointer;
}
.nl-checkbox {
  -webkit-appearance: none; appearance: none;
  flex: none; width: 24px; height: 24px; margin: 1px 0 0; padding: 0;
  display: grid; place-content: center;
  border: 1.5px solid rgba(25, 42, 65, 0.45); border-radius: 7px; background: #fff; cursor: pointer;
}
.nl-checkbox::after {
  content: ""; width: 12px; height: 6px; margin-top: -2px;
  border-left: 3px solid #fff; border-bottom: 3px solid #fff;
  transform: rotate(-45deg); opacity: 0;
}
.nl-checkbox:checked { background: var(--brand-teal); border-color: var(--brand-teal); }
.nl-checkbox:checked::after { opacity: 1; }
.nl-checkbox:focus-visible { outline: 3px solid rgba(19, 138, 138, 0.55); outline-offset: 2px; }
.nl-checkbox[aria-invalid="true"] { border-color: #b02a37; box-shadow: 0 0 0 3px rgba(176, 42, 55, 0.18); }
.nl-check a, .nl-note a { color: var(--brand-indigo); text-decoration: underline; text-underline-offset: 2px; }
.nl-check a { display: inline-block; padding: 12px 2px; margin: -12px -2px; font-weight: 600; } /* Tippflaeche des Links mindestens 44 px hoch, ohne das Zeilenbild zu veraendern */

.nl-card .nl-msg, .nl-pop-card .nl-msg { margin: 14px 0 0; padding: 12px 16px; border-radius: 14px; font-size: 0.95rem; line-height: 1.5; }
.nl-msg[hidden] { display: none; }
.nl-msg-error { background: rgba(176, 42, 55, 0.08); border: 1px solid rgba(176, 42, 55, 0.3); color: #8d1f2c; }

.nl-done { display: grid; gap: 8px; }
.nl-done[hidden], .nl-form[hidden] { display: none; }
.nl-card .nl-done-title, .nl-pop-card .nl-done-title { margin: 0; font-size: 1.25rem; color: #0b5c44; }
.nl-card .nl-done p, .nl-pop-card .nl-done p { margin: 0; color: var(--text-soft); line-height: 1.6; }
.nl-title:focus, .nl-done-title:focus, .nl-pop-card:focus { outline: none; }

/* ---------- Pop-up (Startseite): dunkel, drei Event-Karten im Faecher, alles statisch ---------- */
.nl-pop {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(8, 16, 36, 0.72);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; transition: opacity 200ms ease;
}
.nl-pop[hidden] { display: none; }
.nl-pop.is-on { opacity: 1; }
.nl-pop-card {
  position: relative;
  width: min(100%, 920px);
  max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  overflow-x: hidden; overflow-y: auto;
  margin: auto;
  display: grid; grid-template-columns: 1.15fr 1fr; align-items: center;
  border-radius: 28px;
  background:
    radial-gradient(120% 90% at 0% 0%, #24408f 0, transparent 55%),
    radial-gradient(80% 70% at 100% 100%, rgba(19, 138, 138, 0.4), transparent 60%),
    #0e1a3a;
  color: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}
.nl-pop-card.nl-pop-n0 { width: min(100%, 480px); grid-template-columns: 1fr; }
.nl-pop-close {
  position: absolute; top: 12px; right: 12px; z-index: 4;
  width: 48px; height: 48px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #fff;
  font: inherit; font-size: 2rem; line-height: 1; cursor: pointer;
}
.nl-pop-close:hover { background: rgba(255, 255, 255, 0.26); }
.nl-pop-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Kartenfaecher: feste 3D-Anordnung, KEINE Animation und KEINE Pointer-Reaktion */
.nl-pop-scene {
  position: relative; align-self: stretch; min-height: 500px;
  perspective: 900px; perspective-origin: 50% 40%;
  --u: 1.25px; --cw: 196px; --dx: 100;   /* --u skaliert Tiefe/Hoehe, --dx = seitlicher Versatz der Seitenkarten */
  pointer-events: none;
}
.nl-pop-fan { position: absolute; inset: 0; transform-style: preserve-3d; }
.nl-pop-orb {
  position: absolute; left: 50%; top: 50%; width: 260px; height: 260px; margin: -130px 0 0 -130px;
  border-radius: 50%; background: radial-gradient(circle, rgba(19, 138, 138, 0.55), transparent 65%); filter: blur(10px);
}
.nl-pop-k {
  position: absolute; left: 50%; top: 50%;
  width: var(--cw); height: calc(var(--cw) * 1.34);
  margin: calc(var(--cw) * -0.67) 0 0 calc(var(--cw) * -0.5);
  border-radius: 18px; overflow: hidden;
  background: linear-gradient(160deg, #2b4a9d, #138a8a);
  box-shadow: 0 30px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.18);
  transform-style: preserve-3d;
}
.nl-pop-k::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 55%, rgba(8, 16, 36, 0.7)); }
.nl-pop-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.nl-pop-chip {
  position: absolute; left: 10px; bottom: 10px; z-index: 2;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 0.875rem; font-weight: 700; letter-spacing: 0.02em; color: #fff; white-space: nowrap;
}
.nl-pop-k2 .nl-pop-chip { left: auto; right: 10px; } /* Chip der rechten Karte rechts, sonst verdeckt ihn die vordere Karte */
.nl-pop-k0 { transform: translate3d(0, 0, calc(80 * var(--u))) rotateZ(-2deg); }
.nl-pop-k1 { transform: translate3d(calc(var(--dx) * var(--u) * -1), calc(14 * var(--u)), calc(-20 * var(--u))) rotateY(26deg) rotateZ(-7deg); }
.nl-pop-k2 { transform: translate3d(calc(var(--dx) * var(--u)), calc(30 * var(--u)), calc(-60 * var(--u))) rotateY(-26deg) rotateZ(6deg); }
.nl-pop-n2 .nl-pop-k0 { transform: translate3d(calc(var(--dx) * var(--u) * 0.35), 0, calc(80 * var(--u))) rotateZ(-2deg); }
.nl-pop-n2 .nl-pop-k1 { transform: translate3d(calc(var(--dx) * var(--u) * -0.67), calc(14 * var(--u)), calc(-20 * var(--u))) rotateY(26deg) rotateZ(-7deg); }

.nl-pop-in { padding: 64px 40px 34px 8px; }
.nl-pop-n0 .nl-pop-in { padding: 56px 36px 30px; }
.nl-pop-card .nl-title { margin: 0; padding-right: 0; font-size: 38px; line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; color: #fff; }
.nl-pop-card .nl-lead { margin: 12px 0 22px; color: #b9c7e4; font-size: 1.0625rem; line-height: 1.4; }
.nl-pop-card .nl-row { flex-direction: column; flex-wrap: nowrap; gap: 10px; }
.nl-pop-card .nl-field { flex: 0 0 auto; }
.nl-pop-card .nl-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nl-pop-card .nl-input { min-height: 56px; border-color: transparent; background: rgba(255, 255, 255, 0.96); }
.nl-pop-card .nl-input:focus-visible { outline-color: #fff; border-color: #fff; }
.nl-pop-card .nl-submit.button { width: 100%; align-self: stretch; min-height: 56px; border: 0; border-radius: 999px; background: #fff; color: #0e1a3a; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }
.nl-pop-card .nl-submit.button:hover, .nl-pop-card .nl-submit.button:active, .nl-pop-card .nl-submit.button:focus { background: #fff; transform: none; box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45); }
.nl-pop-card .nl-submit.button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.nl-pop-card .nl-check { color: #b9c7e4; margin-top: 6px; }
.nl-pop-card .nl-check a { color: #fff; }
.nl-pop-card .nl-checkbox { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.6); }
.nl-pop-card .nl-checkbox:checked { background: #138a8a; border-color: #fff; }
.nl-pop-card .nl-checkbox:focus-visible { outline-color: #fff; }
.nl-pop-card .nl-checkbox[aria-invalid="true"] { border-color: #ff9aa5; box-shadow: 0 0 0 3px rgba(255, 154, 165, 0.3); }
.nl-pop-card .nl-msg-error { margin-top: 8px; padding: 10px 14px; background: rgba(255, 154, 165, 0.12); border-color: rgba(255, 154, 165, 0.45); color: #ffc1c8; }
.nl-pop-card .nl-done-title { color: #fff; font-size: 1.5rem; }
.nl-pop-card .nl-done p { color: #b9c7e4; }
.nl-pop-open { overflow: hidden; }

@media (max-width: 860px) {
  .nl-pop-card, .nl-pop-card.nl-pop-n0 { width: min(100%, 600px); grid-template-columns: 1fr; }
  .nl-pop-scene { min-height: 380px; --u: 1.1px; --cw: 184px; --dx: 100; }
  .nl-pop-in, .nl-pop-n0 .nl-pop-in { padding: 0 36px 32px; }
  .nl-pop-n0 .nl-pop-in { padding-top: 56px; }
}
@media (max-width: 640px) {
  .nl-section { padding: 24px 0 36px; }
  .nl-card { padding: 24px 18px; border-radius: var(--radius-md); }
  .nl-row { flex-direction: column; }
  .nl-field { flex: 0 0 auto; }
  .nl-submit { width: 100%; align-self: stretch; }
}
@media (max-width: 540px) {
  .nl-pop { padding: 12px; }
  .nl-pop-card, .nl-pop-card.nl-pop-n0 { width: 100%; border-radius: 24px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .nl-pop-close { width: 52px; height: 52px; top: 10px; right: 10px; font-size: 2.1rem; }
  .nl-pop-scene { min-height: 312px; --u: 1px; --cw: 162px; --dx: 90; }
  .nl-pop-k { border-radius: 14px; }
  .nl-pop-chip { left: 8px; bottom: 8px; padding: 3px 8px; }
  .nl-pop-k2 .nl-pop-chip { left: auto; right: 8px; }
  .nl-pop-in, .nl-pop-n0 .nl-pop-in { padding: 0 22px 24px; }
  .nl-pop-n0 .nl-pop-in { padding-top: 60px; }
  .nl-pop-card .nl-title { font-size: 32px; }
  .nl-pop-card .nl-lead { margin: 10px 0 18px; font-size: 1rem; }
}

@media (max-width: 380px) {
  .nl-pop-scene { min-height: 280px; --cw: 146px; --dx: 80; }
}

@media (prefers-reduced-motion: reduce) {
  .nl-pop { transition: none; }
}
