/* KLYNE modals — Contact Us + Legal (standalone, with motion) */
:root {
  --klyne-text: #f4f4f5;
  --klyne-muted: #9a9aa3;
  --klyne-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --klyne-font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --klyne-font-body: "Figtree", "Segoe UI", sans-serif;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  font-family: var(--klyne-font-body);
  color: var(--klyne-text);
}
.contact-modal[hidden] { display: none; }

.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.contact-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: min(88vh, 720px);
  padding: 1.75rem 1.6rem 1.5rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(165deg, rgba(28, 28, 32, 0.98), rgba(12, 12, 14, 0.98));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  animation: contactIn 0.28s var(--klyne-ease);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.contact-modal--wide .contact-modal__panel { width: min(100%, 560px); }

.contact-modal__meta {
  color: var(--klyne-muted);
  font-size: 0.78rem;
  margin: -0.25rem 0 0.85rem;
}
.contact-modal__body {
  overflow: auto;
  flex: 1 1 auto;
  margin-bottom: 1.15rem;
  padding-right: 0.35rem;
  color: rgba(244, 244, 245, 0.82);
  font-size: 0.9rem;
  line-height: 1.65;
}
.contact-modal__body h3 {
  font-family: var(--klyne-font-display);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--klyne-text);
  margin: 1.15rem 0 0.4rem;
}
.contact-modal__body h3:first-child { margin-top: 0; }
.contact-modal__body p { margin: 0 0 0.65rem; }
.contact-modal__body ul { margin: 0 0 0.75rem; padding-left: 1.15rem; }
.contact-modal__body li { margin-bottom: 0.35rem; }
.contact-modal__body a {
  color: #c8cae8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@keyframes contactIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .contact-modal__panel { animation: none; }
}

.contact-modal__x {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: rgba(244, 244, 245, 0.7);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.contact-modal__x:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
}
.contact-modal__x svg { width: 16px; height: 16px; }

.contact-modal__panel h2 {
  font-family: var(--klyne-font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 2rem 0.65rem 0;
}

.contact-modal__lead {
  color: var(--klyne-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.contact-modal__email {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  margin-bottom: 1.15rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s;
}
.contact-modal__email:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.07);
}
.contact-modal__email-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--klyne-muted);
}
.contact-modal__email strong {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--klyne-text);
  letter-spacing: -0.01em;
}

.contact-modal .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.25s var(--klyne-ease), background 0.25s, border-color 0.25s, color 0.25s;
}
.contact-modal .btn:hover { transform: translateY(-1px); }
.contact-modal .btn--ghost {
  background: transparent;
  color: var(--klyne-text);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.contact-modal .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.28);
}
.contact-modal__close { width: 100%; }
