/* ==========================================================================
   Inquiry modal — quick "Message Gabriel" dialog opened from every Let's talk CTA.
   Posts to the same first-party endpoint as the contact section form.
   ========================================================================== */

.inquiry {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}

.inquiry::backdrop {
  background: rgba(8, 11, 10, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.inquiry[open] { animation: inquiry-in 0.38s var(--ease) both; }
.inquiry[open]::backdrop { animation: inquiry-fade 0.3s ease both; }
.inquiry.is-closing { animation: inquiry-out 0.22s ease both; }
.inquiry.is-closing::backdrop { animation: inquiry-fade 0.22s ease reverse both; }

@keyframes inquiry-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
@keyframes inquiry-out {
  to { opacity: 0; transform: translateY(10px) scale(0.98); }
}
@keyframes inquiry-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.inquiry__panel {
  position: relative;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(24px, 4vw, 36px);
  border-radius: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 40px 90px -20px rgba(8, 11, 10, 0.45);
}

.inquiry__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--paper-tint);
  color: var(--gray-600);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.inquiry__close:hover { background: var(--line); color: var(--ink); transform: rotate(90deg); }
.inquiry__close:focus-visible { outline: 2px solid var(--green-deep); outline-offset: 2px; }

.inquiry__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 44px;
}

.inquiry__avatar {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 12%;
  background: linear-gradient(160deg, #1b2a4a, #0b1324);
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line);
}

.inquiry__eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 2px;
  font-size: 0.75rem;
  color: var(--gray-500);
}

.inquiry__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.inquiry__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.inquiry__title:focus { outline: none; }

.inquiry__desc {
  margin: 14px 0 22px;
  color: var(--gray-600);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.inquiry__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.inquiry__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.inquiry__optional {
  text-transform: none;
  letter-spacing: 0;
  color: var(--gray-500);
  opacity: 0.8;
}

.inquiry__submit[disabled] { opacity: 0.7; cursor: progress; transform: none; }

.inquiry__success {
  padding: 12px 0 4px;
  text-align: center;
}
.inquiry__success .inquiry__desc { margin: 10px auto 8px; max-width: 34ch; }

.inquiry__check {
  display: inline-grid;
  place-items: center;
  margin-bottom: 14px;
  color: var(--green-deep);
}
.inquiry__check circle { stroke-dasharray: 152; stroke-dashoffset: 152; animation: inquiry-draw 0.6s var(--ease) forwards; }
.inquiry__check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: inquiry-draw 0.4s 0.45s var(--ease) forwards; }
@keyframes inquiry-draw { to { stroke-dashoffset: 0; } }

.inquiry__ref {
  margin: 0 0 22px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--gray-500);
}

.contact__open-modal { margin-top: 18px; }

html.inquiry-lock { overflow: hidden; }

@media (max-width: 600px) {
  .inquiry {
    width: 100vw;
    max-width: 100vw;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
  }
  .inquiry__panel {
    max-height: 92dvh;
    border-radius: 24px 24px 0 0;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
  .inquiry__row { grid-template-columns: 1fr; }
  @keyframes inquiry-in {
    from { transform: translateY(100%); }
    to { transform: none; }
  }
  @keyframes inquiry-out {
    to { transform: translateY(100%); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .inquiry[open], .inquiry[open]::backdrop, .inquiry.is-closing, .inquiry.is-closing::backdrop { animation: none; }
  .inquiry__check circle, .inquiry__check path { animation: none; stroke-dashoffset: 0; }
  .inquiry__close:hover { transform: none; }
}
