/* Erstgespräch dialog and contact card action */
.kontakt-open-meeting {
  min-height: 52px;
  margin-top: 22px;
  padding: 15px 28px;
  font-size: 15px;
}

.meeting-dialog {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  box-sizing: border-box;
  padding: 16px;
  overflow-y: auto;
  background: rgba(22, 18, 68, .62);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.meeting-dialog[hidden] { display: none; }
.meeting-dialog.is-open { display: grid; }
.meeting-dialog__panel {
  box-sizing: border-box;
  width: min(640px, calc(100vw - 32px));
  max-width: none;
  max-height: min(90vh, 860px);
  padding: clamp(24px, 4vw, 38px);
  overflow-y: auto;
  border: 0;
  border-radius: 26px;
  background: #fff;
  color: var(--fg-1, #0A0A0A);
  box-shadow: 0 28px 90px rgba(13, 10, 46, .32);
}
.meeting-dialog-open { overflow: hidden; }
.meeting-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.meeting-dialog__header .kontakt-primary-eyebrow { font-size: 11px; }
.meeting-dialog__header h2 {
  margin: 12px 0 0;
  font-size: clamp(27px, 5vw, 38px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: .98;
  text-transform: uppercase;
}
.meeting-dialog__close {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  margin: -6px -6px 0 0;
  border: 0;
  border-radius: 50%;
  background: #f0efff;
  color: var(--bg-capri, #483CFF);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.meeting-dialog__close:hover { background: #e4e1ff; }
.meeting-dialog__intro {
  margin: 14px 0 0;
  color: var(--fg-2, #575757);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
}

.meeting-dialog .kontakt-request-form { width: 100%; margin-top: 22px; }
.meeting-dialog .kontakt-request-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.meeting-dialog .kontakt-request-field {
  display: block;
  min-width: 0;
  color: var(--fg-2, #575757);
  font-size: 12px;
  font-weight: 600;
}
.meeting-dialog .kontakt-request-field > span { display: block; margin-bottom: 6px; }
.meeting-dialog .kontakt-request-field input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid rgba(20,20,40,.18);
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: var(--fg-1, #0A0A0A);
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  transition: border-color .18s, box-shadow .18s;
}
.meeting-dialog .kontakt-request-field input:focus {
  border-color: var(--bg-capri, #483CFF);
  box-shadow: 0 0 0 3px rgba(72,60,255,.12);
}
.meeting-dialog .kontakt-request-privacy {
  margin: 14px 0 0;
  color: var(--fg-3, #888);
  font-size: 12px;
  line-height: 1.5;
}
.meeting-dialog .kontakt-request-privacy a { color: var(--bg-capri, #483CFF); text-decoration: underline; }
.meeting-dialog .kontakt-request-form > button[type="submit"] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin-top: 18px;
  padding: 14px 18px;
  border: 0;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
}
.meeting-dialog .kontakt-request-form > button:disabled { cursor: wait; opacity: .7; }
.meeting-dialog .kontakt-request-status {
  margin: 12px 0 0;
  color: var(--fg-2, #575757);
  font-size: 13px;
  line-height: 1.45;
}
.meeting-dialog .kontakt-request-status[hidden] { display: none; }
.meeting-dialog .kontakt-request-status.is-success { color: #167348; }
.meeting-dialog .kontakt-request-status.is-error { color: #b42318; }

#kontakt .kontakt-primary-portrait { width: 35%; max-height: 320px; }

@media (max-width: 767px) {
  #kontakt .kontakt-primary-portrait {
    width: min(calc(100% + var(--kontakt-primary-pad)), 260px);
    max-height: 260px;
  }
}
@media (max-width: 520px) {
  .meeting-dialog { padding: 12px; }
  .meeting-dialog__panel { width: calc(100vw - 24px); max-height: 92vh; padding: 24px 20px; border-radius: 22px; }
  .meeting-dialog .kontakt-request-fields { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .meeting-dialog__header { gap: 12px; }
  .meeting-dialog__header .kontakt-primary-eyebrow { font-size: 9px; letter-spacing: .11em; }
}

/* Preserve hidden states despite component display rules. */
.meeting-dialog [hidden] { display: none !important; }
.meeting-dialog .kontakt-request-field--wide { grid-column: 1 / -1; }
.meeting-dialog__success { padding: 12px 0 8px; text-align: center; }
.meeting-dialog__success:focus { outline: none; }
.meeting-dialog__success img { width: 48px; height: 48px; object-fit: contain; margin-inline: auto; }
.meeting-dialog__success h2 { margin: 22px 0 10px; font-size: clamp(27px, 5vw, 36px); line-height: 1.15; letter-spacing: -.035em; }
.meeting-dialog__success p { margin: 0 0 28px; color: var(--fg-2, #575757); font-size: 15px; font-weight: 300; line-height: 1.5; }
.meeting-dialog__success button { border: 0; cursor: pointer; }
.meeting-dialog__header:has(> div[hidden]) { justify-content: flex-end; }

/* Newsletter opt-in */
.newsletter-content { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.newsletter-intro {
  flex: 1;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  opacity: .9;
}
.newsletter-form { display: flex; flex-direction: column; gap: 11px; margin-top: 18px; }
.newsletter-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.newsletter-field { display: block; min-width: 0; font-size: 12px; font-weight: 600; }
.newsletter-field > span { display: block; margin-bottom: 5px; }
.newsletter-field input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 12px;
  outline: none;
  background: rgba(255,255,255,.14);
  color: #fff;
  font: inherit;
  font-size: 14px;
}
.newsletter-field input:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.16); }
.newsletter-consent { display: flex; align-items: flex-start; gap: 9px; font-size: 11.5px; font-weight: 300; line-height: 1.45; opacity: .88; }
.newsletter-consent input { flex: 0 0 15px; width: 15px; height: 15px; margin: 2px 0 0; accent-color: #fff; }
.newsletter-consent a { color: #fff; text-decoration: underline; }
.newsletter-submit { width: 100%; padding: 13px 18px; font-size: 14px; }
.newsletter-submit:disabled { cursor: wait; opacity: .7; }
.newsletter-status { margin: 7px 0 0; font-size: 13px; line-height: 1.45; }
.newsletter-status.is-error { color: #ffe2e2; }
.newsletter-status.is-pending,
.newsletter-status.is-success {
  display: flex;
  flex: 1;
  min-height: 180px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 16px 0 0;
  padding: 22px 16px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 18px;
  background: rgba(255,255,255,.09);
  color: #fff;
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  animation: newsletter-success-in 420ms cubic-bezier(.2,.75,.25,1) both;
}
.newsletter-status.is-pending::before,
.newsletter-status.is-success::before {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  background: url("../assets/spark-white.svg") center / contain no-repeat;
  content: "";
}
.newsletter-content.is-pending .newsletter-intro,
.newsletter-content.is-pending .newsletter-form,
.newsletter-content.is-success .newsletter-intro,
.newsletter-content.is-success .newsletter-form { display: none; }
.newsletter-status[hidden] { display: none; }
@keyframes newsletter-success-in {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .newsletter-status.is-pending,
  .newsletter-status.is-success { animation-duration: 1ms; }
}
@media (max-width: 520px) { .newsletter-fields { grid-template-columns: minmax(0, 1fr); } }

@media (min-width: 768px) and (max-width: 1000px) {
  #kontakt .kontakt-secondary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #kontakt .kontakt-secondary-grid > div:nth-child(3) { grid-column: 1 / -1; }
}
