/* Contact overlay — shared across project pages */
.contact-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1200;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.contact-overlay.is-open {
  display: flex;
}

.contact-overlay .contact-panel {
  width: 100%;
  max-width: 720px;
  padding: 2.5rem 2.25rem 2.25rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.25);
  position: relative;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
}

@supports not (height: 100dvh) {
  .contact-overlay .contact-panel {
    max-height: calc(100vh - 2rem);
  }
}

.contact-panel .section-title {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted, #6b7280);
  margin-bottom: 0.5rem;
}

.contact-panel .section-heading {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  color: var(--text-primary, #1a1a1a);
}

.contact-panel-desc {
  font-size: 0.95rem;
  color: var(--text-secondary, #4a4a4a);
  margin-bottom: 1.5rem;
  max-width: 560px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.contact-label {
  font-size: 0.85rem;
  color: var(--text-secondary, #4a4a4a);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-input {
  border-radius: 10px;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  outline: 0;
  background: #fff;
}

.contact-input:focus {
  border-color: rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.contact-textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.contact-submit {
  font-size: 14px;
  font-weight: 500;
  color: #000;
  background: var(--cta-green, #ebffb1);
  border: 1px solid var(--cta-border, #ade900);
  border-radius: 70px;
  padding: 0 16px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}

.contact-submit:hover {
  background: var(--cta-green-hover, #e0fe92);
}

.contact-close-top {
  position: absolute;
  top: 1.2rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #0f172a;
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.contact-close-top:hover {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.16);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.contact-close-top svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 768px) {
  .contact-overlay {
    align-items: flex-start;
    padding: 0.75rem;
  }

  .contact-overlay .contact-panel {
    max-height: calc(100dvh - 1.5rem);
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 1rem;
  }

  @supports not (height: 100dvh) {
    .contact-overlay .contact-panel {
      max-height: calc(100vh - 1.5rem);
    }
  }
}
